generated-configure.sh revision 1341:6fcde8f7bf77
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# This line needs to be here, verbatim, after all includes and the dummy hook
4391# definitions. It is replaced with custom functionality when building
4392# custom sources.
4393#CUSTOM_AUTOCONF_INCLUDE
4394
4395# Do not change or remove the following line, it is needed for consistency checks:
4396DATE_WHEN_GENERATED=1424872060
4397
4398###############################################################################
4399#
4400# Initialization / Boot-strapping
4401#
4402# The bootstrapping process needs to solve the "chicken or the egg" problem,
4403# thus it jumps back and forth, each time gaining something needed later on.
4404#
4405###############################################################################
4406
4407# If we are requested to print additional help, do that and then exit.
4408# This must be the very first call.
4409
4410  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4411    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4412    $PRINTF "Which are valid to use depends on the build platform.\n"
4413    for toolchain in $VALID_TOOLCHAINS_all; do
4414      # Use indirect variable referencing
4415      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4416      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4417      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4418    done
4419
4420    # And now exit directly
4421    exit 0
4422  fi
4423
4424
4425# Basic initialization that must happen first of all in the normal process.
4426
4427  # Save the original command line. This is passed to us by the wrapper configure script.
4428
4429  # Save the path variable before it gets changed
4430  ORIGINAL_PATH="$PATH"
4431
4432  DATE_WHEN_CONFIGURED=`LANG=C date`
4433
4434  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4435$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4436  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4437$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4438
4439
4440  # Start with tools that do not need have cross compilation support
4441  # and can be expected to be found in the default PATH. These tools are
4442  # used by configure. Nor are these tools expected to be found in the
4443  # devkit from the builddeps server either, since they are
4444  # needed to download the devkit.
4445
4446  # First are all the simple required tools.
4447
4448
4449
4450  # Publish this variable in the help.
4451
4452
4453  if test "x$BASENAME" = x; then
4454    # The variable is not set by user, try to locate tool using the code snippet
4455    for ac_prog in basename
4456do
4457  # Extract the first word of "$ac_prog", so it can be a program name with args.
4458set dummy $ac_prog; ac_word=$2
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4460$as_echo_n "checking for $ac_word... " >&6; }
4461if ${ac_cv_path_BASENAME+:} false; then :
4462  $as_echo_n "(cached) " >&6
4463else
4464  case $BASENAME in
4465  [\\/]* | ?:[\\/]*)
4466  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4467  ;;
4468  *)
4469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4470for as_dir in $PATH
4471do
4472  IFS=$as_save_IFS
4473  test -z "$as_dir" && as_dir=.
4474    for ac_exec_ext in '' $ac_executable_extensions; do
4475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4476    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4478    break 2
4479  fi
4480done
4481  done
4482IFS=$as_save_IFS
4483
4484  ;;
4485esac
4486fi
4487BASENAME=$ac_cv_path_BASENAME
4488if test -n "$BASENAME"; then
4489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4490$as_echo "$BASENAME" >&6; }
4491else
4492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4493$as_echo "no" >&6; }
4494fi
4495
4496
4497  test -n "$BASENAME" && break
4498done
4499
4500  else
4501    # The variable is set, but is it from the command line or the environment?
4502
4503    # Try to remove the string !BASENAME! from our list.
4504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4506      # If it failed, the variable was not from the command line. Ignore it,
4507      # but warn the user (except for BASH, which is always set by the calling BASH).
4508      if test "xBASENAME" != xBASH; then
4509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4510$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4511      fi
4512      # Try to locate tool using the code snippet
4513      for ac_prog in basename
4514do
4515  # Extract the first word of "$ac_prog", so it can be a program name with args.
4516set dummy $ac_prog; ac_word=$2
4517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4518$as_echo_n "checking for $ac_word... " >&6; }
4519if ${ac_cv_path_BASENAME+:} false; then :
4520  $as_echo_n "(cached) " >&6
4521else
4522  case $BASENAME in
4523  [\\/]* | ?:[\\/]*)
4524  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4525  ;;
4526  *)
4527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4528for as_dir in $PATH
4529do
4530  IFS=$as_save_IFS
4531  test -z "$as_dir" && as_dir=.
4532    for ac_exec_ext in '' $ac_executable_extensions; do
4533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4534    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4536    break 2
4537  fi
4538done
4539  done
4540IFS=$as_save_IFS
4541
4542  ;;
4543esac
4544fi
4545BASENAME=$ac_cv_path_BASENAME
4546if test -n "$BASENAME"; then
4547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4548$as_echo "$BASENAME" >&6; }
4549else
4550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4551$as_echo "no" >&6; }
4552fi
4553
4554
4555  test -n "$BASENAME" && break
4556done
4557
4558    else
4559      # If it succeeded, then it was overridden by the user. We will use it
4560      # for the tool.
4561
4562      # First remove it from the list of overridden variables, so we can test
4563      # for unknown variables in the end.
4564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4565
4566      # Check if the provided tool contains a complete path.
4567      tool_specified="$BASENAME"
4568      tool_basename="${tool_specified##*/}"
4569      if test "x$tool_basename" = "x$tool_specified"; then
4570        # A command without a complete path is provided, search $PATH.
4571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4572$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4573        # Extract the first word of "$tool_basename", so it can be a program name with args.
4574set dummy $tool_basename; ac_word=$2
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4576$as_echo_n "checking for $ac_word... " >&6; }
4577if ${ac_cv_path_BASENAME+:} false; then :
4578  $as_echo_n "(cached) " >&6
4579else
4580  case $BASENAME in
4581  [\\/]* | ?:[\\/]*)
4582  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4583  ;;
4584  *)
4585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586for as_dir in $PATH
4587do
4588  IFS=$as_save_IFS
4589  test -z "$as_dir" && as_dir=.
4590    for ac_exec_ext in '' $ac_executable_extensions; do
4591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4592    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4594    break 2
4595  fi
4596done
4597  done
4598IFS=$as_save_IFS
4599
4600  ;;
4601esac
4602fi
4603BASENAME=$ac_cv_path_BASENAME
4604if test -n "$BASENAME"; then
4605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4606$as_echo "$BASENAME" >&6; }
4607else
4608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4609$as_echo "no" >&6; }
4610fi
4611
4612
4613        if test "x$BASENAME" = x; then
4614          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4615        fi
4616      else
4617        # Otherwise we believe it is a complete path. Use it as it is.
4618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4619$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4621$as_echo_n "checking for BASENAME... " >&6; }
4622        if test ! -x "$tool_specified"; then
4623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4624$as_echo "not found" >&6; }
4625          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4626        fi
4627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4628$as_echo "$tool_specified" >&6; }
4629      fi
4630    fi
4631  fi
4632
4633
4634
4635  if test "x$BASENAME" = x; then
4636    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4637  fi
4638
4639
4640
4641
4642
4643  # Publish this variable in the help.
4644
4645
4646  if test "x$BASH" = x; then
4647    # The variable is not set by user, try to locate tool using the code snippet
4648    for ac_prog in bash
4649do
4650  # Extract the first word of "$ac_prog", so it can be a program name with args.
4651set dummy $ac_prog; ac_word=$2
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653$as_echo_n "checking for $ac_word... " >&6; }
4654if ${ac_cv_path_BASH+:} false; then :
4655  $as_echo_n "(cached) " >&6
4656else
4657  case $BASH in
4658  [\\/]* | ?:[\\/]*)
4659  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4660  ;;
4661  *)
4662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4663for as_dir in $PATH
4664do
4665  IFS=$as_save_IFS
4666  test -z "$as_dir" && as_dir=.
4667    for ac_exec_ext in '' $ac_executable_extensions; do
4668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4669    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4671    break 2
4672  fi
4673done
4674  done
4675IFS=$as_save_IFS
4676
4677  ;;
4678esac
4679fi
4680BASH=$ac_cv_path_BASH
4681if test -n "$BASH"; then
4682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4683$as_echo "$BASH" >&6; }
4684else
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686$as_echo "no" >&6; }
4687fi
4688
4689
4690  test -n "$BASH" && break
4691done
4692
4693  else
4694    # The variable is set, but is it from the command line or the environment?
4695
4696    # Try to remove the string !BASH! from our list.
4697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4699      # If it failed, the variable was not from the command line. Ignore it,
4700      # but warn the user (except for BASH, which is always set by the calling BASH).
4701      if test "xBASH" != xBASH; then
4702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4703$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4704      fi
4705      # Try to locate tool using the code snippet
4706      for ac_prog in bash
4707do
4708  # Extract the first word of "$ac_prog", so it can be a program name with args.
4709set dummy $ac_prog; ac_word=$2
4710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711$as_echo_n "checking for $ac_word... " >&6; }
4712if ${ac_cv_path_BASH+:} false; then :
4713  $as_echo_n "(cached) " >&6
4714else
4715  case $BASH in
4716  [\\/]* | ?:[\\/]*)
4717  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4718  ;;
4719  *)
4720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721for as_dir in $PATH
4722do
4723  IFS=$as_save_IFS
4724  test -z "$as_dir" && as_dir=.
4725    for ac_exec_ext in '' $ac_executable_extensions; do
4726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4727    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729    break 2
4730  fi
4731done
4732  done
4733IFS=$as_save_IFS
4734
4735  ;;
4736esac
4737fi
4738BASH=$ac_cv_path_BASH
4739if test -n "$BASH"; then
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4741$as_echo "$BASH" >&6; }
4742else
4743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744$as_echo "no" >&6; }
4745fi
4746
4747
4748  test -n "$BASH" && break
4749done
4750
4751    else
4752      # If it succeeded, then it was overridden by the user. We will use it
4753      # for the tool.
4754
4755      # First remove it from the list of overridden variables, so we can test
4756      # for unknown variables in the end.
4757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4758
4759      # Check if the provided tool contains a complete path.
4760      tool_specified="$BASH"
4761      tool_basename="${tool_specified##*/}"
4762      if test "x$tool_basename" = "x$tool_specified"; then
4763        # A command without a complete path is provided, search $PATH.
4764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4765$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4766        # Extract the first word of "$tool_basename", so it can be a program name with args.
4767set dummy $tool_basename; ac_word=$2
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769$as_echo_n "checking for $ac_word... " >&6; }
4770if ${ac_cv_path_BASH+:} false; then :
4771  $as_echo_n "(cached) " >&6
4772else
4773  case $BASH in
4774  [\\/]* | ?:[\\/]*)
4775  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4776  ;;
4777  *)
4778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779for as_dir in $PATH
4780do
4781  IFS=$as_save_IFS
4782  test -z "$as_dir" && as_dir=.
4783    for ac_exec_ext in '' $ac_executable_extensions; do
4784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4785    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4787    break 2
4788  fi
4789done
4790  done
4791IFS=$as_save_IFS
4792
4793  ;;
4794esac
4795fi
4796BASH=$ac_cv_path_BASH
4797if test -n "$BASH"; then
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4799$as_echo "$BASH" >&6; }
4800else
4801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802$as_echo "no" >&6; }
4803fi
4804
4805
4806        if test "x$BASH" = x; then
4807          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4808        fi
4809      else
4810        # Otherwise we believe it is a complete path. Use it as it is.
4811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4812$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4814$as_echo_n "checking for BASH... " >&6; }
4815        if test ! -x "$tool_specified"; then
4816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4817$as_echo "not found" >&6; }
4818          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4819        fi
4820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4821$as_echo "$tool_specified" >&6; }
4822      fi
4823    fi
4824  fi
4825
4826
4827
4828  if test "x$BASH" = x; then
4829    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4830  fi
4831
4832
4833
4834
4835
4836  # Publish this variable in the help.
4837
4838
4839  if test "x$CAT" = x; then
4840    # The variable is not set by user, try to locate tool using the code snippet
4841    for ac_prog in cat
4842do
4843  # Extract the first word of "$ac_prog", so it can be a program name with args.
4844set dummy $ac_prog; ac_word=$2
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4846$as_echo_n "checking for $ac_word... " >&6; }
4847if ${ac_cv_path_CAT+:} false; then :
4848  $as_echo_n "(cached) " >&6
4849else
4850  case $CAT in
4851  [\\/]* | ?:[\\/]*)
4852  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4853  ;;
4854  *)
4855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856for as_dir in $PATH
4857do
4858  IFS=$as_save_IFS
4859  test -z "$as_dir" && as_dir=.
4860    for ac_exec_ext in '' $ac_executable_extensions; do
4861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4862    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4864    break 2
4865  fi
4866done
4867  done
4868IFS=$as_save_IFS
4869
4870  ;;
4871esac
4872fi
4873CAT=$ac_cv_path_CAT
4874if test -n "$CAT"; then
4875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4876$as_echo "$CAT" >&6; }
4877else
4878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4879$as_echo "no" >&6; }
4880fi
4881
4882
4883  test -n "$CAT" && break
4884done
4885
4886  else
4887    # The variable is set, but is it from the command line or the environment?
4888
4889    # Try to remove the string !CAT! from our list.
4890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4892      # If it failed, the variable was not from the command line. Ignore it,
4893      # but warn the user (except for BASH, which is always set by the calling BASH).
4894      if test "xCAT" != xBASH; then
4895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4896$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4897      fi
4898      # Try to locate tool using the code snippet
4899      for ac_prog in cat
4900do
4901  # Extract the first word of "$ac_prog", so it can be a program name with args.
4902set dummy $ac_prog; ac_word=$2
4903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904$as_echo_n "checking for $ac_word... " >&6; }
4905if ${ac_cv_path_CAT+:} false; then :
4906  $as_echo_n "(cached) " >&6
4907else
4908  case $CAT in
4909  [\\/]* | ?:[\\/]*)
4910  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4911  ;;
4912  *)
4913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in $PATH
4915do
4916  IFS=$as_save_IFS
4917  test -z "$as_dir" && as_dir=.
4918    for ac_exec_ext in '' $ac_executable_extensions; do
4919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4920    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922    break 2
4923  fi
4924done
4925  done
4926IFS=$as_save_IFS
4927
4928  ;;
4929esac
4930fi
4931CAT=$ac_cv_path_CAT
4932if test -n "$CAT"; then
4933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4934$as_echo "$CAT" >&6; }
4935else
4936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937$as_echo "no" >&6; }
4938fi
4939
4940
4941  test -n "$CAT" && break
4942done
4943
4944    else
4945      # If it succeeded, then it was overridden by the user. We will use it
4946      # for the tool.
4947
4948      # First remove it from the list of overridden variables, so we can test
4949      # for unknown variables in the end.
4950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4951
4952      # Check if the provided tool contains a complete path.
4953      tool_specified="$CAT"
4954      tool_basename="${tool_specified##*/}"
4955      if test "x$tool_basename" = "x$tool_specified"; then
4956        # A command without a complete path is provided, search $PATH.
4957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4958$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4959        # Extract the first word of "$tool_basename", so it can be a program name with args.
4960set dummy $tool_basename; ac_word=$2
4961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if ${ac_cv_path_CAT+:} false; then :
4964  $as_echo_n "(cached) " >&6
4965else
4966  case $CAT in
4967  [\\/]* | ?:[\\/]*)
4968  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4969  ;;
4970  *)
4971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972for as_dir in $PATH
4973do
4974  IFS=$as_save_IFS
4975  test -z "$as_dir" && as_dir=.
4976    for ac_exec_ext in '' $ac_executable_extensions; do
4977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980    break 2
4981  fi
4982done
4983  done
4984IFS=$as_save_IFS
4985
4986  ;;
4987esac
4988fi
4989CAT=$ac_cv_path_CAT
4990if test -n "$CAT"; then
4991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4992$as_echo "$CAT" >&6; }
4993else
4994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995$as_echo "no" >&6; }
4996fi
4997
4998
4999        if test "x$CAT" = x; then
5000          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5001        fi
5002      else
5003        # Otherwise we believe it is a complete path. Use it as it is.
5004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5005$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5007$as_echo_n "checking for CAT... " >&6; }
5008        if test ! -x "$tool_specified"; then
5009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5010$as_echo "not found" >&6; }
5011          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5012        fi
5013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5014$as_echo "$tool_specified" >&6; }
5015      fi
5016    fi
5017  fi
5018
5019
5020
5021  if test "x$CAT" = x; then
5022    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5023  fi
5024
5025
5026
5027
5028
5029  # Publish this variable in the help.
5030
5031
5032  if test "x$CHMOD" = x; then
5033    # The variable is not set by user, try to locate tool using the code snippet
5034    for ac_prog in chmod
5035do
5036  # Extract the first word of "$ac_prog", so it can be a program name with args.
5037set dummy $ac_prog; ac_word=$2
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
5040if ${ac_cv_path_CHMOD+:} false; then :
5041  $as_echo_n "(cached) " >&6
5042else
5043  case $CHMOD in
5044  [\\/]* | ?:[\\/]*)
5045  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5046  ;;
5047  *)
5048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in $PATH
5050do
5051  IFS=$as_save_IFS
5052  test -z "$as_dir" && as_dir=.
5053    for ac_exec_ext in '' $ac_executable_extensions; do
5054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057    break 2
5058  fi
5059done
5060  done
5061IFS=$as_save_IFS
5062
5063  ;;
5064esac
5065fi
5066CHMOD=$ac_cv_path_CHMOD
5067if test -n "$CHMOD"; then
5068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5069$as_echo "$CHMOD" >&6; }
5070else
5071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
5073fi
5074
5075
5076  test -n "$CHMOD" && break
5077done
5078
5079  else
5080    # The variable is set, but is it from the command line or the environment?
5081
5082    # Try to remove the string !CHMOD! from our list.
5083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5085      # If it failed, the variable was not from the command line. Ignore it,
5086      # but warn the user (except for BASH, which is always set by the calling BASH).
5087      if test "xCHMOD" != xBASH; then
5088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5089$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5090      fi
5091      # Try to locate tool using the code snippet
5092      for ac_prog in chmod
5093do
5094  # Extract the first word of "$ac_prog", so it can be a program name with args.
5095set dummy $ac_prog; ac_word=$2
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097$as_echo_n "checking for $ac_word... " >&6; }
5098if ${ac_cv_path_CHMOD+:} false; then :
5099  $as_echo_n "(cached) " >&6
5100else
5101  case $CHMOD in
5102  [\\/]* | ?:[\\/]*)
5103  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5104  ;;
5105  *)
5106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107for as_dir in $PATH
5108do
5109  IFS=$as_save_IFS
5110  test -z "$as_dir" && as_dir=.
5111    for ac_exec_ext in '' $ac_executable_extensions; do
5112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115    break 2
5116  fi
5117done
5118  done
5119IFS=$as_save_IFS
5120
5121  ;;
5122esac
5123fi
5124CHMOD=$ac_cv_path_CHMOD
5125if test -n "$CHMOD"; then
5126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5127$as_echo "$CHMOD" >&6; }
5128else
5129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130$as_echo "no" >&6; }
5131fi
5132
5133
5134  test -n "$CHMOD" && break
5135done
5136
5137    else
5138      # If it succeeded, then it was overridden by the user. We will use it
5139      # for the tool.
5140
5141      # First remove it from the list of overridden variables, so we can test
5142      # for unknown variables in the end.
5143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5144
5145      # Check if the provided tool contains a complete path.
5146      tool_specified="$CHMOD"
5147      tool_basename="${tool_specified##*/}"
5148      if test "x$tool_basename" = "x$tool_specified"; then
5149        # A command without a complete path is provided, search $PATH.
5150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5151$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5152        # Extract the first word of "$tool_basename", so it can be a program name with args.
5153set dummy $tool_basename; ac_word=$2
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5155$as_echo_n "checking for $ac_word... " >&6; }
5156if ${ac_cv_path_CHMOD+:} false; then :
5157  $as_echo_n "(cached) " >&6
5158else
5159  case $CHMOD in
5160  [\\/]* | ?:[\\/]*)
5161  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5162  ;;
5163  *)
5164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165for as_dir in $PATH
5166do
5167  IFS=$as_save_IFS
5168  test -z "$as_dir" && as_dir=.
5169    for ac_exec_ext in '' $ac_executable_extensions; do
5170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5171    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5173    break 2
5174  fi
5175done
5176  done
5177IFS=$as_save_IFS
5178
5179  ;;
5180esac
5181fi
5182CHMOD=$ac_cv_path_CHMOD
5183if test -n "$CHMOD"; then
5184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5185$as_echo "$CHMOD" >&6; }
5186else
5187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188$as_echo "no" >&6; }
5189fi
5190
5191
5192        if test "x$CHMOD" = x; then
5193          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5194        fi
5195      else
5196        # Otherwise we believe it is a complete path. Use it as it is.
5197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5198$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5200$as_echo_n "checking for CHMOD... " >&6; }
5201        if test ! -x "$tool_specified"; then
5202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5203$as_echo "not found" >&6; }
5204          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5205        fi
5206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5207$as_echo "$tool_specified" >&6; }
5208      fi
5209    fi
5210  fi
5211
5212
5213
5214  if test "x$CHMOD" = x; then
5215    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5216  fi
5217
5218
5219
5220
5221
5222  # Publish this variable in the help.
5223
5224
5225  if test "x$CMP" = x; then
5226    # The variable is not set by user, try to locate tool using the code snippet
5227    for ac_prog in cmp
5228do
5229  # Extract the first word of "$ac_prog", so it can be a program name with args.
5230set dummy $ac_prog; ac_word=$2
5231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5232$as_echo_n "checking for $ac_word... " >&6; }
5233if ${ac_cv_path_CMP+:} false; then :
5234  $as_echo_n "(cached) " >&6
5235else
5236  case $CMP in
5237  [\\/]* | ?:[\\/]*)
5238  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5239  ;;
5240  *)
5241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5242for as_dir in $PATH
5243do
5244  IFS=$as_save_IFS
5245  test -z "$as_dir" && as_dir=.
5246    for ac_exec_ext in '' $ac_executable_extensions; do
5247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5248    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5250    break 2
5251  fi
5252done
5253  done
5254IFS=$as_save_IFS
5255
5256  ;;
5257esac
5258fi
5259CMP=$ac_cv_path_CMP
5260if test -n "$CMP"; then
5261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5262$as_echo "$CMP" >&6; }
5263else
5264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5265$as_echo "no" >&6; }
5266fi
5267
5268
5269  test -n "$CMP" && break
5270done
5271
5272  else
5273    # The variable is set, but is it from the command line or the environment?
5274
5275    # Try to remove the string !CMP! from our list.
5276    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5277    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5278      # If it failed, the variable was not from the command line. Ignore it,
5279      # but warn the user (except for BASH, which is always set by the calling BASH).
5280      if test "xCMP" != xBASH; then
5281        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5282$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5283      fi
5284      # Try to locate tool using the code snippet
5285      for ac_prog in cmp
5286do
5287  # Extract the first word of "$ac_prog", so it can be a program name with args.
5288set dummy $ac_prog; ac_word=$2
5289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5290$as_echo_n "checking for $ac_word... " >&6; }
5291if ${ac_cv_path_CMP+:} false; then :
5292  $as_echo_n "(cached) " >&6
5293else
5294  case $CMP in
5295  [\\/]* | ?:[\\/]*)
5296  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5297  ;;
5298  *)
5299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5300for as_dir in $PATH
5301do
5302  IFS=$as_save_IFS
5303  test -z "$as_dir" && as_dir=.
5304    for ac_exec_ext in '' $ac_executable_extensions; do
5305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5306    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5308    break 2
5309  fi
5310done
5311  done
5312IFS=$as_save_IFS
5313
5314  ;;
5315esac
5316fi
5317CMP=$ac_cv_path_CMP
5318if test -n "$CMP"; then
5319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5320$as_echo "$CMP" >&6; }
5321else
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323$as_echo "no" >&6; }
5324fi
5325
5326
5327  test -n "$CMP" && break
5328done
5329
5330    else
5331      # If it succeeded, then it was overridden by the user. We will use it
5332      # for the tool.
5333
5334      # First remove it from the list of overridden variables, so we can test
5335      # for unknown variables in the end.
5336      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5337
5338      # Check if the provided tool contains a complete path.
5339      tool_specified="$CMP"
5340      tool_basename="${tool_specified##*/}"
5341      if test "x$tool_basename" = "x$tool_specified"; then
5342        # A command without a complete path is provided, search $PATH.
5343        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5344$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5345        # Extract the first word of "$tool_basename", so it can be a program name with args.
5346set dummy $tool_basename; ac_word=$2
5347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5348$as_echo_n "checking for $ac_word... " >&6; }
5349if ${ac_cv_path_CMP+:} false; then :
5350  $as_echo_n "(cached) " >&6
5351else
5352  case $CMP in
5353  [\\/]* | ?:[\\/]*)
5354  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5355  ;;
5356  *)
5357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358for as_dir in $PATH
5359do
5360  IFS=$as_save_IFS
5361  test -z "$as_dir" && as_dir=.
5362    for ac_exec_ext in '' $ac_executable_extensions; do
5363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5364    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5366    break 2
5367  fi
5368done
5369  done
5370IFS=$as_save_IFS
5371
5372  ;;
5373esac
5374fi
5375CMP=$ac_cv_path_CMP
5376if test -n "$CMP"; then
5377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5378$as_echo "$CMP" >&6; }
5379else
5380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381$as_echo "no" >&6; }
5382fi
5383
5384
5385        if test "x$CMP" = x; then
5386          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5387        fi
5388      else
5389        # Otherwise we believe it is a complete path. Use it as it is.
5390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5391$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5393$as_echo_n "checking for CMP... " >&6; }
5394        if test ! -x "$tool_specified"; then
5395          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5396$as_echo "not found" >&6; }
5397          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5398        fi
5399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5400$as_echo "$tool_specified" >&6; }
5401      fi
5402    fi
5403  fi
5404
5405
5406
5407  if test "x$CMP" = x; then
5408    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5409  fi
5410
5411
5412
5413
5414
5415  # Publish this variable in the help.
5416
5417
5418  if test "x$COMM" = x; then
5419    # The variable is not set by user, try to locate tool using the code snippet
5420    for ac_prog in comm
5421do
5422  # Extract the first word of "$ac_prog", so it can be a program name with args.
5423set dummy $ac_prog; ac_word=$2
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425$as_echo_n "checking for $ac_word... " >&6; }
5426if ${ac_cv_path_COMM+:} false; then :
5427  $as_echo_n "(cached) " >&6
5428else
5429  case $COMM in
5430  [\\/]* | ?:[\\/]*)
5431  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5432  ;;
5433  *)
5434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5435for as_dir in $PATH
5436do
5437  IFS=$as_save_IFS
5438  test -z "$as_dir" && as_dir=.
5439    for ac_exec_ext in '' $ac_executable_extensions; do
5440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5441    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5443    break 2
5444  fi
5445done
5446  done
5447IFS=$as_save_IFS
5448
5449  ;;
5450esac
5451fi
5452COMM=$ac_cv_path_COMM
5453if test -n "$COMM"; then
5454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5455$as_echo "$COMM" >&6; }
5456else
5457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5458$as_echo "no" >&6; }
5459fi
5460
5461
5462  test -n "$COMM" && break
5463done
5464
5465  else
5466    # The variable is set, but is it from the command line or the environment?
5467
5468    # Try to remove the string !COMM! from our list.
5469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5471      # If it failed, the variable was not from the command line. Ignore it,
5472      # but warn the user (except for BASH, which is always set by the calling BASH).
5473      if test "xCOMM" != xBASH; then
5474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5475$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5476      fi
5477      # Try to locate tool using the code snippet
5478      for ac_prog in comm
5479do
5480  # Extract the first word of "$ac_prog", so it can be a program name with args.
5481set dummy $ac_prog; ac_word=$2
5482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5483$as_echo_n "checking for $ac_word... " >&6; }
5484if ${ac_cv_path_COMM+:} false; then :
5485  $as_echo_n "(cached) " >&6
5486else
5487  case $COMM in
5488  [\\/]* | ?:[\\/]*)
5489  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5490  ;;
5491  *)
5492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493for as_dir in $PATH
5494do
5495  IFS=$as_save_IFS
5496  test -z "$as_dir" && as_dir=.
5497    for ac_exec_ext in '' $ac_executable_extensions; do
5498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5499    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5501    break 2
5502  fi
5503done
5504  done
5505IFS=$as_save_IFS
5506
5507  ;;
5508esac
5509fi
5510COMM=$ac_cv_path_COMM
5511if test -n "$COMM"; then
5512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5513$as_echo "$COMM" >&6; }
5514else
5515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5516$as_echo "no" >&6; }
5517fi
5518
5519
5520  test -n "$COMM" && break
5521done
5522
5523    else
5524      # If it succeeded, then it was overridden by the user. We will use it
5525      # for the tool.
5526
5527      # First remove it from the list of overridden variables, so we can test
5528      # for unknown variables in the end.
5529      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5530
5531      # Check if the provided tool contains a complete path.
5532      tool_specified="$COMM"
5533      tool_basename="${tool_specified##*/}"
5534      if test "x$tool_basename" = "x$tool_specified"; then
5535        # A command without a complete path is provided, search $PATH.
5536        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5537$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5538        # Extract the first word of "$tool_basename", so it can be a program name with args.
5539set dummy $tool_basename; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if ${ac_cv_path_COMM+:} false; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $COMM in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5557    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568COMM=$ac_cv_path_COMM
5569if test -n "$COMM"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5571$as_echo "$COMM" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578        if test "x$COMM" = x; then
5579          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5580        fi
5581      else
5582        # Otherwise we believe it is a complete path. Use it as it is.
5583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5584$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5586$as_echo_n "checking for COMM... " >&6; }
5587        if test ! -x "$tool_specified"; then
5588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5589$as_echo "not found" >&6; }
5590          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5591        fi
5592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5593$as_echo "$tool_specified" >&6; }
5594      fi
5595    fi
5596  fi
5597
5598
5599
5600  if test "x$COMM" = x; then
5601    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5602  fi
5603
5604
5605
5606
5607
5608  # Publish this variable in the help.
5609
5610
5611  if test "x$CP" = x; then
5612    # The variable is not set by user, try to locate tool using the code snippet
5613    for ac_prog in cp
5614do
5615  # Extract the first word of "$ac_prog", so it can be a program name with args.
5616set dummy $ac_prog; ac_word=$2
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618$as_echo_n "checking for $ac_word... " >&6; }
5619if ${ac_cv_path_CP+:} false; then :
5620  $as_echo_n "(cached) " >&6
5621else
5622  case $CP in
5623  [\\/]* | ?:[\\/]*)
5624  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5625  ;;
5626  *)
5627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628for as_dir in $PATH
5629do
5630  IFS=$as_save_IFS
5631  test -z "$as_dir" && as_dir=.
5632    for ac_exec_ext in '' $ac_executable_extensions; do
5633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5634    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636    break 2
5637  fi
5638done
5639  done
5640IFS=$as_save_IFS
5641
5642  ;;
5643esac
5644fi
5645CP=$ac_cv_path_CP
5646if test -n "$CP"; then
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5648$as_echo "$CP" >&6; }
5649else
5650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651$as_echo "no" >&6; }
5652fi
5653
5654
5655  test -n "$CP" && break
5656done
5657
5658  else
5659    # The variable is set, but is it from the command line or the environment?
5660
5661    # Try to remove the string !CP! from our list.
5662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5664      # If it failed, the variable was not from the command line. Ignore it,
5665      # but warn the user (except for BASH, which is always set by the calling BASH).
5666      if test "xCP" != xBASH; then
5667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5668$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5669      fi
5670      # Try to locate tool using the code snippet
5671      for ac_prog in cp
5672do
5673  # Extract the first word of "$ac_prog", so it can be a program name with args.
5674set dummy $ac_prog; ac_word=$2
5675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5676$as_echo_n "checking for $ac_word... " >&6; }
5677if ${ac_cv_path_CP+:} false; then :
5678  $as_echo_n "(cached) " >&6
5679else
5680  case $CP in
5681  [\\/]* | ?:[\\/]*)
5682  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5683  ;;
5684  *)
5685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5686for as_dir in $PATH
5687do
5688  IFS=$as_save_IFS
5689  test -z "$as_dir" && as_dir=.
5690    for ac_exec_ext in '' $ac_executable_extensions; do
5691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5692    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5694    break 2
5695  fi
5696done
5697  done
5698IFS=$as_save_IFS
5699
5700  ;;
5701esac
5702fi
5703CP=$ac_cv_path_CP
5704if test -n "$CP"; then
5705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5706$as_echo "$CP" >&6; }
5707else
5708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709$as_echo "no" >&6; }
5710fi
5711
5712
5713  test -n "$CP" && break
5714done
5715
5716    else
5717      # If it succeeded, then it was overridden by the user. We will use it
5718      # for the tool.
5719
5720      # First remove it from the list of overridden variables, so we can test
5721      # for unknown variables in the end.
5722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5723
5724      # Check if the provided tool contains a complete path.
5725      tool_specified="$CP"
5726      tool_basename="${tool_specified##*/}"
5727      if test "x$tool_basename" = "x$tool_specified"; then
5728        # A command without a complete path is provided, search $PATH.
5729        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5730$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5731        # Extract the first word of "$tool_basename", so it can be a program name with args.
5732set dummy $tool_basename; ac_word=$2
5733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734$as_echo_n "checking for $ac_word... " >&6; }
5735if ${ac_cv_path_CP+:} false; then :
5736  $as_echo_n "(cached) " >&6
5737else
5738  case $CP in
5739  [\\/]* | ?:[\\/]*)
5740  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5741  ;;
5742  *)
5743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744for as_dir in $PATH
5745do
5746  IFS=$as_save_IFS
5747  test -z "$as_dir" && as_dir=.
5748    for ac_exec_ext in '' $ac_executable_extensions; do
5749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752    break 2
5753  fi
5754done
5755  done
5756IFS=$as_save_IFS
5757
5758  ;;
5759esac
5760fi
5761CP=$ac_cv_path_CP
5762if test -n "$CP"; then
5763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5764$as_echo "$CP" >&6; }
5765else
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768fi
5769
5770
5771        if test "x$CP" = x; then
5772          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5773        fi
5774      else
5775        # Otherwise we believe it is a complete path. Use it as it is.
5776        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5777$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5779$as_echo_n "checking for CP... " >&6; }
5780        if test ! -x "$tool_specified"; then
5781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5782$as_echo "not found" >&6; }
5783          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5784        fi
5785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5786$as_echo "$tool_specified" >&6; }
5787      fi
5788    fi
5789  fi
5790
5791
5792
5793  if test "x$CP" = x; then
5794    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5795  fi
5796
5797
5798
5799
5800
5801  # Publish this variable in the help.
5802
5803
5804  if test "x$CUT" = x; then
5805    # The variable is not set by user, try to locate tool using the code snippet
5806    for ac_prog in cut
5807do
5808  # Extract the first word of "$ac_prog", so it can be a program name with args.
5809set dummy $ac_prog; ac_word=$2
5810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5811$as_echo_n "checking for $ac_word... " >&6; }
5812if ${ac_cv_path_CUT+:} false; then :
5813  $as_echo_n "(cached) " >&6
5814else
5815  case $CUT in
5816  [\\/]* | ?:[\\/]*)
5817  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5818  ;;
5819  *)
5820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5821for as_dir in $PATH
5822do
5823  IFS=$as_save_IFS
5824  test -z "$as_dir" && as_dir=.
5825    for ac_exec_ext in '' $ac_executable_extensions; do
5826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5827    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5829    break 2
5830  fi
5831done
5832  done
5833IFS=$as_save_IFS
5834
5835  ;;
5836esac
5837fi
5838CUT=$ac_cv_path_CUT
5839if test -n "$CUT"; then
5840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5841$as_echo "$CUT" >&6; }
5842else
5843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5844$as_echo "no" >&6; }
5845fi
5846
5847
5848  test -n "$CUT" && break
5849done
5850
5851  else
5852    # The variable is set, but is it from the command line or the environment?
5853
5854    # Try to remove the string !CUT! from our list.
5855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5857      # If it failed, the variable was not from the command line. Ignore it,
5858      # but warn the user (except for BASH, which is always set by the calling BASH).
5859      if test "xCUT" != xBASH; then
5860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5861$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5862      fi
5863      # Try to locate tool using the code snippet
5864      for ac_prog in cut
5865do
5866  # Extract the first word of "$ac_prog", so it can be a program name with args.
5867set dummy $ac_prog; ac_word=$2
5868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5869$as_echo_n "checking for $ac_word... " >&6; }
5870if ${ac_cv_path_CUT+:} false; then :
5871  $as_echo_n "(cached) " >&6
5872else
5873  case $CUT in
5874  [\\/]* | ?:[\\/]*)
5875  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5876  ;;
5877  *)
5878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5879for as_dir in $PATH
5880do
5881  IFS=$as_save_IFS
5882  test -z "$as_dir" && as_dir=.
5883    for ac_exec_ext in '' $ac_executable_extensions; do
5884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5885    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5887    break 2
5888  fi
5889done
5890  done
5891IFS=$as_save_IFS
5892
5893  ;;
5894esac
5895fi
5896CUT=$ac_cv_path_CUT
5897if test -n "$CUT"; then
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5899$as_echo "$CUT" >&6; }
5900else
5901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902$as_echo "no" >&6; }
5903fi
5904
5905
5906  test -n "$CUT" && break
5907done
5908
5909    else
5910      # If it succeeded, then it was overridden by the user. We will use it
5911      # for the tool.
5912
5913      # First remove it from the list of overridden variables, so we can test
5914      # for unknown variables in the end.
5915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5916
5917      # Check if the provided tool contains a complete path.
5918      tool_specified="$CUT"
5919      tool_basename="${tool_specified##*/}"
5920      if test "x$tool_basename" = "x$tool_specified"; then
5921        # A command without a complete path is provided, search $PATH.
5922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5923$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5924        # Extract the first word of "$tool_basename", so it can be a program name with args.
5925set dummy $tool_basename; ac_word=$2
5926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927$as_echo_n "checking for $ac_word... " >&6; }
5928if ${ac_cv_path_CUT+:} false; then :
5929  $as_echo_n "(cached) " >&6
5930else
5931  case $CUT in
5932  [\\/]* | ?:[\\/]*)
5933  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5934  ;;
5935  *)
5936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937for as_dir in $PATH
5938do
5939  IFS=$as_save_IFS
5940  test -z "$as_dir" && as_dir=.
5941    for ac_exec_ext in '' $ac_executable_extensions; do
5942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945    break 2
5946  fi
5947done
5948  done
5949IFS=$as_save_IFS
5950
5951  ;;
5952esac
5953fi
5954CUT=$ac_cv_path_CUT
5955if test -n "$CUT"; then
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5957$as_echo "$CUT" >&6; }
5958else
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
5961fi
5962
5963
5964        if test "x$CUT" = x; then
5965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5966        fi
5967      else
5968        # Otherwise we believe it is a complete path. Use it as it is.
5969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5970$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5972$as_echo_n "checking for CUT... " >&6; }
5973        if test ! -x "$tool_specified"; then
5974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5975$as_echo "not found" >&6; }
5976          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5977        fi
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5979$as_echo "$tool_specified" >&6; }
5980      fi
5981    fi
5982  fi
5983
5984
5985
5986  if test "x$CUT" = x; then
5987    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5988  fi
5989
5990
5991
5992
5993
5994  # Publish this variable in the help.
5995
5996
5997  if test "x$DATE" = x; then
5998    # The variable is not set by user, try to locate tool using the code snippet
5999    for ac_prog in date
6000do
6001  # Extract the first word of "$ac_prog", so it can be a program name with args.
6002set dummy $ac_prog; ac_word=$2
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004$as_echo_n "checking for $ac_word... " >&6; }
6005if ${ac_cv_path_DATE+:} false; then :
6006  $as_echo_n "(cached) " >&6
6007else
6008  case $DATE in
6009  [\\/]* | ?:[\\/]*)
6010  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6011  ;;
6012  *)
6013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH
6015do
6016  IFS=$as_save_IFS
6017  test -z "$as_dir" && as_dir=.
6018    for ac_exec_ext in '' $ac_executable_extensions; do
6019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6020    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022    break 2
6023  fi
6024done
6025  done
6026IFS=$as_save_IFS
6027
6028  ;;
6029esac
6030fi
6031DATE=$ac_cv_path_DATE
6032if test -n "$DATE"; then
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6034$as_echo "$DATE" >&6; }
6035else
6036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038fi
6039
6040
6041  test -n "$DATE" && break
6042done
6043
6044  else
6045    # The variable is set, but is it from the command line or the environment?
6046
6047    # Try to remove the string !DATE! from our list.
6048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6050      # If it failed, the variable was not from the command line. Ignore it,
6051      # but warn the user (except for BASH, which is always set by the calling BASH).
6052      if test "xDATE" != xBASH; then
6053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6054$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6055      fi
6056      # Try to locate tool using the code snippet
6057      for ac_prog in date
6058do
6059  # Extract the first word of "$ac_prog", so it can be a program name with args.
6060set dummy $ac_prog; ac_word=$2
6061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6062$as_echo_n "checking for $ac_word... " >&6; }
6063if ${ac_cv_path_DATE+:} false; then :
6064  $as_echo_n "(cached) " >&6
6065else
6066  case $DATE in
6067  [\\/]* | ?:[\\/]*)
6068  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6069  ;;
6070  *)
6071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072for as_dir in $PATH
6073do
6074  IFS=$as_save_IFS
6075  test -z "$as_dir" && as_dir=.
6076    for ac_exec_ext in '' $ac_executable_extensions; do
6077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6078    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6080    break 2
6081  fi
6082done
6083  done
6084IFS=$as_save_IFS
6085
6086  ;;
6087esac
6088fi
6089DATE=$ac_cv_path_DATE
6090if test -n "$DATE"; then
6091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6092$as_echo "$DATE" >&6; }
6093else
6094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095$as_echo "no" >&6; }
6096fi
6097
6098
6099  test -n "$DATE" && break
6100done
6101
6102    else
6103      # If it succeeded, then it was overridden by the user. We will use it
6104      # for the tool.
6105
6106      # First remove it from the list of overridden variables, so we can test
6107      # for unknown variables in the end.
6108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6109
6110      # Check if the provided tool contains a complete path.
6111      tool_specified="$DATE"
6112      tool_basename="${tool_specified##*/}"
6113      if test "x$tool_basename" = "x$tool_specified"; then
6114        # A command without a complete path is provided, search $PATH.
6115        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6116$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6117        # Extract the first word of "$tool_basename", so it can be a program name with args.
6118set dummy $tool_basename; ac_word=$2
6119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6120$as_echo_n "checking for $ac_word... " >&6; }
6121if ${ac_cv_path_DATE+:} false; then :
6122  $as_echo_n "(cached) " >&6
6123else
6124  case $DATE in
6125  [\\/]* | ?:[\\/]*)
6126  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6127  ;;
6128  *)
6129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6130for as_dir in $PATH
6131do
6132  IFS=$as_save_IFS
6133  test -z "$as_dir" && as_dir=.
6134    for ac_exec_ext in '' $ac_executable_extensions; do
6135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6136    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6138    break 2
6139  fi
6140done
6141  done
6142IFS=$as_save_IFS
6143
6144  ;;
6145esac
6146fi
6147DATE=$ac_cv_path_DATE
6148if test -n "$DATE"; then
6149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6150$as_echo "$DATE" >&6; }
6151else
6152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6153$as_echo "no" >&6; }
6154fi
6155
6156
6157        if test "x$DATE" = x; then
6158          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6159        fi
6160      else
6161        # Otherwise we believe it is a complete path. Use it as it is.
6162        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6163$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6165$as_echo_n "checking for DATE... " >&6; }
6166        if test ! -x "$tool_specified"; then
6167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6168$as_echo "not found" >&6; }
6169          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6170        fi
6171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6172$as_echo "$tool_specified" >&6; }
6173      fi
6174    fi
6175  fi
6176
6177
6178
6179  if test "x$DATE" = x; then
6180    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6181  fi
6182
6183
6184
6185
6186
6187  # Publish this variable in the help.
6188
6189
6190  if test "x$DIFF" = x; then
6191    # The variable is not set by user, try to locate tool using the code snippet
6192    for ac_prog in gdiff diff
6193do
6194  # Extract the first word of "$ac_prog", so it can be a program name with args.
6195set dummy $ac_prog; ac_word=$2
6196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197$as_echo_n "checking for $ac_word... " >&6; }
6198if ${ac_cv_path_DIFF+:} false; then :
6199  $as_echo_n "(cached) " >&6
6200else
6201  case $DIFF in
6202  [\\/]* | ?:[\\/]*)
6203  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6204  ;;
6205  *)
6206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6207for as_dir in $PATH
6208do
6209  IFS=$as_save_IFS
6210  test -z "$as_dir" && as_dir=.
6211    for ac_exec_ext in '' $ac_executable_extensions; do
6212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6213    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6215    break 2
6216  fi
6217done
6218  done
6219IFS=$as_save_IFS
6220
6221  ;;
6222esac
6223fi
6224DIFF=$ac_cv_path_DIFF
6225if test -n "$DIFF"; then
6226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6227$as_echo "$DIFF" >&6; }
6228else
6229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6230$as_echo "no" >&6; }
6231fi
6232
6233
6234  test -n "$DIFF" && break
6235done
6236
6237  else
6238    # The variable is set, but is it from the command line or the environment?
6239
6240    # Try to remove the string !DIFF! from our list.
6241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6243      # If it failed, the variable was not from the command line. Ignore it,
6244      # but warn the user (except for BASH, which is always set by the calling BASH).
6245      if test "xDIFF" != xBASH; then
6246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6247$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6248      fi
6249      # Try to locate tool using the code snippet
6250      for ac_prog in gdiff diff
6251do
6252  # Extract the first word of "$ac_prog", so it can be a program name with args.
6253set dummy $ac_prog; ac_word=$2
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255$as_echo_n "checking for $ac_word... " >&6; }
6256if ${ac_cv_path_DIFF+:} false; then :
6257  $as_echo_n "(cached) " >&6
6258else
6259  case $DIFF in
6260  [\\/]* | ?:[\\/]*)
6261  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6262  ;;
6263  *)
6264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH
6266do
6267  IFS=$as_save_IFS
6268  test -z "$as_dir" && as_dir=.
6269    for ac_exec_ext in '' $ac_executable_extensions; do
6270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273    break 2
6274  fi
6275done
6276  done
6277IFS=$as_save_IFS
6278
6279  ;;
6280esac
6281fi
6282DIFF=$ac_cv_path_DIFF
6283if test -n "$DIFF"; then
6284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6285$as_echo "$DIFF" >&6; }
6286else
6287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288$as_echo "no" >&6; }
6289fi
6290
6291
6292  test -n "$DIFF" && break
6293done
6294
6295    else
6296      # If it succeeded, then it was overridden by the user. We will use it
6297      # for the tool.
6298
6299      # First remove it from the list of overridden variables, so we can test
6300      # for unknown variables in the end.
6301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6302
6303      # Check if the provided tool contains a complete path.
6304      tool_specified="$DIFF"
6305      tool_basename="${tool_specified##*/}"
6306      if test "x$tool_basename" = "x$tool_specified"; then
6307        # A command without a complete path is provided, search $PATH.
6308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6309$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6310        # Extract the first word of "$tool_basename", so it can be a program name with args.
6311set dummy $tool_basename; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_DIFF+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $DIFF in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340DIFF=$ac_cv_path_DIFF
6341if test -n "$DIFF"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6343$as_echo "$DIFF" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350        if test "x$DIFF" = x; then
6351          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6352        fi
6353      else
6354        # Otherwise we believe it is a complete path. Use it as it is.
6355        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6356$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6358$as_echo_n "checking for DIFF... " >&6; }
6359        if test ! -x "$tool_specified"; then
6360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6361$as_echo "not found" >&6; }
6362          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6363        fi
6364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6365$as_echo "$tool_specified" >&6; }
6366      fi
6367    fi
6368  fi
6369
6370
6371
6372  if test "x$DIFF" = x; then
6373    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6374  fi
6375
6376
6377
6378
6379
6380  # Publish this variable in the help.
6381
6382
6383  if test "x$DIRNAME" = x; then
6384    # The variable is not set by user, try to locate tool using the code snippet
6385    for ac_prog in dirname
6386do
6387  # Extract the first word of "$ac_prog", so it can be a program name with args.
6388set dummy $ac_prog; ac_word=$2
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390$as_echo_n "checking for $ac_word... " >&6; }
6391if ${ac_cv_path_DIRNAME+:} false; then :
6392  $as_echo_n "(cached) " >&6
6393else
6394  case $DIRNAME in
6395  [\\/]* | ?:[\\/]*)
6396  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6397  ;;
6398  *)
6399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6400for as_dir in $PATH
6401do
6402  IFS=$as_save_IFS
6403  test -z "$as_dir" && as_dir=.
6404    for ac_exec_ext in '' $ac_executable_extensions; do
6405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6406    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6408    break 2
6409  fi
6410done
6411  done
6412IFS=$as_save_IFS
6413
6414  ;;
6415esac
6416fi
6417DIRNAME=$ac_cv_path_DIRNAME
6418if test -n "$DIRNAME"; then
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6420$as_echo "$DIRNAME" >&6; }
6421else
6422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426
6427  test -n "$DIRNAME" && break
6428done
6429
6430  else
6431    # The variable is set, but is it from the command line or the environment?
6432
6433    # Try to remove the string !DIRNAME! from our list.
6434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6436      # If it failed, the variable was not from the command line. Ignore it,
6437      # but warn the user (except for BASH, which is always set by the calling BASH).
6438      if test "xDIRNAME" != xBASH; then
6439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6440$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6441      fi
6442      # Try to locate tool using the code snippet
6443      for ac_prog in dirname
6444do
6445  # Extract the first word of "$ac_prog", so it can be a program name with args.
6446set dummy $ac_prog; ac_word=$2
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6448$as_echo_n "checking for $ac_word... " >&6; }
6449if ${ac_cv_path_DIRNAME+:} false; then :
6450  $as_echo_n "(cached) " >&6
6451else
6452  case $DIRNAME in
6453  [\\/]* | ?:[\\/]*)
6454  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6455  ;;
6456  *)
6457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458for as_dir in $PATH
6459do
6460  IFS=$as_save_IFS
6461  test -z "$as_dir" && as_dir=.
6462    for ac_exec_ext in '' $ac_executable_extensions; do
6463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6464    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6466    break 2
6467  fi
6468done
6469  done
6470IFS=$as_save_IFS
6471
6472  ;;
6473esac
6474fi
6475DIRNAME=$ac_cv_path_DIRNAME
6476if test -n "$DIRNAME"; then
6477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6478$as_echo "$DIRNAME" >&6; }
6479else
6480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481$as_echo "no" >&6; }
6482fi
6483
6484
6485  test -n "$DIRNAME" && break
6486done
6487
6488    else
6489      # If it succeeded, then it was overridden by the user. We will use it
6490      # for the tool.
6491
6492      # First remove it from the list of overridden variables, so we can test
6493      # for unknown variables in the end.
6494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6495
6496      # Check if the provided tool contains a complete path.
6497      tool_specified="$DIRNAME"
6498      tool_basename="${tool_specified##*/}"
6499      if test "x$tool_basename" = "x$tool_specified"; then
6500        # A command without a complete path is provided, search $PATH.
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6502$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6503        # Extract the first word of "$tool_basename", so it can be a program name with args.
6504set dummy $tool_basename; ac_word=$2
6505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506$as_echo_n "checking for $ac_word... " >&6; }
6507if ${ac_cv_path_DIRNAME+:} false; then :
6508  $as_echo_n "(cached) " >&6
6509else
6510  case $DIRNAME in
6511  [\\/]* | ?:[\\/]*)
6512  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6513  ;;
6514  *)
6515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516for as_dir in $PATH
6517do
6518  IFS=$as_save_IFS
6519  test -z "$as_dir" && as_dir=.
6520    for ac_exec_ext in '' $ac_executable_extensions; do
6521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524    break 2
6525  fi
6526done
6527  done
6528IFS=$as_save_IFS
6529
6530  ;;
6531esac
6532fi
6533DIRNAME=$ac_cv_path_DIRNAME
6534if test -n "$DIRNAME"; then
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6536$as_echo "$DIRNAME" >&6; }
6537else
6538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539$as_echo "no" >&6; }
6540fi
6541
6542
6543        if test "x$DIRNAME" = x; then
6544          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6545        fi
6546      else
6547        # Otherwise we believe it is a complete path. Use it as it is.
6548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6549$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6551$as_echo_n "checking for DIRNAME... " >&6; }
6552        if test ! -x "$tool_specified"; then
6553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6554$as_echo "not found" >&6; }
6555          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6556        fi
6557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6558$as_echo "$tool_specified" >&6; }
6559      fi
6560    fi
6561  fi
6562
6563
6564
6565  if test "x$DIRNAME" = x; then
6566    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6567  fi
6568
6569
6570
6571
6572
6573  # Publish this variable in the help.
6574
6575
6576  if test "x$ECHO" = x; then
6577    # The variable is not set by user, try to locate tool using the code snippet
6578    for ac_prog in echo
6579do
6580  # Extract the first word of "$ac_prog", so it can be a program name with args.
6581set dummy $ac_prog; ac_word=$2
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6583$as_echo_n "checking for $ac_word... " >&6; }
6584if ${ac_cv_path_ECHO+:} false; then :
6585  $as_echo_n "(cached) " >&6
6586else
6587  case $ECHO in
6588  [\\/]* | ?:[\\/]*)
6589  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6590  ;;
6591  *)
6592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6593for as_dir in $PATH
6594do
6595  IFS=$as_save_IFS
6596  test -z "$as_dir" && as_dir=.
6597    for ac_exec_ext in '' $ac_executable_extensions; do
6598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6599    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6601    break 2
6602  fi
6603done
6604  done
6605IFS=$as_save_IFS
6606
6607  ;;
6608esac
6609fi
6610ECHO=$ac_cv_path_ECHO
6611if test -n "$ECHO"; then
6612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6613$as_echo "$ECHO" >&6; }
6614else
6615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616$as_echo "no" >&6; }
6617fi
6618
6619
6620  test -n "$ECHO" && break
6621done
6622
6623  else
6624    # The variable is set, but is it from the command line or the environment?
6625
6626    # Try to remove the string !ECHO! from our list.
6627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6629      # If it failed, the variable was not from the command line. Ignore it,
6630      # but warn the user (except for BASH, which is always set by the calling BASH).
6631      if test "xECHO" != xBASH; then
6632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6633$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6634      fi
6635      # Try to locate tool using the code snippet
6636      for ac_prog in echo
6637do
6638  # Extract the first word of "$ac_prog", so it can be a program name with args.
6639set dummy $ac_prog; ac_word=$2
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6641$as_echo_n "checking for $ac_word... " >&6; }
6642if ${ac_cv_path_ECHO+:} false; then :
6643  $as_echo_n "(cached) " >&6
6644else
6645  case $ECHO in
6646  [\\/]* | ?:[\\/]*)
6647  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6648  ;;
6649  *)
6650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651for as_dir in $PATH
6652do
6653  IFS=$as_save_IFS
6654  test -z "$as_dir" && as_dir=.
6655    for ac_exec_ext in '' $ac_executable_extensions; do
6656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659    break 2
6660  fi
6661done
6662  done
6663IFS=$as_save_IFS
6664
6665  ;;
6666esac
6667fi
6668ECHO=$ac_cv_path_ECHO
6669if test -n "$ECHO"; then
6670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6671$as_echo "$ECHO" >&6; }
6672else
6673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6674$as_echo "no" >&6; }
6675fi
6676
6677
6678  test -n "$ECHO" && break
6679done
6680
6681    else
6682      # If it succeeded, then it was overridden by the user. We will use it
6683      # for the tool.
6684
6685      # First remove it from the list of overridden variables, so we can test
6686      # for unknown variables in the end.
6687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6688
6689      # Check if the provided tool contains a complete path.
6690      tool_specified="$ECHO"
6691      tool_basename="${tool_specified##*/}"
6692      if test "x$tool_basename" = "x$tool_specified"; then
6693        # A command without a complete path is provided, search $PATH.
6694        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6695$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6696        # Extract the first word of "$tool_basename", so it can be a program name with args.
6697set dummy $tool_basename; ac_word=$2
6698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6699$as_echo_n "checking for $ac_word... " >&6; }
6700if ${ac_cv_path_ECHO+:} false; then :
6701  $as_echo_n "(cached) " >&6
6702else
6703  case $ECHO in
6704  [\\/]* | ?:[\\/]*)
6705  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6706  ;;
6707  *)
6708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6709for as_dir in $PATH
6710do
6711  IFS=$as_save_IFS
6712  test -z "$as_dir" && as_dir=.
6713    for ac_exec_ext in '' $ac_executable_extensions; do
6714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6715    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6717    break 2
6718  fi
6719done
6720  done
6721IFS=$as_save_IFS
6722
6723  ;;
6724esac
6725fi
6726ECHO=$ac_cv_path_ECHO
6727if test -n "$ECHO"; then
6728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6729$as_echo "$ECHO" >&6; }
6730else
6731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732$as_echo "no" >&6; }
6733fi
6734
6735
6736        if test "x$ECHO" = x; then
6737          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6738        fi
6739      else
6740        # Otherwise we believe it is a complete path. Use it as it is.
6741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6742$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6744$as_echo_n "checking for ECHO... " >&6; }
6745        if test ! -x "$tool_specified"; then
6746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6747$as_echo "not found" >&6; }
6748          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6749        fi
6750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6751$as_echo "$tool_specified" >&6; }
6752      fi
6753    fi
6754  fi
6755
6756
6757
6758  if test "x$ECHO" = x; then
6759    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6760  fi
6761
6762
6763
6764
6765
6766  # Publish this variable in the help.
6767
6768
6769  if test "x$EXPR" = x; then
6770    # The variable is not set by user, try to locate tool using the code snippet
6771    for ac_prog in expr
6772do
6773  # Extract the first word of "$ac_prog", so it can be a program name with args.
6774set dummy $ac_prog; ac_word=$2
6775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6776$as_echo_n "checking for $ac_word... " >&6; }
6777if ${ac_cv_path_EXPR+:} false; then :
6778  $as_echo_n "(cached) " >&6
6779else
6780  case $EXPR in
6781  [\\/]* | ?:[\\/]*)
6782  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6783  ;;
6784  *)
6785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6786for as_dir in $PATH
6787do
6788  IFS=$as_save_IFS
6789  test -z "$as_dir" && as_dir=.
6790    for ac_exec_ext in '' $ac_executable_extensions; do
6791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6792    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6794    break 2
6795  fi
6796done
6797  done
6798IFS=$as_save_IFS
6799
6800  ;;
6801esac
6802fi
6803EXPR=$ac_cv_path_EXPR
6804if test -n "$EXPR"; then
6805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6806$as_echo "$EXPR" >&6; }
6807else
6808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6809$as_echo "no" >&6; }
6810fi
6811
6812
6813  test -n "$EXPR" && break
6814done
6815
6816  else
6817    # The variable is set, but is it from the command line or the environment?
6818
6819    # Try to remove the string !EXPR! from our list.
6820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6822      # If it failed, the variable was not from the command line. Ignore it,
6823      # but warn the user (except for BASH, which is always set by the calling BASH).
6824      if test "xEXPR" != xBASH; then
6825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6826$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6827      fi
6828      # Try to locate tool using the code snippet
6829      for ac_prog in expr
6830do
6831  # Extract the first word of "$ac_prog", so it can be a program name with args.
6832set dummy $ac_prog; ac_word=$2
6833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6834$as_echo_n "checking for $ac_word... " >&6; }
6835if ${ac_cv_path_EXPR+:} false; then :
6836  $as_echo_n "(cached) " >&6
6837else
6838  case $EXPR in
6839  [\\/]* | ?:[\\/]*)
6840  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6841  ;;
6842  *)
6843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6844for as_dir in $PATH
6845do
6846  IFS=$as_save_IFS
6847  test -z "$as_dir" && as_dir=.
6848    for ac_exec_ext in '' $ac_executable_extensions; do
6849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6850    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6852    break 2
6853  fi
6854done
6855  done
6856IFS=$as_save_IFS
6857
6858  ;;
6859esac
6860fi
6861EXPR=$ac_cv_path_EXPR
6862if test -n "$EXPR"; then
6863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6864$as_echo "$EXPR" >&6; }
6865else
6866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6867$as_echo "no" >&6; }
6868fi
6869
6870
6871  test -n "$EXPR" && break
6872done
6873
6874    else
6875      # If it succeeded, then it was overridden by the user. We will use it
6876      # for the tool.
6877
6878      # First remove it from the list of overridden variables, so we can test
6879      # for unknown variables in the end.
6880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6881
6882      # Check if the provided tool contains a complete path.
6883      tool_specified="$EXPR"
6884      tool_basename="${tool_specified##*/}"
6885      if test "x$tool_basename" = "x$tool_specified"; then
6886        # A command without a complete path is provided, search $PATH.
6887        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6888$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6889        # Extract the first word of "$tool_basename", so it can be a program name with args.
6890set dummy $tool_basename; ac_word=$2
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892$as_echo_n "checking for $ac_word... " >&6; }
6893if ${ac_cv_path_EXPR+:} false; then :
6894  $as_echo_n "(cached) " >&6
6895else
6896  case $EXPR in
6897  [\\/]* | ?:[\\/]*)
6898  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6899  ;;
6900  *)
6901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902for as_dir in $PATH
6903do
6904  IFS=$as_save_IFS
6905  test -z "$as_dir" && as_dir=.
6906    for ac_exec_ext in '' $ac_executable_extensions; do
6907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6910    break 2
6911  fi
6912done
6913  done
6914IFS=$as_save_IFS
6915
6916  ;;
6917esac
6918fi
6919EXPR=$ac_cv_path_EXPR
6920if test -n "$EXPR"; then
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6922$as_echo "$EXPR" >&6; }
6923else
6924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925$as_echo "no" >&6; }
6926fi
6927
6928
6929        if test "x$EXPR" = x; then
6930          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6931        fi
6932      else
6933        # Otherwise we believe it is a complete path. Use it as it is.
6934        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6935$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6937$as_echo_n "checking for EXPR... " >&6; }
6938        if test ! -x "$tool_specified"; then
6939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6940$as_echo "not found" >&6; }
6941          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6942        fi
6943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6944$as_echo "$tool_specified" >&6; }
6945      fi
6946    fi
6947  fi
6948
6949
6950
6951  if test "x$EXPR" = x; then
6952    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6953  fi
6954
6955
6956
6957
6958
6959  # Publish this variable in the help.
6960
6961
6962  if test "x$FILE" = x; then
6963    # The variable is not set by user, try to locate tool using the code snippet
6964    for ac_prog in file
6965do
6966  # Extract the first word of "$ac_prog", so it can be a program name with args.
6967set dummy $ac_prog; ac_word=$2
6968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6969$as_echo_n "checking for $ac_word... " >&6; }
6970if ${ac_cv_path_FILE+:} false; then :
6971  $as_echo_n "(cached) " >&6
6972else
6973  case $FILE in
6974  [\\/]* | ?:[\\/]*)
6975  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6976  ;;
6977  *)
6978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6979for as_dir in $PATH
6980do
6981  IFS=$as_save_IFS
6982  test -z "$as_dir" && as_dir=.
6983    for ac_exec_ext in '' $ac_executable_extensions; do
6984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6985    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6987    break 2
6988  fi
6989done
6990  done
6991IFS=$as_save_IFS
6992
6993  ;;
6994esac
6995fi
6996FILE=$ac_cv_path_FILE
6997if test -n "$FILE"; then
6998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6999$as_echo "$FILE" >&6; }
7000else
7001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7002$as_echo "no" >&6; }
7003fi
7004
7005
7006  test -n "$FILE" && break
7007done
7008
7009  else
7010    # The variable is set, but is it from the command line or the environment?
7011
7012    # Try to remove the string !FILE! from our list.
7013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7015      # If it failed, the variable was not from the command line. Ignore it,
7016      # but warn the user (except for BASH, which is always set by the calling BASH).
7017      if test "xFILE" != xBASH; then
7018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7019$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7020      fi
7021      # Try to locate tool using the code snippet
7022      for ac_prog in file
7023do
7024  # Extract the first word of "$ac_prog", so it can be a program name with args.
7025set dummy $ac_prog; ac_word=$2
7026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7027$as_echo_n "checking for $ac_word... " >&6; }
7028if ${ac_cv_path_FILE+:} false; then :
7029  $as_echo_n "(cached) " >&6
7030else
7031  case $FILE in
7032  [\\/]* | ?:[\\/]*)
7033  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7034  ;;
7035  *)
7036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037for as_dir in $PATH
7038do
7039  IFS=$as_save_IFS
7040  test -z "$as_dir" && as_dir=.
7041    for ac_exec_ext in '' $ac_executable_extensions; do
7042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7043    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7045    break 2
7046  fi
7047done
7048  done
7049IFS=$as_save_IFS
7050
7051  ;;
7052esac
7053fi
7054FILE=$ac_cv_path_FILE
7055if test -n "$FILE"; then
7056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7057$as_echo "$FILE" >&6; }
7058else
7059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060$as_echo "no" >&6; }
7061fi
7062
7063
7064  test -n "$FILE" && break
7065done
7066
7067    else
7068      # If it succeeded, then it was overridden by the user. We will use it
7069      # for the tool.
7070
7071      # First remove it from the list of overridden variables, so we can test
7072      # for unknown variables in the end.
7073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7074
7075      # Check if the provided tool contains a complete path.
7076      tool_specified="$FILE"
7077      tool_basename="${tool_specified##*/}"
7078      if test "x$tool_basename" = "x$tool_specified"; then
7079        # A command without a complete path is provided, search $PATH.
7080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7081$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7082        # Extract the first word of "$tool_basename", so it can be a program name with args.
7083set dummy $tool_basename; ac_word=$2
7084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7085$as_echo_n "checking for $ac_word... " >&6; }
7086if ${ac_cv_path_FILE+:} false; then :
7087  $as_echo_n "(cached) " >&6
7088else
7089  case $FILE in
7090  [\\/]* | ?:[\\/]*)
7091  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7092  ;;
7093  *)
7094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095for as_dir in $PATH
7096do
7097  IFS=$as_save_IFS
7098  test -z "$as_dir" && as_dir=.
7099    for ac_exec_ext in '' $ac_executable_extensions; do
7100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7101    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7103    break 2
7104  fi
7105done
7106  done
7107IFS=$as_save_IFS
7108
7109  ;;
7110esac
7111fi
7112FILE=$ac_cv_path_FILE
7113if test -n "$FILE"; then
7114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7115$as_echo "$FILE" >&6; }
7116else
7117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118$as_echo "no" >&6; }
7119fi
7120
7121
7122        if test "x$FILE" = x; then
7123          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7124        fi
7125      else
7126        # Otherwise we believe it is a complete path. Use it as it is.
7127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7128$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7130$as_echo_n "checking for FILE... " >&6; }
7131        if test ! -x "$tool_specified"; then
7132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7133$as_echo "not found" >&6; }
7134          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7135        fi
7136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7137$as_echo "$tool_specified" >&6; }
7138      fi
7139    fi
7140  fi
7141
7142
7143
7144  if test "x$FILE" = x; then
7145    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7146  fi
7147
7148
7149
7150
7151
7152  # Publish this variable in the help.
7153
7154
7155  if test "x$FIND" = x; then
7156    # The variable is not set by user, try to locate tool using the code snippet
7157    for ac_prog in find
7158do
7159  # Extract the first word of "$ac_prog", so it can be a program name with args.
7160set dummy $ac_prog; ac_word=$2
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7162$as_echo_n "checking for $ac_word... " >&6; }
7163if ${ac_cv_path_FIND+:} false; then :
7164  $as_echo_n "(cached) " >&6
7165else
7166  case $FIND in
7167  [\\/]* | ?:[\\/]*)
7168  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7169  ;;
7170  *)
7171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172for as_dir in $PATH
7173do
7174  IFS=$as_save_IFS
7175  test -z "$as_dir" && as_dir=.
7176    for ac_exec_ext in '' $ac_executable_extensions; do
7177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7178    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7180    break 2
7181  fi
7182done
7183  done
7184IFS=$as_save_IFS
7185
7186  ;;
7187esac
7188fi
7189FIND=$ac_cv_path_FIND
7190if test -n "$FIND"; then
7191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7192$as_echo "$FIND" >&6; }
7193else
7194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7195$as_echo "no" >&6; }
7196fi
7197
7198
7199  test -n "$FIND" && break
7200done
7201
7202  else
7203    # The variable is set, but is it from the command line or the environment?
7204
7205    # Try to remove the string !FIND! from our list.
7206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7208      # If it failed, the variable was not from the command line. Ignore it,
7209      # but warn the user (except for BASH, which is always set by the calling BASH).
7210      if test "xFIND" != xBASH; then
7211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7212$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7213      fi
7214      # Try to locate tool using the code snippet
7215      for ac_prog in find
7216do
7217  # Extract the first word of "$ac_prog", so it can be a program name with args.
7218set dummy $ac_prog; ac_word=$2
7219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7220$as_echo_n "checking for $ac_word... " >&6; }
7221if ${ac_cv_path_FIND+:} false; then :
7222  $as_echo_n "(cached) " >&6
7223else
7224  case $FIND in
7225  [\\/]* | ?:[\\/]*)
7226  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7227  ;;
7228  *)
7229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7230for as_dir in $PATH
7231do
7232  IFS=$as_save_IFS
7233  test -z "$as_dir" && as_dir=.
7234    for ac_exec_ext in '' $ac_executable_extensions; do
7235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7236    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7238    break 2
7239  fi
7240done
7241  done
7242IFS=$as_save_IFS
7243
7244  ;;
7245esac
7246fi
7247FIND=$ac_cv_path_FIND
7248if test -n "$FIND"; then
7249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7250$as_echo "$FIND" >&6; }
7251else
7252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7253$as_echo "no" >&6; }
7254fi
7255
7256
7257  test -n "$FIND" && break
7258done
7259
7260    else
7261      # If it succeeded, then it was overridden by the user. We will use it
7262      # for the tool.
7263
7264      # First remove it from the list of overridden variables, so we can test
7265      # for unknown variables in the end.
7266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7267
7268      # Check if the provided tool contains a complete path.
7269      tool_specified="$FIND"
7270      tool_basename="${tool_specified##*/}"
7271      if test "x$tool_basename" = "x$tool_specified"; then
7272        # A command without a complete path is provided, search $PATH.
7273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7274$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7275        # Extract the first word of "$tool_basename", so it can be a program name with args.
7276set dummy $tool_basename; ac_word=$2
7277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7278$as_echo_n "checking for $ac_word... " >&6; }
7279if ${ac_cv_path_FIND+:} false; then :
7280  $as_echo_n "(cached) " >&6
7281else
7282  case $FIND in
7283  [\\/]* | ?:[\\/]*)
7284  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7285  ;;
7286  *)
7287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7288for as_dir in $PATH
7289do
7290  IFS=$as_save_IFS
7291  test -z "$as_dir" && as_dir=.
7292    for ac_exec_ext in '' $ac_executable_extensions; do
7293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7294    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7296    break 2
7297  fi
7298done
7299  done
7300IFS=$as_save_IFS
7301
7302  ;;
7303esac
7304fi
7305FIND=$ac_cv_path_FIND
7306if test -n "$FIND"; then
7307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7308$as_echo "$FIND" >&6; }
7309else
7310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311$as_echo "no" >&6; }
7312fi
7313
7314
7315        if test "x$FIND" = x; then
7316          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7317        fi
7318      else
7319        # Otherwise we believe it is a complete path. Use it as it is.
7320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7321$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7323$as_echo_n "checking for FIND... " >&6; }
7324        if test ! -x "$tool_specified"; then
7325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7326$as_echo "not found" >&6; }
7327          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7328        fi
7329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7330$as_echo "$tool_specified" >&6; }
7331      fi
7332    fi
7333  fi
7334
7335
7336
7337  if test "x$FIND" = x; then
7338    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7339  fi
7340
7341
7342
7343
7344
7345  # Publish this variable in the help.
7346
7347
7348  if test "x$HEAD" = x; then
7349    # The variable is not set by user, try to locate tool using the code snippet
7350    for ac_prog in head
7351do
7352  # Extract the first word of "$ac_prog", so it can be a program name with args.
7353set dummy $ac_prog; ac_word=$2
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355$as_echo_n "checking for $ac_word... " >&6; }
7356if ${ac_cv_path_HEAD+:} false; then :
7357  $as_echo_n "(cached) " >&6
7358else
7359  case $HEAD in
7360  [\\/]* | ?:[\\/]*)
7361  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7362  ;;
7363  *)
7364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7365for as_dir in $PATH
7366do
7367  IFS=$as_save_IFS
7368  test -z "$as_dir" && as_dir=.
7369    for ac_exec_ext in '' $ac_executable_extensions; do
7370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7371    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7373    break 2
7374  fi
7375done
7376  done
7377IFS=$as_save_IFS
7378
7379  ;;
7380esac
7381fi
7382HEAD=$ac_cv_path_HEAD
7383if test -n "$HEAD"; then
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7385$as_echo "$HEAD" >&6; }
7386else
7387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
7389fi
7390
7391
7392  test -n "$HEAD" && break
7393done
7394
7395  else
7396    # The variable is set, but is it from the command line or the environment?
7397
7398    # Try to remove the string !HEAD! from our list.
7399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7401      # If it failed, the variable was not from the command line. Ignore it,
7402      # but warn the user (except for BASH, which is always set by the calling BASH).
7403      if test "xHEAD" != xBASH; then
7404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7405$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7406      fi
7407      # Try to locate tool using the code snippet
7408      for ac_prog in head
7409do
7410  # Extract the first word of "$ac_prog", so it can be a program name with args.
7411set dummy $ac_prog; ac_word=$2
7412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7413$as_echo_n "checking for $ac_word... " >&6; }
7414if ${ac_cv_path_HEAD+:} false; then :
7415  $as_echo_n "(cached) " >&6
7416else
7417  case $HEAD in
7418  [\\/]* | ?:[\\/]*)
7419  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7420  ;;
7421  *)
7422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423for as_dir in $PATH
7424do
7425  IFS=$as_save_IFS
7426  test -z "$as_dir" && as_dir=.
7427    for ac_exec_ext in '' $ac_executable_extensions; do
7428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7429    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7431    break 2
7432  fi
7433done
7434  done
7435IFS=$as_save_IFS
7436
7437  ;;
7438esac
7439fi
7440HEAD=$ac_cv_path_HEAD
7441if test -n "$HEAD"; then
7442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7443$as_echo "$HEAD" >&6; }
7444else
7445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446$as_echo "no" >&6; }
7447fi
7448
7449
7450  test -n "$HEAD" && break
7451done
7452
7453    else
7454      # If it succeeded, then it was overridden by the user. We will use it
7455      # for the tool.
7456
7457      # First remove it from the list of overridden variables, so we can test
7458      # for unknown variables in the end.
7459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7460
7461      # Check if the provided tool contains a complete path.
7462      tool_specified="$HEAD"
7463      tool_basename="${tool_specified##*/}"
7464      if test "x$tool_basename" = "x$tool_specified"; then
7465        # A command without a complete path is provided, search $PATH.
7466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7467$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7468        # Extract the first word of "$tool_basename", so it can be a program name with args.
7469set dummy $tool_basename; ac_word=$2
7470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471$as_echo_n "checking for $ac_word... " >&6; }
7472if ${ac_cv_path_HEAD+:} false; then :
7473  $as_echo_n "(cached) " >&6
7474else
7475  case $HEAD in
7476  [\\/]* | ?:[\\/]*)
7477  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7478  ;;
7479  *)
7480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481for as_dir in $PATH
7482do
7483  IFS=$as_save_IFS
7484  test -z "$as_dir" && as_dir=.
7485    for ac_exec_ext in '' $ac_executable_extensions; do
7486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489    break 2
7490  fi
7491done
7492  done
7493IFS=$as_save_IFS
7494
7495  ;;
7496esac
7497fi
7498HEAD=$ac_cv_path_HEAD
7499if test -n "$HEAD"; then
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7501$as_echo "$HEAD" >&6; }
7502else
7503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504$as_echo "no" >&6; }
7505fi
7506
7507
7508        if test "x$HEAD" = x; then
7509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7510        fi
7511      else
7512        # Otherwise we believe it is a complete path. Use it as it is.
7513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7514$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7516$as_echo_n "checking for HEAD... " >&6; }
7517        if test ! -x "$tool_specified"; then
7518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7519$as_echo "not found" >&6; }
7520          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7521        fi
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7523$as_echo "$tool_specified" >&6; }
7524      fi
7525    fi
7526  fi
7527
7528
7529
7530  if test "x$HEAD" = x; then
7531    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7532  fi
7533
7534
7535
7536
7537
7538  # Publish this variable in the help.
7539
7540
7541  if test "x$LN" = x; then
7542    # The variable is not set by user, try to locate tool using the code snippet
7543    for ac_prog in ln
7544do
7545  # Extract the first word of "$ac_prog", so it can be a program name with args.
7546set dummy $ac_prog; ac_word=$2
7547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7548$as_echo_n "checking for $ac_word... " >&6; }
7549if ${ac_cv_path_LN+:} false; then :
7550  $as_echo_n "(cached) " >&6
7551else
7552  case $LN in
7553  [\\/]* | ?:[\\/]*)
7554  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7555  ;;
7556  *)
7557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7558for as_dir in $PATH
7559do
7560  IFS=$as_save_IFS
7561  test -z "$as_dir" && as_dir=.
7562    for ac_exec_ext in '' $ac_executable_extensions; do
7563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7564    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7566    break 2
7567  fi
7568done
7569  done
7570IFS=$as_save_IFS
7571
7572  ;;
7573esac
7574fi
7575LN=$ac_cv_path_LN
7576if test -n "$LN"; then
7577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7578$as_echo "$LN" >&6; }
7579else
7580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7581$as_echo "no" >&6; }
7582fi
7583
7584
7585  test -n "$LN" && break
7586done
7587
7588  else
7589    # The variable is set, but is it from the command line or the environment?
7590
7591    # Try to remove the string !LN! from our list.
7592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7594      # If it failed, the variable was not from the command line. Ignore it,
7595      # but warn the user (except for BASH, which is always set by the calling BASH).
7596      if test "xLN" != xBASH; then
7597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7598$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7599      fi
7600      # Try to locate tool using the code snippet
7601      for ac_prog in ln
7602do
7603  # Extract the first word of "$ac_prog", so it can be a program name with args.
7604set dummy $ac_prog; ac_word=$2
7605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7606$as_echo_n "checking for $ac_word... " >&6; }
7607if ${ac_cv_path_LN+:} false; then :
7608  $as_echo_n "(cached) " >&6
7609else
7610  case $LN in
7611  [\\/]* | ?:[\\/]*)
7612  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7613  ;;
7614  *)
7615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7616for as_dir in $PATH
7617do
7618  IFS=$as_save_IFS
7619  test -z "$as_dir" && as_dir=.
7620    for ac_exec_ext in '' $ac_executable_extensions; do
7621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7622    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7624    break 2
7625  fi
7626done
7627  done
7628IFS=$as_save_IFS
7629
7630  ;;
7631esac
7632fi
7633LN=$ac_cv_path_LN
7634if test -n "$LN"; then
7635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7636$as_echo "$LN" >&6; }
7637else
7638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7639$as_echo "no" >&6; }
7640fi
7641
7642
7643  test -n "$LN" && break
7644done
7645
7646    else
7647      # If it succeeded, then it was overridden by the user. We will use it
7648      # for the tool.
7649
7650      # First remove it from the list of overridden variables, so we can test
7651      # for unknown variables in the end.
7652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7653
7654      # Check if the provided tool contains a complete path.
7655      tool_specified="$LN"
7656      tool_basename="${tool_specified##*/}"
7657      if test "x$tool_basename" = "x$tool_specified"; then
7658        # A command without a complete path is provided, search $PATH.
7659        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7660$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7661        # Extract the first word of "$tool_basename", so it can be a program name with args.
7662set dummy $tool_basename; ac_word=$2
7663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7664$as_echo_n "checking for $ac_word... " >&6; }
7665if ${ac_cv_path_LN+:} false; then :
7666  $as_echo_n "(cached) " >&6
7667else
7668  case $LN in
7669  [\\/]* | ?:[\\/]*)
7670  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7671  ;;
7672  *)
7673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7674for as_dir in $PATH
7675do
7676  IFS=$as_save_IFS
7677  test -z "$as_dir" && as_dir=.
7678    for ac_exec_ext in '' $ac_executable_extensions; do
7679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7680    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7682    break 2
7683  fi
7684done
7685  done
7686IFS=$as_save_IFS
7687
7688  ;;
7689esac
7690fi
7691LN=$ac_cv_path_LN
7692if test -n "$LN"; then
7693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7694$as_echo "$LN" >&6; }
7695else
7696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697$as_echo "no" >&6; }
7698fi
7699
7700
7701        if test "x$LN" = x; then
7702          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7703        fi
7704      else
7705        # Otherwise we believe it is a complete path. Use it as it is.
7706        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7707$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7709$as_echo_n "checking for LN... " >&6; }
7710        if test ! -x "$tool_specified"; then
7711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7712$as_echo "not found" >&6; }
7713          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7714        fi
7715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7716$as_echo "$tool_specified" >&6; }
7717      fi
7718    fi
7719  fi
7720
7721
7722
7723  if test "x$LN" = x; then
7724    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7725  fi
7726
7727
7728
7729
7730
7731  # Publish this variable in the help.
7732
7733
7734  if test "x$LS" = x; then
7735    # The variable is not set by user, try to locate tool using the code snippet
7736    for ac_prog in ls
7737do
7738  # Extract the first word of "$ac_prog", so it can be a program name with args.
7739set dummy $ac_prog; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_path_LS+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  case $LS in
7746  [\\/]* | ?:[\\/]*)
7747  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7748  ;;
7749  *)
7750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751for as_dir in $PATH
7752do
7753  IFS=$as_save_IFS
7754  test -z "$as_dir" && as_dir=.
7755    for ac_exec_ext in '' $ac_executable_extensions; do
7756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759    break 2
7760  fi
7761done
7762  done
7763IFS=$as_save_IFS
7764
7765  ;;
7766esac
7767fi
7768LS=$ac_cv_path_LS
7769if test -n "$LS"; then
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7771$as_echo "$LS" >&6; }
7772else
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774$as_echo "no" >&6; }
7775fi
7776
7777
7778  test -n "$LS" && break
7779done
7780
7781  else
7782    # The variable is set, but is it from the command line or the environment?
7783
7784    # Try to remove the string !LS! from our list.
7785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7787      # If it failed, the variable was not from the command line. Ignore it,
7788      # but warn the user (except for BASH, which is always set by the calling BASH).
7789      if test "xLS" != xBASH; then
7790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7791$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7792      fi
7793      # Try to locate tool using the code snippet
7794      for ac_prog in ls
7795do
7796  # Extract the first word of "$ac_prog", so it can be a program name with args.
7797set dummy $ac_prog; ac_word=$2
7798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7799$as_echo_n "checking for $ac_word... " >&6; }
7800if ${ac_cv_path_LS+:} false; then :
7801  $as_echo_n "(cached) " >&6
7802else
7803  case $LS in
7804  [\\/]* | ?:[\\/]*)
7805  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7806  ;;
7807  *)
7808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7809for as_dir in $PATH
7810do
7811  IFS=$as_save_IFS
7812  test -z "$as_dir" && as_dir=.
7813    for ac_exec_ext in '' $ac_executable_extensions; do
7814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7815    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7817    break 2
7818  fi
7819done
7820  done
7821IFS=$as_save_IFS
7822
7823  ;;
7824esac
7825fi
7826LS=$ac_cv_path_LS
7827if test -n "$LS"; then
7828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7829$as_echo "$LS" >&6; }
7830else
7831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832$as_echo "no" >&6; }
7833fi
7834
7835
7836  test -n "$LS" && break
7837done
7838
7839    else
7840      # If it succeeded, then it was overridden by the user. We will use it
7841      # for the tool.
7842
7843      # First remove it from the list of overridden variables, so we can test
7844      # for unknown variables in the end.
7845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7846
7847      # Check if the provided tool contains a complete path.
7848      tool_specified="$LS"
7849      tool_basename="${tool_specified##*/}"
7850      if test "x$tool_basename" = "x$tool_specified"; then
7851        # A command without a complete path is provided, search $PATH.
7852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7853$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7854        # Extract the first word of "$tool_basename", so it can be a program name with args.
7855set dummy $tool_basename; ac_word=$2
7856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7857$as_echo_n "checking for $ac_word... " >&6; }
7858if ${ac_cv_path_LS+:} false; then :
7859  $as_echo_n "(cached) " >&6
7860else
7861  case $LS in
7862  [\\/]* | ?:[\\/]*)
7863  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7864  ;;
7865  *)
7866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867for as_dir in $PATH
7868do
7869  IFS=$as_save_IFS
7870  test -z "$as_dir" && as_dir=.
7871    for ac_exec_ext in '' $ac_executable_extensions; do
7872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7873    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875    break 2
7876  fi
7877done
7878  done
7879IFS=$as_save_IFS
7880
7881  ;;
7882esac
7883fi
7884LS=$ac_cv_path_LS
7885if test -n "$LS"; then
7886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7887$as_echo "$LS" >&6; }
7888else
7889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890$as_echo "no" >&6; }
7891fi
7892
7893
7894        if test "x$LS" = x; then
7895          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7896        fi
7897      else
7898        # Otherwise we believe it is a complete path. Use it as it is.
7899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7900$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7902$as_echo_n "checking for LS... " >&6; }
7903        if test ! -x "$tool_specified"; then
7904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7905$as_echo "not found" >&6; }
7906          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7907        fi
7908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7909$as_echo "$tool_specified" >&6; }
7910      fi
7911    fi
7912  fi
7913
7914
7915
7916  if test "x$LS" = x; then
7917    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7918  fi
7919
7920
7921
7922
7923
7924  # Publish this variable in the help.
7925
7926
7927  if test "x$MKDIR" = x; then
7928    # The variable is not set by user, try to locate tool using the code snippet
7929    for ac_prog in mkdir
7930do
7931  # Extract the first word of "$ac_prog", so it can be a program name with args.
7932set dummy $ac_prog; ac_word=$2
7933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7934$as_echo_n "checking for $ac_word... " >&6; }
7935if ${ac_cv_path_MKDIR+:} false; then :
7936  $as_echo_n "(cached) " >&6
7937else
7938  case $MKDIR in
7939  [\\/]* | ?:[\\/]*)
7940  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7941  ;;
7942  *)
7943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7944for as_dir in $PATH
7945do
7946  IFS=$as_save_IFS
7947  test -z "$as_dir" && as_dir=.
7948    for ac_exec_ext in '' $ac_executable_extensions; do
7949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7950    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7952    break 2
7953  fi
7954done
7955  done
7956IFS=$as_save_IFS
7957
7958  ;;
7959esac
7960fi
7961MKDIR=$ac_cv_path_MKDIR
7962if test -n "$MKDIR"; then
7963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7964$as_echo "$MKDIR" >&6; }
7965else
7966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7967$as_echo "no" >&6; }
7968fi
7969
7970
7971  test -n "$MKDIR" && break
7972done
7973
7974  else
7975    # The variable is set, but is it from the command line or the environment?
7976
7977    # Try to remove the string !MKDIR! from our list.
7978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7980      # If it failed, the variable was not from the command line. Ignore it,
7981      # but warn the user (except for BASH, which is always set by the calling BASH).
7982      if test "xMKDIR" != xBASH; then
7983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7984$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7985      fi
7986      # Try to locate tool using the code snippet
7987      for ac_prog in mkdir
7988do
7989  # Extract the first word of "$ac_prog", so it can be a program name with args.
7990set dummy $ac_prog; ac_word=$2
7991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7992$as_echo_n "checking for $ac_word... " >&6; }
7993if ${ac_cv_path_MKDIR+:} false; then :
7994  $as_echo_n "(cached) " >&6
7995else
7996  case $MKDIR in
7997  [\\/]* | ?:[\\/]*)
7998  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7999  ;;
8000  *)
8001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8002for as_dir in $PATH
8003do
8004  IFS=$as_save_IFS
8005  test -z "$as_dir" && as_dir=.
8006    for ac_exec_ext in '' $ac_executable_extensions; do
8007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8008    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8010    break 2
8011  fi
8012done
8013  done
8014IFS=$as_save_IFS
8015
8016  ;;
8017esac
8018fi
8019MKDIR=$ac_cv_path_MKDIR
8020if test -n "$MKDIR"; then
8021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8022$as_echo "$MKDIR" >&6; }
8023else
8024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8025$as_echo "no" >&6; }
8026fi
8027
8028
8029  test -n "$MKDIR" && break
8030done
8031
8032    else
8033      # If it succeeded, then it was overridden by the user. We will use it
8034      # for the tool.
8035
8036      # First remove it from the list of overridden variables, so we can test
8037      # for unknown variables in the end.
8038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8039
8040      # Check if the provided tool contains a complete path.
8041      tool_specified="$MKDIR"
8042      tool_basename="${tool_specified##*/}"
8043      if test "x$tool_basename" = "x$tool_specified"; then
8044        # A command without a complete path is provided, search $PATH.
8045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8046$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8047        # Extract the first word of "$tool_basename", so it can be a program name with args.
8048set dummy $tool_basename; ac_word=$2
8049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8050$as_echo_n "checking for $ac_word... " >&6; }
8051if ${ac_cv_path_MKDIR+:} false; then :
8052  $as_echo_n "(cached) " >&6
8053else
8054  case $MKDIR in
8055  [\\/]* | ?:[\\/]*)
8056  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8057  ;;
8058  *)
8059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8060for as_dir in $PATH
8061do
8062  IFS=$as_save_IFS
8063  test -z "$as_dir" && as_dir=.
8064    for ac_exec_ext in '' $ac_executable_extensions; do
8065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8066    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8068    break 2
8069  fi
8070done
8071  done
8072IFS=$as_save_IFS
8073
8074  ;;
8075esac
8076fi
8077MKDIR=$ac_cv_path_MKDIR
8078if test -n "$MKDIR"; then
8079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8080$as_echo "$MKDIR" >&6; }
8081else
8082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8083$as_echo "no" >&6; }
8084fi
8085
8086
8087        if test "x$MKDIR" = x; then
8088          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8089        fi
8090      else
8091        # Otherwise we believe it is a complete path. Use it as it is.
8092        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8093$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8095$as_echo_n "checking for MKDIR... " >&6; }
8096        if test ! -x "$tool_specified"; then
8097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8098$as_echo "not found" >&6; }
8099          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8100        fi
8101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8102$as_echo "$tool_specified" >&6; }
8103      fi
8104    fi
8105  fi
8106
8107
8108
8109  if test "x$MKDIR" = x; then
8110    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8111  fi
8112
8113
8114
8115
8116
8117  # Publish this variable in the help.
8118
8119
8120  if test "x$MKTEMP" = x; then
8121    # The variable is not set by user, try to locate tool using the code snippet
8122    for ac_prog in mktemp
8123do
8124  # Extract the first word of "$ac_prog", so it can be a program name with args.
8125set dummy $ac_prog; ac_word=$2
8126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8127$as_echo_n "checking for $ac_word... " >&6; }
8128if ${ac_cv_path_MKTEMP+:} false; then :
8129  $as_echo_n "(cached) " >&6
8130else
8131  case $MKTEMP in
8132  [\\/]* | ?:[\\/]*)
8133  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8134  ;;
8135  *)
8136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8137for as_dir in $PATH
8138do
8139  IFS=$as_save_IFS
8140  test -z "$as_dir" && as_dir=.
8141    for ac_exec_ext in '' $ac_executable_extensions; do
8142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8143    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8145    break 2
8146  fi
8147done
8148  done
8149IFS=$as_save_IFS
8150
8151  ;;
8152esac
8153fi
8154MKTEMP=$ac_cv_path_MKTEMP
8155if test -n "$MKTEMP"; then
8156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8157$as_echo "$MKTEMP" >&6; }
8158else
8159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8160$as_echo "no" >&6; }
8161fi
8162
8163
8164  test -n "$MKTEMP" && break
8165done
8166
8167  else
8168    # The variable is set, but is it from the command line or the environment?
8169
8170    # Try to remove the string !MKTEMP! from our list.
8171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8173      # If it failed, the variable was not from the command line. Ignore it,
8174      # but warn the user (except for BASH, which is always set by the calling BASH).
8175      if test "xMKTEMP" != xBASH; then
8176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8177$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8178      fi
8179      # Try to locate tool using the code snippet
8180      for ac_prog in mktemp
8181do
8182  # Extract the first word of "$ac_prog", so it can be a program name with args.
8183set dummy $ac_prog; ac_word=$2
8184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8185$as_echo_n "checking for $ac_word... " >&6; }
8186if ${ac_cv_path_MKTEMP+:} false; then :
8187  $as_echo_n "(cached) " >&6
8188else
8189  case $MKTEMP in
8190  [\\/]* | ?:[\\/]*)
8191  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8192  ;;
8193  *)
8194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8195for as_dir in $PATH
8196do
8197  IFS=$as_save_IFS
8198  test -z "$as_dir" && as_dir=.
8199    for ac_exec_ext in '' $ac_executable_extensions; do
8200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8201    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8203    break 2
8204  fi
8205done
8206  done
8207IFS=$as_save_IFS
8208
8209  ;;
8210esac
8211fi
8212MKTEMP=$ac_cv_path_MKTEMP
8213if test -n "$MKTEMP"; then
8214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8215$as_echo "$MKTEMP" >&6; }
8216else
8217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8218$as_echo "no" >&6; }
8219fi
8220
8221
8222  test -n "$MKTEMP" && break
8223done
8224
8225    else
8226      # If it succeeded, then it was overridden by the user. We will use it
8227      # for the tool.
8228
8229      # First remove it from the list of overridden variables, so we can test
8230      # for unknown variables in the end.
8231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8232
8233      # Check if the provided tool contains a complete path.
8234      tool_specified="$MKTEMP"
8235      tool_basename="${tool_specified##*/}"
8236      if test "x$tool_basename" = "x$tool_specified"; then
8237        # A command without a complete path is provided, search $PATH.
8238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8239$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8240        # Extract the first word of "$tool_basename", so it can be a program name with args.
8241set dummy $tool_basename; ac_word=$2
8242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8243$as_echo_n "checking for $ac_word... " >&6; }
8244if ${ac_cv_path_MKTEMP+:} false; then :
8245  $as_echo_n "(cached) " >&6
8246else
8247  case $MKTEMP in
8248  [\\/]* | ?:[\\/]*)
8249  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8250  ;;
8251  *)
8252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8253for as_dir in $PATH
8254do
8255  IFS=$as_save_IFS
8256  test -z "$as_dir" && as_dir=.
8257    for ac_exec_ext in '' $ac_executable_extensions; do
8258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8259    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8261    break 2
8262  fi
8263done
8264  done
8265IFS=$as_save_IFS
8266
8267  ;;
8268esac
8269fi
8270MKTEMP=$ac_cv_path_MKTEMP
8271if test -n "$MKTEMP"; then
8272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8273$as_echo "$MKTEMP" >&6; }
8274else
8275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8276$as_echo "no" >&6; }
8277fi
8278
8279
8280        if test "x$MKTEMP" = x; then
8281          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8282        fi
8283      else
8284        # Otherwise we believe it is a complete path. Use it as it is.
8285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8286$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8288$as_echo_n "checking for MKTEMP... " >&6; }
8289        if test ! -x "$tool_specified"; then
8290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8291$as_echo "not found" >&6; }
8292          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8293        fi
8294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8295$as_echo "$tool_specified" >&6; }
8296      fi
8297    fi
8298  fi
8299
8300
8301
8302  if test "x$MKTEMP" = x; then
8303    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8304  fi
8305
8306
8307
8308
8309
8310  # Publish this variable in the help.
8311
8312
8313  if test "x$MV" = x; then
8314    # The variable is not set by user, try to locate tool using the code snippet
8315    for ac_prog in mv
8316do
8317  # Extract the first word of "$ac_prog", so it can be a program name with args.
8318set dummy $ac_prog; ac_word=$2
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320$as_echo_n "checking for $ac_word... " >&6; }
8321if ${ac_cv_path_MV+:} false; then :
8322  $as_echo_n "(cached) " >&6
8323else
8324  case $MV in
8325  [\\/]* | ?:[\\/]*)
8326  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8327  ;;
8328  *)
8329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8330for as_dir in $PATH
8331do
8332  IFS=$as_save_IFS
8333  test -z "$as_dir" && as_dir=.
8334    for ac_exec_ext in '' $ac_executable_extensions; do
8335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8336    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8338    break 2
8339  fi
8340done
8341  done
8342IFS=$as_save_IFS
8343
8344  ;;
8345esac
8346fi
8347MV=$ac_cv_path_MV
8348if test -n "$MV"; then
8349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8350$as_echo "$MV" >&6; }
8351else
8352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8353$as_echo "no" >&6; }
8354fi
8355
8356
8357  test -n "$MV" && break
8358done
8359
8360  else
8361    # The variable is set, but is it from the command line or the environment?
8362
8363    # Try to remove the string !MV! from our list.
8364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8366      # If it failed, the variable was not from the command line. Ignore it,
8367      # but warn the user (except for BASH, which is always set by the calling BASH).
8368      if test "xMV" != xBASH; then
8369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8370$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8371      fi
8372      # Try to locate tool using the code snippet
8373      for ac_prog in mv
8374do
8375  # Extract the first word of "$ac_prog", so it can be a program name with args.
8376set dummy $ac_prog; ac_word=$2
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378$as_echo_n "checking for $ac_word... " >&6; }
8379if ${ac_cv_path_MV+:} false; then :
8380  $as_echo_n "(cached) " >&6
8381else
8382  case $MV in
8383  [\\/]* | ?:[\\/]*)
8384  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8385  ;;
8386  *)
8387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8388for as_dir in $PATH
8389do
8390  IFS=$as_save_IFS
8391  test -z "$as_dir" && as_dir=.
8392    for ac_exec_ext in '' $ac_executable_extensions; do
8393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8394    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396    break 2
8397  fi
8398done
8399  done
8400IFS=$as_save_IFS
8401
8402  ;;
8403esac
8404fi
8405MV=$ac_cv_path_MV
8406if test -n "$MV"; then
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8408$as_echo "$MV" >&6; }
8409else
8410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8411$as_echo "no" >&6; }
8412fi
8413
8414
8415  test -n "$MV" && break
8416done
8417
8418    else
8419      # If it succeeded, then it was overridden by the user. We will use it
8420      # for the tool.
8421
8422      # First remove it from the list of overridden variables, so we can test
8423      # for unknown variables in the end.
8424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8425
8426      # Check if the provided tool contains a complete path.
8427      tool_specified="$MV"
8428      tool_basename="${tool_specified##*/}"
8429      if test "x$tool_basename" = "x$tool_specified"; then
8430        # A command without a complete path is provided, search $PATH.
8431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8432$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8433        # Extract the first word of "$tool_basename", so it can be a program name with args.
8434set dummy $tool_basename; ac_word=$2
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8436$as_echo_n "checking for $ac_word... " >&6; }
8437if ${ac_cv_path_MV+:} false; then :
8438  $as_echo_n "(cached) " >&6
8439else
8440  case $MV in
8441  [\\/]* | ?:[\\/]*)
8442  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8443  ;;
8444  *)
8445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8446for as_dir in $PATH
8447do
8448  IFS=$as_save_IFS
8449  test -z "$as_dir" && as_dir=.
8450    for ac_exec_ext in '' $ac_executable_extensions; do
8451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8452    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8454    break 2
8455  fi
8456done
8457  done
8458IFS=$as_save_IFS
8459
8460  ;;
8461esac
8462fi
8463MV=$ac_cv_path_MV
8464if test -n "$MV"; then
8465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8466$as_echo "$MV" >&6; }
8467else
8468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8469$as_echo "no" >&6; }
8470fi
8471
8472
8473        if test "x$MV" = x; then
8474          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8475        fi
8476      else
8477        # Otherwise we believe it is a complete path. Use it as it is.
8478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8479$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8481$as_echo_n "checking for MV... " >&6; }
8482        if test ! -x "$tool_specified"; then
8483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8484$as_echo "not found" >&6; }
8485          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8486        fi
8487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8488$as_echo "$tool_specified" >&6; }
8489      fi
8490    fi
8491  fi
8492
8493
8494
8495  if test "x$MV" = x; then
8496    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8497  fi
8498
8499
8500
8501
8502
8503  # Publish this variable in the help.
8504
8505
8506  if test "x$NAWK" = x; then
8507    # The variable is not set by user, try to locate tool using the code snippet
8508    for ac_prog in nawk gawk awk
8509do
8510  # Extract the first word of "$ac_prog", so it can be a program name with args.
8511set dummy $ac_prog; ac_word=$2
8512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8513$as_echo_n "checking for $ac_word... " >&6; }
8514if ${ac_cv_path_NAWK+:} false; then :
8515  $as_echo_n "(cached) " >&6
8516else
8517  case $NAWK in
8518  [\\/]* | ?:[\\/]*)
8519  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8520  ;;
8521  *)
8522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523for as_dir in $PATH
8524do
8525  IFS=$as_save_IFS
8526  test -z "$as_dir" && as_dir=.
8527    for ac_exec_ext in '' $ac_executable_extensions; do
8528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8529    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531    break 2
8532  fi
8533done
8534  done
8535IFS=$as_save_IFS
8536
8537  ;;
8538esac
8539fi
8540NAWK=$ac_cv_path_NAWK
8541if test -n "$NAWK"; then
8542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8543$as_echo "$NAWK" >&6; }
8544else
8545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8546$as_echo "no" >&6; }
8547fi
8548
8549
8550  test -n "$NAWK" && break
8551done
8552
8553  else
8554    # The variable is set, but is it from the command line or the environment?
8555
8556    # Try to remove the string !NAWK! from our list.
8557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8559      # If it failed, the variable was not from the command line. Ignore it,
8560      # but warn the user (except for BASH, which is always set by the calling BASH).
8561      if test "xNAWK" != xBASH; then
8562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8563$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8564      fi
8565      # Try to locate tool using the code snippet
8566      for ac_prog in nawk gawk awk
8567do
8568  # Extract the first word of "$ac_prog", so it can be a program name with args.
8569set dummy $ac_prog; ac_word=$2
8570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8571$as_echo_n "checking for $ac_word... " >&6; }
8572if ${ac_cv_path_NAWK+:} false; then :
8573  $as_echo_n "(cached) " >&6
8574else
8575  case $NAWK in
8576  [\\/]* | ?:[\\/]*)
8577  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8578  ;;
8579  *)
8580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8581for as_dir in $PATH
8582do
8583  IFS=$as_save_IFS
8584  test -z "$as_dir" && as_dir=.
8585    for ac_exec_ext in '' $ac_executable_extensions; do
8586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8587    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8589    break 2
8590  fi
8591done
8592  done
8593IFS=$as_save_IFS
8594
8595  ;;
8596esac
8597fi
8598NAWK=$ac_cv_path_NAWK
8599if test -n "$NAWK"; then
8600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8601$as_echo "$NAWK" >&6; }
8602else
8603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8604$as_echo "no" >&6; }
8605fi
8606
8607
8608  test -n "$NAWK" && break
8609done
8610
8611    else
8612      # If it succeeded, then it was overridden by the user. We will use it
8613      # for the tool.
8614
8615      # First remove it from the list of overridden variables, so we can test
8616      # for unknown variables in the end.
8617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8618
8619      # Check if the provided tool contains a complete path.
8620      tool_specified="$NAWK"
8621      tool_basename="${tool_specified##*/}"
8622      if test "x$tool_basename" = "x$tool_specified"; then
8623        # A command without a complete path is provided, search $PATH.
8624        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8625$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8626        # Extract the first word of "$tool_basename", so it can be a program name with args.
8627set dummy $tool_basename; ac_word=$2
8628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8629$as_echo_n "checking for $ac_word... " >&6; }
8630if ${ac_cv_path_NAWK+:} false; then :
8631  $as_echo_n "(cached) " >&6
8632else
8633  case $NAWK in
8634  [\\/]* | ?:[\\/]*)
8635  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8636  ;;
8637  *)
8638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8639for as_dir in $PATH
8640do
8641  IFS=$as_save_IFS
8642  test -z "$as_dir" && as_dir=.
8643    for ac_exec_ext in '' $ac_executable_extensions; do
8644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8645    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8647    break 2
8648  fi
8649done
8650  done
8651IFS=$as_save_IFS
8652
8653  ;;
8654esac
8655fi
8656NAWK=$ac_cv_path_NAWK
8657if test -n "$NAWK"; then
8658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8659$as_echo "$NAWK" >&6; }
8660else
8661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8662$as_echo "no" >&6; }
8663fi
8664
8665
8666        if test "x$NAWK" = x; then
8667          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8668        fi
8669      else
8670        # Otherwise we believe it is a complete path. Use it as it is.
8671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8672$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8674$as_echo_n "checking for NAWK... " >&6; }
8675        if test ! -x "$tool_specified"; then
8676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8677$as_echo "not found" >&6; }
8678          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8679        fi
8680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8681$as_echo "$tool_specified" >&6; }
8682      fi
8683    fi
8684  fi
8685
8686
8687
8688  if test "x$NAWK" = x; then
8689    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8690  fi
8691
8692
8693
8694
8695
8696  # Publish this variable in the help.
8697
8698
8699  if test "x$PRINTF" = x; then
8700    # The variable is not set by user, try to locate tool using the code snippet
8701    for ac_prog in printf
8702do
8703  # Extract the first word of "$ac_prog", so it can be a program name with args.
8704set dummy $ac_prog; ac_word=$2
8705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8706$as_echo_n "checking for $ac_word... " >&6; }
8707if ${ac_cv_path_PRINTF+:} false; then :
8708  $as_echo_n "(cached) " >&6
8709else
8710  case $PRINTF in
8711  [\\/]* | ?:[\\/]*)
8712  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8713  ;;
8714  *)
8715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8716for as_dir in $PATH
8717do
8718  IFS=$as_save_IFS
8719  test -z "$as_dir" && as_dir=.
8720    for ac_exec_ext in '' $ac_executable_extensions; do
8721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8722    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8724    break 2
8725  fi
8726done
8727  done
8728IFS=$as_save_IFS
8729
8730  ;;
8731esac
8732fi
8733PRINTF=$ac_cv_path_PRINTF
8734if test -n "$PRINTF"; then
8735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8736$as_echo "$PRINTF" >&6; }
8737else
8738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8739$as_echo "no" >&6; }
8740fi
8741
8742
8743  test -n "$PRINTF" && break
8744done
8745
8746  else
8747    # The variable is set, but is it from the command line or the environment?
8748
8749    # Try to remove the string !PRINTF! from our list.
8750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8752      # If it failed, the variable was not from the command line. Ignore it,
8753      # but warn the user (except for BASH, which is always set by the calling BASH).
8754      if test "xPRINTF" != xBASH; then
8755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8756$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8757      fi
8758      # Try to locate tool using the code snippet
8759      for ac_prog in printf
8760do
8761  # Extract the first word of "$ac_prog", so it can be a program name with args.
8762set dummy $ac_prog; ac_word=$2
8763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8764$as_echo_n "checking for $ac_word... " >&6; }
8765if ${ac_cv_path_PRINTF+:} false; then :
8766  $as_echo_n "(cached) " >&6
8767else
8768  case $PRINTF in
8769  [\\/]* | ?:[\\/]*)
8770  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8771  ;;
8772  *)
8773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8774for as_dir in $PATH
8775do
8776  IFS=$as_save_IFS
8777  test -z "$as_dir" && as_dir=.
8778    for ac_exec_ext in '' $ac_executable_extensions; do
8779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8780    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8782    break 2
8783  fi
8784done
8785  done
8786IFS=$as_save_IFS
8787
8788  ;;
8789esac
8790fi
8791PRINTF=$ac_cv_path_PRINTF
8792if test -n "$PRINTF"; then
8793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8794$as_echo "$PRINTF" >&6; }
8795else
8796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8797$as_echo "no" >&6; }
8798fi
8799
8800
8801  test -n "$PRINTF" && break
8802done
8803
8804    else
8805      # If it succeeded, then it was overridden by the user. We will use it
8806      # for the tool.
8807
8808      # First remove it from the list of overridden variables, so we can test
8809      # for unknown variables in the end.
8810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8811
8812      # Check if the provided tool contains a complete path.
8813      tool_specified="$PRINTF"
8814      tool_basename="${tool_specified##*/}"
8815      if test "x$tool_basename" = "x$tool_specified"; then
8816        # A command without a complete path is provided, search $PATH.
8817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8818$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8819        # Extract the first word of "$tool_basename", so it can be a program name with args.
8820set dummy $tool_basename; ac_word=$2
8821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8822$as_echo_n "checking for $ac_word... " >&6; }
8823if ${ac_cv_path_PRINTF+:} false; then :
8824  $as_echo_n "(cached) " >&6
8825else
8826  case $PRINTF in
8827  [\\/]* | ?:[\\/]*)
8828  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8829  ;;
8830  *)
8831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8832for as_dir in $PATH
8833do
8834  IFS=$as_save_IFS
8835  test -z "$as_dir" && as_dir=.
8836    for ac_exec_ext in '' $ac_executable_extensions; do
8837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8838    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8840    break 2
8841  fi
8842done
8843  done
8844IFS=$as_save_IFS
8845
8846  ;;
8847esac
8848fi
8849PRINTF=$ac_cv_path_PRINTF
8850if test -n "$PRINTF"; then
8851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8852$as_echo "$PRINTF" >&6; }
8853else
8854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8855$as_echo "no" >&6; }
8856fi
8857
8858
8859        if test "x$PRINTF" = x; then
8860          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8861        fi
8862      else
8863        # Otherwise we believe it is a complete path. Use it as it is.
8864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8865$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8867$as_echo_n "checking for PRINTF... " >&6; }
8868        if test ! -x "$tool_specified"; then
8869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8870$as_echo "not found" >&6; }
8871          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8872        fi
8873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8874$as_echo "$tool_specified" >&6; }
8875      fi
8876    fi
8877  fi
8878
8879
8880
8881  if test "x$PRINTF" = x; then
8882    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8883  fi
8884
8885
8886
8887
8888
8889  # Publish this variable in the help.
8890
8891
8892  if test "x$RM" = x; then
8893    # The variable is not set by user, try to locate tool using the code snippet
8894    for ac_prog in rm
8895do
8896  # Extract the first word of "$ac_prog", so it can be a program name with args.
8897set dummy $ac_prog; ac_word=$2
8898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899$as_echo_n "checking for $ac_word... " >&6; }
8900if ${ac_cv_path_RM+:} false; then :
8901  $as_echo_n "(cached) " >&6
8902else
8903  case $RM in
8904  [\\/]* | ?:[\\/]*)
8905  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8906  ;;
8907  *)
8908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909for as_dir in $PATH
8910do
8911  IFS=$as_save_IFS
8912  test -z "$as_dir" && as_dir=.
8913    for ac_exec_ext in '' $ac_executable_extensions; do
8914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8915    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8917    break 2
8918  fi
8919done
8920  done
8921IFS=$as_save_IFS
8922
8923  ;;
8924esac
8925fi
8926RM=$ac_cv_path_RM
8927if test -n "$RM"; then
8928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8929$as_echo "$RM" >&6; }
8930else
8931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
8933fi
8934
8935
8936  test -n "$RM" && break
8937done
8938
8939  else
8940    # The variable is set, but is it from the command line or the environment?
8941
8942    # Try to remove the string !RM! from our list.
8943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8945      # If it failed, the variable was not from the command line. Ignore it,
8946      # but warn the user (except for BASH, which is always set by the calling BASH).
8947      if test "xRM" != xBASH; then
8948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8949$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8950      fi
8951      # Try to locate tool using the code snippet
8952      for ac_prog in rm
8953do
8954  # Extract the first word of "$ac_prog", so it can be a program name with args.
8955set dummy $ac_prog; ac_word=$2
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8957$as_echo_n "checking for $ac_word... " >&6; }
8958if ${ac_cv_path_RM+:} false; then :
8959  $as_echo_n "(cached) " >&6
8960else
8961  case $RM in
8962  [\\/]* | ?:[\\/]*)
8963  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8964  ;;
8965  *)
8966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8967for as_dir in $PATH
8968do
8969  IFS=$as_save_IFS
8970  test -z "$as_dir" && as_dir=.
8971    for ac_exec_ext in '' $ac_executable_extensions; do
8972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8973    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8975    break 2
8976  fi
8977done
8978  done
8979IFS=$as_save_IFS
8980
8981  ;;
8982esac
8983fi
8984RM=$ac_cv_path_RM
8985if test -n "$RM"; then
8986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8987$as_echo "$RM" >&6; }
8988else
8989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990$as_echo "no" >&6; }
8991fi
8992
8993
8994  test -n "$RM" && break
8995done
8996
8997    else
8998      # If it succeeded, then it was overridden by the user. We will use it
8999      # for the tool.
9000
9001      # First remove it from the list of overridden variables, so we can test
9002      # for unknown variables in the end.
9003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9004
9005      # Check if the provided tool contains a complete path.
9006      tool_specified="$RM"
9007      tool_basename="${tool_specified##*/}"
9008      if test "x$tool_basename" = "x$tool_specified"; then
9009        # A command without a complete path is provided, search $PATH.
9010        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9011$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9012        # Extract the first word of "$tool_basename", so it can be a program name with args.
9013set dummy $tool_basename; ac_word=$2
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9015$as_echo_n "checking for $ac_word... " >&6; }
9016if ${ac_cv_path_RM+:} false; then :
9017  $as_echo_n "(cached) " >&6
9018else
9019  case $RM in
9020  [\\/]* | ?:[\\/]*)
9021  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9022  ;;
9023  *)
9024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9025for as_dir in $PATH
9026do
9027  IFS=$as_save_IFS
9028  test -z "$as_dir" && as_dir=.
9029    for ac_exec_ext in '' $ac_executable_extensions; do
9030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9031    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9033    break 2
9034  fi
9035done
9036  done
9037IFS=$as_save_IFS
9038
9039  ;;
9040esac
9041fi
9042RM=$ac_cv_path_RM
9043if test -n "$RM"; then
9044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9045$as_echo "$RM" >&6; }
9046else
9047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9048$as_echo "no" >&6; }
9049fi
9050
9051
9052        if test "x$RM" = x; then
9053          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9054        fi
9055      else
9056        # Otherwise we believe it is a complete path. Use it as it is.
9057        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9058$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9060$as_echo_n "checking for RM... " >&6; }
9061        if test ! -x "$tool_specified"; then
9062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9063$as_echo "not found" >&6; }
9064          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9065        fi
9066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9067$as_echo "$tool_specified" >&6; }
9068      fi
9069    fi
9070  fi
9071
9072
9073
9074  if test "x$RM" = x; then
9075    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9076  fi
9077
9078
9079
9080
9081
9082  # Publish this variable in the help.
9083
9084
9085  if test "x$SH" = x; then
9086    # The variable is not set by user, try to locate tool using the code snippet
9087    for ac_prog in sh
9088do
9089  # Extract the first word of "$ac_prog", so it can be a program name with args.
9090set dummy $ac_prog; ac_word=$2
9091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9092$as_echo_n "checking for $ac_word... " >&6; }
9093if ${ac_cv_path_SH+:} false; then :
9094  $as_echo_n "(cached) " >&6
9095else
9096  case $SH in
9097  [\\/]* | ?:[\\/]*)
9098  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9099  ;;
9100  *)
9101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102for as_dir in $PATH
9103do
9104  IFS=$as_save_IFS
9105  test -z "$as_dir" && as_dir=.
9106    for ac_exec_ext in '' $ac_executable_extensions; do
9107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9108    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9110    break 2
9111  fi
9112done
9113  done
9114IFS=$as_save_IFS
9115
9116  ;;
9117esac
9118fi
9119SH=$ac_cv_path_SH
9120if test -n "$SH"; then
9121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9122$as_echo "$SH" >&6; }
9123else
9124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125$as_echo "no" >&6; }
9126fi
9127
9128
9129  test -n "$SH" && break
9130done
9131
9132  else
9133    # The variable is set, but is it from the command line or the environment?
9134
9135    # Try to remove the string !SH! from our list.
9136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9138      # If it failed, the variable was not from the command line. Ignore it,
9139      # but warn the user (except for BASH, which is always set by the calling BASH).
9140      if test "xSH" != xBASH; then
9141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9142$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9143      fi
9144      # Try to locate tool using the code snippet
9145      for ac_prog in sh
9146do
9147  # Extract the first word of "$ac_prog", so it can be a program name with args.
9148set dummy $ac_prog; ac_word=$2
9149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9150$as_echo_n "checking for $ac_word... " >&6; }
9151if ${ac_cv_path_SH+:} false; then :
9152  $as_echo_n "(cached) " >&6
9153else
9154  case $SH in
9155  [\\/]* | ?:[\\/]*)
9156  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9157  ;;
9158  *)
9159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9160for as_dir in $PATH
9161do
9162  IFS=$as_save_IFS
9163  test -z "$as_dir" && as_dir=.
9164    for ac_exec_ext in '' $ac_executable_extensions; do
9165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9166    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9168    break 2
9169  fi
9170done
9171  done
9172IFS=$as_save_IFS
9173
9174  ;;
9175esac
9176fi
9177SH=$ac_cv_path_SH
9178if test -n "$SH"; then
9179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9180$as_echo "$SH" >&6; }
9181else
9182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183$as_echo "no" >&6; }
9184fi
9185
9186
9187  test -n "$SH" && break
9188done
9189
9190    else
9191      # If it succeeded, then it was overridden by the user. We will use it
9192      # for the tool.
9193
9194      # First remove it from the list of overridden variables, so we can test
9195      # for unknown variables in the end.
9196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9197
9198      # Check if the provided tool contains a complete path.
9199      tool_specified="$SH"
9200      tool_basename="${tool_specified##*/}"
9201      if test "x$tool_basename" = "x$tool_specified"; then
9202        # A command without a complete path is provided, search $PATH.
9203        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9204$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9205        # Extract the first word of "$tool_basename", so it can be a program name with args.
9206set dummy $tool_basename; ac_word=$2
9207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9208$as_echo_n "checking for $ac_word... " >&6; }
9209if ${ac_cv_path_SH+:} false; then :
9210  $as_echo_n "(cached) " >&6
9211else
9212  case $SH in
9213  [\\/]* | ?:[\\/]*)
9214  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9215  ;;
9216  *)
9217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9218for as_dir in $PATH
9219do
9220  IFS=$as_save_IFS
9221  test -z "$as_dir" && as_dir=.
9222    for ac_exec_ext in '' $ac_executable_extensions; do
9223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9224    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9226    break 2
9227  fi
9228done
9229  done
9230IFS=$as_save_IFS
9231
9232  ;;
9233esac
9234fi
9235SH=$ac_cv_path_SH
9236if test -n "$SH"; then
9237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9238$as_echo "$SH" >&6; }
9239else
9240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
9242fi
9243
9244
9245        if test "x$SH" = x; then
9246          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9247        fi
9248      else
9249        # Otherwise we believe it is a complete path. Use it as it is.
9250        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9251$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9252        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9253$as_echo_n "checking for SH... " >&6; }
9254        if test ! -x "$tool_specified"; then
9255          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9256$as_echo "not found" >&6; }
9257          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9258        fi
9259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9260$as_echo "$tool_specified" >&6; }
9261      fi
9262    fi
9263  fi
9264
9265
9266
9267  if test "x$SH" = x; then
9268    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9269  fi
9270
9271
9272
9273
9274
9275  # Publish this variable in the help.
9276
9277
9278  if test "x$SORT" = x; then
9279    # The variable is not set by user, try to locate tool using the code snippet
9280    for ac_prog in sort
9281do
9282  # Extract the first word of "$ac_prog", so it can be a program name with args.
9283set dummy $ac_prog; ac_word=$2
9284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9285$as_echo_n "checking for $ac_word... " >&6; }
9286if ${ac_cv_path_SORT+:} false; then :
9287  $as_echo_n "(cached) " >&6
9288else
9289  case $SORT in
9290  [\\/]* | ?:[\\/]*)
9291  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9292  ;;
9293  *)
9294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9295for as_dir in $PATH
9296do
9297  IFS=$as_save_IFS
9298  test -z "$as_dir" && as_dir=.
9299    for ac_exec_ext in '' $ac_executable_extensions; do
9300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9301    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9303    break 2
9304  fi
9305done
9306  done
9307IFS=$as_save_IFS
9308
9309  ;;
9310esac
9311fi
9312SORT=$ac_cv_path_SORT
9313if test -n "$SORT"; then
9314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9315$as_echo "$SORT" >&6; }
9316else
9317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318$as_echo "no" >&6; }
9319fi
9320
9321
9322  test -n "$SORT" && break
9323done
9324
9325  else
9326    # The variable is set, but is it from the command line or the environment?
9327
9328    # Try to remove the string !SORT! from our list.
9329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9331      # If it failed, the variable was not from the command line. Ignore it,
9332      # but warn the user (except for BASH, which is always set by the calling BASH).
9333      if test "xSORT" != xBASH; then
9334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9335$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9336      fi
9337      # Try to locate tool using the code snippet
9338      for ac_prog in sort
9339do
9340  # Extract the first word of "$ac_prog", so it can be a program name with args.
9341set dummy $ac_prog; ac_word=$2
9342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9343$as_echo_n "checking for $ac_word... " >&6; }
9344if ${ac_cv_path_SORT+:} false; then :
9345  $as_echo_n "(cached) " >&6
9346else
9347  case $SORT in
9348  [\\/]* | ?:[\\/]*)
9349  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9350  ;;
9351  *)
9352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9353for as_dir in $PATH
9354do
9355  IFS=$as_save_IFS
9356  test -z "$as_dir" && as_dir=.
9357    for ac_exec_ext in '' $ac_executable_extensions; do
9358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9359    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9361    break 2
9362  fi
9363done
9364  done
9365IFS=$as_save_IFS
9366
9367  ;;
9368esac
9369fi
9370SORT=$ac_cv_path_SORT
9371if test -n "$SORT"; then
9372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9373$as_echo "$SORT" >&6; }
9374else
9375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9376$as_echo "no" >&6; }
9377fi
9378
9379
9380  test -n "$SORT" && break
9381done
9382
9383    else
9384      # If it succeeded, then it was overridden by the user. We will use it
9385      # for the tool.
9386
9387      # First remove it from the list of overridden variables, so we can test
9388      # for unknown variables in the end.
9389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9390
9391      # Check if the provided tool contains a complete path.
9392      tool_specified="$SORT"
9393      tool_basename="${tool_specified##*/}"
9394      if test "x$tool_basename" = "x$tool_specified"; then
9395        # A command without a complete path is provided, search $PATH.
9396        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9397$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9398        # Extract the first word of "$tool_basename", so it can be a program name with args.
9399set dummy $tool_basename; ac_word=$2
9400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9401$as_echo_n "checking for $ac_word... " >&6; }
9402if ${ac_cv_path_SORT+:} false; then :
9403  $as_echo_n "(cached) " >&6
9404else
9405  case $SORT in
9406  [\\/]* | ?:[\\/]*)
9407  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9408  ;;
9409  *)
9410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9411for as_dir in $PATH
9412do
9413  IFS=$as_save_IFS
9414  test -z "$as_dir" && as_dir=.
9415    for ac_exec_ext in '' $ac_executable_extensions; do
9416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9417    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9419    break 2
9420  fi
9421done
9422  done
9423IFS=$as_save_IFS
9424
9425  ;;
9426esac
9427fi
9428SORT=$ac_cv_path_SORT
9429if test -n "$SORT"; then
9430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9431$as_echo "$SORT" >&6; }
9432else
9433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434$as_echo "no" >&6; }
9435fi
9436
9437
9438        if test "x$SORT" = x; then
9439          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9440        fi
9441      else
9442        # Otherwise we believe it is a complete path. Use it as it is.
9443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9444$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9446$as_echo_n "checking for SORT... " >&6; }
9447        if test ! -x "$tool_specified"; then
9448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9449$as_echo "not found" >&6; }
9450          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9451        fi
9452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9453$as_echo "$tool_specified" >&6; }
9454      fi
9455    fi
9456  fi
9457
9458
9459
9460  if test "x$SORT" = x; then
9461    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9462  fi
9463
9464
9465
9466
9467
9468  # Publish this variable in the help.
9469
9470
9471  if test "x$TAIL" = x; then
9472    # The variable is not set by user, try to locate tool using the code snippet
9473    for ac_prog in tail
9474do
9475  # Extract the first word of "$ac_prog", so it can be a program name with args.
9476set dummy $ac_prog; ac_word=$2
9477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9478$as_echo_n "checking for $ac_word... " >&6; }
9479if ${ac_cv_path_TAIL+:} false; then :
9480  $as_echo_n "(cached) " >&6
9481else
9482  case $TAIL in
9483  [\\/]* | ?:[\\/]*)
9484  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9485  ;;
9486  *)
9487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9488for as_dir in $PATH
9489do
9490  IFS=$as_save_IFS
9491  test -z "$as_dir" && as_dir=.
9492    for ac_exec_ext in '' $ac_executable_extensions; do
9493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9494    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9496    break 2
9497  fi
9498done
9499  done
9500IFS=$as_save_IFS
9501
9502  ;;
9503esac
9504fi
9505TAIL=$ac_cv_path_TAIL
9506if test -n "$TAIL"; then
9507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9508$as_echo "$TAIL" >&6; }
9509else
9510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9511$as_echo "no" >&6; }
9512fi
9513
9514
9515  test -n "$TAIL" && break
9516done
9517
9518  else
9519    # The variable is set, but is it from the command line or the environment?
9520
9521    # Try to remove the string !TAIL! from our list.
9522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9524      # If it failed, the variable was not from the command line. Ignore it,
9525      # but warn the user (except for BASH, which is always set by the calling BASH).
9526      if test "xTAIL" != xBASH; then
9527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9528$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9529      fi
9530      # Try to locate tool using the code snippet
9531      for ac_prog in tail
9532do
9533  # Extract the first word of "$ac_prog", so it can be a program name with args.
9534set dummy $ac_prog; ac_word=$2
9535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9536$as_echo_n "checking for $ac_word... " >&6; }
9537if ${ac_cv_path_TAIL+:} false; then :
9538  $as_echo_n "(cached) " >&6
9539else
9540  case $TAIL in
9541  [\\/]* | ?:[\\/]*)
9542  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9543  ;;
9544  *)
9545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9546for as_dir in $PATH
9547do
9548  IFS=$as_save_IFS
9549  test -z "$as_dir" && as_dir=.
9550    for ac_exec_ext in '' $ac_executable_extensions; do
9551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9552    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9554    break 2
9555  fi
9556done
9557  done
9558IFS=$as_save_IFS
9559
9560  ;;
9561esac
9562fi
9563TAIL=$ac_cv_path_TAIL
9564if test -n "$TAIL"; then
9565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9566$as_echo "$TAIL" >&6; }
9567else
9568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569$as_echo "no" >&6; }
9570fi
9571
9572
9573  test -n "$TAIL" && break
9574done
9575
9576    else
9577      # If it succeeded, then it was overridden by the user. We will use it
9578      # for the tool.
9579
9580      # First remove it from the list of overridden variables, so we can test
9581      # for unknown variables in the end.
9582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9583
9584      # Check if the provided tool contains a complete path.
9585      tool_specified="$TAIL"
9586      tool_basename="${tool_specified##*/}"
9587      if test "x$tool_basename" = "x$tool_specified"; then
9588        # A command without a complete path is provided, search $PATH.
9589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9590$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9591        # Extract the first word of "$tool_basename", so it can be a program name with args.
9592set dummy $tool_basename; ac_word=$2
9593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9594$as_echo_n "checking for $ac_word... " >&6; }
9595if ${ac_cv_path_TAIL+:} false; then :
9596  $as_echo_n "(cached) " >&6
9597else
9598  case $TAIL in
9599  [\\/]* | ?:[\\/]*)
9600  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9601  ;;
9602  *)
9603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9604for as_dir in $PATH
9605do
9606  IFS=$as_save_IFS
9607  test -z "$as_dir" && as_dir=.
9608    for ac_exec_ext in '' $ac_executable_extensions; do
9609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9610    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9612    break 2
9613  fi
9614done
9615  done
9616IFS=$as_save_IFS
9617
9618  ;;
9619esac
9620fi
9621TAIL=$ac_cv_path_TAIL
9622if test -n "$TAIL"; then
9623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9624$as_echo "$TAIL" >&6; }
9625else
9626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627$as_echo "no" >&6; }
9628fi
9629
9630
9631        if test "x$TAIL" = x; then
9632          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9633        fi
9634      else
9635        # Otherwise we believe it is a complete path. Use it as it is.
9636        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9637$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9639$as_echo_n "checking for TAIL... " >&6; }
9640        if test ! -x "$tool_specified"; then
9641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9642$as_echo "not found" >&6; }
9643          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9644        fi
9645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9646$as_echo "$tool_specified" >&6; }
9647      fi
9648    fi
9649  fi
9650
9651
9652
9653  if test "x$TAIL" = x; then
9654    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9655  fi
9656
9657
9658
9659
9660
9661  # Publish this variable in the help.
9662
9663
9664  if test "x$TAR" = x; then
9665    # The variable is not set by user, try to locate tool using the code snippet
9666    for ac_prog in tar
9667do
9668  # Extract the first word of "$ac_prog", so it can be a program name with args.
9669set dummy $ac_prog; ac_word=$2
9670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9671$as_echo_n "checking for $ac_word... " >&6; }
9672if ${ac_cv_path_TAR+:} false; then :
9673  $as_echo_n "(cached) " >&6
9674else
9675  case $TAR in
9676  [\\/]* | ?:[\\/]*)
9677  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9678  ;;
9679  *)
9680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9681for as_dir in $PATH
9682do
9683  IFS=$as_save_IFS
9684  test -z "$as_dir" && as_dir=.
9685    for ac_exec_ext in '' $ac_executable_extensions; do
9686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9687    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9689    break 2
9690  fi
9691done
9692  done
9693IFS=$as_save_IFS
9694
9695  ;;
9696esac
9697fi
9698TAR=$ac_cv_path_TAR
9699if test -n "$TAR"; then
9700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9701$as_echo "$TAR" >&6; }
9702else
9703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9704$as_echo "no" >&6; }
9705fi
9706
9707
9708  test -n "$TAR" && break
9709done
9710
9711  else
9712    # The variable is set, but is it from the command line or the environment?
9713
9714    # Try to remove the string !TAR! from our list.
9715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9717      # If it failed, the variable was not from the command line. Ignore it,
9718      # but warn the user (except for BASH, which is always set by the calling BASH).
9719      if test "xTAR" != xBASH; then
9720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9721$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9722      fi
9723      # Try to locate tool using the code snippet
9724      for ac_prog in tar
9725do
9726  # Extract the first word of "$ac_prog", so it can be a program name with args.
9727set dummy $ac_prog; ac_word=$2
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9729$as_echo_n "checking for $ac_word... " >&6; }
9730if ${ac_cv_path_TAR+:} false; then :
9731  $as_echo_n "(cached) " >&6
9732else
9733  case $TAR in
9734  [\\/]* | ?:[\\/]*)
9735  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9736  ;;
9737  *)
9738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9739for as_dir in $PATH
9740do
9741  IFS=$as_save_IFS
9742  test -z "$as_dir" && as_dir=.
9743    for ac_exec_ext in '' $ac_executable_extensions; do
9744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9745    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9747    break 2
9748  fi
9749done
9750  done
9751IFS=$as_save_IFS
9752
9753  ;;
9754esac
9755fi
9756TAR=$ac_cv_path_TAR
9757if test -n "$TAR"; then
9758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9759$as_echo "$TAR" >&6; }
9760else
9761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762$as_echo "no" >&6; }
9763fi
9764
9765
9766  test -n "$TAR" && break
9767done
9768
9769    else
9770      # If it succeeded, then it was overridden by the user. We will use it
9771      # for the tool.
9772
9773      # First remove it from the list of overridden variables, so we can test
9774      # for unknown variables in the end.
9775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9776
9777      # Check if the provided tool contains a complete path.
9778      tool_specified="$TAR"
9779      tool_basename="${tool_specified##*/}"
9780      if test "x$tool_basename" = "x$tool_specified"; then
9781        # A command without a complete path is provided, search $PATH.
9782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9783$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9784        # Extract the first word of "$tool_basename", so it can be a program name with args.
9785set dummy $tool_basename; ac_word=$2
9786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9787$as_echo_n "checking for $ac_word... " >&6; }
9788if ${ac_cv_path_TAR+:} false; then :
9789  $as_echo_n "(cached) " >&6
9790else
9791  case $TAR in
9792  [\\/]* | ?:[\\/]*)
9793  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9794  ;;
9795  *)
9796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9797for as_dir in $PATH
9798do
9799  IFS=$as_save_IFS
9800  test -z "$as_dir" && as_dir=.
9801    for ac_exec_ext in '' $ac_executable_extensions; do
9802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9803    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9805    break 2
9806  fi
9807done
9808  done
9809IFS=$as_save_IFS
9810
9811  ;;
9812esac
9813fi
9814TAR=$ac_cv_path_TAR
9815if test -n "$TAR"; then
9816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9817$as_echo "$TAR" >&6; }
9818else
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820$as_echo "no" >&6; }
9821fi
9822
9823
9824        if test "x$TAR" = x; then
9825          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9826        fi
9827      else
9828        # Otherwise we believe it is a complete path. Use it as it is.
9829        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9830$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9832$as_echo_n "checking for TAR... " >&6; }
9833        if test ! -x "$tool_specified"; then
9834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9835$as_echo "not found" >&6; }
9836          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9837        fi
9838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9839$as_echo "$tool_specified" >&6; }
9840      fi
9841    fi
9842  fi
9843
9844
9845
9846  if test "x$TAR" = x; then
9847    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9848  fi
9849
9850
9851
9852
9853
9854  # Publish this variable in the help.
9855
9856
9857  if test "x$TEE" = x; then
9858    # The variable is not set by user, try to locate tool using the code snippet
9859    for ac_prog in tee
9860do
9861  # Extract the first word of "$ac_prog", so it can be a program name with args.
9862set dummy $ac_prog; ac_word=$2
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864$as_echo_n "checking for $ac_word... " >&6; }
9865if ${ac_cv_path_TEE+:} false; then :
9866  $as_echo_n "(cached) " >&6
9867else
9868  case $TEE in
9869  [\\/]* | ?:[\\/]*)
9870  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9871  ;;
9872  *)
9873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9874for as_dir in $PATH
9875do
9876  IFS=$as_save_IFS
9877  test -z "$as_dir" && as_dir=.
9878    for ac_exec_ext in '' $ac_executable_extensions; do
9879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9880    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9882    break 2
9883  fi
9884done
9885  done
9886IFS=$as_save_IFS
9887
9888  ;;
9889esac
9890fi
9891TEE=$ac_cv_path_TEE
9892if test -n "$TEE"; then
9893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9894$as_echo "$TEE" >&6; }
9895else
9896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897$as_echo "no" >&6; }
9898fi
9899
9900
9901  test -n "$TEE" && break
9902done
9903
9904  else
9905    # The variable is set, but is it from the command line or the environment?
9906
9907    # Try to remove the string !TEE! from our list.
9908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9910      # If it failed, the variable was not from the command line. Ignore it,
9911      # but warn the user (except for BASH, which is always set by the calling BASH).
9912      if test "xTEE" != xBASH; then
9913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9914$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9915      fi
9916      # Try to locate tool using the code snippet
9917      for ac_prog in tee
9918do
9919  # Extract the first word of "$ac_prog", so it can be a program name with args.
9920set dummy $ac_prog; ac_word=$2
9921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9922$as_echo_n "checking for $ac_word... " >&6; }
9923if ${ac_cv_path_TEE+:} false; then :
9924  $as_echo_n "(cached) " >&6
9925else
9926  case $TEE in
9927  [\\/]* | ?:[\\/]*)
9928  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9929  ;;
9930  *)
9931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9932for as_dir in $PATH
9933do
9934  IFS=$as_save_IFS
9935  test -z "$as_dir" && as_dir=.
9936    for ac_exec_ext in '' $ac_executable_extensions; do
9937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9938    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9940    break 2
9941  fi
9942done
9943  done
9944IFS=$as_save_IFS
9945
9946  ;;
9947esac
9948fi
9949TEE=$ac_cv_path_TEE
9950if test -n "$TEE"; then
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9952$as_echo "$TEE" >&6; }
9953else
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955$as_echo "no" >&6; }
9956fi
9957
9958
9959  test -n "$TEE" && break
9960done
9961
9962    else
9963      # If it succeeded, then it was overridden by the user. We will use it
9964      # for the tool.
9965
9966      # First remove it from the list of overridden variables, so we can test
9967      # for unknown variables in the end.
9968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9969
9970      # Check if the provided tool contains a complete path.
9971      tool_specified="$TEE"
9972      tool_basename="${tool_specified##*/}"
9973      if test "x$tool_basename" = "x$tool_specified"; then
9974        # A command without a complete path is provided, search $PATH.
9975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9976$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9977        # Extract the first word of "$tool_basename", so it can be a program name with args.
9978set dummy $tool_basename; ac_word=$2
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9980$as_echo_n "checking for $ac_word... " >&6; }
9981if ${ac_cv_path_TEE+:} false; then :
9982  $as_echo_n "(cached) " >&6
9983else
9984  case $TEE in
9985  [\\/]* | ?:[\\/]*)
9986  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9987  ;;
9988  *)
9989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9990for as_dir in $PATH
9991do
9992  IFS=$as_save_IFS
9993  test -z "$as_dir" && as_dir=.
9994    for ac_exec_ext in '' $ac_executable_extensions; do
9995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9996    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9998    break 2
9999  fi
10000done
10001  done
10002IFS=$as_save_IFS
10003
10004  ;;
10005esac
10006fi
10007TEE=$ac_cv_path_TEE
10008if test -n "$TEE"; then
10009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10010$as_echo "$TEE" >&6; }
10011else
10012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
10014fi
10015
10016
10017        if test "x$TEE" = x; then
10018          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10019        fi
10020      else
10021        # Otherwise we believe it is a complete path. Use it as it is.
10022        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10023$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10025$as_echo_n "checking for TEE... " >&6; }
10026        if test ! -x "$tool_specified"; then
10027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10028$as_echo "not found" >&6; }
10029          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10030        fi
10031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10032$as_echo "$tool_specified" >&6; }
10033      fi
10034    fi
10035  fi
10036
10037
10038
10039  if test "x$TEE" = x; then
10040    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10041  fi
10042
10043
10044
10045
10046
10047  # Publish this variable in the help.
10048
10049
10050  if test "x$TOUCH" = x; then
10051    # The variable is not set by user, try to locate tool using the code snippet
10052    for ac_prog in touch
10053do
10054  # Extract the first word of "$ac_prog", so it can be a program name with args.
10055set dummy $ac_prog; ac_word=$2
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10057$as_echo_n "checking for $ac_word... " >&6; }
10058if ${ac_cv_path_TOUCH+:} false; then :
10059  $as_echo_n "(cached) " >&6
10060else
10061  case $TOUCH in
10062  [\\/]* | ?:[\\/]*)
10063  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10064  ;;
10065  *)
10066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10067for as_dir in $PATH
10068do
10069  IFS=$as_save_IFS
10070  test -z "$as_dir" && as_dir=.
10071    for ac_exec_ext in '' $ac_executable_extensions; do
10072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10073    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10075    break 2
10076  fi
10077done
10078  done
10079IFS=$as_save_IFS
10080
10081  ;;
10082esac
10083fi
10084TOUCH=$ac_cv_path_TOUCH
10085if test -n "$TOUCH"; then
10086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10087$as_echo "$TOUCH" >&6; }
10088else
10089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090$as_echo "no" >&6; }
10091fi
10092
10093
10094  test -n "$TOUCH" && break
10095done
10096
10097  else
10098    # The variable is set, but is it from the command line or the environment?
10099
10100    # Try to remove the string !TOUCH! from our list.
10101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10103      # If it failed, the variable was not from the command line. Ignore it,
10104      # but warn the user (except for BASH, which is always set by the calling BASH).
10105      if test "xTOUCH" != xBASH; then
10106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10107$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10108      fi
10109      # Try to locate tool using the code snippet
10110      for ac_prog in touch
10111do
10112  # Extract the first word of "$ac_prog", so it can be a program name with args.
10113set dummy $ac_prog; ac_word=$2
10114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10115$as_echo_n "checking for $ac_word... " >&6; }
10116if ${ac_cv_path_TOUCH+:} false; then :
10117  $as_echo_n "(cached) " >&6
10118else
10119  case $TOUCH in
10120  [\\/]* | ?:[\\/]*)
10121  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10122  ;;
10123  *)
10124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10125for as_dir in $PATH
10126do
10127  IFS=$as_save_IFS
10128  test -z "$as_dir" && as_dir=.
10129    for ac_exec_ext in '' $ac_executable_extensions; do
10130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10131    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10133    break 2
10134  fi
10135done
10136  done
10137IFS=$as_save_IFS
10138
10139  ;;
10140esac
10141fi
10142TOUCH=$ac_cv_path_TOUCH
10143if test -n "$TOUCH"; then
10144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10145$as_echo "$TOUCH" >&6; }
10146else
10147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10148$as_echo "no" >&6; }
10149fi
10150
10151
10152  test -n "$TOUCH" && break
10153done
10154
10155    else
10156      # If it succeeded, then it was overridden by the user. We will use it
10157      # for the tool.
10158
10159      # First remove it from the list of overridden variables, so we can test
10160      # for unknown variables in the end.
10161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10162
10163      # Check if the provided tool contains a complete path.
10164      tool_specified="$TOUCH"
10165      tool_basename="${tool_specified##*/}"
10166      if test "x$tool_basename" = "x$tool_specified"; then
10167        # A command without a complete path is provided, search $PATH.
10168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10169$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10170        # Extract the first word of "$tool_basename", so it can be a program name with args.
10171set dummy $tool_basename; ac_word=$2
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10173$as_echo_n "checking for $ac_word... " >&6; }
10174if ${ac_cv_path_TOUCH+:} false; then :
10175  $as_echo_n "(cached) " >&6
10176else
10177  case $TOUCH in
10178  [\\/]* | ?:[\\/]*)
10179  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10180  ;;
10181  *)
10182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10183for as_dir in $PATH
10184do
10185  IFS=$as_save_IFS
10186  test -z "$as_dir" && as_dir=.
10187    for ac_exec_ext in '' $ac_executable_extensions; do
10188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10189    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10191    break 2
10192  fi
10193done
10194  done
10195IFS=$as_save_IFS
10196
10197  ;;
10198esac
10199fi
10200TOUCH=$ac_cv_path_TOUCH
10201if test -n "$TOUCH"; then
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10203$as_echo "$TOUCH" >&6; }
10204else
10205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206$as_echo "no" >&6; }
10207fi
10208
10209
10210        if test "x$TOUCH" = x; then
10211          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10212        fi
10213      else
10214        # Otherwise we believe it is a complete path. Use it as it is.
10215        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10216$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10218$as_echo_n "checking for TOUCH... " >&6; }
10219        if test ! -x "$tool_specified"; then
10220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10221$as_echo "not found" >&6; }
10222          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10223        fi
10224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10225$as_echo "$tool_specified" >&6; }
10226      fi
10227    fi
10228  fi
10229
10230
10231
10232  if test "x$TOUCH" = x; then
10233    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10234  fi
10235
10236
10237
10238
10239
10240  # Publish this variable in the help.
10241
10242
10243  if test "x$TR" = x; then
10244    # The variable is not set by user, try to locate tool using the code snippet
10245    for ac_prog in tr
10246do
10247  # Extract the first word of "$ac_prog", so it can be a program name with args.
10248set dummy $ac_prog; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if ${ac_cv_path_TR+:} false; then :
10252  $as_echo_n "(cached) " >&6
10253else
10254  case $TR in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262  IFS=$as_save_IFS
10263  test -z "$as_dir" && as_dir=.
10264    for ac_exec_ext in '' $ac_executable_extensions; do
10265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268    break 2
10269  fi
10270done
10271  done
10272IFS=$as_save_IFS
10273
10274  ;;
10275esac
10276fi
10277TR=$ac_cv_path_TR
10278if test -n "$TR"; then
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10280$as_echo "$TR" >&6; }
10281else
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287  test -n "$TR" && break
10288done
10289
10290  else
10291    # The variable is set, but is it from the command line or the environment?
10292
10293    # Try to remove the string !TR! from our list.
10294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10296      # If it failed, the variable was not from the command line. Ignore it,
10297      # but warn the user (except for BASH, which is always set by the calling BASH).
10298      if test "xTR" != xBASH; then
10299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10300$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10301      fi
10302      # Try to locate tool using the code snippet
10303      for ac_prog in tr
10304do
10305  # Extract the first word of "$ac_prog", so it can be a program name with args.
10306set dummy $ac_prog; ac_word=$2
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10308$as_echo_n "checking for $ac_word... " >&6; }
10309if ${ac_cv_path_TR+:} false; then :
10310  $as_echo_n "(cached) " >&6
10311else
10312  case $TR in
10313  [\\/]* | ?:[\\/]*)
10314  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10315  ;;
10316  *)
10317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318for as_dir in $PATH
10319do
10320  IFS=$as_save_IFS
10321  test -z "$as_dir" && as_dir=.
10322    for ac_exec_ext in '' $ac_executable_extensions; do
10323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10324    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10326    break 2
10327  fi
10328done
10329  done
10330IFS=$as_save_IFS
10331
10332  ;;
10333esac
10334fi
10335TR=$ac_cv_path_TR
10336if test -n "$TR"; then
10337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10338$as_echo "$TR" >&6; }
10339else
10340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10341$as_echo "no" >&6; }
10342fi
10343
10344
10345  test -n "$TR" && break
10346done
10347
10348    else
10349      # If it succeeded, then it was overridden by the user. We will use it
10350      # for the tool.
10351
10352      # First remove it from the list of overridden variables, so we can test
10353      # for unknown variables in the end.
10354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10355
10356      # Check if the provided tool contains a complete path.
10357      tool_specified="$TR"
10358      tool_basename="${tool_specified##*/}"
10359      if test "x$tool_basename" = "x$tool_specified"; then
10360        # A command without a complete path is provided, search $PATH.
10361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10362$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10363        # Extract the first word of "$tool_basename", so it can be a program name with args.
10364set dummy $tool_basename; ac_word=$2
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366$as_echo_n "checking for $ac_word... " >&6; }
10367if ${ac_cv_path_TR+:} false; then :
10368  $as_echo_n "(cached) " >&6
10369else
10370  case $TR in
10371  [\\/]* | ?:[\\/]*)
10372  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10373  ;;
10374  *)
10375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376for as_dir in $PATH
10377do
10378  IFS=$as_save_IFS
10379  test -z "$as_dir" && as_dir=.
10380    for ac_exec_ext in '' $ac_executable_extensions; do
10381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10382    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384    break 2
10385  fi
10386done
10387  done
10388IFS=$as_save_IFS
10389
10390  ;;
10391esac
10392fi
10393TR=$ac_cv_path_TR
10394if test -n "$TR"; then
10395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10396$as_echo "$TR" >&6; }
10397else
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
10400fi
10401
10402
10403        if test "x$TR" = x; then
10404          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10405        fi
10406      else
10407        # Otherwise we believe it is a complete path. Use it as it is.
10408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10409$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10411$as_echo_n "checking for TR... " >&6; }
10412        if test ! -x "$tool_specified"; then
10413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10414$as_echo "not found" >&6; }
10415          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10416        fi
10417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10418$as_echo "$tool_specified" >&6; }
10419      fi
10420    fi
10421  fi
10422
10423
10424
10425  if test "x$TR" = x; then
10426    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10427  fi
10428
10429
10430
10431
10432
10433  # Publish this variable in the help.
10434
10435
10436  if test "x$UNAME" = x; then
10437    # The variable is not set by user, try to locate tool using the code snippet
10438    for ac_prog in uname
10439do
10440  # Extract the first word of "$ac_prog", so it can be a program name with args.
10441set dummy $ac_prog; ac_word=$2
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10443$as_echo_n "checking for $ac_word... " >&6; }
10444if ${ac_cv_path_UNAME+:} false; then :
10445  $as_echo_n "(cached) " >&6
10446else
10447  case $UNAME in
10448  [\\/]* | ?:[\\/]*)
10449  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10450  ;;
10451  *)
10452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10453for as_dir in $PATH
10454do
10455  IFS=$as_save_IFS
10456  test -z "$as_dir" && as_dir=.
10457    for ac_exec_ext in '' $ac_executable_extensions; do
10458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10459    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10461    break 2
10462  fi
10463done
10464  done
10465IFS=$as_save_IFS
10466
10467  ;;
10468esac
10469fi
10470UNAME=$ac_cv_path_UNAME
10471if test -n "$UNAME"; then
10472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10473$as_echo "$UNAME" >&6; }
10474else
10475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476$as_echo "no" >&6; }
10477fi
10478
10479
10480  test -n "$UNAME" && break
10481done
10482
10483  else
10484    # The variable is set, but is it from the command line or the environment?
10485
10486    # Try to remove the string !UNAME! from our list.
10487    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10488    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10489      # If it failed, the variable was not from the command line. Ignore it,
10490      # but warn the user (except for BASH, which is always set by the calling BASH).
10491      if test "xUNAME" != xBASH; then
10492        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10493$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10494      fi
10495      # Try to locate tool using the code snippet
10496      for ac_prog in uname
10497do
10498  # Extract the first word of "$ac_prog", so it can be a program name with args.
10499set dummy $ac_prog; ac_word=$2
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10501$as_echo_n "checking for $ac_word... " >&6; }
10502if ${ac_cv_path_UNAME+:} false; then :
10503  $as_echo_n "(cached) " >&6
10504else
10505  case $UNAME in
10506  [\\/]* | ?:[\\/]*)
10507  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10508  ;;
10509  *)
10510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10511for as_dir in $PATH
10512do
10513  IFS=$as_save_IFS
10514  test -z "$as_dir" && as_dir=.
10515    for ac_exec_ext in '' $ac_executable_extensions; do
10516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10517    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10519    break 2
10520  fi
10521done
10522  done
10523IFS=$as_save_IFS
10524
10525  ;;
10526esac
10527fi
10528UNAME=$ac_cv_path_UNAME
10529if test -n "$UNAME"; then
10530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10531$as_echo "$UNAME" >&6; }
10532else
10533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10534$as_echo "no" >&6; }
10535fi
10536
10537
10538  test -n "$UNAME" && break
10539done
10540
10541    else
10542      # If it succeeded, then it was overridden by the user. We will use it
10543      # for the tool.
10544
10545      # First remove it from the list of overridden variables, so we can test
10546      # for unknown variables in the end.
10547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10548
10549      # Check if the provided tool contains a complete path.
10550      tool_specified="$UNAME"
10551      tool_basename="${tool_specified##*/}"
10552      if test "x$tool_basename" = "x$tool_specified"; then
10553        # A command without a complete path is provided, search $PATH.
10554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10555$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10556        # Extract the first word of "$tool_basename", so it can be a program name with args.
10557set dummy $tool_basename; ac_word=$2
10558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10559$as_echo_n "checking for $ac_word... " >&6; }
10560if ${ac_cv_path_UNAME+:} false; then :
10561  $as_echo_n "(cached) " >&6
10562else
10563  case $UNAME in
10564  [\\/]* | ?:[\\/]*)
10565  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10566  ;;
10567  *)
10568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569for as_dir in $PATH
10570do
10571  IFS=$as_save_IFS
10572  test -z "$as_dir" && as_dir=.
10573    for ac_exec_ext in '' $ac_executable_extensions; do
10574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10575    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577    break 2
10578  fi
10579done
10580  done
10581IFS=$as_save_IFS
10582
10583  ;;
10584esac
10585fi
10586UNAME=$ac_cv_path_UNAME
10587if test -n "$UNAME"; then
10588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10589$as_echo "$UNAME" >&6; }
10590else
10591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
10593fi
10594
10595
10596        if test "x$UNAME" = x; then
10597          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10598        fi
10599      else
10600        # Otherwise we believe it is a complete path. Use it as it is.
10601        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10602$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10604$as_echo_n "checking for UNAME... " >&6; }
10605        if test ! -x "$tool_specified"; then
10606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10607$as_echo "not found" >&6; }
10608          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10609        fi
10610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10611$as_echo "$tool_specified" >&6; }
10612      fi
10613    fi
10614  fi
10615
10616
10617
10618  if test "x$UNAME" = x; then
10619    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10620  fi
10621
10622
10623
10624
10625
10626  # Publish this variable in the help.
10627
10628
10629  if test "x$UNIQ" = x; then
10630    # The variable is not set by user, try to locate tool using the code snippet
10631    for ac_prog in uniq
10632do
10633  # Extract the first word of "$ac_prog", so it can be a program name with args.
10634set dummy $ac_prog; ac_word=$2
10635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636$as_echo_n "checking for $ac_word... " >&6; }
10637if ${ac_cv_path_UNIQ+:} false; then :
10638  $as_echo_n "(cached) " >&6
10639else
10640  case $UNIQ in
10641  [\\/]* | ?:[\\/]*)
10642  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10643  ;;
10644  *)
10645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646for as_dir in $PATH
10647do
10648  IFS=$as_save_IFS
10649  test -z "$as_dir" && as_dir=.
10650    for ac_exec_ext in '' $ac_executable_extensions; do
10651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10652    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10654    break 2
10655  fi
10656done
10657  done
10658IFS=$as_save_IFS
10659
10660  ;;
10661esac
10662fi
10663UNIQ=$ac_cv_path_UNIQ
10664if test -n "$UNIQ"; then
10665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10666$as_echo "$UNIQ" >&6; }
10667else
10668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669$as_echo "no" >&6; }
10670fi
10671
10672
10673  test -n "$UNIQ" && break
10674done
10675
10676  else
10677    # The variable is set, but is it from the command line or the environment?
10678
10679    # Try to remove the string !UNIQ! from our list.
10680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10682      # If it failed, the variable was not from the command line. Ignore it,
10683      # but warn the user (except for BASH, which is always set by the calling BASH).
10684      if test "xUNIQ" != xBASH; then
10685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10686$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10687      fi
10688      # Try to locate tool using the code snippet
10689      for ac_prog in uniq
10690do
10691  # Extract the first word of "$ac_prog", so it can be a program name with args.
10692set dummy $ac_prog; ac_word=$2
10693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10694$as_echo_n "checking for $ac_word... " >&6; }
10695if ${ac_cv_path_UNIQ+:} false; then :
10696  $as_echo_n "(cached) " >&6
10697else
10698  case $UNIQ in
10699  [\\/]* | ?:[\\/]*)
10700  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10701  ;;
10702  *)
10703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10704for as_dir in $PATH
10705do
10706  IFS=$as_save_IFS
10707  test -z "$as_dir" && as_dir=.
10708    for ac_exec_ext in '' $ac_executable_extensions; do
10709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10710    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10712    break 2
10713  fi
10714done
10715  done
10716IFS=$as_save_IFS
10717
10718  ;;
10719esac
10720fi
10721UNIQ=$ac_cv_path_UNIQ
10722if test -n "$UNIQ"; then
10723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10724$as_echo "$UNIQ" >&6; }
10725else
10726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10727$as_echo "no" >&6; }
10728fi
10729
10730
10731  test -n "$UNIQ" && break
10732done
10733
10734    else
10735      # If it succeeded, then it was overridden by the user. We will use it
10736      # for the tool.
10737
10738      # First remove it from the list of overridden variables, so we can test
10739      # for unknown variables in the end.
10740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10741
10742      # Check if the provided tool contains a complete path.
10743      tool_specified="$UNIQ"
10744      tool_basename="${tool_specified##*/}"
10745      if test "x$tool_basename" = "x$tool_specified"; then
10746        # A command without a complete path is provided, search $PATH.
10747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10748$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10749        # Extract the first word of "$tool_basename", so it can be a program name with args.
10750set dummy $tool_basename; ac_word=$2
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10752$as_echo_n "checking for $ac_word... " >&6; }
10753if ${ac_cv_path_UNIQ+:} false; then :
10754  $as_echo_n "(cached) " >&6
10755else
10756  case $UNIQ in
10757  [\\/]* | ?:[\\/]*)
10758  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10759  ;;
10760  *)
10761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  test -z "$as_dir" && as_dir=.
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776  ;;
10777esac
10778fi
10779UNIQ=$ac_cv_path_UNIQ
10780if test -n "$UNIQ"; then
10781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10782$as_echo "$UNIQ" >&6; }
10783else
10784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
10786fi
10787
10788
10789        if test "x$UNIQ" = x; then
10790          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10791        fi
10792      else
10793        # Otherwise we believe it is a complete path. Use it as it is.
10794        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10795$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10797$as_echo_n "checking for UNIQ... " >&6; }
10798        if test ! -x "$tool_specified"; then
10799          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10800$as_echo "not found" >&6; }
10801          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10802        fi
10803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10804$as_echo "$tool_specified" >&6; }
10805      fi
10806    fi
10807  fi
10808
10809
10810
10811  if test "x$UNIQ" = x; then
10812    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10813  fi
10814
10815
10816
10817
10818
10819  # Publish this variable in the help.
10820
10821
10822  if test "x$WC" = x; then
10823    # The variable is not set by user, try to locate tool using the code snippet
10824    for ac_prog in wc
10825do
10826  # Extract the first word of "$ac_prog", so it can be a program name with args.
10827set dummy $ac_prog; ac_word=$2
10828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10829$as_echo_n "checking for $ac_word... " >&6; }
10830if ${ac_cv_path_WC+:} false; then :
10831  $as_echo_n "(cached) " >&6
10832else
10833  case $WC in
10834  [\\/]* | ?:[\\/]*)
10835  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10836  ;;
10837  *)
10838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10839for as_dir in $PATH
10840do
10841  IFS=$as_save_IFS
10842  test -z "$as_dir" && as_dir=.
10843    for ac_exec_ext in '' $ac_executable_extensions; do
10844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10845    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10847    break 2
10848  fi
10849done
10850  done
10851IFS=$as_save_IFS
10852
10853  ;;
10854esac
10855fi
10856WC=$ac_cv_path_WC
10857if test -n "$WC"; then
10858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10859$as_echo "$WC" >&6; }
10860else
10861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10862$as_echo "no" >&6; }
10863fi
10864
10865
10866  test -n "$WC" && break
10867done
10868
10869  else
10870    # The variable is set, but is it from the command line or the environment?
10871
10872    # Try to remove the string !WC! from our list.
10873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10875      # If it failed, the variable was not from the command line. Ignore it,
10876      # but warn the user (except for BASH, which is always set by the calling BASH).
10877      if test "xWC" != xBASH; then
10878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10879$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10880      fi
10881      # Try to locate tool using the code snippet
10882      for ac_prog in wc
10883do
10884  # Extract the first word of "$ac_prog", so it can be a program name with args.
10885set dummy $ac_prog; ac_word=$2
10886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10887$as_echo_n "checking for $ac_word... " >&6; }
10888if ${ac_cv_path_WC+:} false; then :
10889  $as_echo_n "(cached) " >&6
10890else
10891  case $WC in
10892  [\\/]* | ?:[\\/]*)
10893  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10894  ;;
10895  *)
10896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10897for as_dir in $PATH
10898do
10899  IFS=$as_save_IFS
10900  test -z "$as_dir" && as_dir=.
10901    for ac_exec_ext in '' $ac_executable_extensions; do
10902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10903    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10905    break 2
10906  fi
10907done
10908  done
10909IFS=$as_save_IFS
10910
10911  ;;
10912esac
10913fi
10914WC=$ac_cv_path_WC
10915if test -n "$WC"; then
10916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10917$as_echo "$WC" >&6; }
10918else
10919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920$as_echo "no" >&6; }
10921fi
10922
10923
10924  test -n "$WC" && break
10925done
10926
10927    else
10928      # If it succeeded, then it was overridden by the user. We will use it
10929      # for the tool.
10930
10931      # First remove it from the list of overridden variables, so we can test
10932      # for unknown variables in the end.
10933      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10934
10935      # Check if the provided tool contains a complete path.
10936      tool_specified="$WC"
10937      tool_basename="${tool_specified##*/}"
10938      if test "x$tool_basename" = "x$tool_specified"; then
10939        # A command without a complete path is provided, search $PATH.
10940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10941$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10942        # Extract the first word of "$tool_basename", so it can be a program name with args.
10943set dummy $tool_basename; ac_word=$2
10944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10945$as_echo_n "checking for $ac_word... " >&6; }
10946if ${ac_cv_path_WC+:} false; then :
10947  $as_echo_n "(cached) " >&6
10948else
10949  case $WC in
10950  [\\/]* | ?:[\\/]*)
10951  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10952  ;;
10953  *)
10954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10955for as_dir in $PATH
10956do
10957  IFS=$as_save_IFS
10958  test -z "$as_dir" && as_dir=.
10959    for ac_exec_ext in '' $ac_executable_extensions; do
10960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10961    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10963    break 2
10964  fi
10965done
10966  done
10967IFS=$as_save_IFS
10968
10969  ;;
10970esac
10971fi
10972WC=$ac_cv_path_WC
10973if test -n "$WC"; then
10974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10975$as_echo "$WC" >&6; }
10976else
10977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
10979fi
10980
10981
10982        if test "x$WC" = x; then
10983          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10984        fi
10985      else
10986        # Otherwise we believe it is a complete path. Use it as it is.
10987        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10988$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10990$as_echo_n "checking for WC... " >&6; }
10991        if test ! -x "$tool_specified"; then
10992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10993$as_echo "not found" >&6; }
10994          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10995        fi
10996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10997$as_echo "$tool_specified" >&6; }
10998      fi
10999    fi
11000  fi
11001
11002
11003
11004  if test "x$WC" = x; then
11005    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11006  fi
11007
11008
11009
11010
11011
11012  # Publish this variable in the help.
11013
11014
11015  if test "x$WHICH" = x; then
11016    # The variable is not set by user, try to locate tool using the code snippet
11017    for ac_prog in which
11018do
11019  # Extract the first word of "$ac_prog", so it can be a program name with args.
11020set dummy $ac_prog; ac_word=$2
11021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11022$as_echo_n "checking for $ac_word... " >&6; }
11023if ${ac_cv_path_WHICH+:} false; then :
11024  $as_echo_n "(cached) " >&6
11025else
11026  case $WHICH in
11027  [\\/]* | ?:[\\/]*)
11028  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11029  ;;
11030  *)
11031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11032for as_dir in $PATH
11033do
11034  IFS=$as_save_IFS
11035  test -z "$as_dir" && as_dir=.
11036    for ac_exec_ext in '' $ac_executable_extensions; do
11037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11038    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11040    break 2
11041  fi
11042done
11043  done
11044IFS=$as_save_IFS
11045
11046  ;;
11047esac
11048fi
11049WHICH=$ac_cv_path_WHICH
11050if test -n "$WHICH"; then
11051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11052$as_echo "$WHICH" >&6; }
11053else
11054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11055$as_echo "no" >&6; }
11056fi
11057
11058
11059  test -n "$WHICH" && break
11060done
11061
11062  else
11063    # The variable is set, but is it from the command line or the environment?
11064
11065    # Try to remove the string !WHICH! from our list.
11066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11068      # If it failed, the variable was not from the command line. Ignore it,
11069      # but warn the user (except for BASH, which is always set by the calling BASH).
11070      if test "xWHICH" != xBASH; then
11071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11072$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11073      fi
11074      # Try to locate tool using the code snippet
11075      for ac_prog in which
11076do
11077  # Extract the first word of "$ac_prog", so it can be a program name with args.
11078set dummy $ac_prog; ac_word=$2
11079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11080$as_echo_n "checking for $ac_word... " >&6; }
11081if ${ac_cv_path_WHICH+:} false; then :
11082  $as_echo_n "(cached) " >&6
11083else
11084  case $WHICH in
11085  [\\/]* | ?:[\\/]*)
11086  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11087  ;;
11088  *)
11089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11090for as_dir in $PATH
11091do
11092  IFS=$as_save_IFS
11093  test -z "$as_dir" && as_dir=.
11094    for ac_exec_ext in '' $ac_executable_extensions; do
11095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11096    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11098    break 2
11099  fi
11100done
11101  done
11102IFS=$as_save_IFS
11103
11104  ;;
11105esac
11106fi
11107WHICH=$ac_cv_path_WHICH
11108if test -n "$WHICH"; then
11109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11110$as_echo "$WHICH" >&6; }
11111else
11112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11113$as_echo "no" >&6; }
11114fi
11115
11116
11117  test -n "$WHICH" && break
11118done
11119
11120    else
11121      # If it succeeded, then it was overridden by the user. We will use it
11122      # for the tool.
11123
11124      # First remove it from the list of overridden variables, so we can test
11125      # for unknown variables in the end.
11126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11127
11128      # Check if the provided tool contains a complete path.
11129      tool_specified="$WHICH"
11130      tool_basename="${tool_specified##*/}"
11131      if test "x$tool_basename" = "x$tool_specified"; then
11132        # A command without a complete path is provided, search $PATH.
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11134$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11135        # Extract the first word of "$tool_basename", so it can be a program name with args.
11136set dummy $tool_basename; ac_word=$2
11137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11138$as_echo_n "checking for $ac_word... " >&6; }
11139if ${ac_cv_path_WHICH+:} false; then :
11140  $as_echo_n "(cached) " >&6
11141else
11142  case $WHICH in
11143  [\\/]* | ?:[\\/]*)
11144  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11145  ;;
11146  *)
11147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11148for as_dir in $PATH
11149do
11150  IFS=$as_save_IFS
11151  test -z "$as_dir" && as_dir=.
11152    for ac_exec_ext in '' $ac_executable_extensions; do
11153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11154    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11156    break 2
11157  fi
11158done
11159  done
11160IFS=$as_save_IFS
11161
11162  ;;
11163esac
11164fi
11165WHICH=$ac_cv_path_WHICH
11166if test -n "$WHICH"; then
11167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11168$as_echo "$WHICH" >&6; }
11169else
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171$as_echo "no" >&6; }
11172fi
11173
11174
11175        if test "x$WHICH" = x; then
11176          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11177        fi
11178      else
11179        # Otherwise we believe it is a complete path. Use it as it is.
11180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11181$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11183$as_echo_n "checking for WHICH... " >&6; }
11184        if test ! -x "$tool_specified"; then
11185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11186$as_echo "not found" >&6; }
11187          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11188        fi
11189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11190$as_echo "$tool_specified" >&6; }
11191      fi
11192    fi
11193  fi
11194
11195
11196
11197  if test "x$WHICH" = x; then
11198    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11199  fi
11200
11201
11202
11203
11204
11205  # Publish this variable in the help.
11206
11207
11208  if test "x$XARGS" = x; then
11209    # The variable is not set by user, try to locate tool using the code snippet
11210    for ac_prog in xargs
11211do
11212  # Extract the first word of "$ac_prog", so it can be a program name with args.
11213set dummy $ac_prog; ac_word=$2
11214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11215$as_echo_n "checking for $ac_word... " >&6; }
11216if ${ac_cv_path_XARGS+:} false; then :
11217  $as_echo_n "(cached) " >&6
11218else
11219  case $XARGS in
11220  [\\/]* | ?:[\\/]*)
11221  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11222  ;;
11223  *)
11224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11225for as_dir in $PATH
11226do
11227  IFS=$as_save_IFS
11228  test -z "$as_dir" && as_dir=.
11229    for ac_exec_ext in '' $ac_executable_extensions; do
11230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11231    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11233    break 2
11234  fi
11235done
11236  done
11237IFS=$as_save_IFS
11238
11239  ;;
11240esac
11241fi
11242XARGS=$ac_cv_path_XARGS
11243if test -n "$XARGS"; then
11244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11245$as_echo "$XARGS" >&6; }
11246else
11247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11248$as_echo "no" >&6; }
11249fi
11250
11251
11252  test -n "$XARGS" && break
11253done
11254
11255  else
11256    # The variable is set, but is it from the command line or the environment?
11257
11258    # Try to remove the string !XARGS! from our list.
11259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11261      # If it failed, the variable was not from the command line. Ignore it,
11262      # but warn the user (except for BASH, which is always set by the calling BASH).
11263      if test "xXARGS" != xBASH; then
11264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11265$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11266      fi
11267      # Try to locate tool using the code snippet
11268      for ac_prog in xargs
11269do
11270  # Extract the first word of "$ac_prog", so it can be a program name with args.
11271set dummy $ac_prog; ac_word=$2
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11273$as_echo_n "checking for $ac_word... " >&6; }
11274if ${ac_cv_path_XARGS+:} false; then :
11275  $as_echo_n "(cached) " >&6
11276else
11277  case $XARGS in
11278  [\\/]* | ?:[\\/]*)
11279  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11280  ;;
11281  *)
11282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11283for as_dir in $PATH
11284do
11285  IFS=$as_save_IFS
11286  test -z "$as_dir" && as_dir=.
11287    for ac_exec_ext in '' $ac_executable_extensions; do
11288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11289    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11291    break 2
11292  fi
11293done
11294  done
11295IFS=$as_save_IFS
11296
11297  ;;
11298esac
11299fi
11300XARGS=$ac_cv_path_XARGS
11301if test -n "$XARGS"; then
11302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11303$as_echo "$XARGS" >&6; }
11304else
11305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11306$as_echo "no" >&6; }
11307fi
11308
11309
11310  test -n "$XARGS" && break
11311done
11312
11313    else
11314      # If it succeeded, then it was overridden by the user. We will use it
11315      # for the tool.
11316
11317      # First remove it from the list of overridden variables, so we can test
11318      # for unknown variables in the end.
11319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11320
11321      # Check if the provided tool contains a complete path.
11322      tool_specified="$XARGS"
11323      tool_basename="${tool_specified##*/}"
11324      if test "x$tool_basename" = "x$tool_specified"; then
11325        # A command without a complete path is provided, search $PATH.
11326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11327$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11328        # Extract the first word of "$tool_basename", so it can be a program name with args.
11329set dummy $tool_basename; ac_word=$2
11330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11331$as_echo_n "checking for $ac_word... " >&6; }
11332if ${ac_cv_path_XARGS+:} false; then :
11333  $as_echo_n "(cached) " >&6
11334else
11335  case $XARGS in
11336  [\\/]* | ?:[\\/]*)
11337  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11338  ;;
11339  *)
11340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11341for as_dir in $PATH
11342do
11343  IFS=$as_save_IFS
11344  test -z "$as_dir" && as_dir=.
11345    for ac_exec_ext in '' $ac_executable_extensions; do
11346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11347    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11349    break 2
11350  fi
11351done
11352  done
11353IFS=$as_save_IFS
11354
11355  ;;
11356esac
11357fi
11358XARGS=$ac_cv_path_XARGS
11359if test -n "$XARGS"; then
11360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11361$as_echo "$XARGS" >&6; }
11362else
11363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
11365fi
11366
11367
11368        if test "x$XARGS" = x; then
11369          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11370        fi
11371      else
11372        # Otherwise we believe it is a complete path. Use it as it is.
11373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11374$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11376$as_echo_n "checking for XARGS... " >&6; }
11377        if test ! -x "$tool_specified"; then
11378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11379$as_echo "not found" >&6; }
11380          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11381        fi
11382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11383$as_echo "$tool_specified" >&6; }
11384      fi
11385    fi
11386  fi
11387
11388
11389
11390  if test "x$XARGS" = x; then
11391    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11392  fi
11393
11394
11395
11396  # Then required tools that require some special treatment.
11397
11398
11399  # Publish this variable in the help.
11400
11401
11402  if test "x$AWK" = x; then
11403    # The variable is not set by user, try to locate tool using the code snippet
11404    for ac_prog in gawk mawk nawk awk
11405do
11406  # Extract the first word of "$ac_prog", so it can be a program name with args.
11407set dummy $ac_prog; ac_word=$2
11408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11409$as_echo_n "checking for $ac_word... " >&6; }
11410if ${ac_cv_prog_AWK+:} false; then :
11411  $as_echo_n "(cached) " >&6
11412else
11413  if test -n "$AWK"; then
11414  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11415else
11416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11417for as_dir in $PATH
11418do
11419  IFS=$as_save_IFS
11420  test -z "$as_dir" && as_dir=.
11421    for ac_exec_ext in '' $ac_executable_extensions; do
11422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11423    ac_cv_prog_AWK="$ac_prog"
11424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11425    break 2
11426  fi
11427done
11428  done
11429IFS=$as_save_IFS
11430
11431fi
11432fi
11433AWK=$ac_cv_prog_AWK
11434if test -n "$AWK"; then
11435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11436$as_echo "$AWK" >&6; }
11437else
11438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11439$as_echo "no" >&6; }
11440fi
11441
11442
11443  test -n "$AWK" && break
11444done
11445
11446  else
11447    # The variable is set, but is it from the command line or the environment?
11448
11449    # Try to remove the string !AWK! from our list.
11450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11452      # If it failed, the variable was not from the command line. Ignore it,
11453      # but warn the user (except for BASH, which is always set by the calling BASH).
11454      if test "xAWK" != xBASH; then
11455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11456$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11457      fi
11458      # Try to locate tool using the code snippet
11459      for ac_prog in gawk mawk nawk awk
11460do
11461  # Extract the first word of "$ac_prog", so it can be a program name with args.
11462set dummy $ac_prog; ac_word=$2
11463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11464$as_echo_n "checking for $ac_word... " >&6; }
11465if ${ac_cv_prog_AWK+:} false; then :
11466  $as_echo_n "(cached) " >&6
11467else
11468  if test -n "$AWK"; then
11469  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11470else
11471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11472for as_dir in $PATH
11473do
11474  IFS=$as_save_IFS
11475  test -z "$as_dir" && as_dir=.
11476    for ac_exec_ext in '' $ac_executable_extensions; do
11477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11478    ac_cv_prog_AWK="$ac_prog"
11479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11480    break 2
11481  fi
11482done
11483  done
11484IFS=$as_save_IFS
11485
11486fi
11487fi
11488AWK=$ac_cv_prog_AWK
11489if test -n "$AWK"; then
11490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11491$as_echo "$AWK" >&6; }
11492else
11493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494$as_echo "no" >&6; }
11495fi
11496
11497
11498  test -n "$AWK" && break
11499done
11500
11501    else
11502      # If it succeeded, then it was overridden by the user. We will use it
11503      # for the tool.
11504
11505      # First remove it from the list of overridden variables, so we can test
11506      # for unknown variables in the end.
11507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11508
11509      # Check if the provided tool contains a complete path.
11510      tool_specified="$AWK"
11511      tool_basename="${tool_specified##*/}"
11512      if test "x$tool_basename" = "x$tool_specified"; then
11513        # A command without a complete path is provided, search $PATH.
11514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11515$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11516        # Extract the first word of "$tool_basename", so it can be a program name with args.
11517set dummy $tool_basename; ac_word=$2
11518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11519$as_echo_n "checking for $ac_word... " >&6; }
11520if ${ac_cv_path_AWK+:} false; then :
11521  $as_echo_n "(cached) " >&6
11522else
11523  case $AWK in
11524  [\\/]* | ?:[\\/]*)
11525  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11526  ;;
11527  *)
11528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11529for as_dir in $PATH
11530do
11531  IFS=$as_save_IFS
11532  test -z "$as_dir" && as_dir=.
11533    for ac_exec_ext in '' $ac_executable_extensions; do
11534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11535    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11537    break 2
11538  fi
11539done
11540  done
11541IFS=$as_save_IFS
11542
11543  ;;
11544esac
11545fi
11546AWK=$ac_cv_path_AWK
11547if test -n "$AWK"; then
11548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11549$as_echo "$AWK" >&6; }
11550else
11551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552$as_echo "no" >&6; }
11553fi
11554
11555
11556        if test "x$AWK" = x; then
11557          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11558        fi
11559      else
11560        # Otherwise we believe it is a complete path. Use it as it is.
11561        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11562$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11564$as_echo_n "checking for AWK... " >&6; }
11565        if test ! -x "$tool_specified"; then
11566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11567$as_echo "not found" >&6; }
11568          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11569        fi
11570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11571$as_echo "$tool_specified" >&6; }
11572      fi
11573    fi
11574  fi
11575
11576
11577  if test "x$AWK" = x; then
11578    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11579  fi
11580
11581
11582
11583
11584  # Publish this variable in the help.
11585
11586
11587  if test "x$GREP" = x; then
11588    # The variable is not set by user, try to locate tool using the code snippet
11589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11590$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11591if ${ac_cv_path_GREP+:} false; then :
11592  $as_echo_n "(cached) " >&6
11593else
11594  if test -z "$GREP"; then
11595  ac_path_GREP_found=false
11596  # Loop through the user's path and test for each of PROGNAME-LIST
11597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11598for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11599do
11600  IFS=$as_save_IFS
11601  test -z "$as_dir" && as_dir=.
11602    for ac_prog in grep ggrep; do
11603    for ac_exec_ext in '' $ac_executable_extensions; do
11604      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11605      as_fn_executable_p "$ac_path_GREP" || continue
11606# Check for GNU ac_path_GREP and select it if it is found.
11607  # Check for GNU $ac_path_GREP
11608case `"$ac_path_GREP" --version 2>&1` in
11609*GNU*)
11610  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11611*)
11612  ac_count=0
11613  $as_echo_n 0123456789 >"conftest.in"
11614  while :
11615  do
11616    cat "conftest.in" "conftest.in" >"conftest.tmp"
11617    mv "conftest.tmp" "conftest.in"
11618    cp "conftest.in" "conftest.nl"
11619    $as_echo 'GREP' >> "conftest.nl"
11620    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11621    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11622    as_fn_arith $ac_count + 1 && ac_count=$as_val
11623    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11624      # Best one so far, save it but keep looking for a better one
11625      ac_cv_path_GREP="$ac_path_GREP"
11626      ac_path_GREP_max=$ac_count
11627    fi
11628    # 10*(2^10) chars as input seems more than enough
11629    test $ac_count -gt 10 && break
11630  done
11631  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11632esac
11633
11634      $ac_path_GREP_found && break 3
11635    done
11636  done
11637  done
11638IFS=$as_save_IFS
11639  if test -z "$ac_cv_path_GREP"; then
11640    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11641  fi
11642else
11643  ac_cv_path_GREP=$GREP
11644fi
11645
11646fi
11647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11648$as_echo "$ac_cv_path_GREP" >&6; }
11649 GREP="$ac_cv_path_GREP"
11650
11651
11652  else
11653    # The variable is set, but is it from the command line or the environment?
11654
11655    # Try to remove the string !GREP! from our list.
11656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11658      # If it failed, the variable was not from the command line. Ignore it,
11659      # but warn the user (except for BASH, which is always set by the calling BASH).
11660      if test "xGREP" != xBASH; then
11661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11662$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11663      fi
11664      # Try to locate tool using the code snippet
11665      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11666$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11667if ${ac_cv_path_GREP+:} false; then :
11668  $as_echo_n "(cached) " >&6
11669else
11670  if test -z "$GREP"; then
11671  ac_path_GREP_found=false
11672  # Loop through the user's path and test for each of PROGNAME-LIST
11673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11674for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11675do
11676  IFS=$as_save_IFS
11677  test -z "$as_dir" && as_dir=.
11678    for ac_prog in grep ggrep; do
11679    for ac_exec_ext in '' $ac_executable_extensions; do
11680      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11681      as_fn_executable_p "$ac_path_GREP" || continue
11682# Check for GNU ac_path_GREP and select it if it is found.
11683  # Check for GNU $ac_path_GREP
11684case `"$ac_path_GREP" --version 2>&1` in
11685*GNU*)
11686  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11687*)
11688  ac_count=0
11689  $as_echo_n 0123456789 >"conftest.in"
11690  while :
11691  do
11692    cat "conftest.in" "conftest.in" >"conftest.tmp"
11693    mv "conftest.tmp" "conftest.in"
11694    cp "conftest.in" "conftest.nl"
11695    $as_echo 'GREP' >> "conftest.nl"
11696    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11697    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11698    as_fn_arith $ac_count + 1 && ac_count=$as_val
11699    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11700      # Best one so far, save it but keep looking for a better one
11701      ac_cv_path_GREP="$ac_path_GREP"
11702      ac_path_GREP_max=$ac_count
11703    fi
11704    # 10*(2^10) chars as input seems more than enough
11705    test $ac_count -gt 10 && break
11706  done
11707  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11708esac
11709
11710      $ac_path_GREP_found && break 3
11711    done
11712  done
11713  done
11714IFS=$as_save_IFS
11715  if test -z "$ac_cv_path_GREP"; then
11716    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11717  fi
11718else
11719  ac_cv_path_GREP=$GREP
11720fi
11721
11722fi
11723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11724$as_echo "$ac_cv_path_GREP" >&6; }
11725 GREP="$ac_cv_path_GREP"
11726
11727
11728    else
11729      # If it succeeded, then it was overridden by the user. We will use it
11730      # for the tool.
11731
11732      # First remove it from the list of overridden variables, so we can test
11733      # for unknown variables in the end.
11734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11735
11736      # Check if the provided tool contains a complete path.
11737      tool_specified="$GREP"
11738      tool_basename="${tool_specified##*/}"
11739      if test "x$tool_basename" = "x$tool_specified"; then
11740        # A command without a complete path is provided, search $PATH.
11741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11742$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11743        # Extract the first word of "$tool_basename", so it can be a program name with args.
11744set dummy $tool_basename; ac_word=$2
11745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11746$as_echo_n "checking for $ac_word... " >&6; }
11747if ${ac_cv_path_GREP+:} false; then :
11748  $as_echo_n "(cached) " >&6
11749else
11750  case $GREP in
11751  [\\/]* | ?:[\\/]*)
11752  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11753  ;;
11754  *)
11755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11756for as_dir in $PATH
11757do
11758  IFS=$as_save_IFS
11759  test -z "$as_dir" && as_dir=.
11760    for ac_exec_ext in '' $ac_executable_extensions; do
11761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11762    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11764    break 2
11765  fi
11766done
11767  done
11768IFS=$as_save_IFS
11769
11770  ;;
11771esac
11772fi
11773GREP=$ac_cv_path_GREP
11774if test -n "$GREP"; then
11775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11776$as_echo "$GREP" >&6; }
11777else
11778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779$as_echo "no" >&6; }
11780fi
11781
11782
11783        if test "x$GREP" = x; then
11784          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11785        fi
11786      else
11787        # Otherwise we believe it is a complete path. Use it as it is.
11788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11789$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11791$as_echo_n "checking for GREP... " >&6; }
11792        if test ! -x "$tool_specified"; then
11793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11794$as_echo "not found" >&6; }
11795          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11796        fi
11797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11798$as_echo "$tool_specified" >&6; }
11799      fi
11800    fi
11801  fi
11802
11803
11804  if test "x$GREP" = x; then
11805    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11806  fi
11807
11808
11809
11810
11811  # Publish this variable in the help.
11812
11813
11814  if test "x$EGREP" = x; then
11815    # The variable is not set by user, try to locate tool using the code snippet
11816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11817$as_echo_n "checking for egrep... " >&6; }
11818if ${ac_cv_path_EGREP+:} false; then :
11819  $as_echo_n "(cached) " >&6
11820else
11821  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11822   then ac_cv_path_EGREP="$GREP -E"
11823   else
11824     if test -z "$EGREP"; then
11825  ac_path_EGREP_found=false
11826  # Loop through the user's path and test for each of PROGNAME-LIST
11827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11828for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11829do
11830  IFS=$as_save_IFS
11831  test -z "$as_dir" && as_dir=.
11832    for ac_prog in egrep; do
11833    for ac_exec_ext in '' $ac_executable_extensions; do
11834      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11835      as_fn_executable_p "$ac_path_EGREP" || continue
11836# Check for GNU ac_path_EGREP and select it if it is found.
11837  # Check for GNU $ac_path_EGREP
11838case `"$ac_path_EGREP" --version 2>&1` in
11839*GNU*)
11840  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11841*)
11842  ac_count=0
11843  $as_echo_n 0123456789 >"conftest.in"
11844  while :
11845  do
11846    cat "conftest.in" "conftest.in" >"conftest.tmp"
11847    mv "conftest.tmp" "conftest.in"
11848    cp "conftest.in" "conftest.nl"
11849    $as_echo 'EGREP' >> "conftest.nl"
11850    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11851    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11852    as_fn_arith $ac_count + 1 && ac_count=$as_val
11853    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11854      # Best one so far, save it but keep looking for a better one
11855      ac_cv_path_EGREP="$ac_path_EGREP"
11856      ac_path_EGREP_max=$ac_count
11857    fi
11858    # 10*(2^10) chars as input seems more than enough
11859    test $ac_count -gt 10 && break
11860  done
11861  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11862esac
11863
11864      $ac_path_EGREP_found && break 3
11865    done
11866  done
11867  done
11868IFS=$as_save_IFS
11869  if test -z "$ac_cv_path_EGREP"; then
11870    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11871  fi
11872else
11873  ac_cv_path_EGREP=$EGREP
11874fi
11875
11876   fi
11877fi
11878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11879$as_echo "$ac_cv_path_EGREP" >&6; }
11880 EGREP="$ac_cv_path_EGREP"
11881
11882
11883  else
11884    # The variable is set, but is it from the command line or the environment?
11885
11886    # Try to remove the string !EGREP! from our list.
11887    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11888    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11889      # If it failed, the variable was not from the command line. Ignore it,
11890      # but warn the user (except for BASH, which is always set by the calling BASH).
11891      if test "xEGREP" != xBASH; then
11892        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11893$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11894      fi
11895      # Try to locate tool using the code snippet
11896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11897$as_echo_n "checking for egrep... " >&6; }
11898if ${ac_cv_path_EGREP+:} false; then :
11899  $as_echo_n "(cached) " >&6
11900else
11901  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11902   then ac_cv_path_EGREP="$GREP -E"
11903   else
11904     if test -z "$EGREP"; then
11905  ac_path_EGREP_found=false
11906  # Loop through the user's path and test for each of PROGNAME-LIST
11907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11908for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11909do
11910  IFS=$as_save_IFS
11911  test -z "$as_dir" && as_dir=.
11912    for ac_prog in egrep; do
11913    for ac_exec_ext in '' $ac_executable_extensions; do
11914      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11915      as_fn_executable_p "$ac_path_EGREP" || continue
11916# Check for GNU ac_path_EGREP and select it if it is found.
11917  # Check for GNU $ac_path_EGREP
11918case `"$ac_path_EGREP" --version 2>&1` in
11919*GNU*)
11920  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11921*)
11922  ac_count=0
11923  $as_echo_n 0123456789 >"conftest.in"
11924  while :
11925  do
11926    cat "conftest.in" "conftest.in" >"conftest.tmp"
11927    mv "conftest.tmp" "conftest.in"
11928    cp "conftest.in" "conftest.nl"
11929    $as_echo 'EGREP' >> "conftest.nl"
11930    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11931    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11932    as_fn_arith $ac_count + 1 && ac_count=$as_val
11933    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11934      # Best one so far, save it but keep looking for a better one
11935      ac_cv_path_EGREP="$ac_path_EGREP"
11936      ac_path_EGREP_max=$ac_count
11937    fi
11938    # 10*(2^10) chars as input seems more than enough
11939    test $ac_count -gt 10 && break
11940  done
11941  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11942esac
11943
11944      $ac_path_EGREP_found && break 3
11945    done
11946  done
11947  done
11948IFS=$as_save_IFS
11949  if test -z "$ac_cv_path_EGREP"; then
11950    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11951  fi
11952else
11953  ac_cv_path_EGREP=$EGREP
11954fi
11955
11956   fi
11957fi
11958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11959$as_echo "$ac_cv_path_EGREP" >&6; }
11960 EGREP="$ac_cv_path_EGREP"
11961
11962
11963    else
11964      # If it succeeded, then it was overridden by the user. We will use it
11965      # for the tool.
11966
11967      # First remove it from the list of overridden variables, so we can test
11968      # for unknown variables in the end.
11969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11970
11971      # Check if the provided tool contains a complete path.
11972      tool_specified="$EGREP"
11973      tool_basename="${tool_specified##*/}"
11974      if test "x$tool_basename" = "x$tool_specified"; then
11975        # A command without a complete path is provided, search $PATH.
11976        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11977$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11978        # Extract the first word of "$tool_basename", so it can be a program name with args.
11979set dummy $tool_basename; ac_word=$2
11980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11981$as_echo_n "checking for $ac_word... " >&6; }
11982if ${ac_cv_path_EGREP+:} false; then :
11983  $as_echo_n "(cached) " >&6
11984else
11985  case $EGREP in
11986  [\\/]* | ?:[\\/]*)
11987  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11988  ;;
11989  *)
11990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11991for as_dir in $PATH
11992do
11993  IFS=$as_save_IFS
11994  test -z "$as_dir" && as_dir=.
11995    for ac_exec_ext in '' $ac_executable_extensions; do
11996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11997    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11999    break 2
12000  fi
12001done
12002  done
12003IFS=$as_save_IFS
12004
12005  ;;
12006esac
12007fi
12008EGREP=$ac_cv_path_EGREP
12009if test -n "$EGREP"; then
12010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12011$as_echo "$EGREP" >&6; }
12012else
12013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014$as_echo "no" >&6; }
12015fi
12016
12017
12018        if test "x$EGREP" = x; then
12019          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12020        fi
12021      else
12022        # Otherwise we believe it is a complete path. Use it as it is.
12023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12024$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12026$as_echo_n "checking for EGREP... " >&6; }
12027        if test ! -x "$tool_specified"; then
12028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12029$as_echo "not found" >&6; }
12030          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12031        fi
12032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12033$as_echo "$tool_specified" >&6; }
12034      fi
12035    fi
12036  fi
12037
12038
12039  if test "x$EGREP" = x; then
12040    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12041  fi
12042
12043
12044
12045
12046  # Publish this variable in the help.
12047
12048
12049  if test "x$FGREP" = x; then
12050    # The variable is not set by user, try to locate tool using the code snippet
12051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12052$as_echo_n "checking for fgrep... " >&6; }
12053if ${ac_cv_path_FGREP+:} false; then :
12054  $as_echo_n "(cached) " >&6
12055else
12056  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12057   then ac_cv_path_FGREP="$GREP -F"
12058   else
12059     if test -z "$FGREP"; then
12060  ac_path_FGREP_found=false
12061  # Loop through the user's path and test for each of PROGNAME-LIST
12062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12063for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12064do
12065  IFS=$as_save_IFS
12066  test -z "$as_dir" && as_dir=.
12067    for ac_prog in fgrep; do
12068    for ac_exec_ext in '' $ac_executable_extensions; do
12069      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12070      as_fn_executable_p "$ac_path_FGREP" || continue
12071# Check for GNU ac_path_FGREP and select it if it is found.
12072  # Check for GNU $ac_path_FGREP
12073case `"$ac_path_FGREP" --version 2>&1` in
12074*GNU*)
12075  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12076*)
12077  ac_count=0
12078  $as_echo_n 0123456789 >"conftest.in"
12079  while :
12080  do
12081    cat "conftest.in" "conftest.in" >"conftest.tmp"
12082    mv "conftest.tmp" "conftest.in"
12083    cp "conftest.in" "conftest.nl"
12084    $as_echo 'FGREP' >> "conftest.nl"
12085    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12086    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12087    as_fn_arith $ac_count + 1 && ac_count=$as_val
12088    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12089      # Best one so far, save it but keep looking for a better one
12090      ac_cv_path_FGREP="$ac_path_FGREP"
12091      ac_path_FGREP_max=$ac_count
12092    fi
12093    # 10*(2^10) chars as input seems more than enough
12094    test $ac_count -gt 10 && break
12095  done
12096  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12097esac
12098
12099      $ac_path_FGREP_found && break 3
12100    done
12101  done
12102  done
12103IFS=$as_save_IFS
12104  if test -z "$ac_cv_path_FGREP"; then
12105    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12106  fi
12107else
12108  ac_cv_path_FGREP=$FGREP
12109fi
12110
12111   fi
12112fi
12113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12114$as_echo "$ac_cv_path_FGREP" >&6; }
12115 FGREP="$ac_cv_path_FGREP"
12116
12117
12118  else
12119    # The variable is set, but is it from the command line or the environment?
12120
12121    # Try to remove the string !FGREP! from our list.
12122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12124      # If it failed, the variable was not from the command line. Ignore it,
12125      # but warn the user (except for BASH, which is always set by the calling BASH).
12126      if test "xFGREP" != xBASH; then
12127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12128$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12129      fi
12130      # Try to locate tool using the code snippet
12131      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12132$as_echo_n "checking for fgrep... " >&6; }
12133if ${ac_cv_path_FGREP+:} false; then :
12134  $as_echo_n "(cached) " >&6
12135else
12136  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12137   then ac_cv_path_FGREP="$GREP -F"
12138   else
12139     if test -z "$FGREP"; then
12140  ac_path_FGREP_found=false
12141  # Loop through the user's path and test for each of PROGNAME-LIST
12142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12143for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12144do
12145  IFS=$as_save_IFS
12146  test -z "$as_dir" && as_dir=.
12147    for ac_prog in fgrep; do
12148    for ac_exec_ext in '' $ac_executable_extensions; do
12149      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12150      as_fn_executable_p "$ac_path_FGREP" || continue
12151# Check for GNU ac_path_FGREP and select it if it is found.
12152  # Check for GNU $ac_path_FGREP
12153case `"$ac_path_FGREP" --version 2>&1` in
12154*GNU*)
12155  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12156*)
12157  ac_count=0
12158  $as_echo_n 0123456789 >"conftest.in"
12159  while :
12160  do
12161    cat "conftest.in" "conftest.in" >"conftest.tmp"
12162    mv "conftest.tmp" "conftest.in"
12163    cp "conftest.in" "conftest.nl"
12164    $as_echo 'FGREP' >> "conftest.nl"
12165    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12166    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12167    as_fn_arith $ac_count + 1 && ac_count=$as_val
12168    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12169      # Best one so far, save it but keep looking for a better one
12170      ac_cv_path_FGREP="$ac_path_FGREP"
12171      ac_path_FGREP_max=$ac_count
12172    fi
12173    # 10*(2^10) chars as input seems more than enough
12174    test $ac_count -gt 10 && break
12175  done
12176  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12177esac
12178
12179      $ac_path_FGREP_found && break 3
12180    done
12181  done
12182  done
12183IFS=$as_save_IFS
12184  if test -z "$ac_cv_path_FGREP"; then
12185    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12186  fi
12187else
12188  ac_cv_path_FGREP=$FGREP
12189fi
12190
12191   fi
12192fi
12193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12194$as_echo "$ac_cv_path_FGREP" >&6; }
12195 FGREP="$ac_cv_path_FGREP"
12196
12197
12198    else
12199      # If it succeeded, then it was overridden by the user. We will use it
12200      # for the tool.
12201
12202      # First remove it from the list of overridden variables, so we can test
12203      # for unknown variables in the end.
12204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12205
12206      # Check if the provided tool contains a complete path.
12207      tool_specified="$FGREP"
12208      tool_basename="${tool_specified##*/}"
12209      if test "x$tool_basename" = "x$tool_specified"; then
12210        # A command without a complete path is provided, search $PATH.
12211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12212$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12213        # Extract the first word of "$tool_basename", so it can be a program name with args.
12214set dummy $tool_basename; ac_word=$2
12215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12216$as_echo_n "checking for $ac_word... " >&6; }
12217if ${ac_cv_path_FGREP+:} false; then :
12218  $as_echo_n "(cached) " >&6
12219else
12220  case $FGREP in
12221  [\\/]* | ?:[\\/]*)
12222  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12223  ;;
12224  *)
12225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12226for as_dir in $PATH
12227do
12228  IFS=$as_save_IFS
12229  test -z "$as_dir" && as_dir=.
12230    for ac_exec_ext in '' $ac_executable_extensions; do
12231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12232    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12234    break 2
12235  fi
12236done
12237  done
12238IFS=$as_save_IFS
12239
12240  ;;
12241esac
12242fi
12243FGREP=$ac_cv_path_FGREP
12244if test -n "$FGREP"; then
12245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12246$as_echo "$FGREP" >&6; }
12247else
12248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12249$as_echo "no" >&6; }
12250fi
12251
12252
12253        if test "x$FGREP" = x; then
12254          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12255        fi
12256      else
12257        # Otherwise we believe it is a complete path. Use it as it is.
12258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12259$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12261$as_echo_n "checking for FGREP... " >&6; }
12262        if test ! -x "$tool_specified"; then
12263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12264$as_echo "not found" >&6; }
12265          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12266        fi
12267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12268$as_echo "$tool_specified" >&6; }
12269      fi
12270    fi
12271  fi
12272
12273
12274  if test "x$FGREP" = x; then
12275    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12276  fi
12277
12278
12279
12280
12281  # Publish this variable in the help.
12282
12283
12284  if test "x$SED" = x; then
12285    # The variable is not set by user, try to locate tool using the code snippet
12286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12287$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12288if ${ac_cv_path_SED+:} false; then :
12289  $as_echo_n "(cached) " >&6
12290else
12291            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12292     for ac_i in 1 2 3 4 5 6 7; do
12293       ac_script="$ac_script$as_nl$ac_script"
12294     done
12295     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12296     { ac_script=; unset ac_script;}
12297     if test -z "$SED"; then
12298  ac_path_SED_found=false
12299  # Loop through the user's path and test for each of PROGNAME-LIST
12300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12301for as_dir in $PATH
12302do
12303  IFS=$as_save_IFS
12304  test -z "$as_dir" && as_dir=.
12305    for ac_prog in sed gsed; do
12306    for ac_exec_ext in '' $ac_executable_extensions; do
12307      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12308      as_fn_executable_p "$ac_path_SED" || continue
12309# Check for GNU ac_path_SED and select it if it is found.
12310  # Check for GNU $ac_path_SED
12311case `"$ac_path_SED" --version 2>&1` in
12312*GNU*)
12313  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12314*)
12315  ac_count=0
12316  $as_echo_n 0123456789 >"conftest.in"
12317  while :
12318  do
12319    cat "conftest.in" "conftest.in" >"conftest.tmp"
12320    mv "conftest.tmp" "conftest.in"
12321    cp "conftest.in" "conftest.nl"
12322    $as_echo '' >> "conftest.nl"
12323    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12324    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12325    as_fn_arith $ac_count + 1 && ac_count=$as_val
12326    if test $ac_count -gt ${ac_path_SED_max-0}; then
12327      # Best one so far, save it but keep looking for a better one
12328      ac_cv_path_SED="$ac_path_SED"
12329      ac_path_SED_max=$ac_count
12330    fi
12331    # 10*(2^10) chars as input seems more than enough
12332    test $ac_count -gt 10 && break
12333  done
12334  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12335esac
12336
12337      $ac_path_SED_found && break 3
12338    done
12339  done
12340  done
12341IFS=$as_save_IFS
12342  if test -z "$ac_cv_path_SED"; then
12343    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12344  fi
12345else
12346  ac_cv_path_SED=$SED
12347fi
12348
12349fi
12350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12351$as_echo "$ac_cv_path_SED" >&6; }
12352 SED="$ac_cv_path_SED"
12353  rm -f conftest.sed
12354
12355  else
12356    # The variable is set, but is it from the command line or the environment?
12357
12358    # Try to remove the string !SED! from our list.
12359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12361      # If it failed, the variable was not from the command line. Ignore it,
12362      # but warn the user (except for BASH, which is always set by the calling BASH).
12363      if test "xSED" != xBASH; then
12364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12365$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12366      fi
12367      # Try to locate tool using the code snippet
12368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12369$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12370if ${ac_cv_path_SED+:} false; then :
12371  $as_echo_n "(cached) " >&6
12372else
12373            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12374     for ac_i in 1 2 3 4 5 6 7; do
12375       ac_script="$ac_script$as_nl$ac_script"
12376     done
12377     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12378     { ac_script=; unset ac_script;}
12379     if test -z "$SED"; then
12380  ac_path_SED_found=false
12381  # Loop through the user's path and test for each of PROGNAME-LIST
12382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12383for as_dir in $PATH
12384do
12385  IFS=$as_save_IFS
12386  test -z "$as_dir" && as_dir=.
12387    for ac_prog in sed gsed; do
12388    for ac_exec_ext in '' $ac_executable_extensions; do
12389      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12390      as_fn_executable_p "$ac_path_SED" || continue
12391# Check for GNU ac_path_SED and select it if it is found.
12392  # Check for GNU $ac_path_SED
12393case `"$ac_path_SED" --version 2>&1` in
12394*GNU*)
12395  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12396*)
12397  ac_count=0
12398  $as_echo_n 0123456789 >"conftest.in"
12399  while :
12400  do
12401    cat "conftest.in" "conftest.in" >"conftest.tmp"
12402    mv "conftest.tmp" "conftest.in"
12403    cp "conftest.in" "conftest.nl"
12404    $as_echo '' >> "conftest.nl"
12405    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12406    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12407    as_fn_arith $ac_count + 1 && ac_count=$as_val
12408    if test $ac_count -gt ${ac_path_SED_max-0}; then
12409      # Best one so far, save it but keep looking for a better one
12410      ac_cv_path_SED="$ac_path_SED"
12411      ac_path_SED_max=$ac_count
12412    fi
12413    # 10*(2^10) chars as input seems more than enough
12414    test $ac_count -gt 10 && break
12415  done
12416  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12417esac
12418
12419      $ac_path_SED_found && break 3
12420    done
12421  done
12422  done
12423IFS=$as_save_IFS
12424  if test -z "$ac_cv_path_SED"; then
12425    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12426  fi
12427else
12428  ac_cv_path_SED=$SED
12429fi
12430
12431fi
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12433$as_echo "$ac_cv_path_SED" >&6; }
12434 SED="$ac_cv_path_SED"
12435  rm -f conftest.sed
12436
12437    else
12438      # If it succeeded, then it was overridden by the user. We will use it
12439      # for the tool.
12440
12441      # First remove it from the list of overridden variables, so we can test
12442      # for unknown variables in the end.
12443      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12444
12445      # Check if the provided tool contains a complete path.
12446      tool_specified="$SED"
12447      tool_basename="${tool_specified##*/}"
12448      if test "x$tool_basename" = "x$tool_specified"; then
12449        # A command without a complete path is provided, search $PATH.
12450        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12451$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12452        # Extract the first word of "$tool_basename", so it can be a program name with args.
12453set dummy $tool_basename; ac_word=$2
12454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455$as_echo_n "checking for $ac_word... " >&6; }
12456if ${ac_cv_path_SED+:} false; then :
12457  $as_echo_n "(cached) " >&6
12458else
12459  case $SED in
12460  [\\/]* | ?:[\\/]*)
12461  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12462  ;;
12463  *)
12464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12465for as_dir in $PATH
12466do
12467  IFS=$as_save_IFS
12468  test -z "$as_dir" && as_dir=.
12469    for ac_exec_ext in '' $ac_executable_extensions; do
12470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12471    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12473    break 2
12474  fi
12475done
12476  done
12477IFS=$as_save_IFS
12478
12479  ;;
12480esac
12481fi
12482SED=$ac_cv_path_SED
12483if test -n "$SED"; then
12484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12485$as_echo "$SED" >&6; }
12486else
12487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488$as_echo "no" >&6; }
12489fi
12490
12491
12492        if test "x$SED" = x; then
12493          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12494        fi
12495      else
12496        # Otherwise we believe it is a complete path. Use it as it is.
12497        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12498$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12500$as_echo_n "checking for SED... " >&6; }
12501        if test ! -x "$tool_specified"; then
12502          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12503$as_echo "not found" >&6; }
12504          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12505        fi
12506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12507$as_echo "$tool_specified" >&6; }
12508      fi
12509    fi
12510  fi
12511
12512
12513  if test "x$SED" = x; then
12514    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12515  fi
12516
12517
12518
12519  # Always force rm.
12520  RM="$RM -f"
12521
12522  # pwd behaves differently on various platforms and some don't support the -L flag.
12523  # Always use the bash builtin pwd to get uniform behavior.
12524  THEPWDCMD=pwd
12525
12526  # These are not required on all platforms
12527
12528
12529  # Publish this variable in the help.
12530
12531
12532  if test "x$CYGPATH" = x; then
12533    # The variable is not set by user, try to locate tool using the code snippet
12534    for ac_prog in cygpath
12535do
12536  # Extract the first word of "$ac_prog", so it can be a program name with args.
12537set dummy $ac_prog; ac_word=$2
12538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12539$as_echo_n "checking for $ac_word... " >&6; }
12540if ${ac_cv_path_CYGPATH+:} false; then :
12541  $as_echo_n "(cached) " >&6
12542else
12543  case $CYGPATH in
12544  [\\/]* | ?:[\\/]*)
12545  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12546  ;;
12547  *)
12548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12549for as_dir in $PATH
12550do
12551  IFS=$as_save_IFS
12552  test -z "$as_dir" && as_dir=.
12553    for ac_exec_ext in '' $ac_executable_extensions; do
12554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12555    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12557    break 2
12558  fi
12559done
12560  done
12561IFS=$as_save_IFS
12562
12563  ;;
12564esac
12565fi
12566CYGPATH=$ac_cv_path_CYGPATH
12567if test -n "$CYGPATH"; then
12568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12569$as_echo "$CYGPATH" >&6; }
12570else
12571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12572$as_echo "no" >&6; }
12573fi
12574
12575
12576  test -n "$CYGPATH" && break
12577done
12578
12579  else
12580    # The variable is set, but is it from the command line or the environment?
12581
12582    # Try to remove the string !CYGPATH! from our list.
12583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12585      # If it failed, the variable was not from the command line. Ignore it,
12586      # but warn the user (except for BASH, which is always set by the calling BASH).
12587      if test "xCYGPATH" != xBASH; then
12588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12589$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12590      fi
12591      # Try to locate tool using the code snippet
12592      for ac_prog in cygpath
12593do
12594  # Extract the first word of "$ac_prog", so it can be a program name with args.
12595set dummy $ac_prog; ac_word=$2
12596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12597$as_echo_n "checking for $ac_word... " >&6; }
12598if ${ac_cv_path_CYGPATH+:} false; then :
12599  $as_echo_n "(cached) " >&6
12600else
12601  case $CYGPATH in
12602  [\\/]* | ?:[\\/]*)
12603  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12604  ;;
12605  *)
12606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12607for as_dir in $PATH
12608do
12609  IFS=$as_save_IFS
12610  test -z "$as_dir" && as_dir=.
12611    for ac_exec_ext in '' $ac_executable_extensions; do
12612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12613    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12615    break 2
12616  fi
12617done
12618  done
12619IFS=$as_save_IFS
12620
12621  ;;
12622esac
12623fi
12624CYGPATH=$ac_cv_path_CYGPATH
12625if test -n "$CYGPATH"; then
12626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12627$as_echo "$CYGPATH" >&6; }
12628else
12629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12630$as_echo "no" >&6; }
12631fi
12632
12633
12634  test -n "$CYGPATH" && break
12635done
12636
12637    else
12638      # If it succeeded, then it was overridden by the user. We will use it
12639      # for the tool.
12640
12641      # First remove it from the list of overridden variables, so we can test
12642      # for unknown variables in the end.
12643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12644
12645      # Check if the provided tool contains a complete path.
12646      tool_specified="$CYGPATH"
12647      tool_basename="${tool_specified##*/}"
12648      if test "x$tool_basename" = "x$tool_specified"; then
12649        # A command without a complete path is provided, search $PATH.
12650        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12651$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12652        # Extract the first word of "$tool_basename", so it can be a program name with args.
12653set dummy $tool_basename; ac_word=$2
12654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12655$as_echo_n "checking for $ac_word... " >&6; }
12656if ${ac_cv_path_CYGPATH+:} false; then :
12657  $as_echo_n "(cached) " >&6
12658else
12659  case $CYGPATH in
12660  [\\/]* | ?:[\\/]*)
12661  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12662  ;;
12663  *)
12664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12665for as_dir in $PATH
12666do
12667  IFS=$as_save_IFS
12668  test -z "$as_dir" && as_dir=.
12669    for ac_exec_ext in '' $ac_executable_extensions; do
12670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12671    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12673    break 2
12674  fi
12675done
12676  done
12677IFS=$as_save_IFS
12678
12679  ;;
12680esac
12681fi
12682CYGPATH=$ac_cv_path_CYGPATH
12683if test -n "$CYGPATH"; then
12684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12685$as_echo "$CYGPATH" >&6; }
12686else
12687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688$as_echo "no" >&6; }
12689fi
12690
12691
12692        if test "x$CYGPATH" = x; then
12693          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12694        fi
12695      else
12696        # Otherwise we believe it is a complete path. Use it as it is.
12697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12698$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12700$as_echo_n "checking for CYGPATH... " >&6; }
12701        if test ! -x "$tool_specified"; then
12702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12703$as_echo "not found" >&6; }
12704          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12705        fi
12706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12707$as_echo "$tool_specified" >&6; }
12708      fi
12709    fi
12710  fi
12711
12712
12713
12714
12715  # Publish this variable in the help.
12716
12717
12718  if test "x$READLINK" = x; then
12719    # The variable is not set by user, try to locate tool using the code snippet
12720    for ac_prog in greadlink readlink
12721do
12722  # Extract the first word of "$ac_prog", so it can be a program name with args.
12723set dummy $ac_prog; ac_word=$2
12724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12725$as_echo_n "checking for $ac_word... " >&6; }
12726if ${ac_cv_path_READLINK+:} false; then :
12727  $as_echo_n "(cached) " >&6
12728else
12729  case $READLINK in
12730  [\\/]* | ?:[\\/]*)
12731  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12732  ;;
12733  *)
12734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12735for as_dir in $PATH
12736do
12737  IFS=$as_save_IFS
12738  test -z "$as_dir" && as_dir=.
12739    for ac_exec_ext in '' $ac_executable_extensions; do
12740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12741    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12743    break 2
12744  fi
12745done
12746  done
12747IFS=$as_save_IFS
12748
12749  ;;
12750esac
12751fi
12752READLINK=$ac_cv_path_READLINK
12753if test -n "$READLINK"; then
12754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12755$as_echo "$READLINK" >&6; }
12756else
12757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12758$as_echo "no" >&6; }
12759fi
12760
12761
12762  test -n "$READLINK" && break
12763done
12764
12765  else
12766    # The variable is set, but is it from the command line or the environment?
12767
12768    # Try to remove the string !READLINK! from our list.
12769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12771      # If it failed, the variable was not from the command line. Ignore it,
12772      # but warn the user (except for BASH, which is always set by the calling BASH).
12773      if test "xREADLINK" != xBASH; then
12774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12775$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12776      fi
12777      # Try to locate tool using the code snippet
12778      for ac_prog in greadlink readlink
12779do
12780  # Extract the first word of "$ac_prog", so it can be a program name with args.
12781set dummy $ac_prog; ac_word=$2
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12783$as_echo_n "checking for $ac_word... " >&6; }
12784if ${ac_cv_path_READLINK+:} false; then :
12785  $as_echo_n "(cached) " >&6
12786else
12787  case $READLINK in
12788  [\\/]* | ?:[\\/]*)
12789  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12790  ;;
12791  *)
12792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12793for as_dir in $PATH
12794do
12795  IFS=$as_save_IFS
12796  test -z "$as_dir" && as_dir=.
12797    for ac_exec_ext in '' $ac_executable_extensions; do
12798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12799    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12801    break 2
12802  fi
12803done
12804  done
12805IFS=$as_save_IFS
12806
12807  ;;
12808esac
12809fi
12810READLINK=$ac_cv_path_READLINK
12811if test -n "$READLINK"; then
12812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12813$as_echo "$READLINK" >&6; }
12814else
12815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12816$as_echo "no" >&6; }
12817fi
12818
12819
12820  test -n "$READLINK" && break
12821done
12822
12823    else
12824      # If it succeeded, then it was overridden by the user. We will use it
12825      # for the tool.
12826
12827      # First remove it from the list of overridden variables, so we can test
12828      # for unknown variables in the end.
12829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12830
12831      # Check if the provided tool contains a complete path.
12832      tool_specified="$READLINK"
12833      tool_basename="${tool_specified##*/}"
12834      if test "x$tool_basename" = "x$tool_specified"; then
12835        # A command without a complete path is provided, search $PATH.
12836        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12837$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12838        # Extract the first word of "$tool_basename", so it can be a program name with args.
12839set dummy $tool_basename; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_READLINK+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $READLINK in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868READLINK=$ac_cv_path_READLINK
12869if test -n "$READLINK"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12871$as_echo "$READLINK" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878        if test "x$READLINK" = x; then
12879          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12880        fi
12881      else
12882        # Otherwise we believe it is a complete path. Use it as it is.
12883        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12884$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12885        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12886$as_echo_n "checking for READLINK... " >&6; }
12887        if test ! -x "$tool_specified"; then
12888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12889$as_echo "not found" >&6; }
12890          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12891        fi
12892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12893$as_echo "$tool_specified" >&6; }
12894      fi
12895    fi
12896  fi
12897
12898
12899
12900
12901  # Publish this variable in the help.
12902
12903
12904  if test "x$DF" = x; then
12905    # The variable is not set by user, try to locate tool using the code snippet
12906    for ac_prog in df
12907do
12908  # Extract the first word of "$ac_prog", so it can be a program name with args.
12909set dummy $ac_prog; ac_word=$2
12910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12911$as_echo_n "checking for $ac_word... " >&6; }
12912if ${ac_cv_path_DF+:} false; then :
12913  $as_echo_n "(cached) " >&6
12914else
12915  case $DF in
12916  [\\/]* | ?:[\\/]*)
12917  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12918  ;;
12919  *)
12920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12921for as_dir in $PATH
12922do
12923  IFS=$as_save_IFS
12924  test -z "$as_dir" && as_dir=.
12925    for ac_exec_ext in '' $ac_executable_extensions; do
12926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12927    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12929    break 2
12930  fi
12931done
12932  done
12933IFS=$as_save_IFS
12934
12935  ;;
12936esac
12937fi
12938DF=$ac_cv_path_DF
12939if test -n "$DF"; then
12940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12941$as_echo "$DF" >&6; }
12942else
12943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12944$as_echo "no" >&6; }
12945fi
12946
12947
12948  test -n "$DF" && break
12949done
12950
12951  else
12952    # The variable is set, but is it from the command line or the environment?
12953
12954    # Try to remove the string !DF! from our list.
12955    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12956    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12957      # If it failed, the variable was not from the command line. Ignore it,
12958      # but warn the user (except for BASH, which is always set by the calling BASH).
12959      if test "xDF" != xBASH; then
12960        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12961$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12962      fi
12963      # Try to locate tool using the code snippet
12964      for ac_prog in df
12965do
12966  # Extract the first word of "$ac_prog", so it can be a program name with args.
12967set dummy $ac_prog; ac_word=$2
12968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12969$as_echo_n "checking for $ac_word... " >&6; }
12970if ${ac_cv_path_DF+:} false; then :
12971  $as_echo_n "(cached) " >&6
12972else
12973  case $DF in
12974  [\\/]* | ?:[\\/]*)
12975  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12976  ;;
12977  *)
12978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12979for as_dir in $PATH
12980do
12981  IFS=$as_save_IFS
12982  test -z "$as_dir" && as_dir=.
12983    for ac_exec_ext in '' $ac_executable_extensions; do
12984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12985    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12987    break 2
12988  fi
12989done
12990  done
12991IFS=$as_save_IFS
12992
12993  ;;
12994esac
12995fi
12996DF=$ac_cv_path_DF
12997if test -n "$DF"; then
12998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12999$as_echo "$DF" >&6; }
13000else
13001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13002$as_echo "no" >&6; }
13003fi
13004
13005
13006  test -n "$DF" && break
13007done
13008
13009    else
13010      # If it succeeded, then it was overridden by the user. We will use it
13011      # for the tool.
13012
13013      # First remove it from the list of overridden variables, so we can test
13014      # for unknown variables in the end.
13015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13016
13017      # Check if the provided tool contains a complete path.
13018      tool_specified="$DF"
13019      tool_basename="${tool_specified##*/}"
13020      if test "x$tool_basename" = "x$tool_specified"; then
13021        # A command without a complete path is provided, search $PATH.
13022        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13023$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13024        # Extract the first word of "$tool_basename", so it can be a program name with args.
13025set dummy $tool_basename; ac_word=$2
13026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13027$as_echo_n "checking for $ac_word... " >&6; }
13028if ${ac_cv_path_DF+:} false; then :
13029  $as_echo_n "(cached) " >&6
13030else
13031  case $DF in
13032  [\\/]* | ?:[\\/]*)
13033  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13034  ;;
13035  *)
13036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13037for as_dir in $PATH
13038do
13039  IFS=$as_save_IFS
13040  test -z "$as_dir" && as_dir=.
13041    for ac_exec_ext in '' $ac_executable_extensions; do
13042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13043    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13045    break 2
13046  fi
13047done
13048  done
13049IFS=$as_save_IFS
13050
13051  ;;
13052esac
13053fi
13054DF=$ac_cv_path_DF
13055if test -n "$DF"; then
13056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13057$as_echo "$DF" >&6; }
13058else
13059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13060$as_echo "no" >&6; }
13061fi
13062
13063
13064        if test "x$DF" = x; then
13065          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13066        fi
13067      else
13068        # Otherwise we believe it is a complete path. Use it as it is.
13069        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13070$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13072$as_echo_n "checking for DF... " >&6; }
13073        if test ! -x "$tool_specified"; then
13074          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13075$as_echo "not found" >&6; }
13076          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13077        fi
13078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13079$as_echo "$tool_specified" >&6; }
13080      fi
13081    fi
13082  fi
13083
13084
13085
13086
13087  # Publish this variable in the help.
13088
13089
13090  if test "x$SETFILE" = x; then
13091    # The variable is not set by user, try to locate tool using the code snippet
13092    for ac_prog in SetFile
13093do
13094  # Extract the first word of "$ac_prog", so it can be a program name with args.
13095set dummy $ac_prog; ac_word=$2
13096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13097$as_echo_n "checking for $ac_word... " >&6; }
13098if ${ac_cv_path_SETFILE+:} false; then :
13099  $as_echo_n "(cached) " >&6
13100else
13101  case $SETFILE in
13102  [\\/]* | ?:[\\/]*)
13103  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13104  ;;
13105  *)
13106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13107for as_dir in $PATH
13108do
13109  IFS=$as_save_IFS
13110  test -z "$as_dir" && as_dir=.
13111    for ac_exec_ext in '' $ac_executable_extensions; do
13112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13113    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13115    break 2
13116  fi
13117done
13118  done
13119IFS=$as_save_IFS
13120
13121  ;;
13122esac
13123fi
13124SETFILE=$ac_cv_path_SETFILE
13125if test -n "$SETFILE"; then
13126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13127$as_echo "$SETFILE" >&6; }
13128else
13129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13130$as_echo "no" >&6; }
13131fi
13132
13133
13134  test -n "$SETFILE" && break
13135done
13136
13137  else
13138    # The variable is set, but is it from the command line or the environment?
13139
13140    # Try to remove the string !SETFILE! from our list.
13141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13143      # If it failed, the variable was not from the command line. Ignore it,
13144      # but warn the user (except for BASH, which is always set by the calling BASH).
13145      if test "xSETFILE" != xBASH; then
13146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13147$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13148      fi
13149      # Try to locate tool using the code snippet
13150      for ac_prog in SetFile
13151do
13152  # Extract the first word of "$ac_prog", so it can be a program name with args.
13153set dummy $ac_prog; ac_word=$2
13154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13155$as_echo_n "checking for $ac_word... " >&6; }
13156if ${ac_cv_path_SETFILE+:} false; then :
13157  $as_echo_n "(cached) " >&6
13158else
13159  case $SETFILE in
13160  [\\/]* | ?:[\\/]*)
13161  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13162  ;;
13163  *)
13164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13165for as_dir in $PATH
13166do
13167  IFS=$as_save_IFS
13168  test -z "$as_dir" && as_dir=.
13169    for ac_exec_ext in '' $ac_executable_extensions; do
13170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13171    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13173    break 2
13174  fi
13175done
13176  done
13177IFS=$as_save_IFS
13178
13179  ;;
13180esac
13181fi
13182SETFILE=$ac_cv_path_SETFILE
13183if test -n "$SETFILE"; then
13184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13185$as_echo "$SETFILE" >&6; }
13186else
13187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13188$as_echo "no" >&6; }
13189fi
13190
13191
13192  test -n "$SETFILE" && break
13193done
13194
13195    else
13196      # If it succeeded, then it was overridden by the user. We will use it
13197      # for the tool.
13198
13199      # First remove it from the list of overridden variables, so we can test
13200      # for unknown variables in the end.
13201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13202
13203      # Check if the provided tool contains a complete path.
13204      tool_specified="$SETFILE"
13205      tool_basename="${tool_specified##*/}"
13206      if test "x$tool_basename" = "x$tool_specified"; then
13207        # A command without a complete path is provided, search $PATH.
13208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13209$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13210        # Extract the first word of "$tool_basename", so it can be a program name with args.
13211set dummy $tool_basename; ac_word=$2
13212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13213$as_echo_n "checking for $ac_word... " >&6; }
13214if ${ac_cv_path_SETFILE+:} false; then :
13215  $as_echo_n "(cached) " >&6
13216else
13217  case $SETFILE in
13218  [\\/]* | ?:[\\/]*)
13219  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13220  ;;
13221  *)
13222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13223for as_dir in $PATH
13224do
13225  IFS=$as_save_IFS
13226  test -z "$as_dir" && as_dir=.
13227    for ac_exec_ext in '' $ac_executable_extensions; do
13228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13229    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13231    break 2
13232  fi
13233done
13234  done
13235IFS=$as_save_IFS
13236
13237  ;;
13238esac
13239fi
13240SETFILE=$ac_cv_path_SETFILE
13241if test -n "$SETFILE"; then
13242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13243$as_echo "$SETFILE" >&6; }
13244else
13245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13246$as_echo "no" >&6; }
13247fi
13248
13249
13250        if test "x$SETFILE" = x; then
13251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13252        fi
13253      else
13254        # Otherwise we believe it is a complete path. Use it as it is.
13255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13256$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13258$as_echo_n "checking for SETFILE... " >&6; }
13259        if test ! -x "$tool_specified"; then
13260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13261$as_echo "not found" >&6; }
13262          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13263        fi
13264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13265$as_echo "$tool_specified" >&6; }
13266      fi
13267    fi
13268  fi
13269
13270
13271
13272
13273  # Publish this variable in the help.
13274
13275
13276  if test "x$CPIO" = x; then
13277    # The variable is not set by user, try to locate tool using the code snippet
13278    for ac_prog in cpio bsdcpio
13279do
13280  # Extract the first word of "$ac_prog", so it can be a program name with args.
13281set dummy $ac_prog; ac_word=$2
13282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13283$as_echo_n "checking for $ac_word... " >&6; }
13284if ${ac_cv_path_CPIO+:} false; then :
13285  $as_echo_n "(cached) " >&6
13286else
13287  case $CPIO in
13288  [\\/]* | ?:[\\/]*)
13289  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13290  ;;
13291  *)
13292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13293for as_dir in $PATH
13294do
13295  IFS=$as_save_IFS
13296  test -z "$as_dir" && as_dir=.
13297    for ac_exec_ext in '' $ac_executable_extensions; do
13298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13299    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13301    break 2
13302  fi
13303done
13304  done
13305IFS=$as_save_IFS
13306
13307  ;;
13308esac
13309fi
13310CPIO=$ac_cv_path_CPIO
13311if test -n "$CPIO"; then
13312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13313$as_echo "$CPIO" >&6; }
13314else
13315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13316$as_echo "no" >&6; }
13317fi
13318
13319
13320  test -n "$CPIO" && break
13321done
13322
13323  else
13324    # The variable is set, but is it from the command line or the environment?
13325
13326    # Try to remove the string !CPIO! from our list.
13327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13329      # If it failed, the variable was not from the command line. Ignore it,
13330      # but warn the user (except for BASH, which is always set by the calling BASH).
13331      if test "xCPIO" != xBASH; then
13332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13333$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13334      fi
13335      # Try to locate tool using the code snippet
13336      for ac_prog in cpio bsdcpio
13337do
13338  # Extract the first word of "$ac_prog", so it can be a program name with args.
13339set dummy $ac_prog; ac_word=$2
13340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13341$as_echo_n "checking for $ac_word... " >&6; }
13342if ${ac_cv_path_CPIO+:} false; then :
13343  $as_echo_n "(cached) " >&6
13344else
13345  case $CPIO in
13346  [\\/]* | ?:[\\/]*)
13347  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13348  ;;
13349  *)
13350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13351for as_dir in $PATH
13352do
13353  IFS=$as_save_IFS
13354  test -z "$as_dir" && as_dir=.
13355    for ac_exec_ext in '' $ac_executable_extensions; do
13356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13357    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13359    break 2
13360  fi
13361done
13362  done
13363IFS=$as_save_IFS
13364
13365  ;;
13366esac
13367fi
13368CPIO=$ac_cv_path_CPIO
13369if test -n "$CPIO"; then
13370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13371$as_echo "$CPIO" >&6; }
13372else
13373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13374$as_echo "no" >&6; }
13375fi
13376
13377
13378  test -n "$CPIO" && break
13379done
13380
13381    else
13382      # If it succeeded, then it was overridden by the user. We will use it
13383      # for the tool.
13384
13385      # First remove it from the list of overridden variables, so we can test
13386      # for unknown variables in the end.
13387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13388
13389      # Check if the provided tool contains a complete path.
13390      tool_specified="$CPIO"
13391      tool_basename="${tool_specified##*/}"
13392      if test "x$tool_basename" = "x$tool_specified"; then
13393        # A command without a complete path is provided, search $PATH.
13394        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13395$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13396        # Extract the first word of "$tool_basename", so it can be a program name with args.
13397set dummy $tool_basename; ac_word=$2
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13399$as_echo_n "checking for $ac_word... " >&6; }
13400if ${ac_cv_path_CPIO+:} false; then :
13401  $as_echo_n "(cached) " >&6
13402else
13403  case $CPIO in
13404  [\\/]* | ?:[\\/]*)
13405  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13406  ;;
13407  *)
13408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13409for as_dir in $PATH
13410do
13411  IFS=$as_save_IFS
13412  test -z "$as_dir" && as_dir=.
13413    for ac_exec_ext in '' $ac_executable_extensions; do
13414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13415    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13417    break 2
13418  fi
13419done
13420  done
13421IFS=$as_save_IFS
13422
13423  ;;
13424esac
13425fi
13426CPIO=$ac_cv_path_CPIO
13427if test -n "$CPIO"; then
13428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13429$as_echo "$CPIO" >&6; }
13430else
13431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13432$as_echo "no" >&6; }
13433fi
13434
13435
13436        if test "x$CPIO" = x; then
13437          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13438        fi
13439      else
13440        # Otherwise we believe it is a complete path. Use it as it is.
13441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13442$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13444$as_echo_n "checking for CPIO... " >&6; }
13445        if test ! -x "$tool_specified"; then
13446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13447$as_echo "not found" >&6; }
13448          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13449        fi
13450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13451$as_echo "$tool_specified" >&6; }
13452      fi
13453    fi
13454  fi
13455
13456
13457
13458
13459# Now we can determine OpenJDK build and target platforms. This is required to
13460# have early on.
13461# Make sure we can run config.sub.
13462$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13463  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13464
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13466$as_echo_n "checking build system type... " >&6; }
13467if ${ac_cv_build+:} false; then :
13468  $as_echo_n "(cached) " >&6
13469else
13470  ac_build_alias=$build_alias
13471test "x$ac_build_alias" = x &&
13472  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13473test "x$ac_build_alias" = x &&
13474  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13475ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13476  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13477
13478fi
13479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13480$as_echo "$ac_cv_build" >&6; }
13481case $ac_cv_build in
13482*-*-*) ;;
13483*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13484esac
13485build=$ac_cv_build
13486ac_save_IFS=$IFS; IFS='-'
13487set x $ac_cv_build
13488shift
13489build_cpu=$1
13490build_vendor=$2
13491shift; shift
13492# Remember, the first character of IFS is used to create $*,
13493# except with old shells:
13494build_os=$*
13495IFS=$ac_save_IFS
13496case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13497
13498
13499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13500$as_echo_n "checking host system type... " >&6; }
13501if ${ac_cv_host+:} false; then :
13502  $as_echo_n "(cached) " >&6
13503else
13504  if test "x$host_alias" = x; then
13505  ac_cv_host=$ac_cv_build
13506else
13507  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13508    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13509fi
13510
13511fi
13512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13513$as_echo "$ac_cv_host" >&6; }
13514case $ac_cv_host in
13515*-*-*) ;;
13516*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13517esac
13518host=$ac_cv_host
13519ac_save_IFS=$IFS; IFS='-'
13520set x $ac_cv_host
13521shift
13522host_cpu=$1
13523host_vendor=$2
13524shift; shift
13525# Remember, the first character of IFS is used to create $*,
13526# except with old shells:
13527host_os=$*
13528IFS=$ac_save_IFS
13529case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13530
13531
13532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13533$as_echo_n "checking target system type... " >&6; }
13534if ${ac_cv_target+:} false; then :
13535  $as_echo_n "(cached) " >&6
13536else
13537  if test "x$target_alias" = x; then
13538  ac_cv_target=$ac_cv_host
13539else
13540  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13541    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13542fi
13543
13544fi
13545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13546$as_echo "$ac_cv_target" >&6; }
13547case $ac_cv_target in
13548*-*-*) ;;
13549*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13550esac
13551target=$ac_cv_target
13552ac_save_IFS=$IFS; IFS='-'
13553set x $ac_cv_target
13554shift
13555target_cpu=$1
13556target_vendor=$2
13557shift; shift
13558# Remember, the first character of IFS is used to create $*,
13559# except with old shells:
13560target_os=$*
13561IFS=$ac_save_IFS
13562case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13563
13564
13565# The aliases save the names the user supplied, while $host etc.
13566# will get canonicalized.
13567test -n "$target_alias" &&
13568  test "$program_prefix$program_suffix$program_transform_name" = \
13569    NONENONEs,x,x, &&
13570  program_prefix=${target_alias}-
13571
13572  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13573  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13574  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13575  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13576  # to use the configure naming style.
13577
13578
13579
13580
13581
13582  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13583  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13584  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13585  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13586  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13587  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13588
13589
13590
13591  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13592
13593  case "$build_os" in
13594    *linux*)
13595      VAR_OS=linux
13596      VAR_OS_TYPE=unix
13597      ;;
13598    *solaris*)
13599      VAR_OS=solaris
13600      VAR_OS_TYPE=unix
13601      ;;
13602    *darwin*)
13603      VAR_OS=macosx
13604      VAR_OS_TYPE=unix
13605      ;;
13606    *bsd*)
13607      VAR_OS=bsd
13608      VAR_OS_TYPE=unix
13609      ;;
13610    *cygwin*)
13611      VAR_OS=windows
13612      VAR_OS_ENV=windows.cygwin
13613      ;;
13614    *mingw*)
13615      VAR_OS=windows
13616      VAR_OS_ENV=windows.msys
13617      ;;
13618    *aix*)
13619      VAR_OS=aix
13620      VAR_OS_TYPE=unix
13621      ;;
13622    *)
13623      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13624      ;;
13625  esac
13626
13627
13628  # First argument is the cpu name from the trip/quad
13629  case "$build_cpu" in
13630    x86_64)
13631      VAR_CPU=x86_64
13632      VAR_CPU_ARCH=x86
13633      VAR_CPU_BITS=64
13634      VAR_CPU_ENDIAN=little
13635      ;;
13636    i?86)
13637      VAR_CPU=x86
13638      VAR_CPU_ARCH=x86
13639      VAR_CPU_BITS=32
13640      VAR_CPU_ENDIAN=little
13641      ;;
13642    arm*)
13643      VAR_CPU=arm
13644      VAR_CPU_ARCH=arm
13645      VAR_CPU_BITS=32
13646      VAR_CPU_ENDIAN=little
13647      ;;
13648    powerpc)
13649      VAR_CPU=ppc
13650      VAR_CPU_ARCH=ppc
13651      VAR_CPU_BITS=32
13652      VAR_CPU_ENDIAN=big
13653      ;;
13654    powerpc64)
13655      VAR_CPU=ppc64
13656      VAR_CPU_ARCH=ppc
13657      VAR_CPU_BITS=64
13658      VAR_CPU_ENDIAN=big
13659      ;;
13660    powerpc64le)
13661      VAR_CPU=ppc64
13662      VAR_CPU_ARCH=ppc
13663      VAR_CPU_BITS=64
13664      VAR_CPU_ENDIAN=little
13665      ;;
13666    s390)
13667      VAR_CPU=s390
13668      VAR_CPU_ARCH=s390
13669      VAR_CPU_BITS=32
13670      VAR_CPU_ENDIAN=big
13671      ;;
13672    s390x)
13673      VAR_CPU=s390x
13674      VAR_CPU_ARCH=s390
13675      VAR_CPU_BITS=64
13676      VAR_CPU_ENDIAN=big
13677      ;;
13678    sparc)
13679      VAR_CPU=sparc
13680      VAR_CPU_ARCH=sparc
13681      VAR_CPU_BITS=32
13682      VAR_CPU_ENDIAN=big
13683      ;;
13684    sparcv9|sparc64)
13685      VAR_CPU=sparcv9
13686      VAR_CPU_ARCH=sparc
13687      VAR_CPU_BITS=64
13688      VAR_CPU_ENDIAN=big
13689      ;;
13690    *)
13691      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13692      ;;
13693  esac
13694
13695  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13696  OPENJDK_BUILD_OS="$VAR_OS"
13697  if test "x$VAR_OS_TYPE" != x; then
13698    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13699  else
13700    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13701  fi
13702  if test "x$VAR_OS_ENV" != x; then
13703    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13704  else
13705    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13706  fi
13707  OPENJDK_BUILD_CPU="$VAR_CPU"
13708  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13709  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13710  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13711
13712
13713
13714
13715
13716
13717
13718
13719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13720$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13722$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13723
13724  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13725
13726  case "$host_os" in
13727    *linux*)
13728      VAR_OS=linux
13729      VAR_OS_TYPE=unix
13730      ;;
13731    *solaris*)
13732      VAR_OS=solaris
13733      VAR_OS_TYPE=unix
13734      ;;
13735    *darwin*)
13736      VAR_OS=macosx
13737      VAR_OS_TYPE=unix
13738      ;;
13739    *bsd*)
13740      VAR_OS=bsd
13741      VAR_OS_TYPE=unix
13742      ;;
13743    *cygwin*)
13744      VAR_OS=windows
13745      VAR_OS_ENV=windows.cygwin
13746      ;;
13747    *mingw*)
13748      VAR_OS=windows
13749      VAR_OS_ENV=windows.msys
13750      ;;
13751    *aix*)
13752      VAR_OS=aix
13753      VAR_OS_TYPE=unix
13754      ;;
13755    *)
13756      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13757      ;;
13758  esac
13759
13760
13761  # First argument is the cpu name from the trip/quad
13762  case "$host_cpu" in
13763    x86_64)
13764      VAR_CPU=x86_64
13765      VAR_CPU_ARCH=x86
13766      VAR_CPU_BITS=64
13767      VAR_CPU_ENDIAN=little
13768      ;;
13769    i?86)
13770      VAR_CPU=x86
13771      VAR_CPU_ARCH=x86
13772      VAR_CPU_BITS=32
13773      VAR_CPU_ENDIAN=little
13774      ;;
13775    arm*)
13776      VAR_CPU=arm
13777      VAR_CPU_ARCH=arm
13778      VAR_CPU_BITS=32
13779      VAR_CPU_ENDIAN=little
13780      ;;
13781    powerpc)
13782      VAR_CPU=ppc
13783      VAR_CPU_ARCH=ppc
13784      VAR_CPU_BITS=32
13785      VAR_CPU_ENDIAN=big
13786      ;;
13787    powerpc64)
13788      VAR_CPU=ppc64
13789      VAR_CPU_ARCH=ppc
13790      VAR_CPU_BITS=64
13791      VAR_CPU_ENDIAN=big
13792      ;;
13793    powerpc64le)
13794      VAR_CPU=ppc64
13795      VAR_CPU_ARCH=ppc
13796      VAR_CPU_BITS=64
13797      VAR_CPU_ENDIAN=little
13798      ;;
13799    s390)
13800      VAR_CPU=s390
13801      VAR_CPU_ARCH=s390
13802      VAR_CPU_BITS=32
13803      VAR_CPU_ENDIAN=big
13804      ;;
13805    s390x)
13806      VAR_CPU=s390x
13807      VAR_CPU_ARCH=s390
13808      VAR_CPU_BITS=64
13809      VAR_CPU_ENDIAN=big
13810      ;;
13811    sparc)
13812      VAR_CPU=sparc
13813      VAR_CPU_ARCH=sparc
13814      VAR_CPU_BITS=32
13815      VAR_CPU_ENDIAN=big
13816      ;;
13817    sparcv9|sparc64)
13818      VAR_CPU=sparcv9
13819      VAR_CPU_ARCH=sparc
13820      VAR_CPU_BITS=64
13821      VAR_CPU_ENDIAN=big
13822      ;;
13823    *)
13824      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13825      ;;
13826  esac
13827
13828  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13829  OPENJDK_TARGET_OS="$VAR_OS"
13830  if test "x$VAR_OS_TYPE" != x; then
13831    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13832  else
13833    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13834  fi
13835  if test "x$VAR_OS_ENV" != x; then
13836    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13837  else
13838    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13839  fi
13840  OPENJDK_TARGET_CPU="$VAR_CPU"
13841  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13842  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13843  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13844
13845
13846
13847
13848
13849
13850
13851
13852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13853$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13855$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13856
13857
13858
13859# Check whether --with-target-bits was given.
13860if test "${with_target_bits+set}" = set; then :
13861  withval=$with_target_bits;
13862fi
13863
13864
13865  # We have three types of compiles:
13866  # native  == normal compilation, target system == build system
13867  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13868  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13869  #
13870  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13871    # We're doing a proper cross-compilation
13872    COMPILE_TYPE="cross"
13873  else
13874    COMPILE_TYPE="native"
13875  fi
13876
13877  if test "x$with_target_bits" != x; then
13878    if test "x$COMPILE_TYPE" = "xcross"; then
13879      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13880    fi
13881
13882    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13883      # A reduced build is requested
13884      COMPILE_TYPE="reduced"
13885      OPENJDK_TARGET_CPU_BITS=32
13886      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13887        OPENJDK_TARGET_CPU=x86
13888      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13889        OPENJDK_TARGET_CPU=sparc
13890      else
13891        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13892      fi
13893    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13894      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
13895    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13896      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13897$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13898    else
13899      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13900    fi
13901  fi
13902
13903
13904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13905$as_echo_n "checking compilation type... " >&6; }
13906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13907$as_echo "$COMPILE_TYPE" >&6; }
13908
13909
13910  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13911    REQUIRED_OS_NAME=SunOS
13912    REQUIRED_OS_VERSION=5.10
13913  fi
13914  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13915    REQUIRED_OS_NAME=Linux
13916    REQUIRED_OS_VERSION=2.6
13917  fi
13918  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13919    REQUIRED_OS_NAME=Windows
13920    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13921      REQUIRED_OS_VERSION=5.2
13922    else
13923      REQUIRED_OS_VERSION=5.1
13924    fi
13925  fi
13926  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13927    REQUIRED_OS_NAME=Darwin
13928    REQUIRED_OS_VERSION=11.2
13929  fi
13930
13931
13932
13933
13934
13935  # Also store the legacy naming of the cpu.
13936  # Ie i586 and amd64 instead of x86 and x86_64
13937  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13938  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13939    OPENJDK_TARGET_CPU_LEGACY="i586"
13940  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13941    # On all platforms except MacOSX replace x86_64 with amd64.
13942    OPENJDK_TARGET_CPU_LEGACY="amd64"
13943  fi
13944
13945
13946  # And the second legacy naming of the cpu.
13947  # Ie i386 and amd64 instead of x86 and x86_64.
13948  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13949  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13950    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13951  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13952    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13953  fi
13954
13955
13956  # This is the name of the cpu (but using i386 and amd64 instead of
13957  # x86 and x86_64, respectively), preceeded by a /, to be used when
13958  # locating libraries. On macosx, it's empty, though.
13959  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13960  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13961    OPENJDK_TARGET_CPU_LIBDIR=""
13962  fi
13963
13964
13965  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13966  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13967  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13968  OPENJDK_TARGET_CPU_ISADIR=""
13969  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13970    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13971      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13972    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13973      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13974    fi
13975  fi
13976
13977
13978  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13979  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13980  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13981    # On linux only, we replace x86 with i386.
13982    OPENJDK_TARGET_CPU_OSARCH="i386"
13983  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13984    # On all platforms except macosx, we replace x86_64 with amd64.
13985    OPENJDK_TARGET_CPU_OSARCH="amd64"
13986  fi
13987
13988
13989  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13990  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13991    OPENJDK_TARGET_CPU_JLI="i386"
13992  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13993    # On all platforms except macosx, we replace x86_64 with amd64.
13994    OPENJDK_TARGET_CPU_JLI="amd64"
13995  fi
13996  # Now setup the -D flags for building libjli.
13997  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13998  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13999    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14000      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14001    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14002      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14003    fi
14004  fi
14005
14006
14007  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14008      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14009  else
14010      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14011  fi
14012
14013
14014  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14015    A_LP64="LP64:="
14016    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14017    # unpack200.exe
14018    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14019      ADD_LP64="-D_LP64=1"
14020    fi
14021  fi
14022  LP64=$A_LP64
14023
14024
14025  if test "x$COMPILE_TYPE" = "xcross"; then
14026    # FIXME: ... or should this include reduced builds..?
14027    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14028  else
14029    DEFINE_CROSS_COMPILE_ARCH=""
14030  fi
14031
14032
14033  # ZERO_ARCHDEF is used to enable architecture-specific code
14034  case "${OPENJDK_TARGET_CPU}" in
14035    ppc)     ZERO_ARCHDEF=PPC32 ;;
14036    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14037    s390*)   ZERO_ARCHDEF=S390  ;;
14038    sparc*)  ZERO_ARCHDEF=SPARC ;;
14039    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14040    x86)     ZERO_ARCHDEF=IA32  ;;
14041    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14042  esac
14043
14044
14045
14046
14047# Continue setting up basic stuff. Most remaining code require fundamental tools.
14048
14049  # Save the current directory this script was started from
14050  CURDIR="$PWD"
14051
14052  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14053    PATH_SEP=";"
14054
14055  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14056  if test $SRC_ROOT_LENGTH -gt 100; then
14057    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14058  fi
14059
14060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14062$as_echo_n "checking cygwin release... " >&6; }
14063    CYGWIN_VERSION=`$UNAME -r`
14064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14065$as_echo "$CYGWIN_VERSION" >&6; }
14066    WINDOWS_ENV_VENDOR='cygwin'
14067    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14068
14069    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14070    if test "x$CYGWIN_VERSION_OK" = x; then
14071      { $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
14072$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;}
14073      as_fn_error $? "Cannot continue" "$LINENO" 5
14074    fi
14075    if test "x$CYGPATH" = x; then
14076      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14077    fi
14078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14079$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14080    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14081    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14082    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14083    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14085$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14086    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14087    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14088    if test "x$test_cygdrive_prefix" = x; then
14089      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14090    fi
14091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14093$as_echo_n "checking msys release... " >&6; }
14094    MSYS_VERSION=`$UNAME -r`
14095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14096$as_echo "$MSYS_VERSION" >&6; }
14097
14098    WINDOWS_ENV_VENDOR='msys'
14099    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14100
14101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14102$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14103    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14104    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14105
14106  windows_path="$MSYS_ROOT_PATH"
14107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14108    unix_path=`$CYGPATH -u "$windows_path"`
14109    MSYS_ROOT_PATH="$unix_path"
14110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14112    MSYS_ROOT_PATH="$unix_path"
14113  fi
14114
14115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14116$as_echo "$MSYS_ROOT_PATH" >&6; }
14117    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14118  else
14119    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14120  fi
14121
14122  # Test if windows or unix (cygwin/msys) find is first in path.
14123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14124$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14125  FIND_BINARY_OUTPUT=`find --version 2>&1`
14126  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14128$as_echo "unix style" >&6; }
14129  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14131$as_echo "Windows" >&6; }
14132    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14133$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14134    { $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
14135$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14136    as_fn_error $? "Cannot continue" "$LINENO" 5
14137  else
14138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14139$as_echo "unknown" >&6; }
14140    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14141$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14142  fi
14143
14144  else
14145    PATH_SEP=":"
14146  fi
14147
14148
14149  # We get the top-level directory from the supporting wrappers.
14150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14151$as_echo_n "checking for top-level directory... " >&6; }
14152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14153$as_echo "$TOPDIR" >&6; }
14154
14155
14156  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14157
14158  # Only process if variable expands to non-empty
14159
14160  if test "x$CURDIR" != x; then
14161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14162
14163  # Input might be given as Windows format, start by converting to
14164  # unix format.
14165  path="$CURDIR"
14166  new_path=`$CYGPATH -u "$path"`
14167
14168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14171  # "foo.exe" is OK but "foo" is an error.
14172  #
14173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14174  # It is also a way to make sure we got the proper file name for the real test later on.
14175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14176  if test "x$test_shortpath" = x; then
14177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14178$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14179    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14180  fi
14181
14182  # Call helper function which possibly converts this using DOS-style short mode.
14183  # If so, the updated path is stored in $new_path.
14184
14185  input_path="$new_path"
14186  # Check if we need to convert this using DOS-style short mode. If the path
14187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14188  # take no chances and rewrite it.
14189  # Note: m4 eats our [], so we need to use [ and ] instead.
14190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14191  if test "x$has_forbidden_chars" != x; then
14192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14196      # Going to short mode and back again did indeed matter. Since short mode is
14197      # case insensitive, let's make it lowercase to improve readability.
14198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14199      # Now convert it back to Unix-stile (cygpath)
14200      input_path=`$CYGPATH -u "$shortmode_path"`
14201      new_path="$input_path"
14202    fi
14203  fi
14204
14205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14206  if test "x$test_cygdrive_prefix" = x; then
14207    # As a simple fix, exclude /usr/bin since it's not a real path.
14208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14210      # a path prefixed by /cygdrive for fixpath to work.
14211      new_path="$CYGWIN_ROOT_PATH$input_path"
14212    fi
14213  fi
14214
14215
14216  if test "x$path" != "x$new_path"; then
14217    CURDIR="$new_path"
14218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14219$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14220  fi
14221
14222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14223
14224  path="$CURDIR"
14225  has_colon=`$ECHO $path | $GREP ^.:`
14226  new_path="$path"
14227  if test "x$has_colon" = x; then
14228    # Not in mixed or Windows style, start by that.
14229    new_path=`cmd //c echo $path`
14230  fi
14231
14232
14233  input_path="$new_path"
14234  # Check if we need to convert this using DOS-style short mode. If the path
14235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14236  # take no chances and rewrite it.
14237  # Note: m4 eats our [], so we need to use [ and ] instead.
14238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14239  if test "x$has_forbidden_chars" != x; then
14240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14242  fi
14243
14244
14245  windows_path="$new_path"
14246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14247    unix_path=`$CYGPATH -u "$windows_path"`
14248    new_path="$unix_path"
14249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14251    new_path="$unix_path"
14252  fi
14253
14254  if test "x$path" != "x$new_path"; then
14255    CURDIR="$new_path"
14256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14257$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14258  fi
14259
14260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14262
14263    else
14264      # We're on a unix platform. Hooray! :)
14265      path="$CURDIR"
14266      has_space=`$ECHO "$path" | $GREP " "`
14267      if test "x$has_space" != x; then
14268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14269$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14271      fi
14272
14273      # Use eval to expand a potential ~
14274      eval path="$path"
14275      if test ! -f "$path" && test ! -d "$path"; then
14276        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14277      fi
14278
14279      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14280    fi
14281  fi
14282
14283
14284  # Only process if variable expands to non-empty
14285
14286  if test "x$TOPDIR" != x; then
14287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14288
14289  # Input might be given as Windows format, start by converting to
14290  # unix format.
14291  path="$TOPDIR"
14292  new_path=`$CYGPATH -u "$path"`
14293
14294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14297  # "foo.exe" is OK but "foo" is an error.
14298  #
14299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14300  # It is also a way to make sure we got the proper file name for the real test later on.
14301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14302  if test "x$test_shortpath" = x; then
14303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14304$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14305    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14306  fi
14307
14308  # Call helper function which possibly converts this using DOS-style short mode.
14309  # If so, the updated path is stored in $new_path.
14310
14311  input_path="$new_path"
14312  # Check if we need to convert this using DOS-style short mode. If the path
14313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14314  # take no chances and rewrite it.
14315  # Note: m4 eats our [], so we need to use [ and ] instead.
14316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14317  if test "x$has_forbidden_chars" != x; then
14318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14322      # Going to short mode and back again did indeed matter. Since short mode is
14323      # case insensitive, let's make it lowercase to improve readability.
14324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14325      # Now convert it back to Unix-stile (cygpath)
14326      input_path=`$CYGPATH -u "$shortmode_path"`
14327      new_path="$input_path"
14328    fi
14329  fi
14330
14331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14332  if test "x$test_cygdrive_prefix" = x; then
14333    # As a simple fix, exclude /usr/bin since it's not a real path.
14334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14336      # a path prefixed by /cygdrive for fixpath to work.
14337      new_path="$CYGWIN_ROOT_PATH$input_path"
14338    fi
14339  fi
14340
14341
14342  if test "x$path" != "x$new_path"; then
14343    TOPDIR="$new_path"
14344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14345$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14346  fi
14347
14348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14349
14350  path="$TOPDIR"
14351  has_colon=`$ECHO $path | $GREP ^.:`
14352  new_path="$path"
14353  if test "x$has_colon" = x; then
14354    # Not in mixed or Windows style, start by that.
14355    new_path=`cmd //c echo $path`
14356  fi
14357
14358
14359  input_path="$new_path"
14360  # Check if we need to convert this using DOS-style short mode. If the path
14361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14362  # take no chances and rewrite it.
14363  # Note: m4 eats our [], so we need to use [ and ] instead.
14364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14365  if test "x$has_forbidden_chars" != x; then
14366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14368  fi
14369
14370
14371  windows_path="$new_path"
14372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14373    unix_path=`$CYGPATH -u "$windows_path"`
14374    new_path="$unix_path"
14375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14377    new_path="$unix_path"
14378  fi
14379
14380  if test "x$path" != "x$new_path"; then
14381    TOPDIR="$new_path"
14382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14383$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14384  fi
14385
14386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14388
14389    else
14390      # We're on a unix platform. Hooray! :)
14391      path="$TOPDIR"
14392      has_space=`$ECHO "$path" | $GREP " "`
14393      if test "x$has_space" != x; then
14394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14395$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14397      fi
14398
14399      # Use eval to expand a potential ~
14400      eval path="$path"
14401      if test ! -f "$path" && test ! -d "$path"; then
14402        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14403      fi
14404
14405      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14406    fi
14407  fi
14408
14409  # SRC_ROOT is a traditional alias for TOPDIR.
14410  SRC_ROOT=$TOPDIR
14411
14412  # Locate the directory of this script.
14413  AUTOCONF_DIR=$TOPDIR/common/autoconf
14414
14415
14416  # Setup default logging of stdout and stderr to build.log in the output root.
14417  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14418  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14419  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14420
14421
14422
14423
14424
14425# Check if it's a pure open build or if custom sources are to be used.
14426
14427  # Check whether --enable-openjdk-only was given.
14428if test "${enable_openjdk_only+set}" = set; then :
14429  enableval=$enable_openjdk_only;
14430else
14431  enable_openjdk_only="no"
14432fi
14433
14434
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14436$as_echo_n "checking for presence of closed sources... " >&6; }
14437  if test -d "$SRC_ROOT/jdk/src/closed"; then
14438    CLOSED_SOURCE_PRESENT=yes
14439  else
14440    CLOSED_SOURCE_PRESENT=no
14441  fi
14442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14443$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14444
14445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14446$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14447  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14449$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14450
14451  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14452    OPENJDK=true
14453    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14454      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14455$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14456    fi
14457  else
14458    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14459      OPENJDK=true
14460    else
14461      OPENJDK=false
14462    fi
14463  fi
14464
14465  if test "x$OPENJDK" = "xtrue"; then
14466    SET_OPENJDK="OPENJDK=true"
14467  fi
14468
14469
14470
14471  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14472  # the IncludeCustomExtension macro.
14473
14474
14475# Check whether --with-custom-make-dir was given.
14476if test "${with_custom_make_dir+set}" = set; then :
14477  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
14478$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14479fi
14480
14481
14482
14483
14484# These are needed to be able to create a configuration name (and thus the output directory)
14485
14486  ###############################################################################
14487  #
14488  # Check which variant of the JDK that we want to build.
14489  # Currently we have:
14490  #    normal:   standard edition
14491  # but the custom make system may add other variants
14492  #
14493  # Effectively the JDK variant gives a name to a specific set of
14494  # modules to compile into the JDK. In the future, these modules
14495  # might even be Jigsaw modules.
14496  #
14497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14498$as_echo_n "checking which variant of the JDK to build... " >&6; }
14499
14500# Check whether --with-jdk-variant was given.
14501if test "${with_jdk_variant+set}" = set; then :
14502  withval=$with_jdk_variant;
14503fi
14504
14505
14506  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14507    JDK_VARIANT="normal"
14508  else
14509    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14510  fi
14511
14512
14513
14514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14515$as_echo "$JDK_VARIANT" >&6; }
14516
14517
14518###############################################################################
14519#
14520# Check which interpreter of the JVM we want to build.
14521# Currently we have:
14522#    template: Template interpreter (the default)
14523#    cpp     : C++ interpreter
14524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14525$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14526
14527# Check whether --with-jvm-interpreter was given.
14528if test "${with_jvm_interpreter+set}" = set; then :
14529  withval=$with_jvm_interpreter;
14530fi
14531
14532
14533if test "x$with_jvm_interpreter" = x; then
14534     with_jvm_interpreter="template"
14535fi
14536
14537JVM_INTERPRETER="$with_jvm_interpreter"
14538
14539if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14540   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14541fi
14542
14543
14544
14545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14546$as_echo "$with_jvm_interpreter" >&6; }
14547
14548
14549
14550  ###############################################################################
14551  #
14552  # Check which variants of the JVM that we want to build.
14553  # Currently we have:
14554  #    server: normal interpreter and a tiered C1/C2 compiler
14555  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14556  #    minimal1: reduced form of client with optional VM services and features stripped out
14557  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14558  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14559  #    zero: no machine code interpreter, no compiler
14560  #    zeroshark: zero interpreter and shark/llvm compiler backend
14561#    core: interpreter only, no compiler (only works on some platforms)
14562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14563$as_echo_n "checking which variants of the JVM to build... " >&6; }
14564
14565# Check whether --with-jvm-variants was given.
14566if test "${with_jvm_variants+set}" = set; then :
14567  withval=$with_jvm_variants;
14568fi
14569
14570
14571  if test "x$with_jvm_variants" = x; then
14572    with_jvm_variants="server"
14573  fi
14574
14575  JVM_VARIANTS=",$with_jvm_variants,"
14576  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,//'`
14577
14578  if test "x$TEST_VARIANTS" != "x,"; then
14579     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14580  fi
14581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14582$as_echo "$with_jvm_variants" >&6; }
14583
14584  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14585  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14586  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14587  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14588  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14589  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14590  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14591
14592  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14593    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14594      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14595    fi
14596  fi
14597  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14598    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14599      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14600    fi
14601  fi
14602  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14603    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14604      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14605    fi
14606  fi
14607
14608  # Replace the commas with AND for use in the build directory name.
14609  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14610  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/'`
14611  if test "x$COUNT_VARIANTS" != "x,1"; then
14612    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14613  else
14614    BUILDING_MULTIPLE_JVM_VARIANTS=no
14615  fi
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626  INCLUDE_SA=true
14627  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14628    INCLUDE_SA=false
14629  fi
14630  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14631    INCLUDE_SA=false
14632  fi
14633  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14634    INCLUDE_SA=false
14635  fi
14636
14637
14638  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14639    MACOSX_UNIVERSAL="true"
14640  fi
14641
14642
14643
14644
14645  ###############################################################################
14646  #
14647  # Set the debug level
14648  #    release: no debug information, all optimizations, no asserts.
14649  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14650  #    fastdebug: debug information (-g), all optimizations, all asserts
14651  #    slowdebug: debug information (-g), no optimizations, all asserts
14652  #
14653  DEBUG_LEVEL="release"
14654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14655$as_echo_n "checking which debug level to use... " >&6; }
14656  # Check whether --enable-debug was given.
14657if test "${enable_debug+set}" = set; then :
14658  enableval=$enable_debug;
14659        ENABLE_DEBUG="${enableval}"
14660        DEBUG_LEVEL="fastdebug"
14661
14662else
14663  ENABLE_DEBUG="no"
14664fi
14665
14666
14667
14668# Check whether --with-debug-level was given.
14669if test "${with_debug_level+set}" = set; then :
14670  withval=$with_debug_level;
14671        DEBUG_LEVEL="${withval}"
14672        if test "x$ENABLE_DEBUG" = xyes; then
14673          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14674        fi
14675
14676fi
14677
14678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14679$as_echo "$DEBUG_LEVEL" >&6; }
14680
14681  if test "x$DEBUG_LEVEL" != xrelease && \
14682      test "x$DEBUG_LEVEL" != xoptimized && \
14683      test "x$DEBUG_LEVEL" != xfastdebug && \
14684      test "x$DEBUG_LEVEL" != xslowdebug; then
14685    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14686  fi
14687
14688
14689  ###############################################################################
14690  #
14691  # Setup legacy vars/targets and new vars to deal with different debug levels.
14692  #
14693
14694  case $DEBUG_LEVEL in
14695    release )
14696      VARIANT="OPT"
14697      FASTDEBUG="false"
14698      DEBUG_CLASSFILES="false"
14699      BUILD_VARIANT_RELEASE=""
14700      HOTSPOT_DEBUG_LEVEL="product"
14701      HOTSPOT_EXPORT="product"
14702      ;;
14703    fastdebug )
14704      VARIANT="DBG"
14705      FASTDEBUG="true"
14706      DEBUG_CLASSFILES="true"
14707      BUILD_VARIANT_RELEASE="-fastdebug"
14708      HOTSPOT_DEBUG_LEVEL="fastdebug"
14709      HOTSPOT_EXPORT="fastdebug"
14710      ;;
14711    slowdebug )
14712      VARIANT="DBG"
14713      FASTDEBUG="false"
14714      DEBUG_CLASSFILES="true"
14715      BUILD_VARIANT_RELEASE="-debug"
14716      HOTSPOT_DEBUG_LEVEL="debug"
14717      HOTSPOT_EXPORT="debug"
14718      ;;
14719    optimized )
14720      VARIANT="OPT"
14721      FASTDEBUG="false"
14722      DEBUG_CLASSFILES="false"
14723      BUILD_VARIANT_RELEASE="-optimized"
14724      HOTSPOT_DEBUG_LEVEL="optimized"
14725      HOTSPOT_EXPORT="optimized"
14726      ;;
14727  esac
14728
14729  # The debug level 'optimized' is a little special because it is currently only
14730  # applicable to the HotSpot build where it means to build a completely
14731  # optimized version of the VM without any debugging code (like for the
14732  # 'release' debug level which is called 'product' in the HotSpot build) but
14733  # with the exception that it can contain additional code which is otherwise
14734  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14735  # test new and/or experimental features which are not intended for customer
14736  # shipment. Because these new features need to be tested and benchmarked in
14737  # real world scenarios, we want to build the containing JDK at the 'release'
14738  # debug level.
14739  if test "x$DEBUG_LEVEL" = xoptimized; then
14740    DEBUG_LEVEL="release"
14741  fi
14742
14743  #####
14744  # Generate the legacy makefile targets for hotspot.
14745  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14746  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14747  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14748  # But until then ...
14749  HOTSPOT_TARGET=""
14750
14751  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14752    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14753  fi
14754
14755  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14756    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14757  fi
14758
14759  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14760    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14761  fi
14762
14763  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14764    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14765  fi
14766
14767  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14768    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14769  fi
14770
14771  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14772    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14773  fi
14774
14775  if test "x$JVM_VARIANT_CORE" = xtrue; then
14776    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14777  fi
14778
14779  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14780
14781  # On Macosx universal binaries are produced, but they only contain
14782  # 64 bit intel. This invalidates control of which jvms are built
14783  # from configure, but only server is valid anyway. Fix this
14784  # when hotspot makefiles are rewritten.
14785  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14786    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14787  fi
14788
14789  #####
14790
14791
14792
14793
14794
14795
14796
14797
14798# With basic setup done, call the custom early hook.
14799
14800
14801# Check if we have devkits, extra paths or sysroot set.
14802
14803
14804# Check whether --with-devkit was given.
14805if test "${with_devkit+set}" = set; then :
14806  withval=$with_devkit;
14807
14808  # Only process if variable expands to non-empty
14809
14810  if test "x$with_devkit" != x; then
14811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14812
14813  # Input might be given as Windows format, start by converting to
14814  # unix format.
14815  path="$with_devkit"
14816  new_path=`$CYGPATH -u "$path"`
14817
14818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14821  # "foo.exe" is OK but "foo" is an error.
14822  #
14823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14824  # It is also a way to make sure we got the proper file name for the real test later on.
14825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14826  if test "x$test_shortpath" = x; then
14827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14828$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14829    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14830  fi
14831
14832  # Call helper function which possibly converts this using DOS-style short mode.
14833  # If so, the updated path is stored in $new_path.
14834
14835  input_path="$new_path"
14836  # Check if we need to convert this using DOS-style short mode. If the path
14837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14838  # take no chances and rewrite it.
14839  # Note: m4 eats our [], so we need to use [ and ] instead.
14840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14841  if test "x$has_forbidden_chars" != x; then
14842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14846      # Going to short mode and back again did indeed matter. Since short mode is
14847      # case insensitive, let's make it lowercase to improve readability.
14848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14849      # Now convert it back to Unix-stile (cygpath)
14850      input_path=`$CYGPATH -u "$shortmode_path"`
14851      new_path="$input_path"
14852    fi
14853  fi
14854
14855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14856  if test "x$test_cygdrive_prefix" = x; then
14857    # As a simple fix, exclude /usr/bin since it's not a real path.
14858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14860      # a path prefixed by /cygdrive for fixpath to work.
14861      new_path="$CYGWIN_ROOT_PATH$input_path"
14862    fi
14863  fi
14864
14865
14866  if test "x$path" != "x$new_path"; then
14867    with_devkit="$new_path"
14868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14869$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14870  fi
14871
14872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14873
14874  path="$with_devkit"
14875  has_colon=`$ECHO $path | $GREP ^.:`
14876  new_path="$path"
14877  if test "x$has_colon" = x; then
14878    # Not in mixed or Windows style, start by that.
14879    new_path=`cmd //c echo $path`
14880  fi
14881
14882
14883  input_path="$new_path"
14884  # Check if we need to convert this using DOS-style short mode. If the path
14885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14886  # take no chances and rewrite it.
14887  # Note: m4 eats our [], so we need to use [ and ] instead.
14888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14889  if test "x$has_forbidden_chars" != x; then
14890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14892  fi
14893
14894
14895  windows_path="$new_path"
14896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14897    unix_path=`$CYGPATH -u "$windows_path"`
14898    new_path="$unix_path"
14899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14901    new_path="$unix_path"
14902  fi
14903
14904  if test "x$path" != "x$new_path"; then
14905    with_devkit="$new_path"
14906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14907$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14908  fi
14909
14910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14912
14913    else
14914      # We're on a unix platform. Hooray! :)
14915      path="$with_devkit"
14916      has_space=`$ECHO "$path" | $GREP " "`
14917      if test "x$has_space" != x; then
14918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14919$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14921      fi
14922
14923      # Use eval to expand a potential ~
14924      eval path="$path"
14925      if test ! -f "$path" && test ! -d "$path"; then
14926        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14927      fi
14928
14929      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14930    fi
14931  fi
14932
14933        DEVKIT_ROOT="$with_devkit"
14934        # Check for a meta data info file in the root of the devkit
14935        if test -f "$DEVKIT_ROOT/devkit.info"; then
14936          # This potentially sets the following:
14937          # DEVKIT_NAME: A descriptive name of the devkit
14938          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14939          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14940          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14941          . $DEVKIT_ROOT/devkit.info
14942        fi
14943
14944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14945$as_echo_n "checking for devkit... " >&6; }
14946        if test "x$DEVKIT_NAME" != x; then
14947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14948$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14949        else
14950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14951$as_echo "$DEVKIT_ROOT" >&6; }
14952        fi
14953
14954        if test "x$DEVKIT_EXTRA_PATH" != x; then
14955
14956  if test "x$DEVKIT_EXTRA_PATH" != x; then
14957    if test "x$EXTRA_PATH" = x; then
14958      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14959    else
14960      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14961    fi
14962  fi
14963
14964        fi
14965
14966        # Fallback default of just /bin if DEVKIT_PATH is not defined
14967        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14968          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14969        fi
14970
14971  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14972    if test "x$TOOLCHAIN_PATH" = x; then
14973      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14974    else
14975      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14976    fi
14977  fi
14978
14979
14980        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14981        # places for backwards compatiblity.
14982        if test "x$DEVKIT_SYSROOT" != x; then
14983          SYSROOT="$DEVKIT_SYSROOT"
14984        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14985          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14986        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14987          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14988        fi
14989
14990
14991fi
14992
14993
14994  # You can force the sysroot if the sysroot encoded into the compiler tools
14995  # is not correct.
14996
14997# Check whether --with-sys-root was given.
14998if test "${with_sys_root+set}" = set; then :
14999  withval=$with_sys_root; SYSROOT=$with_sys_root
15000
15001fi
15002
15003
15004
15005# Check whether --with-sysroot was given.
15006if test "${with_sysroot+set}" = set; then :
15007  withval=$with_sysroot; SYSROOT=$with_sysroot
15008
15009fi
15010
15011
15012
15013# Check whether --with-tools-dir was given.
15014if test "${with_tools_dir+set}" = set; then :
15015  withval=$with_tools_dir;
15016  if test "x$with_tools_dir" != x; then
15017    if test "x$TOOLCHAIN_PATH" = x; then
15018      TOOLCHAIN_PATH="$with_tools_dir"
15019    else
15020      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15021    fi
15022  fi
15023
15024
15025fi
15026
15027
15028
15029# Check whether --with-toolchain-path was given.
15030if test "${with_toolchain_path+set}" = set; then :
15031  withval=$with_toolchain_path;
15032  if test "x$with_toolchain_path" != x; then
15033    if test "x$TOOLCHAIN_PATH" = x; then
15034      TOOLCHAIN_PATH="$with_toolchain_path"
15035    else
15036      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15037    fi
15038  fi
15039
15040
15041fi
15042
15043
15044
15045# Check whether --with-extra-path was given.
15046if test "${with_extra_path+set}" = set; then :
15047  withval=$with_extra_path;
15048  if test "x$with_extra_path" != x; then
15049    if test "x$EXTRA_PATH" = x; then
15050      EXTRA_PATH="$with_extra_path"
15051    else
15052      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15053    fi
15054  fi
15055
15056
15057fi
15058
15059
15060  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15061    # detect if Xcode is installed by running xcodebuild -version
15062    # if no Xcode installed, xcodebuild exits with 1
15063    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15064    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15065      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15066      # fall back on the stub binary in /usr/bin/xcodebuild
15067      # Extract the first word of "xcodebuild", so it can be a program name with args.
15068set dummy xcodebuild; ac_word=$2
15069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15070$as_echo_n "checking for $ac_word... " >&6; }
15071if ${ac_cv_path_XCODEBUILD+:} false; then :
15072  $as_echo_n "(cached) " >&6
15073else
15074  case $XCODEBUILD in
15075  [\\/]* | ?:[\\/]*)
15076  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15077  ;;
15078  *)
15079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15080for as_dir in $TOOLCHAIN_PATH
15081do
15082  IFS=$as_save_IFS
15083  test -z "$as_dir" && as_dir=.
15084    for ac_exec_ext in '' $ac_executable_extensions; do
15085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15086    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15088    break 2
15089  fi
15090done
15091  done
15092IFS=$as_save_IFS
15093
15094  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15095  ;;
15096esac
15097fi
15098XCODEBUILD=$ac_cv_path_XCODEBUILD
15099if test -n "$XCODEBUILD"; then
15100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15101$as_echo "$XCODEBUILD" >&6; }
15102else
15103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15104$as_echo "no" >&6; }
15105fi
15106
15107
15108    else
15109      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15110      # when only the command line tools are installed there are no SDKs, so headers
15111      # are copied into the system frameworks
15112      XCODEBUILD=
15113
15114    fi
15115
15116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15117$as_echo_n "checking for sdk name... " >&6; }
15118
15119# Check whether --with-sdk-name was given.
15120if test "${with_sdk_name+set}" = set; then :
15121  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15122
15123fi
15124
15125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15126$as_echo "$SDKNAME" >&6; }
15127
15128    # if toolchain path is specified then don't rely on system headers, they may not compile
15129    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15130    test -z "$TOOLCHAIN_PATH" && \
15131      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15132
15133    if test -z "$SYSROOT"; then
15134      if test -n "$XCODEBUILD"; then
15135        # if we don't have system headers, use default SDK name (last resort)
15136        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15137          SDKNAME=${SDKNAME:-macosx}
15138        fi
15139
15140        if test -n "$SDKNAME"; then
15141          # Call xcodebuild to determine SYSROOT
15142          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15143        fi
15144      else
15145        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15146          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
15147        fi
15148      fi
15149    else
15150      # warn user if --with-sdk-name was also set
15151      if test -n "$with_sdk_name"; then
15152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15153$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15154      fi
15155    fi
15156
15157    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15158      # If no system framework headers, then SYSROOT must be set, or we won't build
15159      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
15160    fi
15161
15162    # Perform a basic sanity test
15163    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15164      if test -z "$SYSROOT"; then
15165        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
15166      else
15167        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15168      fi
15169    fi
15170
15171    # set SDKROOT too, Xcode tools will pick it up
15172    SDKROOT=$SYSROOT
15173
15174  fi
15175
15176  # Prepend the extra path to the global path
15177
15178  if test "x$EXTRA_PATH" != x; then
15179    if test "x$PATH" = x; then
15180      PATH="$EXTRA_PATH"
15181    else
15182      PATH="$EXTRA_PATH:$PATH"
15183    fi
15184  fi
15185
15186
15187  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15188    # Add extra search paths on solaris for utilities like ar and as etc...
15189    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15190  fi
15191
15192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15193$as_echo_n "checking for sysroot... " >&6; }
15194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15195$as_echo "$SYSROOT" >&6; }
15196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15197$as_echo_n "checking for toolchain path... " >&6; }
15198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15199$as_echo "$TOOLCHAIN_PATH" >&6; }
15200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15201$as_echo_n "checking for extra path... " >&6; }
15202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15203$as_echo "$EXTRA_PATH" >&6; }
15204
15205
15206# To properly create a configuration name, we need to have the OpenJDK target
15207# and options (variants and debug level) parsed.
15208
15209
15210
15211# Check whether --with-conf-name was given.
15212if test "${with_conf_name+set}" = set; then :
15213  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15214fi
15215
15216
15217  # Test from where we are running configure, in or outside of src root.
15218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15219$as_echo_n "checking where to store configuration... " >&6; }
15220  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15221      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15222      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15223    # We are running configure from the src root.
15224    # Create a default ./build/target-variant-debuglevel output root.
15225    if test "x${CONF_NAME}" = x; then
15226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15227$as_echo "in default location" >&6; }
15228      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15229    else
15230      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15231$as_echo "in build directory with custom name" >&6; }
15232    fi
15233    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15234    $MKDIR -p "$OUTPUT_ROOT"
15235    if test ! -d "$OUTPUT_ROOT"; then
15236      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15237    fi
15238  else
15239    # We are running configure from outside of the src dir.
15240    # Then use the current directory as output dir!
15241    # If configuration is situated in normal build directory, just use the build
15242    # directory name as configuration name, otherwise use the complete path.
15243    if test "x${CONF_NAME}" = x; then
15244      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15245    fi
15246    OUTPUT_ROOT="$CURDIR"
15247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15248$as_echo "in current directory" >&6; }
15249
15250    # WARNING: This might be a bad thing to do. You need to be sure you want to
15251    # have a configuration in this directory. Do some sanity checks!
15252
15253    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15254      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15255      # other files
15256      files_present=`$LS $OUTPUT_ROOT`
15257      # Configure has already touched config.log and confdefs.h in the current dir when this check
15258      # is performed.
15259      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15260      | $TR -d '\n'`
15261      if test "x$filtered_files" != x; then
15262        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15263$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15264        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15265$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15266        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15267$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15268        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15269$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15270        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15271$as_echo "$as_me: seriously mess up just about everything." >&6;}
15272        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15273$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15274        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15275$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15276        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15277      fi
15278    fi
15279  fi
15280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15281$as_echo_n "checking what configuration name to use... " >&6; }
15282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15283$as_echo "$CONF_NAME" >&6; }
15284
15285
15286  # Only process if variable expands to non-empty
15287
15288  if test "x$OUTPUT_ROOT" != x; then
15289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15290
15291  # Input might be given as Windows format, start by converting to
15292  # unix format.
15293  path="$OUTPUT_ROOT"
15294  new_path=`$CYGPATH -u "$path"`
15295
15296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15299  # "foo.exe" is OK but "foo" is an error.
15300  #
15301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15302  # It is also a way to make sure we got the proper file name for the real test later on.
15303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15304  if test "x$test_shortpath" = x; then
15305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15306$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15307    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15308  fi
15309
15310  # Call helper function which possibly converts this using DOS-style short mode.
15311  # If so, the updated path is stored in $new_path.
15312
15313  input_path="$new_path"
15314  # Check if we need to convert this using DOS-style short mode. If the path
15315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15316  # take no chances and rewrite it.
15317  # Note: m4 eats our [], so we need to use [ and ] instead.
15318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15319  if test "x$has_forbidden_chars" != x; then
15320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15324      # Going to short mode and back again did indeed matter. Since short mode is
15325      # case insensitive, let's make it lowercase to improve readability.
15326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15327      # Now convert it back to Unix-stile (cygpath)
15328      input_path=`$CYGPATH -u "$shortmode_path"`
15329      new_path="$input_path"
15330    fi
15331  fi
15332
15333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15334  if test "x$test_cygdrive_prefix" = x; then
15335    # As a simple fix, exclude /usr/bin since it's not a real path.
15336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15338      # a path prefixed by /cygdrive for fixpath to work.
15339      new_path="$CYGWIN_ROOT_PATH$input_path"
15340    fi
15341  fi
15342
15343
15344  if test "x$path" != "x$new_path"; then
15345    OUTPUT_ROOT="$new_path"
15346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15347$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15348  fi
15349
15350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15351
15352  path="$OUTPUT_ROOT"
15353  has_colon=`$ECHO $path | $GREP ^.:`
15354  new_path="$path"
15355  if test "x$has_colon" = x; then
15356    # Not in mixed or Windows style, start by that.
15357    new_path=`cmd //c echo $path`
15358  fi
15359
15360
15361  input_path="$new_path"
15362  # Check if we need to convert this using DOS-style short mode. If the path
15363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15364  # take no chances and rewrite it.
15365  # Note: m4 eats our [], so we need to use [ and ] instead.
15366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15367  if test "x$has_forbidden_chars" != x; then
15368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15370  fi
15371
15372
15373  windows_path="$new_path"
15374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15375    unix_path=`$CYGPATH -u "$windows_path"`
15376    new_path="$unix_path"
15377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15379    new_path="$unix_path"
15380  fi
15381
15382  if test "x$path" != "x$new_path"; then
15383    OUTPUT_ROOT="$new_path"
15384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15385$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15386  fi
15387
15388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15390
15391    else
15392      # We're on a unix platform. Hooray! :)
15393      path="$OUTPUT_ROOT"
15394      has_space=`$ECHO "$path" | $GREP " "`
15395      if test "x$has_space" != x; then
15396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15397$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15399      fi
15400
15401      # Use eval to expand a potential ~
15402      eval path="$path"
15403      if test ! -f "$path" && test ! -d "$path"; then
15404        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15405      fi
15406
15407      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15408    fi
15409  fi
15410
15411
15412  SPEC=$OUTPUT_ROOT/spec.gmk
15413
15414  CONF_NAME=$CONF_NAME
15415
15416  OUTPUT_ROOT=$OUTPUT_ROOT
15417
15418
15419  # The spec.gmk file contains all variables for the make system.
15420  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15421
15422  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15423  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15424
15425  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15426  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15427
15428  # The compare.sh is used to compare the build output to other builds.
15429  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15430
15431  # The generated Makefile knows where the spec.gmk is and where the source is.
15432  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15433  # which will look for generated configurations
15434  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15435
15436
15437
15438# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15439
15440  for ac_prog in apt-get yum port pkgutil pkgadd
15441do
15442  # Extract the first word of "$ac_prog", so it can be a program name with args.
15443set dummy $ac_prog; ac_word=$2
15444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15445$as_echo_n "checking for $ac_word... " >&6; }
15446if ${ac_cv_prog_PKGHANDLER+:} false; then :
15447  $as_echo_n "(cached) " >&6
15448else
15449  if test -n "$PKGHANDLER"; then
15450  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15451else
15452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15453for as_dir in $PATH
15454do
15455  IFS=$as_save_IFS
15456  test -z "$as_dir" && as_dir=.
15457    for ac_exec_ext in '' $ac_executable_extensions; do
15458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15459    ac_cv_prog_PKGHANDLER="$ac_prog"
15460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15461    break 2
15462  fi
15463done
15464  done
15465IFS=$as_save_IFS
15466
15467fi
15468fi
15469PKGHANDLER=$ac_cv_prog_PKGHANDLER
15470if test -n "$PKGHANDLER"; then
15471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15472$as_echo "$PKGHANDLER" >&6; }
15473else
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15475$as_echo "no" >&6; }
15476fi
15477
15478
15479  test -n "$PKGHANDLER" && break
15480done
15481
15482
15483
15484# Setup tools that requires more complex handling, or that is not needed by the configure script.
15485
15486
15487  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15488  if test "x$MAKE" != x; then
15489    # User has supplied a make, test it.
15490    if test ! -f "$MAKE"; then
15491      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15492    fi
15493
15494  MAKE_CANDIDATE=""$MAKE""
15495  DESCRIPTION="user supplied MAKE=$MAKE"
15496  if test "x$MAKE_CANDIDATE" != x; then
15497    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15498$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15499    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15500    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15501    if test "x$IS_GNU_MAKE" = x; then
15502      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15503$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15504    else
15505      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15506      if test "x$IS_MODERN_MAKE" = x; then
15507        { $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
15508$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;}
15509      else
15510        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15511          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15512            MAKE_EXPECTED_ENV='cygwin'
15513          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15514            MAKE_EXPECTED_ENV='msys'
15515          else
15516            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15517          fi
15518          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15519          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15520        else
15521          # Not relevant for non-Windows
15522          IS_MAKE_CORRECT_ENV=true
15523        fi
15524        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15525          { $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
15526$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;}
15527        else
15528          FOUND_MAKE=$MAKE_CANDIDATE
15529
15530  # Only process if variable expands to non-empty
15531
15532  if test "x$FOUND_MAKE" != x; then
15533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15534
15535  # First separate the path from the arguments. This will split at the first
15536  # space.
15537  complete="$FOUND_MAKE"
15538  path="${complete%% *}"
15539  tmp="$complete EOL"
15540  arguments="${tmp#* }"
15541
15542  # Input might be given as Windows format, start by converting to
15543  # unix format.
15544  new_path=`$CYGPATH -u "$path"`
15545
15546  # Now try to locate executable using which
15547  new_path=`$WHICH "$new_path" 2> /dev/null`
15548  # bat and cmd files are not always considered executable in cygwin causing which
15549  # to not find them
15550  if test "x$new_path" = x \
15551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15553    new_path=`$CYGPATH -u "$path"`
15554  fi
15555  if test "x$new_path" = x; then
15556    # Oops. Which didn't find the executable.
15557    # The splitting of arguments from the executable at a space might have been incorrect,
15558    # since paths with space are more likely in Windows. Give it another try with the whole
15559    # argument.
15560    path="$complete"
15561    arguments="EOL"
15562    new_path=`$CYGPATH -u "$path"`
15563    new_path=`$WHICH "$new_path" 2> /dev/null`
15564    # bat and cmd files are not always considered executable in cygwin causing which
15565    # to not find them
15566    if test "x$new_path" = x \
15567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15569      new_path=`$CYGPATH -u "$path"`
15570    fi
15571    if test "x$new_path" = x; then
15572      # It's still not found. Now this is an unrecoverable error.
15573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15575      has_space=`$ECHO "$complete" | $GREP " "`
15576      if test "x$has_space" != x; then
15577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15579      fi
15580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15581    fi
15582  fi
15583
15584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15587  # "foo.exe" is OK but "foo" is an error.
15588  #
15589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15590  # It is also a way to make sure we got the proper file name for the real test later on.
15591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15592  if test "x$test_shortpath" = x; then
15593    # Short path failed, file does not exist as specified.
15594    # Try adding .exe or .cmd
15595    if test -f "${new_path}.exe"; then
15596      input_to_shortpath="${new_path}.exe"
15597    elif test -f "${new_path}.cmd"; then
15598      input_to_shortpath="${new_path}.cmd"
15599    else
15600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15604      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15605    fi
15606  else
15607    input_to_shortpath="$new_path"
15608  fi
15609
15610  # Call helper function which possibly converts this using DOS-style short mode.
15611  # If so, the updated path is stored in $new_path.
15612  new_path="$input_to_shortpath"
15613
15614  input_path="$input_to_shortpath"
15615  # Check if we need to convert this using DOS-style short mode. If the path
15616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15617  # take no chances and rewrite it.
15618  # Note: m4 eats our [], so we need to use [ and ] instead.
15619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15620  if test "x$has_forbidden_chars" != x; then
15621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15625      # Going to short mode and back again did indeed matter. Since short mode is
15626      # case insensitive, let's make it lowercase to improve readability.
15627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15628      # Now convert it back to Unix-stile (cygpath)
15629      input_path=`$CYGPATH -u "$shortmode_path"`
15630      new_path="$input_path"
15631    fi
15632  fi
15633
15634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15635  if test "x$test_cygdrive_prefix" = x; then
15636    # As a simple fix, exclude /usr/bin since it's not a real path.
15637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15639      # a path prefixed by /cygdrive for fixpath to work.
15640      new_path="$CYGWIN_ROOT_PATH$input_path"
15641    fi
15642  fi
15643
15644  # remove trailing .exe if any
15645  new_path="${new_path/%.exe/}"
15646
15647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15648
15649  # First separate the path from the arguments. This will split at the first
15650  # space.
15651  complete="$FOUND_MAKE"
15652  path="${complete%% *}"
15653  tmp="$complete EOL"
15654  arguments="${tmp#* }"
15655
15656  # Input might be given as Windows format, start by converting to
15657  # unix format.
15658  new_path="$path"
15659
15660  windows_path="$new_path"
15661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15662    unix_path=`$CYGPATH -u "$windows_path"`
15663    new_path="$unix_path"
15664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15666    new_path="$unix_path"
15667  fi
15668
15669
15670  # Now try to locate executable using which
15671  new_path=`$WHICH "$new_path" 2> /dev/null`
15672
15673  if test "x$new_path" = x; then
15674    # Oops. Which didn't find the executable.
15675    # The splitting of arguments from the executable at a space might have been incorrect,
15676    # since paths with space are more likely in Windows. Give it another try with the whole
15677    # argument.
15678    path="$complete"
15679    arguments="EOL"
15680    new_path="$path"
15681
15682  windows_path="$new_path"
15683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15684    unix_path=`$CYGPATH -u "$windows_path"`
15685    new_path="$unix_path"
15686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15688    new_path="$unix_path"
15689  fi
15690
15691
15692    new_path=`$WHICH "$new_path" 2> /dev/null`
15693    # bat and cmd files are not always considered executable in MSYS causing which
15694    # to not find them
15695    if test "x$new_path" = x \
15696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15698      new_path="$path"
15699
15700  windows_path="$new_path"
15701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15702    unix_path=`$CYGPATH -u "$windows_path"`
15703    new_path="$unix_path"
15704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15706    new_path="$unix_path"
15707  fi
15708
15709    fi
15710
15711    if test "x$new_path" = x; then
15712      # It's still not found. Now this is an unrecoverable error.
15713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15714$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15715      has_space=`$ECHO "$complete" | $GREP " "`
15716      if test "x$has_space" != x; then
15717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15719      fi
15720      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15721    fi
15722  fi
15723
15724  # Now new_path has a complete unix path to the binary
15725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15726    # Keep paths in /bin as-is, but remove trailing .exe if any
15727    new_path="${new_path/%.exe/}"
15728    # Do not save /bin paths to all_fixpath_prefixes!
15729  else
15730    # Not in mixed or Windows style, start by that.
15731    new_path=`cmd //c echo $new_path`
15732
15733  input_path="$new_path"
15734  # Check if we need to convert this using DOS-style short mode. If the path
15735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15736  # take no chances and rewrite it.
15737  # Note: m4 eats our [], so we need to use [ and ] instead.
15738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15739  if test "x$has_forbidden_chars" != x; then
15740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15742  fi
15743
15744    # Output is in $new_path
15745
15746  windows_path="$new_path"
15747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15748    unix_path=`$CYGPATH -u "$windows_path"`
15749    new_path="$unix_path"
15750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15752    new_path="$unix_path"
15753  fi
15754
15755    # remove trailing .exe if any
15756    new_path="${new_path/%.exe/}"
15757
15758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15760  fi
15761
15762    else
15763      # We're on a unix platform. Hooray! :)
15764      # First separate the path from the arguments. This will split at the first
15765      # space.
15766      complete="$FOUND_MAKE"
15767      path="${complete%% *}"
15768      tmp="$complete EOL"
15769      arguments="${tmp#* }"
15770
15771      # Cannot rely on the command "which" here since it doesn't always work.
15772      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15773      if test -z "$is_absolute_path"; then
15774        # Path to executable is not absolute. Find it.
15775        IFS_save="$IFS"
15776        IFS=:
15777        for p in $PATH; do
15778          if test -f "$p/$path" && test -x "$p/$path"; then
15779            new_path="$p/$path"
15780            break
15781          fi
15782        done
15783        IFS="$IFS_save"
15784      else
15785        # This is an absolute path, we can use it without further modifications.
15786        new_path="$path"
15787      fi
15788
15789      if test "x$new_path" = x; then
15790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15791$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15792        has_space=`$ECHO "$complete" | $GREP " "`
15793        if test "x$has_space" != x; then
15794          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15795$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15796        fi
15797        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15798      fi
15799    fi
15800
15801    # Now join together the path and the arguments once again
15802    if test "x$arguments" != xEOL; then
15803      new_complete="$new_path ${arguments% *}"
15804    else
15805      new_complete="$new_path"
15806    fi
15807
15808    if test "x$complete" != "x$new_complete"; then
15809      FOUND_MAKE="$new_complete"
15810      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15811$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15812    fi
15813  fi
15814
15815        fi
15816      fi
15817    fi
15818  fi
15819
15820    if test "x$FOUND_MAKE" = x; then
15821      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15822    fi
15823  else
15824    # Try our hardest to locate a correct version of GNU make
15825    for ac_prog in gmake
15826do
15827  # Extract the first word of "$ac_prog", so it can be a program name with args.
15828set dummy $ac_prog; ac_word=$2
15829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15830$as_echo_n "checking for $ac_word... " >&6; }
15831if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15832  $as_echo_n "(cached) " >&6
15833else
15834  case $CHECK_GMAKE in
15835  [\\/]* | ?:[\\/]*)
15836  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15837  ;;
15838  *)
15839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15840for as_dir in $PATH
15841do
15842  IFS=$as_save_IFS
15843  test -z "$as_dir" && as_dir=.
15844    for ac_exec_ext in '' $ac_executable_extensions; do
15845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15846    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15848    break 2
15849  fi
15850done
15851  done
15852IFS=$as_save_IFS
15853
15854  ;;
15855esac
15856fi
15857CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15858if test -n "$CHECK_GMAKE"; then
15859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15860$as_echo "$CHECK_GMAKE" >&6; }
15861else
15862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15863$as_echo "no" >&6; }
15864fi
15865
15866
15867  test -n "$CHECK_GMAKE" && break
15868done
15869
15870
15871  MAKE_CANDIDATE=""$CHECK_GMAKE""
15872  DESCRIPTION="gmake in PATH"
15873  if test "x$MAKE_CANDIDATE" != x; then
15874    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15875$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15876    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15877    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15878    if test "x$IS_GNU_MAKE" = x; then
15879      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15880$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15881    else
15882      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15883      if test "x$IS_MODERN_MAKE" = x; then
15884        { $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
15885$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;}
15886      else
15887        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15888          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15889            MAKE_EXPECTED_ENV='cygwin'
15890          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15891            MAKE_EXPECTED_ENV='msys'
15892          else
15893            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15894          fi
15895          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15896          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15897        else
15898          # Not relevant for non-Windows
15899          IS_MAKE_CORRECT_ENV=true
15900        fi
15901        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15902          { $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
15903$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;}
15904        else
15905          FOUND_MAKE=$MAKE_CANDIDATE
15906
15907  # Only process if variable expands to non-empty
15908
15909  if test "x$FOUND_MAKE" != x; then
15910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15911
15912  # First separate the path from the arguments. This will split at the first
15913  # space.
15914  complete="$FOUND_MAKE"
15915  path="${complete%% *}"
15916  tmp="$complete EOL"
15917  arguments="${tmp#* }"
15918
15919  # Input might be given as Windows format, start by converting to
15920  # unix format.
15921  new_path=`$CYGPATH -u "$path"`
15922
15923  # Now try to locate executable using which
15924  new_path=`$WHICH "$new_path" 2> /dev/null`
15925  # bat and cmd files are not always considered executable in cygwin causing which
15926  # to not find them
15927  if test "x$new_path" = x \
15928      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15929      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15930    new_path=`$CYGPATH -u "$path"`
15931  fi
15932  if test "x$new_path" = x; then
15933    # Oops. Which didn't find the executable.
15934    # The splitting of arguments from the executable at a space might have been incorrect,
15935    # since paths with space are more likely in Windows. Give it another try with the whole
15936    # argument.
15937    path="$complete"
15938    arguments="EOL"
15939    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
15950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15951$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15952      has_space=`$ECHO "$complete" | $GREP " "`
15953      if test "x$has_space" != x; then
15954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15956      fi
15957      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15958    fi
15959  fi
15960
15961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15964  # "foo.exe" is OK but "foo" is an error.
15965  #
15966  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15967  # It is also a way to make sure we got the proper file name for the real test later on.
15968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15969  if test "x$test_shortpath" = x; then
15970    # Short path failed, file does not exist as specified.
15971    # Try adding .exe or .cmd
15972    if test -f "${new_path}.exe"; then
15973      input_to_shortpath="${new_path}.exe"
15974    elif test -f "${new_path}.cmd"; then
15975      input_to_shortpath="${new_path}.cmd"
15976    else
15977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15978$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15979      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15980$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15981      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15982    fi
15983  else
15984    input_to_shortpath="$new_path"
15985  fi
15986
15987  # Call helper function which possibly converts this using DOS-style short mode.
15988  # If so, the updated path is stored in $new_path.
15989  new_path="$input_to_shortpath"
15990
15991  input_path="$input_to_shortpath"
15992  # Check if we need to convert this using DOS-style short mode. If the path
15993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15994  # take no chances and rewrite it.
15995  # Note: m4 eats our [], so we need to use [ and ] instead.
15996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15997  if test "x$has_forbidden_chars" != x; then
15998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16002      # Going to short mode and back again did indeed matter. Since short mode is
16003      # case insensitive, let's make it lowercase to improve readability.
16004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16005      # Now convert it back to Unix-stile (cygpath)
16006      input_path=`$CYGPATH -u "$shortmode_path"`
16007      new_path="$input_path"
16008    fi
16009  fi
16010
16011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16012  if test "x$test_cygdrive_prefix" = x; then
16013    # As a simple fix, exclude /usr/bin since it's not a real path.
16014    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16016      # a path prefixed by /cygdrive for fixpath to work.
16017      new_path="$CYGWIN_ROOT_PATH$input_path"
16018    fi
16019  fi
16020
16021  # remove trailing .exe if any
16022  new_path="${new_path/%.exe/}"
16023
16024    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16025
16026  # First separate the path from the arguments. This will split at the first
16027  # space.
16028  complete="$FOUND_MAKE"
16029  path="${complete%% *}"
16030  tmp="$complete EOL"
16031  arguments="${tmp#* }"
16032
16033  # Input might be given as Windows format, start by converting to
16034  # unix format.
16035  new_path="$path"
16036
16037  windows_path="$new_path"
16038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16039    unix_path=`$CYGPATH -u "$windows_path"`
16040    new_path="$unix_path"
16041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16043    new_path="$unix_path"
16044  fi
16045
16046
16047  # Now try to locate executable using which
16048  new_path=`$WHICH "$new_path" 2> /dev/null`
16049
16050  if test "x$new_path" = x; then
16051    # Oops. Which didn't find the executable.
16052    # The splitting of arguments from the executable at a space might have been incorrect,
16053    # since paths with space are more likely in Windows. Give it another try with the whole
16054    # argument.
16055    path="$complete"
16056    arguments="EOL"
16057    new_path="$path"
16058
16059  windows_path="$new_path"
16060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16061    unix_path=`$CYGPATH -u "$windows_path"`
16062    new_path="$unix_path"
16063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16065    new_path="$unix_path"
16066  fi
16067
16068
16069    new_path=`$WHICH "$new_path" 2> /dev/null`
16070    # bat and cmd files are not always considered executable in MSYS causing which
16071    # to not find them
16072    if test "x$new_path" = x \
16073        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16074        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16075      new_path="$path"
16076
16077  windows_path="$new_path"
16078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16079    unix_path=`$CYGPATH -u "$windows_path"`
16080    new_path="$unix_path"
16081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16083    new_path="$unix_path"
16084  fi
16085
16086    fi
16087
16088    if test "x$new_path" = x; then
16089      # It's still not found. Now this is an unrecoverable error.
16090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16092      has_space=`$ECHO "$complete" | $GREP " "`
16093      if test "x$has_space" != x; then
16094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16096      fi
16097      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16098    fi
16099  fi
16100
16101  # Now new_path has a complete unix path to the binary
16102  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16103    # Keep paths in /bin as-is, but remove trailing .exe if any
16104    new_path="${new_path/%.exe/}"
16105    # Do not save /bin paths to all_fixpath_prefixes!
16106  else
16107    # Not in mixed or Windows style, start by that.
16108    new_path=`cmd //c echo $new_path`
16109
16110  input_path="$new_path"
16111  # Check if we need to convert this using DOS-style short mode. If the path
16112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16113  # take no chances and rewrite it.
16114  # Note: m4 eats our [], so we need to use [ and ] instead.
16115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16116  if test "x$has_forbidden_chars" != x; then
16117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16119  fi
16120
16121    # Output is in $new_path
16122
16123  windows_path="$new_path"
16124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16125    unix_path=`$CYGPATH -u "$windows_path"`
16126    new_path="$unix_path"
16127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16129    new_path="$unix_path"
16130  fi
16131
16132    # remove trailing .exe if any
16133    new_path="${new_path/%.exe/}"
16134
16135    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16136    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16137  fi
16138
16139    else
16140      # We're on a unix platform. Hooray! :)
16141      # First separate the path from the arguments. This will split at the first
16142      # space.
16143      complete="$FOUND_MAKE"
16144      path="${complete%% *}"
16145      tmp="$complete EOL"
16146      arguments="${tmp#* }"
16147
16148      # Cannot rely on the command "which" here since it doesn't always work.
16149      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16150      if test -z "$is_absolute_path"; then
16151        # Path to executable is not absolute. Find it.
16152        IFS_save="$IFS"
16153        IFS=:
16154        for p in $PATH; do
16155          if test -f "$p/$path" && test -x "$p/$path"; then
16156            new_path="$p/$path"
16157            break
16158          fi
16159        done
16160        IFS="$IFS_save"
16161      else
16162        # This is an absolute path, we can use it without further modifications.
16163        new_path="$path"
16164      fi
16165
16166      if test "x$new_path" = x; then
16167        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16168$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16169        has_space=`$ECHO "$complete" | $GREP " "`
16170        if test "x$has_space" != x; then
16171          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16172$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16173        fi
16174        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16175      fi
16176    fi
16177
16178    # Now join together the path and the arguments once again
16179    if test "x$arguments" != xEOL; then
16180      new_complete="$new_path ${arguments% *}"
16181    else
16182      new_complete="$new_path"
16183    fi
16184
16185    if test "x$complete" != "x$new_complete"; then
16186      FOUND_MAKE="$new_complete"
16187      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16188$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16189    fi
16190  fi
16191
16192        fi
16193      fi
16194    fi
16195  fi
16196
16197
16198    if test "x$FOUND_MAKE" = x; then
16199      for ac_prog in make
16200do
16201  # Extract the first word of "$ac_prog", so it can be a program name with args.
16202set dummy $ac_prog; ac_word=$2
16203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16204$as_echo_n "checking for $ac_word... " >&6; }
16205if ${ac_cv_path_CHECK_MAKE+:} false; then :
16206  $as_echo_n "(cached) " >&6
16207else
16208  case $CHECK_MAKE in
16209  [\\/]* | ?:[\\/]*)
16210  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16211  ;;
16212  *)
16213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16214for as_dir in $PATH
16215do
16216  IFS=$as_save_IFS
16217  test -z "$as_dir" && as_dir=.
16218    for ac_exec_ext in '' $ac_executable_extensions; do
16219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16220    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16222    break 2
16223  fi
16224done
16225  done
16226IFS=$as_save_IFS
16227
16228  ;;
16229esac
16230fi
16231CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16232if test -n "$CHECK_MAKE"; then
16233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16234$as_echo "$CHECK_MAKE" >&6; }
16235else
16236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16237$as_echo "no" >&6; }
16238fi
16239
16240
16241  test -n "$CHECK_MAKE" && break
16242done
16243
16244
16245  MAKE_CANDIDATE=""$CHECK_MAKE""
16246  DESCRIPTION="make in PATH"
16247  if test "x$MAKE_CANDIDATE" != x; then
16248    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16249$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16250    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16251    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16252    if test "x$IS_GNU_MAKE" = x; then
16253      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16254$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16255    else
16256      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16257      if test "x$IS_MODERN_MAKE" = x; then
16258        { $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
16259$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;}
16260      else
16261        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16262          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16263            MAKE_EXPECTED_ENV='cygwin'
16264          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16265            MAKE_EXPECTED_ENV='msys'
16266          else
16267            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16268          fi
16269          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16270          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16271        else
16272          # Not relevant for non-Windows
16273          IS_MAKE_CORRECT_ENV=true
16274        fi
16275        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16276          { $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
16277$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;}
16278        else
16279          FOUND_MAKE=$MAKE_CANDIDATE
16280
16281  # Only process if variable expands to non-empty
16282
16283  if test "x$FOUND_MAKE" != x; then
16284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16285
16286  # First separate the path from the arguments. This will split at the first
16287  # space.
16288  complete="$FOUND_MAKE"
16289  path="${complete%% *}"
16290  tmp="$complete EOL"
16291  arguments="${tmp#* }"
16292
16293  # Input might be given as Windows format, start by converting to
16294  # unix format.
16295  new_path=`$CYGPATH -u "$path"`
16296
16297  # Now try to locate executable using which
16298  new_path=`$WHICH "$new_path" 2> /dev/null`
16299  # bat and cmd files are not always considered executable in cygwin causing which
16300  # to not find them
16301  if test "x$new_path" = x \
16302      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16303      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16304    new_path=`$CYGPATH -u "$path"`
16305  fi
16306  if test "x$new_path" = x; then
16307    # Oops. Which didn't find the executable.
16308    # The splitting of arguments from the executable at a space might have been incorrect,
16309    # since paths with space are more likely in Windows. Give it another try with the whole
16310    # argument.
16311    path="$complete"
16312    arguments="EOL"
16313    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
16324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16325$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16326      has_space=`$ECHO "$complete" | $GREP " "`
16327      if test "x$has_space" != x; then
16328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16330      fi
16331      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16332    fi
16333  fi
16334
16335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16338  # "foo.exe" is OK but "foo" is an error.
16339  #
16340  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16341  # It is also a way to make sure we got the proper file name for the real test later on.
16342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16343  if test "x$test_shortpath" = x; then
16344    # Short path failed, file does not exist as specified.
16345    # Try adding .exe or .cmd
16346    if test -f "${new_path}.exe"; then
16347      input_to_shortpath="${new_path}.exe"
16348    elif test -f "${new_path}.cmd"; then
16349      input_to_shortpath="${new_path}.cmd"
16350    else
16351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16353      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16354$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16355      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16356    fi
16357  else
16358    input_to_shortpath="$new_path"
16359  fi
16360
16361  # Call helper function which possibly converts this using DOS-style short mode.
16362  # If so, the updated path is stored in $new_path.
16363  new_path="$input_to_shortpath"
16364
16365  input_path="$input_to_shortpath"
16366  # Check if we need to convert this using DOS-style short mode. If the path
16367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16368  # take no chances and rewrite it.
16369  # Note: m4 eats our [], so we need to use [ and ] instead.
16370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16371  if test "x$has_forbidden_chars" != x; then
16372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16376      # Going to short mode and back again did indeed matter. Since short mode is
16377      # case insensitive, let's make it lowercase to improve readability.
16378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16379      # Now convert it back to Unix-stile (cygpath)
16380      input_path=`$CYGPATH -u "$shortmode_path"`
16381      new_path="$input_path"
16382    fi
16383  fi
16384
16385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16386  if test "x$test_cygdrive_prefix" = x; then
16387    # As a simple fix, exclude /usr/bin since it's not a real path.
16388    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16390      # a path prefixed by /cygdrive for fixpath to work.
16391      new_path="$CYGWIN_ROOT_PATH$input_path"
16392    fi
16393  fi
16394
16395  # remove trailing .exe if any
16396  new_path="${new_path/%.exe/}"
16397
16398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16399
16400  # First separate the path from the arguments. This will split at the first
16401  # space.
16402  complete="$FOUND_MAKE"
16403  path="${complete%% *}"
16404  tmp="$complete EOL"
16405  arguments="${tmp#* }"
16406
16407  # Input might be given as Windows format, start by converting to
16408  # unix format.
16409  new_path="$path"
16410
16411  windows_path="$new_path"
16412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16413    unix_path=`$CYGPATH -u "$windows_path"`
16414    new_path="$unix_path"
16415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16417    new_path="$unix_path"
16418  fi
16419
16420
16421  # Now try to locate executable using which
16422  new_path=`$WHICH "$new_path" 2> /dev/null`
16423
16424  if test "x$new_path" = x; then
16425    # Oops. Which didn't find the executable.
16426    # The splitting of arguments from the executable at a space might have been incorrect,
16427    # since paths with space are more likely in Windows. Give it another try with the whole
16428    # argument.
16429    path="$complete"
16430    arguments="EOL"
16431    new_path="$path"
16432
16433  windows_path="$new_path"
16434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16435    unix_path=`$CYGPATH -u "$windows_path"`
16436    new_path="$unix_path"
16437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16439    new_path="$unix_path"
16440  fi
16441
16442
16443    new_path=`$WHICH "$new_path" 2> /dev/null`
16444    # bat and cmd files are not always considered executable in MSYS causing which
16445    # to not find them
16446    if test "x$new_path" = x \
16447        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16448        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16449      new_path="$path"
16450
16451  windows_path="$new_path"
16452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16453    unix_path=`$CYGPATH -u "$windows_path"`
16454    new_path="$unix_path"
16455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16457    new_path="$unix_path"
16458  fi
16459
16460    fi
16461
16462    if test "x$new_path" = x; then
16463      # It's still not found. Now this is an unrecoverable error.
16464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16465$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16466      has_space=`$ECHO "$complete" | $GREP " "`
16467      if test "x$has_space" != x; then
16468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16470      fi
16471      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16472    fi
16473  fi
16474
16475  # Now new_path has a complete unix path to the binary
16476  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16477    # Keep paths in /bin as-is, but remove trailing .exe if any
16478    new_path="${new_path/%.exe/}"
16479    # Do not save /bin paths to all_fixpath_prefixes!
16480  else
16481    # Not in mixed or Windows style, start by that.
16482    new_path=`cmd //c echo $new_path`
16483
16484  input_path="$new_path"
16485  # Check if we need to convert this using DOS-style short mode. If the path
16486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16487  # take no chances and rewrite it.
16488  # Note: m4 eats our [], so we need to use [ and ] instead.
16489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16490  if test "x$has_forbidden_chars" != x; then
16491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16493  fi
16494
16495    # Output is in $new_path
16496
16497  windows_path="$new_path"
16498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16499    unix_path=`$CYGPATH -u "$windows_path"`
16500    new_path="$unix_path"
16501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16503    new_path="$unix_path"
16504  fi
16505
16506    # remove trailing .exe if any
16507    new_path="${new_path/%.exe/}"
16508
16509    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16510    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16511  fi
16512
16513    else
16514      # We're on a unix platform. Hooray! :)
16515      # First separate the path from the arguments. This will split at the first
16516      # space.
16517      complete="$FOUND_MAKE"
16518      path="${complete%% *}"
16519      tmp="$complete EOL"
16520      arguments="${tmp#* }"
16521
16522      # Cannot rely on the command "which" here since it doesn't always work.
16523      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16524      if test -z "$is_absolute_path"; then
16525        # Path to executable is not absolute. Find it.
16526        IFS_save="$IFS"
16527        IFS=:
16528        for p in $PATH; do
16529          if test -f "$p/$path" && test -x "$p/$path"; then
16530            new_path="$p/$path"
16531            break
16532          fi
16533        done
16534        IFS="$IFS_save"
16535      else
16536        # This is an absolute path, we can use it without further modifications.
16537        new_path="$path"
16538      fi
16539
16540      if test "x$new_path" = x; then
16541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16542$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16543        has_space=`$ECHO "$complete" | $GREP " "`
16544        if test "x$has_space" != x; then
16545          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16546$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16547        fi
16548        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16549      fi
16550    fi
16551
16552    # Now join together the path and the arguments once again
16553    if test "x$arguments" != xEOL; then
16554      new_complete="$new_path ${arguments% *}"
16555    else
16556      new_complete="$new_path"
16557    fi
16558
16559    if test "x$complete" != "x$new_complete"; then
16560      FOUND_MAKE="$new_complete"
16561      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16562$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16563    fi
16564  fi
16565
16566        fi
16567      fi
16568    fi
16569  fi
16570
16571    fi
16572
16573    if test "x$FOUND_MAKE" = x; then
16574      if test "x$TOOLCHAIN_PATH" != x; then
16575        # We have a toolchain path, check that as well before giving up.
16576        OLD_PATH=$PATH
16577        PATH=$TOOLCHAIN_PATH:$PATH
16578        for ac_prog in gmake
16579do
16580  # Extract the first word of "$ac_prog", so it can be a program name with args.
16581set dummy $ac_prog; ac_word=$2
16582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16583$as_echo_n "checking for $ac_word... " >&6; }
16584if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16585  $as_echo_n "(cached) " >&6
16586else
16587  case $CHECK_TOOLSDIR_GMAKE in
16588  [\\/]* | ?:[\\/]*)
16589  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16590  ;;
16591  *)
16592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16593for as_dir in $PATH
16594do
16595  IFS=$as_save_IFS
16596  test -z "$as_dir" && as_dir=.
16597    for ac_exec_ext in '' $ac_executable_extensions; do
16598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16599    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16601    break 2
16602  fi
16603done
16604  done
16605IFS=$as_save_IFS
16606
16607  ;;
16608esac
16609fi
16610CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16611if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16613$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16614else
16615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16616$as_echo "no" >&6; }
16617fi
16618
16619
16620  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16621done
16622
16623
16624  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16625  DESCRIPTION="gmake in tools-dir"
16626  if test "x$MAKE_CANDIDATE" != x; then
16627    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16628$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16629    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16630    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16631    if test "x$IS_GNU_MAKE" = x; then
16632      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16633$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16634    else
16635      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16636      if test "x$IS_MODERN_MAKE" = x; then
16637        { $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
16638$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;}
16639      else
16640        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16641          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16642            MAKE_EXPECTED_ENV='cygwin'
16643          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16644            MAKE_EXPECTED_ENV='msys'
16645          else
16646            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16647          fi
16648          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16649          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16650        else
16651          # Not relevant for non-Windows
16652          IS_MAKE_CORRECT_ENV=true
16653        fi
16654        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16655          { $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
16656$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;}
16657        else
16658          FOUND_MAKE=$MAKE_CANDIDATE
16659
16660  # Only process if variable expands to non-empty
16661
16662  if test "x$FOUND_MAKE" != x; then
16663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16664
16665  # First separate the path from the arguments. This will split at the first
16666  # space.
16667  complete="$FOUND_MAKE"
16668  path="${complete%% *}"
16669  tmp="$complete EOL"
16670  arguments="${tmp#* }"
16671
16672  # Input might be given as Windows format, start by converting to
16673  # unix format.
16674  new_path=`$CYGPATH -u "$path"`
16675
16676  # Now try to locate executable using which
16677  new_path=`$WHICH "$new_path" 2> /dev/null`
16678  # bat and cmd files are not always considered executable in cygwin causing which
16679  # to not find them
16680  if test "x$new_path" = x \
16681      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16682      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16683    new_path=`$CYGPATH -u "$path"`
16684  fi
16685  if test "x$new_path" = x; then
16686    # Oops. Which didn't find the executable.
16687    # The splitting of arguments from the executable at a space might have been incorrect,
16688    # since paths with space are more likely in Windows. Give it another try with the whole
16689    # argument.
16690    path="$complete"
16691    arguments="EOL"
16692    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
16703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16705      has_space=`$ECHO "$complete" | $GREP " "`
16706      if test "x$has_space" != x; then
16707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16709      fi
16710      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16711    fi
16712  fi
16713
16714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16717  # "foo.exe" is OK but "foo" is an error.
16718  #
16719  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16720  # It is also a way to make sure we got the proper file name for the real test later on.
16721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16722  if test "x$test_shortpath" = x; then
16723    # Short path failed, file does not exist as specified.
16724    # Try adding .exe or .cmd
16725    if test -f "${new_path}.exe"; then
16726      input_to_shortpath="${new_path}.exe"
16727    elif test -f "${new_path}.cmd"; then
16728      input_to_shortpath="${new_path}.cmd"
16729    else
16730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16731$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16732      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16733$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16734      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16735    fi
16736  else
16737    input_to_shortpath="$new_path"
16738  fi
16739
16740  # Call helper function which possibly converts this using DOS-style short mode.
16741  # If so, the updated path is stored in $new_path.
16742  new_path="$input_to_shortpath"
16743
16744  input_path="$input_to_shortpath"
16745  # Check if we need to convert this using DOS-style short mode. If the path
16746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16747  # take no chances and rewrite it.
16748  # Note: m4 eats our [], so we need to use [ and ] instead.
16749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16750  if test "x$has_forbidden_chars" != x; then
16751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16755      # Going to short mode and back again did indeed matter. Since short mode is
16756      # case insensitive, let's make it lowercase to improve readability.
16757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16758      # Now convert it back to Unix-stile (cygpath)
16759      input_path=`$CYGPATH -u "$shortmode_path"`
16760      new_path="$input_path"
16761    fi
16762  fi
16763
16764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16765  if test "x$test_cygdrive_prefix" = x; then
16766    # As a simple fix, exclude /usr/bin since it's not a real path.
16767    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16769      # a path prefixed by /cygdrive for fixpath to work.
16770      new_path="$CYGWIN_ROOT_PATH$input_path"
16771    fi
16772  fi
16773
16774  # remove trailing .exe if any
16775  new_path="${new_path/%.exe/}"
16776
16777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16778
16779  # First separate the path from the arguments. This will split at the first
16780  # space.
16781  complete="$FOUND_MAKE"
16782  path="${complete%% *}"
16783  tmp="$complete EOL"
16784  arguments="${tmp#* }"
16785
16786  # Input might be given as Windows format, start by converting to
16787  # unix format.
16788  new_path="$path"
16789
16790  windows_path="$new_path"
16791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16792    unix_path=`$CYGPATH -u "$windows_path"`
16793    new_path="$unix_path"
16794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16796    new_path="$unix_path"
16797  fi
16798
16799
16800  # Now try to locate executable using which
16801  new_path=`$WHICH "$new_path" 2> /dev/null`
16802
16803  if test "x$new_path" = x; then
16804    # Oops. Which didn't find the executable.
16805    # The splitting of arguments from the executable at a space might have been incorrect,
16806    # since paths with space are more likely in Windows. Give it another try with the whole
16807    # argument.
16808    path="$complete"
16809    arguments="EOL"
16810    new_path="$path"
16811
16812  windows_path="$new_path"
16813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16814    unix_path=`$CYGPATH -u "$windows_path"`
16815    new_path="$unix_path"
16816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16818    new_path="$unix_path"
16819  fi
16820
16821
16822    new_path=`$WHICH "$new_path" 2> /dev/null`
16823    # bat and cmd files are not always considered executable in MSYS causing which
16824    # to not find them
16825    if test "x$new_path" = x \
16826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16828      new_path="$path"
16829
16830  windows_path="$new_path"
16831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16832    unix_path=`$CYGPATH -u "$windows_path"`
16833    new_path="$unix_path"
16834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16836    new_path="$unix_path"
16837  fi
16838
16839    fi
16840
16841    if test "x$new_path" = x; then
16842      # It's still not found. Now this is an unrecoverable error.
16843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16844$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16845      has_space=`$ECHO "$complete" | $GREP " "`
16846      if test "x$has_space" != x; then
16847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16849      fi
16850      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16851    fi
16852  fi
16853
16854  # Now new_path has a complete unix path to the binary
16855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16856    # Keep paths in /bin as-is, but remove trailing .exe if any
16857    new_path="${new_path/%.exe/}"
16858    # Do not save /bin paths to all_fixpath_prefixes!
16859  else
16860    # Not in mixed or Windows style, start by that.
16861    new_path=`cmd //c echo $new_path`
16862
16863  input_path="$new_path"
16864  # Check if we need to convert this using DOS-style short mode. If the path
16865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16866  # take no chances and rewrite it.
16867  # Note: m4 eats our [], so we need to use [ and ] instead.
16868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16869  if test "x$has_forbidden_chars" != x; then
16870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16872  fi
16873
16874    # Output is in $new_path
16875
16876  windows_path="$new_path"
16877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16878    unix_path=`$CYGPATH -u "$windows_path"`
16879    new_path="$unix_path"
16880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16882    new_path="$unix_path"
16883  fi
16884
16885    # remove trailing .exe if any
16886    new_path="${new_path/%.exe/}"
16887
16888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16890  fi
16891
16892    else
16893      # We're on a unix platform. Hooray! :)
16894      # First separate the path from the arguments. This will split at the first
16895      # space.
16896      complete="$FOUND_MAKE"
16897      path="${complete%% *}"
16898      tmp="$complete EOL"
16899      arguments="${tmp#* }"
16900
16901      # Cannot rely on the command "which" here since it doesn't always work.
16902      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16903      if test -z "$is_absolute_path"; then
16904        # Path to executable is not absolute. Find it.
16905        IFS_save="$IFS"
16906        IFS=:
16907        for p in $PATH; do
16908          if test -f "$p/$path" && test -x "$p/$path"; then
16909            new_path="$p/$path"
16910            break
16911          fi
16912        done
16913        IFS="$IFS_save"
16914      else
16915        # This is an absolute path, we can use it without further modifications.
16916        new_path="$path"
16917      fi
16918
16919      if test "x$new_path" = x; then
16920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16921$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16922        has_space=`$ECHO "$complete" | $GREP " "`
16923        if test "x$has_space" != x; then
16924          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16926        fi
16927        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16928      fi
16929    fi
16930
16931    # Now join together the path and the arguments once again
16932    if test "x$arguments" != xEOL; then
16933      new_complete="$new_path ${arguments% *}"
16934    else
16935      new_complete="$new_path"
16936    fi
16937
16938    if test "x$complete" != "x$new_complete"; then
16939      FOUND_MAKE="$new_complete"
16940      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16941$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16942    fi
16943  fi
16944
16945        fi
16946      fi
16947    fi
16948  fi
16949
16950        if test "x$FOUND_MAKE" = x; then
16951          for ac_prog in make
16952do
16953  # Extract the first word of "$ac_prog", so it can be a program name with args.
16954set dummy $ac_prog; ac_word=$2
16955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16956$as_echo_n "checking for $ac_word... " >&6; }
16957if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16958  $as_echo_n "(cached) " >&6
16959else
16960  case $CHECK_TOOLSDIR_MAKE in
16961  [\\/]* | ?:[\\/]*)
16962  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16963  ;;
16964  *)
16965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16966for as_dir in $PATH
16967do
16968  IFS=$as_save_IFS
16969  test -z "$as_dir" && as_dir=.
16970    for ac_exec_ext in '' $ac_executable_extensions; do
16971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16972    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16974    break 2
16975  fi
16976done
16977  done
16978IFS=$as_save_IFS
16979
16980  ;;
16981esac
16982fi
16983CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16984if test -n "$CHECK_TOOLSDIR_MAKE"; then
16985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16986$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16987else
16988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16989$as_echo "no" >&6; }
16990fi
16991
16992
16993  test -n "$CHECK_TOOLSDIR_MAKE" && break
16994done
16995
16996
16997  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16998  DESCRIPTION="make in tools-dir"
16999  if test "x$MAKE_CANDIDATE" != x; then
17000    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17001$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17002    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17003    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17004    if test "x$IS_GNU_MAKE" = x; then
17005      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17006$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17007    else
17008      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
17009      if test "x$IS_MODERN_MAKE" = x; then
17010        { $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
17011$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;}
17012      else
17013        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17014          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17015            MAKE_EXPECTED_ENV='cygwin'
17016          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17017            MAKE_EXPECTED_ENV='msys'
17018          else
17019            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17020          fi
17021          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17022          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17023        else
17024          # Not relevant for non-Windows
17025          IS_MAKE_CORRECT_ENV=true
17026        fi
17027        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17028          { $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
17029$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;}
17030        else
17031          FOUND_MAKE=$MAKE_CANDIDATE
17032
17033  # Only process if variable expands to non-empty
17034
17035  if test "x$FOUND_MAKE" != x; then
17036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17037
17038  # First separate the path from the arguments. This will split at the first
17039  # space.
17040  complete="$FOUND_MAKE"
17041  path="${complete%% *}"
17042  tmp="$complete EOL"
17043  arguments="${tmp#* }"
17044
17045  # Input might be given as Windows format, start by converting to
17046  # unix format.
17047  new_path=`$CYGPATH -u "$path"`
17048
17049  # Now try to locate executable using which
17050  new_path=`$WHICH "$new_path" 2> /dev/null`
17051  # bat and cmd files are not always considered executable in cygwin causing which
17052  # to not find them
17053  if test "x$new_path" = x \
17054      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17055      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17056    new_path=`$CYGPATH -u "$path"`
17057  fi
17058  if test "x$new_path" = x; then
17059    # Oops. Which didn't find the executable.
17060    # The splitting of arguments from the executable at a space might have been incorrect,
17061    # since paths with space are more likely in Windows. Give it another try with the whole
17062    # argument.
17063    path="$complete"
17064    arguments="EOL"
17065    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
17076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17078      has_space=`$ECHO "$complete" | $GREP " "`
17079      if test "x$has_space" != x; then
17080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17082      fi
17083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17084    fi
17085  fi
17086
17087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17090  # "foo.exe" is OK but "foo" is an error.
17091  #
17092  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17093  # It is also a way to make sure we got the proper file name for the real test later on.
17094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17095  if test "x$test_shortpath" = x; then
17096    # Short path failed, file does not exist as specified.
17097    # Try adding .exe or .cmd
17098    if test -f "${new_path}.exe"; then
17099      input_to_shortpath="${new_path}.exe"
17100    elif test -f "${new_path}.cmd"; then
17101      input_to_shortpath="${new_path}.cmd"
17102    else
17103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17104$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17108    fi
17109  else
17110    input_to_shortpath="$new_path"
17111  fi
17112
17113  # Call helper function which possibly converts this using DOS-style short mode.
17114  # If so, the updated path is stored in $new_path.
17115  new_path="$input_to_shortpath"
17116
17117  input_path="$input_to_shortpath"
17118  # Check if we need to convert this using DOS-style short mode. If the path
17119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17120  # take no chances and rewrite it.
17121  # Note: m4 eats our [], so we need to use [ and ] instead.
17122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17123  if test "x$has_forbidden_chars" != x; then
17124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17128      # Going to short mode and back again did indeed matter. Since short mode is
17129      # case insensitive, let's make it lowercase to improve readability.
17130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17131      # Now convert it back to Unix-stile (cygpath)
17132      input_path=`$CYGPATH -u "$shortmode_path"`
17133      new_path="$input_path"
17134    fi
17135  fi
17136
17137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17138  if test "x$test_cygdrive_prefix" = x; then
17139    # As a simple fix, exclude /usr/bin since it's not a real path.
17140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17142      # a path prefixed by /cygdrive for fixpath to work.
17143      new_path="$CYGWIN_ROOT_PATH$input_path"
17144    fi
17145  fi
17146
17147  # remove trailing .exe if any
17148  new_path="${new_path/%.exe/}"
17149
17150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17151
17152  # First separate the path from the arguments. This will split at the first
17153  # space.
17154  complete="$FOUND_MAKE"
17155  path="${complete%% *}"
17156  tmp="$complete EOL"
17157  arguments="${tmp#* }"
17158
17159  # Input might be given as Windows format, start by converting to
17160  # unix format.
17161  new_path="$path"
17162
17163  windows_path="$new_path"
17164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17165    unix_path=`$CYGPATH -u "$windows_path"`
17166    new_path="$unix_path"
17167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17169    new_path="$unix_path"
17170  fi
17171
17172
17173  # Now try to locate executable using which
17174  new_path=`$WHICH "$new_path" 2> /dev/null`
17175
17176  if test "x$new_path" = x; then
17177    # Oops. Which didn't find the executable.
17178    # The splitting of arguments from the executable at a space might have been incorrect,
17179    # since paths with space are more likely in Windows. Give it another try with the whole
17180    # argument.
17181    path="$complete"
17182    arguments="EOL"
17183    new_path="$path"
17184
17185  windows_path="$new_path"
17186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17187    unix_path=`$CYGPATH -u "$windows_path"`
17188    new_path="$unix_path"
17189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17191    new_path="$unix_path"
17192  fi
17193
17194
17195    new_path=`$WHICH "$new_path" 2> /dev/null`
17196    # bat and cmd files are not always considered executable in MSYS causing which
17197    # to not find them
17198    if test "x$new_path" = x \
17199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17201      new_path="$path"
17202
17203  windows_path="$new_path"
17204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17205    unix_path=`$CYGPATH -u "$windows_path"`
17206    new_path="$unix_path"
17207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17209    new_path="$unix_path"
17210  fi
17211
17212    fi
17213
17214    if test "x$new_path" = x; then
17215      # It's still not found. Now this is an unrecoverable error.
17216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17218      has_space=`$ECHO "$complete" | $GREP " "`
17219      if test "x$has_space" != x; then
17220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17222      fi
17223      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17224    fi
17225  fi
17226
17227  # Now new_path has a complete unix path to the binary
17228  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17229    # Keep paths in /bin as-is, but remove trailing .exe if any
17230    new_path="${new_path/%.exe/}"
17231    # Do not save /bin paths to all_fixpath_prefixes!
17232  else
17233    # Not in mixed or Windows style, start by that.
17234    new_path=`cmd //c echo $new_path`
17235
17236  input_path="$new_path"
17237  # Check if we need to convert this using DOS-style short mode. If the path
17238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17239  # take no chances and rewrite it.
17240  # Note: m4 eats our [], so we need to use [ and ] instead.
17241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17242  if test "x$has_forbidden_chars" != x; then
17243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17245  fi
17246
17247    # Output is in $new_path
17248
17249  windows_path="$new_path"
17250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17251    unix_path=`$CYGPATH -u "$windows_path"`
17252    new_path="$unix_path"
17253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17255    new_path="$unix_path"
17256  fi
17257
17258    # remove trailing .exe if any
17259    new_path="${new_path/%.exe/}"
17260
17261    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17262    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17263  fi
17264
17265    else
17266      # We're on a unix platform. Hooray! :)
17267      # First separate the path from the arguments. This will split at the first
17268      # space.
17269      complete="$FOUND_MAKE"
17270      path="${complete%% *}"
17271      tmp="$complete EOL"
17272      arguments="${tmp#* }"
17273
17274      # Cannot rely on the command "which" here since it doesn't always work.
17275      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17276      if test -z "$is_absolute_path"; then
17277        # Path to executable is not absolute. Find it.
17278        IFS_save="$IFS"
17279        IFS=:
17280        for p in $PATH; do
17281          if test -f "$p/$path" && test -x "$p/$path"; then
17282            new_path="$p/$path"
17283            break
17284          fi
17285        done
17286        IFS="$IFS_save"
17287      else
17288        # This is an absolute path, we can use it without further modifications.
17289        new_path="$path"
17290      fi
17291
17292      if test "x$new_path" = x; then
17293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17294$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17295        has_space=`$ECHO "$complete" | $GREP " "`
17296        if test "x$has_space" != x; then
17297          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17298$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17299        fi
17300        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17301      fi
17302    fi
17303
17304    # Now join together the path and the arguments once again
17305    if test "x$arguments" != xEOL; then
17306      new_complete="$new_path ${arguments% *}"
17307    else
17308      new_complete="$new_path"
17309    fi
17310
17311    if test "x$complete" != "x$new_complete"; then
17312      FOUND_MAKE="$new_complete"
17313      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17314$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17315    fi
17316  fi
17317
17318        fi
17319      fi
17320    fi
17321  fi
17322
17323        fi
17324        PATH=$OLD_PATH
17325      fi
17326    fi
17327
17328    if test "x$FOUND_MAKE" = x; then
17329      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
17330    fi
17331  fi
17332
17333  MAKE=$FOUND_MAKE
17334
17335  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17336$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17337
17338
17339  # Check if make supports the output sync option and if so, setup using it.
17340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17341$as_echo_n "checking if make --output-sync is supported... " >&6; }
17342  if $MAKE --version -O > /dev/null 2>&1; then
17343    OUTPUT_SYNC_SUPPORTED=true
17344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17345$as_echo "yes" >&6; }
17346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17347$as_echo_n "checking for output-sync value... " >&6; }
17348
17349# Check whether --with-output-sync was given.
17350if test "${with_output_sync+set}" = set; then :
17351  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17352fi
17353
17354    if test "x$OUTPUT_SYNC" = "x"; then
17355      OUTPUT_SYNC=none
17356    fi
17357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17358$as_echo "$OUTPUT_SYNC" >&6; }
17359    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17360      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17361    fi
17362  else
17363    OUTPUT_SYNC_SUPPORTED=false
17364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17365$as_echo "no" >&6; }
17366  fi
17367
17368
17369
17370
17371
17372
17373  # Test if find supports -delete
17374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17375$as_echo_n "checking if find supports -delete... " >&6; }
17376  FIND_DELETE="-delete"
17377
17378  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17379
17380  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17381
17382  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17383  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17384    # No, it does not.
17385    rm $DELETEDIR/TestIfFindSupportsDelete
17386    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17387      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17388      FIND_DELETE="-print | xargs rm"
17389    else
17390      FIND_DELETE="-exec rm \{\} \+"
17391    fi
17392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17393$as_echo "no" >&6; }
17394  else
17395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17396$as_echo "yes" >&6; }
17397  fi
17398  rmdir $DELETEDIR
17399
17400
17401
17402  # These tools might not be installed by default,
17403  # need hint on how to install them.
17404
17405
17406
17407  # Publish this variable in the help.
17408
17409
17410  if test "x$UNZIP" = x; then
17411    # The variable is not set by user, try to locate tool using the code snippet
17412    for ac_prog in unzip
17413do
17414  # Extract the first word of "$ac_prog", so it can be a program name with args.
17415set dummy $ac_prog; ac_word=$2
17416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17417$as_echo_n "checking for $ac_word... " >&6; }
17418if ${ac_cv_path_UNZIP+:} false; then :
17419  $as_echo_n "(cached) " >&6
17420else
17421  case $UNZIP in
17422  [\\/]* | ?:[\\/]*)
17423  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17424  ;;
17425  *)
17426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17427for as_dir in $PATH
17428do
17429  IFS=$as_save_IFS
17430  test -z "$as_dir" && as_dir=.
17431    for ac_exec_ext in '' $ac_executable_extensions; do
17432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17433    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17435    break 2
17436  fi
17437done
17438  done
17439IFS=$as_save_IFS
17440
17441  ;;
17442esac
17443fi
17444UNZIP=$ac_cv_path_UNZIP
17445if test -n "$UNZIP"; then
17446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17447$as_echo "$UNZIP" >&6; }
17448else
17449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17450$as_echo "no" >&6; }
17451fi
17452
17453
17454  test -n "$UNZIP" && break
17455done
17456
17457  else
17458    # The variable is set, but is it from the command line or the environment?
17459
17460    # Try to remove the string !UNZIP! from our list.
17461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17463      # If it failed, the variable was not from the command line. Ignore it,
17464      # but warn the user (except for BASH, which is always set by the calling BASH).
17465      if test "xUNZIP" != xBASH; then
17466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17467$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17468      fi
17469      # Try to locate tool using the code snippet
17470      for ac_prog in unzip
17471do
17472  # Extract the first word of "$ac_prog", so it can be a program name with args.
17473set dummy $ac_prog; ac_word=$2
17474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17475$as_echo_n "checking for $ac_word... " >&6; }
17476if ${ac_cv_path_UNZIP+:} false; then :
17477  $as_echo_n "(cached) " >&6
17478else
17479  case $UNZIP in
17480  [\\/]* | ?:[\\/]*)
17481  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17482  ;;
17483  *)
17484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17485for as_dir in $PATH
17486do
17487  IFS=$as_save_IFS
17488  test -z "$as_dir" && as_dir=.
17489    for ac_exec_ext in '' $ac_executable_extensions; do
17490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17491    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17493    break 2
17494  fi
17495done
17496  done
17497IFS=$as_save_IFS
17498
17499  ;;
17500esac
17501fi
17502UNZIP=$ac_cv_path_UNZIP
17503if test -n "$UNZIP"; then
17504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17505$as_echo "$UNZIP" >&6; }
17506else
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17508$as_echo "no" >&6; }
17509fi
17510
17511
17512  test -n "$UNZIP" && break
17513done
17514
17515    else
17516      # If it succeeded, then it was overridden by the user. We will use it
17517      # for the tool.
17518
17519      # First remove it from the list of overridden variables, so we can test
17520      # for unknown variables in the end.
17521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17522
17523      # Check if the provided tool contains a complete path.
17524      tool_specified="$UNZIP"
17525      tool_basename="${tool_specified##*/}"
17526      if test "x$tool_basename" = "x$tool_specified"; then
17527        # A command without a complete path is provided, search $PATH.
17528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17529$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17530        # Extract the first word of "$tool_basename", so it can be a program name with args.
17531set dummy $tool_basename; ac_word=$2
17532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17533$as_echo_n "checking for $ac_word... " >&6; }
17534if ${ac_cv_path_UNZIP+:} false; then :
17535  $as_echo_n "(cached) " >&6
17536else
17537  case $UNZIP in
17538  [\\/]* | ?:[\\/]*)
17539  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17540  ;;
17541  *)
17542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17543for as_dir in $PATH
17544do
17545  IFS=$as_save_IFS
17546  test -z "$as_dir" && as_dir=.
17547    for ac_exec_ext in '' $ac_executable_extensions; do
17548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17549    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17551    break 2
17552  fi
17553done
17554  done
17555IFS=$as_save_IFS
17556
17557  ;;
17558esac
17559fi
17560UNZIP=$ac_cv_path_UNZIP
17561if test -n "$UNZIP"; then
17562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17563$as_echo "$UNZIP" >&6; }
17564else
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17566$as_echo "no" >&6; }
17567fi
17568
17569
17570        if test "x$UNZIP" = x; then
17571          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17572        fi
17573      else
17574        # Otherwise we believe it is a complete path. Use it as it is.
17575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17576$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17577        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17578$as_echo_n "checking for UNZIP... " >&6; }
17579        if test ! -x "$tool_specified"; then
17580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17581$as_echo "not found" >&6; }
17582          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17583        fi
17584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17585$as_echo "$tool_specified" >&6; }
17586      fi
17587    fi
17588  fi
17589
17590
17591
17592  if test "x$UNZIP" = x; then
17593    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17594  fi
17595
17596
17597
17598
17599
17600  # Publish this variable in the help.
17601
17602
17603  if test "x$ZIP" = x; then
17604    # The variable is not set by user, try to locate tool using the code snippet
17605    for ac_prog in zip
17606do
17607  # Extract the first word of "$ac_prog", so it can be a program name with args.
17608set dummy $ac_prog; ac_word=$2
17609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17610$as_echo_n "checking for $ac_word... " >&6; }
17611if ${ac_cv_path_ZIP+:} false; then :
17612  $as_echo_n "(cached) " >&6
17613else
17614  case $ZIP in
17615  [\\/]* | ?:[\\/]*)
17616  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17617  ;;
17618  *)
17619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17620for as_dir in $PATH
17621do
17622  IFS=$as_save_IFS
17623  test -z "$as_dir" && as_dir=.
17624    for ac_exec_ext in '' $ac_executable_extensions; do
17625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17626    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17628    break 2
17629  fi
17630done
17631  done
17632IFS=$as_save_IFS
17633
17634  ;;
17635esac
17636fi
17637ZIP=$ac_cv_path_ZIP
17638if test -n "$ZIP"; then
17639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17640$as_echo "$ZIP" >&6; }
17641else
17642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17643$as_echo "no" >&6; }
17644fi
17645
17646
17647  test -n "$ZIP" && break
17648done
17649
17650  else
17651    # The variable is set, but is it from the command line or the environment?
17652
17653    # Try to remove the string !ZIP! from our list.
17654    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17655    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17656      # If it failed, the variable was not from the command line. Ignore it,
17657      # but warn the user (except for BASH, which is always set by the calling BASH).
17658      if test "xZIP" != xBASH; then
17659        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17660$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17661      fi
17662      # Try to locate tool using the code snippet
17663      for ac_prog in zip
17664do
17665  # Extract the first word of "$ac_prog", so it can be a program name with args.
17666set dummy $ac_prog; ac_word=$2
17667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17668$as_echo_n "checking for $ac_word... " >&6; }
17669if ${ac_cv_path_ZIP+:} false; then :
17670  $as_echo_n "(cached) " >&6
17671else
17672  case $ZIP in
17673  [\\/]* | ?:[\\/]*)
17674  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17675  ;;
17676  *)
17677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17678for as_dir in $PATH
17679do
17680  IFS=$as_save_IFS
17681  test -z "$as_dir" && as_dir=.
17682    for ac_exec_ext in '' $ac_executable_extensions; do
17683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17684    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17686    break 2
17687  fi
17688done
17689  done
17690IFS=$as_save_IFS
17691
17692  ;;
17693esac
17694fi
17695ZIP=$ac_cv_path_ZIP
17696if test -n "$ZIP"; then
17697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17698$as_echo "$ZIP" >&6; }
17699else
17700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17701$as_echo "no" >&6; }
17702fi
17703
17704
17705  test -n "$ZIP" && break
17706done
17707
17708    else
17709      # If it succeeded, then it was overridden by the user. We will use it
17710      # for the tool.
17711
17712      # First remove it from the list of overridden variables, so we can test
17713      # for unknown variables in the end.
17714      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17715
17716      # Check if the provided tool contains a complete path.
17717      tool_specified="$ZIP"
17718      tool_basename="${tool_specified##*/}"
17719      if test "x$tool_basename" = "x$tool_specified"; then
17720        # A command without a complete path is provided, search $PATH.
17721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17722$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17723        # Extract the first word of "$tool_basename", so it can be a program name with args.
17724set dummy $tool_basename; ac_word=$2
17725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17726$as_echo_n "checking for $ac_word... " >&6; }
17727if ${ac_cv_path_ZIP+:} false; then :
17728  $as_echo_n "(cached) " >&6
17729else
17730  case $ZIP in
17731  [\\/]* | ?:[\\/]*)
17732  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17733  ;;
17734  *)
17735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17736for as_dir in $PATH
17737do
17738  IFS=$as_save_IFS
17739  test -z "$as_dir" && as_dir=.
17740    for ac_exec_ext in '' $ac_executable_extensions; do
17741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17742    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17744    break 2
17745  fi
17746done
17747  done
17748IFS=$as_save_IFS
17749
17750  ;;
17751esac
17752fi
17753ZIP=$ac_cv_path_ZIP
17754if test -n "$ZIP"; then
17755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17756$as_echo "$ZIP" >&6; }
17757else
17758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17759$as_echo "no" >&6; }
17760fi
17761
17762
17763        if test "x$ZIP" = x; then
17764          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17765        fi
17766      else
17767        # Otherwise we believe it is a complete path. Use it as it is.
17768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17769$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17771$as_echo_n "checking for ZIP... " >&6; }
17772        if test ! -x "$tool_specified"; then
17773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17774$as_echo "not found" >&6; }
17775          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17776        fi
17777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17778$as_echo "$tool_specified" >&6; }
17779      fi
17780    fi
17781  fi
17782
17783
17784
17785  if test "x$ZIP" = x; then
17786    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17787  fi
17788
17789
17790
17791  # Non-required basic tools
17792
17793
17794
17795  # Publish this variable in the help.
17796
17797
17798  if test "x$LDD" = x; then
17799    # The variable is not set by user, try to locate tool using the code snippet
17800    for ac_prog in ldd
17801do
17802  # Extract the first word of "$ac_prog", so it can be a program name with args.
17803set dummy $ac_prog; ac_word=$2
17804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17805$as_echo_n "checking for $ac_word... " >&6; }
17806if ${ac_cv_path_LDD+:} false; then :
17807  $as_echo_n "(cached) " >&6
17808else
17809  case $LDD in
17810  [\\/]* | ?:[\\/]*)
17811  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17812  ;;
17813  *)
17814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17815for as_dir in $PATH
17816do
17817  IFS=$as_save_IFS
17818  test -z "$as_dir" && as_dir=.
17819    for ac_exec_ext in '' $ac_executable_extensions; do
17820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17821    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17823    break 2
17824  fi
17825done
17826  done
17827IFS=$as_save_IFS
17828
17829  ;;
17830esac
17831fi
17832LDD=$ac_cv_path_LDD
17833if test -n "$LDD"; then
17834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17835$as_echo "$LDD" >&6; }
17836else
17837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17838$as_echo "no" >&6; }
17839fi
17840
17841
17842  test -n "$LDD" && break
17843done
17844
17845  else
17846    # The variable is set, but is it from the command line or the environment?
17847
17848    # Try to remove the string !LDD! from our list.
17849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17851      # If it failed, the variable was not from the command line. Ignore it,
17852      # but warn the user (except for BASH, which is always set by the calling BASH).
17853      if test "xLDD" != xBASH; then
17854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17855$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17856      fi
17857      # Try to locate tool using the code snippet
17858      for ac_prog in ldd
17859do
17860  # Extract the first word of "$ac_prog", so it can be a program name with args.
17861set dummy $ac_prog; ac_word=$2
17862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17863$as_echo_n "checking for $ac_word... " >&6; }
17864if ${ac_cv_path_LDD+:} false; then :
17865  $as_echo_n "(cached) " >&6
17866else
17867  case $LDD in
17868  [\\/]* | ?:[\\/]*)
17869  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17870  ;;
17871  *)
17872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17873for as_dir in $PATH
17874do
17875  IFS=$as_save_IFS
17876  test -z "$as_dir" && as_dir=.
17877    for ac_exec_ext in '' $ac_executable_extensions; do
17878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17879    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17881    break 2
17882  fi
17883done
17884  done
17885IFS=$as_save_IFS
17886
17887  ;;
17888esac
17889fi
17890LDD=$ac_cv_path_LDD
17891if test -n "$LDD"; then
17892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17893$as_echo "$LDD" >&6; }
17894else
17895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17896$as_echo "no" >&6; }
17897fi
17898
17899
17900  test -n "$LDD" && break
17901done
17902
17903    else
17904      # If it succeeded, then it was overridden by the user. We will use it
17905      # for the tool.
17906
17907      # First remove it from the list of overridden variables, so we can test
17908      # for unknown variables in the end.
17909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17910
17911      # Check if the provided tool contains a complete path.
17912      tool_specified="$LDD"
17913      tool_basename="${tool_specified##*/}"
17914      if test "x$tool_basename" = "x$tool_specified"; then
17915        # A command without a complete path is provided, search $PATH.
17916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17917$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17918        # Extract the first word of "$tool_basename", so it can be a program name with args.
17919set dummy $tool_basename; ac_word=$2
17920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17921$as_echo_n "checking for $ac_word... " >&6; }
17922if ${ac_cv_path_LDD+:} false; then :
17923  $as_echo_n "(cached) " >&6
17924else
17925  case $LDD in
17926  [\\/]* | ?:[\\/]*)
17927  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17928  ;;
17929  *)
17930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17931for as_dir in $PATH
17932do
17933  IFS=$as_save_IFS
17934  test -z "$as_dir" && as_dir=.
17935    for ac_exec_ext in '' $ac_executable_extensions; do
17936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17937    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17939    break 2
17940  fi
17941done
17942  done
17943IFS=$as_save_IFS
17944
17945  ;;
17946esac
17947fi
17948LDD=$ac_cv_path_LDD
17949if test -n "$LDD"; then
17950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17951$as_echo "$LDD" >&6; }
17952else
17953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17954$as_echo "no" >&6; }
17955fi
17956
17957
17958        if test "x$LDD" = x; then
17959          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17960        fi
17961      else
17962        # Otherwise we believe it is a complete path. Use it as it is.
17963        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17964$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17966$as_echo_n "checking for LDD... " >&6; }
17967        if test ! -x "$tool_specified"; then
17968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17969$as_echo "not found" >&6; }
17970          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17971        fi
17972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17973$as_echo "$tool_specified" >&6; }
17974      fi
17975    fi
17976  fi
17977
17978
17979  if test "x$LDD" = "x"; then
17980    # List shared lib dependencies is used for
17981    # debug output and checking for forbidden dependencies.
17982    # We can build without it.
17983    LDD="true"
17984  fi
17985
17986
17987  # Publish this variable in the help.
17988
17989
17990  if test "x$OTOOL" = x; then
17991    # The variable is not set by user, try to locate tool using the code snippet
17992    for ac_prog in otool
17993do
17994  # Extract the first word of "$ac_prog", so it can be a program name with args.
17995set dummy $ac_prog; ac_word=$2
17996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17997$as_echo_n "checking for $ac_word... " >&6; }
17998if ${ac_cv_path_OTOOL+:} false; then :
17999  $as_echo_n "(cached) " >&6
18000else
18001  case $OTOOL in
18002  [\\/]* | ?:[\\/]*)
18003  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18004  ;;
18005  *)
18006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18007for as_dir in $PATH
18008do
18009  IFS=$as_save_IFS
18010  test -z "$as_dir" && as_dir=.
18011    for ac_exec_ext in '' $ac_executable_extensions; do
18012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18013    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18015    break 2
18016  fi
18017done
18018  done
18019IFS=$as_save_IFS
18020
18021  ;;
18022esac
18023fi
18024OTOOL=$ac_cv_path_OTOOL
18025if test -n "$OTOOL"; then
18026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18027$as_echo "$OTOOL" >&6; }
18028else
18029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18030$as_echo "no" >&6; }
18031fi
18032
18033
18034  test -n "$OTOOL" && break
18035done
18036
18037  else
18038    # The variable is set, but is it from the command line or the environment?
18039
18040    # Try to remove the string !OTOOL! from our list.
18041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18043      # If it failed, the variable was not from the command line. Ignore it,
18044      # but warn the user (except for BASH, which is always set by the calling BASH).
18045      if test "xOTOOL" != xBASH; then
18046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18047$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18048      fi
18049      # Try to locate tool using the code snippet
18050      for ac_prog in otool
18051do
18052  # Extract the first word of "$ac_prog", so it can be a program name with args.
18053set dummy $ac_prog; ac_word=$2
18054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18055$as_echo_n "checking for $ac_word... " >&6; }
18056if ${ac_cv_path_OTOOL+:} false; then :
18057  $as_echo_n "(cached) " >&6
18058else
18059  case $OTOOL in
18060  [\\/]* | ?:[\\/]*)
18061  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18062  ;;
18063  *)
18064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18065for as_dir in $PATH
18066do
18067  IFS=$as_save_IFS
18068  test -z "$as_dir" && as_dir=.
18069    for ac_exec_ext in '' $ac_executable_extensions; do
18070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18071    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18073    break 2
18074  fi
18075done
18076  done
18077IFS=$as_save_IFS
18078
18079  ;;
18080esac
18081fi
18082OTOOL=$ac_cv_path_OTOOL
18083if test -n "$OTOOL"; then
18084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18085$as_echo "$OTOOL" >&6; }
18086else
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18088$as_echo "no" >&6; }
18089fi
18090
18091
18092  test -n "$OTOOL" && break
18093done
18094
18095    else
18096      # If it succeeded, then it was overridden by the user. We will use it
18097      # for the tool.
18098
18099      # First remove it from the list of overridden variables, so we can test
18100      # for unknown variables in the end.
18101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18102
18103      # Check if the provided tool contains a complete path.
18104      tool_specified="$OTOOL"
18105      tool_basename="${tool_specified##*/}"
18106      if test "x$tool_basename" = "x$tool_specified"; then
18107        # A command without a complete path is provided, search $PATH.
18108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18109$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18110        # Extract the first word of "$tool_basename", so it can be a program name with args.
18111set dummy $tool_basename; ac_word=$2
18112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18113$as_echo_n "checking for $ac_word... " >&6; }
18114if ${ac_cv_path_OTOOL+:} false; then :
18115  $as_echo_n "(cached) " >&6
18116else
18117  case $OTOOL in
18118  [\\/]* | ?:[\\/]*)
18119  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18120  ;;
18121  *)
18122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18123for as_dir in $PATH
18124do
18125  IFS=$as_save_IFS
18126  test -z "$as_dir" && as_dir=.
18127    for ac_exec_ext in '' $ac_executable_extensions; do
18128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18129    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18131    break 2
18132  fi
18133done
18134  done
18135IFS=$as_save_IFS
18136
18137  ;;
18138esac
18139fi
18140OTOOL=$ac_cv_path_OTOOL
18141if test -n "$OTOOL"; then
18142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18143$as_echo "$OTOOL" >&6; }
18144else
18145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18146$as_echo "no" >&6; }
18147fi
18148
18149
18150        if test "x$OTOOL" = x; then
18151          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18152        fi
18153      else
18154        # Otherwise we believe it is a complete path. Use it as it is.
18155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18156$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18158$as_echo_n "checking for OTOOL... " >&6; }
18159        if test ! -x "$tool_specified"; then
18160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18161$as_echo "not found" >&6; }
18162          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18163        fi
18164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18165$as_echo "$tool_specified" >&6; }
18166      fi
18167    fi
18168  fi
18169
18170
18171  if test "x$OTOOL" = "x"; then
18172    OTOOL="true"
18173  fi
18174
18175
18176  # Publish this variable in the help.
18177
18178
18179  if test "x$READELF" = x; then
18180    # The variable is not set by user, try to locate tool using the code snippet
18181    for ac_prog in greadelf readelf
18182do
18183  # Extract the first word of "$ac_prog", so it can be a program name with args.
18184set dummy $ac_prog; ac_word=$2
18185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18186$as_echo_n "checking for $ac_word... " >&6; }
18187if ${ac_cv_path_READELF+:} false; then :
18188  $as_echo_n "(cached) " >&6
18189else
18190  case $READELF in
18191  [\\/]* | ?:[\\/]*)
18192  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18193  ;;
18194  *)
18195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18196for as_dir in $PATH
18197do
18198  IFS=$as_save_IFS
18199  test -z "$as_dir" && as_dir=.
18200    for ac_exec_ext in '' $ac_executable_extensions; do
18201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18202    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18204    break 2
18205  fi
18206done
18207  done
18208IFS=$as_save_IFS
18209
18210  ;;
18211esac
18212fi
18213READELF=$ac_cv_path_READELF
18214if test -n "$READELF"; then
18215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18216$as_echo "$READELF" >&6; }
18217else
18218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219$as_echo "no" >&6; }
18220fi
18221
18222
18223  test -n "$READELF" && break
18224done
18225
18226  else
18227    # The variable is set, but is it from the command line or the environment?
18228
18229    # Try to remove the string !READELF! from our list.
18230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18232      # If it failed, the variable was not from the command line. Ignore it,
18233      # but warn the user (except for BASH, which is always set by the calling BASH).
18234      if test "xREADELF" != xBASH; then
18235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18236$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18237      fi
18238      # Try to locate tool using the code snippet
18239      for ac_prog in greadelf readelf
18240do
18241  # Extract the first word of "$ac_prog", so it can be a program name with args.
18242set dummy $ac_prog; ac_word=$2
18243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18244$as_echo_n "checking for $ac_word... " >&6; }
18245if ${ac_cv_path_READELF+:} false; then :
18246  $as_echo_n "(cached) " >&6
18247else
18248  case $READELF in
18249  [\\/]* | ?:[\\/]*)
18250  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18251  ;;
18252  *)
18253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18254for as_dir in $PATH
18255do
18256  IFS=$as_save_IFS
18257  test -z "$as_dir" && as_dir=.
18258    for ac_exec_ext in '' $ac_executable_extensions; do
18259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18260    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18262    break 2
18263  fi
18264done
18265  done
18266IFS=$as_save_IFS
18267
18268  ;;
18269esac
18270fi
18271READELF=$ac_cv_path_READELF
18272if test -n "$READELF"; then
18273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18274$as_echo "$READELF" >&6; }
18275else
18276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18277$as_echo "no" >&6; }
18278fi
18279
18280
18281  test -n "$READELF" && break
18282done
18283
18284    else
18285      # If it succeeded, then it was overridden by the user. We will use it
18286      # for the tool.
18287
18288      # First remove it from the list of overridden variables, so we can test
18289      # for unknown variables in the end.
18290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18291
18292      # Check if the provided tool contains a complete path.
18293      tool_specified="$READELF"
18294      tool_basename="${tool_specified##*/}"
18295      if test "x$tool_basename" = "x$tool_specified"; then
18296        # A command without a complete path is provided, search $PATH.
18297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18298$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18299        # Extract the first word of "$tool_basename", so it can be a program name with args.
18300set dummy $tool_basename; ac_word=$2
18301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18302$as_echo_n "checking for $ac_word... " >&6; }
18303if ${ac_cv_path_READELF+:} false; then :
18304  $as_echo_n "(cached) " >&6
18305else
18306  case $READELF in
18307  [\\/]* | ?:[\\/]*)
18308  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18309  ;;
18310  *)
18311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18312for as_dir in $PATH
18313do
18314  IFS=$as_save_IFS
18315  test -z "$as_dir" && as_dir=.
18316    for ac_exec_ext in '' $ac_executable_extensions; do
18317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18318    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18320    break 2
18321  fi
18322done
18323  done
18324IFS=$as_save_IFS
18325
18326  ;;
18327esac
18328fi
18329READELF=$ac_cv_path_READELF
18330if test -n "$READELF"; then
18331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18332$as_echo "$READELF" >&6; }
18333else
18334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18335$as_echo "no" >&6; }
18336fi
18337
18338
18339        if test "x$READELF" = x; then
18340          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18341        fi
18342      else
18343        # Otherwise we believe it is a complete path. Use it as it is.
18344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18345$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18347$as_echo_n "checking for READELF... " >&6; }
18348        if test ! -x "$tool_specified"; then
18349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18350$as_echo "not found" >&6; }
18351          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18352        fi
18353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18354$as_echo "$tool_specified" >&6; }
18355      fi
18356    fi
18357  fi
18358
18359
18360
18361
18362  # Publish this variable in the help.
18363
18364
18365  if test "x$HG" = x; then
18366    # The variable is not set by user, try to locate tool using the code snippet
18367    for ac_prog in hg
18368do
18369  # Extract the first word of "$ac_prog", so it can be a program name with args.
18370set dummy $ac_prog; ac_word=$2
18371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18372$as_echo_n "checking for $ac_word... " >&6; }
18373if ${ac_cv_path_HG+:} false; then :
18374  $as_echo_n "(cached) " >&6
18375else
18376  case $HG in
18377  [\\/]* | ?:[\\/]*)
18378  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18379  ;;
18380  *)
18381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18382for as_dir in $PATH
18383do
18384  IFS=$as_save_IFS
18385  test -z "$as_dir" && as_dir=.
18386    for ac_exec_ext in '' $ac_executable_extensions; do
18387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18388    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18390    break 2
18391  fi
18392done
18393  done
18394IFS=$as_save_IFS
18395
18396  ;;
18397esac
18398fi
18399HG=$ac_cv_path_HG
18400if test -n "$HG"; then
18401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18402$as_echo "$HG" >&6; }
18403else
18404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18405$as_echo "no" >&6; }
18406fi
18407
18408
18409  test -n "$HG" && break
18410done
18411
18412  else
18413    # The variable is set, but is it from the command line or the environment?
18414
18415    # Try to remove the string !HG! from our list.
18416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18418      # If it failed, the variable was not from the command line. Ignore it,
18419      # but warn the user (except for BASH, which is always set by the calling BASH).
18420      if test "xHG" != xBASH; then
18421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18422$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18423      fi
18424      # Try to locate tool using the code snippet
18425      for ac_prog in hg
18426do
18427  # Extract the first word of "$ac_prog", so it can be a program name with args.
18428set dummy $ac_prog; ac_word=$2
18429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18430$as_echo_n "checking for $ac_word... " >&6; }
18431if ${ac_cv_path_HG+:} false; then :
18432  $as_echo_n "(cached) " >&6
18433else
18434  case $HG in
18435  [\\/]* | ?:[\\/]*)
18436  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18437  ;;
18438  *)
18439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18440for as_dir in $PATH
18441do
18442  IFS=$as_save_IFS
18443  test -z "$as_dir" && as_dir=.
18444    for ac_exec_ext in '' $ac_executable_extensions; do
18445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18446    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18448    break 2
18449  fi
18450done
18451  done
18452IFS=$as_save_IFS
18453
18454  ;;
18455esac
18456fi
18457HG=$ac_cv_path_HG
18458if test -n "$HG"; then
18459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18460$as_echo "$HG" >&6; }
18461else
18462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18463$as_echo "no" >&6; }
18464fi
18465
18466
18467  test -n "$HG" && break
18468done
18469
18470    else
18471      # If it succeeded, then it was overridden by the user. We will use it
18472      # for the tool.
18473
18474      # First remove it from the list of overridden variables, so we can test
18475      # for unknown variables in the end.
18476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18477
18478      # Check if the provided tool contains a complete path.
18479      tool_specified="$HG"
18480      tool_basename="${tool_specified##*/}"
18481      if test "x$tool_basename" = "x$tool_specified"; then
18482        # A command without a complete path is provided, search $PATH.
18483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18484$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18485        # Extract the first word of "$tool_basename", so it can be a program name with args.
18486set dummy $tool_basename; ac_word=$2
18487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18488$as_echo_n "checking for $ac_word... " >&6; }
18489if ${ac_cv_path_HG+:} false; then :
18490  $as_echo_n "(cached) " >&6
18491else
18492  case $HG in
18493  [\\/]* | ?:[\\/]*)
18494  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18495  ;;
18496  *)
18497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18498for as_dir in $PATH
18499do
18500  IFS=$as_save_IFS
18501  test -z "$as_dir" && as_dir=.
18502    for ac_exec_ext in '' $ac_executable_extensions; do
18503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18504    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18506    break 2
18507  fi
18508done
18509  done
18510IFS=$as_save_IFS
18511
18512  ;;
18513esac
18514fi
18515HG=$ac_cv_path_HG
18516if test -n "$HG"; then
18517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18518$as_echo "$HG" >&6; }
18519else
18520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18521$as_echo "no" >&6; }
18522fi
18523
18524
18525        if test "x$HG" = x; then
18526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18527        fi
18528      else
18529        # Otherwise we believe it is a complete path. Use it as it is.
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18531$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18533$as_echo_n "checking for HG... " >&6; }
18534        if test ! -x "$tool_specified"; then
18535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18536$as_echo "not found" >&6; }
18537          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18538        fi
18539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18540$as_echo "$tool_specified" >&6; }
18541      fi
18542    fi
18543  fi
18544
18545
18546
18547
18548  # Publish this variable in the help.
18549
18550
18551  if test "x$STAT" = x; then
18552    # The variable is not set by user, try to locate tool using the code snippet
18553    for ac_prog in stat
18554do
18555  # Extract the first word of "$ac_prog", so it can be a program name with args.
18556set dummy $ac_prog; ac_word=$2
18557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18558$as_echo_n "checking for $ac_word... " >&6; }
18559if ${ac_cv_path_STAT+:} false; then :
18560  $as_echo_n "(cached) " >&6
18561else
18562  case $STAT in
18563  [\\/]* | ?:[\\/]*)
18564  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18565  ;;
18566  *)
18567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18568for as_dir in $PATH
18569do
18570  IFS=$as_save_IFS
18571  test -z "$as_dir" && as_dir=.
18572    for ac_exec_ext in '' $ac_executable_extensions; do
18573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18574    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18576    break 2
18577  fi
18578done
18579  done
18580IFS=$as_save_IFS
18581
18582  ;;
18583esac
18584fi
18585STAT=$ac_cv_path_STAT
18586if test -n "$STAT"; then
18587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18588$as_echo "$STAT" >&6; }
18589else
18590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18591$as_echo "no" >&6; }
18592fi
18593
18594
18595  test -n "$STAT" && break
18596done
18597
18598  else
18599    # The variable is set, but is it from the command line or the environment?
18600
18601    # Try to remove the string !STAT! from our list.
18602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18604      # If it failed, the variable was not from the command line. Ignore it,
18605      # but warn the user (except for BASH, which is always set by the calling BASH).
18606      if test "xSTAT" != xBASH; then
18607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18608$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18609      fi
18610      # Try to locate tool using the code snippet
18611      for ac_prog in stat
18612do
18613  # Extract the first word of "$ac_prog", so it can be a program name with args.
18614set dummy $ac_prog; ac_word=$2
18615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18616$as_echo_n "checking for $ac_word... " >&6; }
18617if ${ac_cv_path_STAT+:} false; then :
18618  $as_echo_n "(cached) " >&6
18619else
18620  case $STAT in
18621  [\\/]* | ?:[\\/]*)
18622  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18623  ;;
18624  *)
18625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18626for as_dir in $PATH
18627do
18628  IFS=$as_save_IFS
18629  test -z "$as_dir" && as_dir=.
18630    for ac_exec_ext in '' $ac_executable_extensions; do
18631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18632    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18634    break 2
18635  fi
18636done
18637  done
18638IFS=$as_save_IFS
18639
18640  ;;
18641esac
18642fi
18643STAT=$ac_cv_path_STAT
18644if test -n "$STAT"; then
18645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18646$as_echo "$STAT" >&6; }
18647else
18648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18649$as_echo "no" >&6; }
18650fi
18651
18652
18653  test -n "$STAT" && break
18654done
18655
18656    else
18657      # If it succeeded, then it was overridden by the user. We will use it
18658      # for the tool.
18659
18660      # First remove it from the list of overridden variables, so we can test
18661      # for unknown variables in the end.
18662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18663
18664      # Check if the provided tool contains a complete path.
18665      tool_specified="$STAT"
18666      tool_basename="${tool_specified##*/}"
18667      if test "x$tool_basename" = "x$tool_specified"; then
18668        # A command without a complete path is provided, search $PATH.
18669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18670$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18671        # Extract the first word of "$tool_basename", so it can be a program name with args.
18672set dummy $tool_basename; ac_word=$2
18673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18674$as_echo_n "checking for $ac_word... " >&6; }
18675if ${ac_cv_path_STAT+:} false; then :
18676  $as_echo_n "(cached) " >&6
18677else
18678  case $STAT in
18679  [\\/]* | ?:[\\/]*)
18680  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18681  ;;
18682  *)
18683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18684for as_dir in $PATH
18685do
18686  IFS=$as_save_IFS
18687  test -z "$as_dir" && as_dir=.
18688    for ac_exec_ext in '' $ac_executable_extensions; do
18689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18690    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18692    break 2
18693  fi
18694done
18695  done
18696IFS=$as_save_IFS
18697
18698  ;;
18699esac
18700fi
18701STAT=$ac_cv_path_STAT
18702if test -n "$STAT"; then
18703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18704$as_echo "$STAT" >&6; }
18705else
18706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18707$as_echo "no" >&6; }
18708fi
18709
18710
18711        if test "x$STAT" = x; then
18712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18713        fi
18714      else
18715        # Otherwise we believe it is a complete path. Use it as it is.
18716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18717$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18719$as_echo_n "checking for STAT... " >&6; }
18720        if test ! -x "$tool_specified"; then
18721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18722$as_echo "not found" >&6; }
18723          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18724        fi
18725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18726$as_echo "$tool_specified" >&6; }
18727      fi
18728    fi
18729  fi
18730
18731
18732
18733
18734  # Publish this variable in the help.
18735
18736
18737  if test "x$TIME" = x; then
18738    # The variable is not set by user, try to locate tool using the code snippet
18739    for ac_prog in time
18740do
18741  # Extract the first word of "$ac_prog", so it can be a program name with args.
18742set dummy $ac_prog; ac_word=$2
18743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18744$as_echo_n "checking for $ac_word... " >&6; }
18745if ${ac_cv_path_TIME+:} false; then :
18746  $as_echo_n "(cached) " >&6
18747else
18748  case $TIME in
18749  [\\/]* | ?:[\\/]*)
18750  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18751  ;;
18752  *)
18753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18754for as_dir in $PATH
18755do
18756  IFS=$as_save_IFS
18757  test -z "$as_dir" && as_dir=.
18758    for ac_exec_ext in '' $ac_executable_extensions; do
18759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18760    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18762    break 2
18763  fi
18764done
18765  done
18766IFS=$as_save_IFS
18767
18768  ;;
18769esac
18770fi
18771TIME=$ac_cv_path_TIME
18772if test -n "$TIME"; then
18773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18774$as_echo "$TIME" >&6; }
18775else
18776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18777$as_echo "no" >&6; }
18778fi
18779
18780
18781  test -n "$TIME" && break
18782done
18783
18784  else
18785    # The variable is set, but is it from the command line or the environment?
18786
18787    # Try to remove the string !TIME! from our list.
18788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18790      # If it failed, the variable was not from the command line. Ignore it,
18791      # but warn the user (except for BASH, which is always set by the calling BASH).
18792      if test "xTIME" != xBASH; then
18793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18794$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18795      fi
18796      # Try to locate tool using the code snippet
18797      for ac_prog in time
18798do
18799  # Extract the first word of "$ac_prog", so it can be a program name with args.
18800set dummy $ac_prog; ac_word=$2
18801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18802$as_echo_n "checking for $ac_word... " >&6; }
18803if ${ac_cv_path_TIME+:} false; then :
18804  $as_echo_n "(cached) " >&6
18805else
18806  case $TIME in
18807  [\\/]* | ?:[\\/]*)
18808  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18809  ;;
18810  *)
18811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18812for as_dir in $PATH
18813do
18814  IFS=$as_save_IFS
18815  test -z "$as_dir" && as_dir=.
18816    for ac_exec_ext in '' $ac_executable_extensions; do
18817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18818    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18820    break 2
18821  fi
18822done
18823  done
18824IFS=$as_save_IFS
18825
18826  ;;
18827esac
18828fi
18829TIME=$ac_cv_path_TIME
18830if test -n "$TIME"; then
18831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18832$as_echo "$TIME" >&6; }
18833else
18834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18835$as_echo "no" >&6; }
18836fi
18837
18838
18839  test -n "$TIME" && break
18840done
18841
18842    else
18843      # If it succeeded, then it was overridden by the user. We will use it
18844      # for the tool.
18845
18846      # First remove it from the list of overridden variables, so we can test
18847      # for unknown variables in the end.
18848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18849
18850      # Check if the provided tool contains a complete path.
18851      tool_specified="$TIME"
18852      tool_basename="${tool_specified##*/}"
18853      if test "x$tool_basename" = "x$tool_specified"; then
18854        # A command without a complete path is provided, search $PATH.
18855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18856$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18857        # Extract the first word of "$tool_basename", so it can be a program name with args.
18858set dummy $tool_basename; ac_word=$2
18859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18860$as_echo_n "checking for $ac_word... " >&6; }
18861if ${ac_cv_path_TIME+:} false; then :
18862  $as_echo_n "(cached) " >&6
18863else
18864  case $TIME in
18865  [\\/]* | ?:[\\/]*)
18866  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18867  ;;
18868  *)
18869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18870for as_dir in $PATH
18871do
18872  IFS=$as_save_IFS
18873  test -z "$as_dir" && as_dir=.
18874    for ac_exec_ext in '' $ac_executable_extensions; do
18875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18876    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18878    break 2
18879  fi
18880done
18881  done
18882IFS=$as_save_IFS
18883
18884  ;;
18885esac
18886fi
18887TIME=$ac_cv_path_TIME
18888if test -n "$TIME"; then
18889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18890$as_echo "$TIME" >&6; }
18891else
18892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18893$as_echo "no" >&6; }
18894fi
18895
18896
18897        if test "x$TIME" = x; then
18898          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18899        fi
18900      else
18901        # Otherwise we believe it is a complete path. Use it as it is.
18902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18903$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18905$as_echo_n "checking for TIME... " >&6; }
18906        if test ! -x "$tool_specified"; then
18907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18908$as_echo "not found" >&6; }
18909          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18910        fi
18911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18912$as_echo "$tool_specified" >&6; }
18913      fi
18914    fi
18915  fi
18916
18917
18918  # Check if it's GNU time
18919  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18920  if test "x$IS_GNU_TIME" != x; then
18921    IS_GNU_TIME=yes
18922  else
18923    IS_GNU_TIME=no
18924  fi
18925
18926
18927  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18928
18929
18930
18931  # Publish this variable in the help.
18932
18933
18934  if test "x$DSYMUTIL" = x; then
18935    # The variable is not set by user, try to locate tool using the code snippet
18936    for ac_prog in dsymutil
18937do
18938  # Extract the first word of "$ac_prog", so it can be a program name with args.
18939set dummy $ac_prog; ac_word=$2
18940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18941$as_echo_n "checking for $ac_word... " >&6; }
18942if ${ac_cv_path_DSYMUTIL+:} false; then :
18943  $as_echo_n "(cached) " >&6
18944else
18945  case $DSYMUTIL in
18946  [\\/]* | ?:[\\/]*)
18947  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18948  ;;
18949  *)
18950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18951for as_dir in $PATH
18952do
18953  IFS=$as_save_IFS
18954  test -z "$as_dir" && as_dir=.
18955    for ac_exec_ext in '' $ac_executable_extensions; do
18956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18957    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18959    break 2
18960  fi
18961done
18962  done
18963IFS=$as_save_IFS
18964
18965  ;;
18966esac
18967fi
18968DSYMUTIL=$ac_cv_path_DSYMUTIL
18969if test -n "$DSYMUTIL"; then
18970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18971$as_echo "$DSYMUTIL" >&6; }
18972else
18973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18974$as_echo "no" >&6; }
18975fi
18976
18977
18978  test -n "$DSYMUTIL" && break
18979done
18980
18981  else
18982    # The variable is set, but is it from the command line or the environment?
18983
18984    # Try to remove the string !DSYMUTIL! from our list.
18985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18987      # If it failed, the variable was not from the command line. Ignore it,
18988      # but warn the user (except for BASH, which is always set by the calling BASH).
18989      if test "xDSYMUTIL" != xBASH; then
18990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18991$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18992      fi
18993      # Try to locate tool using the code snippet
18994      for ac_prog in dsymutil
18995do
18996  # Extract the first word of "$ac_prog", so it can be a program name with args.
18997set dummy $ac_prog; ac_word=$2
18998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18999$as_echo_n "checking for $ac_word... " >&6; }
19000if ${ac_cv_path_DSYMUTIL+:} false; then :
19001  $as_echo_n "(cached) " >&6
19002else
19003  case $DSYMUTIL in
19004  [\\/]* | ?:[\\/]*)
19005  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19006  ;;
19007  *)
19008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19009for as_dir in $PATH
19010do
19011  IFS=$as_save_IFS
19012  test -z "$as_dir" && as_dir=.
19013    for ac_exec_ext in '' $ac_executable_extensions; do
19014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19015    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19017    break 2
19018  fi
19019done
19020  done
19021IFS=$as_save_IFS
19022
19023  ;;
19024esac
19025fi
19026DSYMUTIL=$ac_cv_path_DSYMUTIL
19027if test -n "$DSYMUTIL"; then
19028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19029$as_echo "$DSYMUTIL" >&6; }
19030else
19031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19032$as_echo "no" >&6; }
19033fi
19034
19035
19036  test -n "$DSYMUTIL" && break
19037done
19038
19039    else
19040      # If it succeeded, then it was overridden by the user. We will use it
19041      # for the tool.
19042
19043      # First remove it from the list of overridden variables, so we can test
19044      # for unknown variables in the end.
19045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19046
19047      # Check if the provided tool contains a complete path.
19048      tool_specified="$DSYMUTIL"
19049      tool_basename="${tool_specified##*/}"
19050      if test "x$tool_basename" = "x$tool_specified"; then
19051        # A command without a complete path is provided, search $PATH.
19052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19053$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19054        # Extract the first word of "$tool_basename", so it can be a program name with args.
19055set dummy $tool_basename; ac_word=$2
19056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19057$as_echo_n "checking for $ac_word... " >&6; }
19058if ${ac_cv_path_DSYMUTIL+:} false; then :
19059  $as_echo_n "(cached) " >&6
19060else
19061  case $DSYMUTIL in
19062  [\\/]* | ?:[\\/]*)
19063  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19064  ;;
19065  *)
19066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19067for as_dir in $PATH
19068do
19069  IFS=$as_save_IFS
19070  test -z "$as_dir" && as_dir=.
19071    for ac_exec_ext in '' $ac_executable_extensions; do
19072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19073    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19075    break 2
19076  fi
19077done
19078  done
19079IFS=$as_save_IFS
19080
19081  ;;
19082esac
19083fi
19084DSYMUTIL=$ac_cv_path_DSYMUTIL
19085if test -n "$DSYMUTIL"; then
19086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19087$as_echo "$DSYMUTIL" >&6; }
19088else
19089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19090$as_echo "no" >&6; }
19091fi
19092
19093
19094        if test "x$DSYMUTIL" = x; then
19095          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19096        fi
19097      else
19098        # Otherwise we believe it is a complete path. Use it as it is.
19099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19100$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19102$as_echo_n "checking for DSYMUTIL... " >&6; }
19103        if test ! -x "$tool_specified"; then
19104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19105$as_echo "not found" >&6; }
19106          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19107        fi
19108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19109$as_echo "$tool_specified" >&6; }
19110      fi
19111    fi
19112  fi
19113
19114
19115
19116  if test "x$DSYMUTIL" = x; then
19117    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19118  fi
19119
19120
19121
19122
19123
19124  # Publish this variable in the help.
19125
19126
19127  if test "x$XATTR" = x; then
19128    # The variable is not set by user, try to locate tool using the code snippet
19129    for ac_prog in xattr
19130do
19131  # Extract the first word of "$ac_prog", so it can be a program name with args.
19132set dummy $ac_prog; ac_word=$2
19133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19134$as_echo_n "checking for $ac_word... " >&6; }
19135if ${ac_cv_path_XATTR+:} false; then :
19136  $as_echo_n "(cached) " >&6
19137else
19138  case $XATTR in
19139  [\\/]* | ?:[\\/]*)
19140  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19141  ;;
19142  *)
19143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19144for as_dir in $PATH
19145do
19146  IFS=$as_save_IFS
19147  test -z "$as_dir" && as_dir=.
19148    for ac_exec_ext in '' $ac_executable_extensions; do
19149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19150    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19152    break 2
19153  fi
19154done
19155  done
19156IFS=$as_save_IFS
19157
19158  ;;
19159esac
19160fi
19161XATTR=$ac_cv_path_XATTR
19162if test -n "$XATTR"; then
19163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19164$as_echo "$XATTR" >&6; }
19165else
19166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19167$as_echo "no" >&6; }
19168fi
19169
19170
19171  test -n "$XATTR" && break
19172done
19173
19174  else
19175    # The variable is set, but is it from the command line or the environment?
19176
19177    # Try to remove the string !XATTR! from our list.
19178    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19179    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19180      # If it failed, the variable was not from the command line. Ignore it,
19181      # but warn the user (except for BASH, which is always set by the calling BASH).
19182      if test "xXATTR" != xBASH; then
19183        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19184$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19185      fi
19186      # Try to locate tool using the code snippet
19187      for ac_prog in xattr
19188do
19189  # Extract the first word of "$ac_prog", so it can be a program name with args.
19190set dummy $ac_prog; ac_word=$2
19191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19192$as_echo_n "checking for $ac_word... " >&6; }
19193if ${ac_cv_path_XATTR+:} false; then :
19194  $as_echo_n "(cached) " >&6
19195else
19196  case $XATTR in
19197  [\\/]* | ?:[\\/]*)
19198  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19199  ;;
19200  *)
19201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19202for as_dir in $PATH
19203do
19204  IFS=$as_save_IFS
19205  test -z "$as_dir" && as_dir=.
19206    for ac_exec_ext in '' $ac_executable_extensions; do
19207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19208    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19210    break 2
19211  fi
19212done
19213  done
19214IFS=$as_save_IFS
19215
19216  ;;
19217esac
19218fi
19219XATTR=$ac_cv_path_XATTR
19220if test -n "$XATTR"; then
19221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19222$as_echo "$XATTR" >&6; }
19223else
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19225$as_echo "no" >&6; }
19226fi
19227
19228
19229  test -n "$XATTR" && break
19230done
19231
19232    else
19233      # If it succeeded, then it was overridden by the user. We will use it
19234      # for the tool.
19235
19236      # First remove it from the list of overridden variables, so we can test
19237      # for unknown variables in the end.
19238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19239
19240      # Check if the provided tool contains a complete path.
19241      tool_specified="$XATTR"
19242      tool_basename="${tool_specified##*/}"
19243      if test "x$tool_basename" = "x$tool_specified"; then
19244        # A command without a complete path is provided, search $PATH.
19245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19246$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19247        # Extract the first word of "$tool_basename", so it can be a program name with args.
19248set dummy $tool_basename; ac_word=$2
19249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19250$as_echo_n "checking for $ac_word... " >&6; }
19251if ${ac_cv_path_XATTR+:} false; then :
19252  $as_echo_n "(cached) " >&6
19253else
19254  case $XATTR in
19255  [\\/]* | ?:[\\/]*)
19256  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19257  ;;
19258  *)
19259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19260for as_dir in $PATH
19261do
19262  IFS=$as_save_IFS
19263  test -z "$as_dir" && as_dir=.
19264    for ac_exec_ext in '' $ac_executable_extensions; do
19265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19266    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19268    break 2
19269  fi
19270done
19271  done
19272IFS=$as_save_IFS
19273
19274  ;;
19275esac
19276fi
19277XATTR=$ac_cv_path_XATTR
19278if test -n "$XATTR"; then
19279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19280$as_echo "$XATTR" >&6; }
19281else
19282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19283$as_echo "no" >&6; }
19284fi
19285
19286
19287        if test "x$XATTR" = x; then
19288          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19289        fi
19290      else
19291        # Otherwise we believe it is a complete path. Use it as it is.
19292        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19293$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19295$as_echo_n "checking for XATTR... " >&6; }
19296        if test ! -x "$tool_specified"; then
19297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19298$as_echo "not found" >&6; }
19299          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19300        fi
19301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19302$as_echo "$tool_specified" >&6; }
19303      fi
19304    fi
19305  fi
19306
19307
19308
19309  if test "x$XATTR" = x; then
19310    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19311  fi
19312
19313
19314
19315
19316  # Publish this variable in the help.
19317
19318
19319  if test "x$CODESIGN" = x; then
19320    # The variable is not set by user, try to locate tool using the code snippet
19321    for ac_prog in codesign
19322do
19323  # Extract the first word of "$ac_prog", so it can be a program name with args.
19324set dummy $ac_prog; ac_word=$2
19325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19326$as_echo_n "checking for $ac_word... " >&6; }
19327if ${ac_cv_path_CODESIGN+:} false; then :
19328  $as_echo_n "(cached) " >&6
19329else
19330  case $CODESIGN in
19331  [\\/]* | ?:[\\/]*)
19332  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19333  ;;
19334  *)
19335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19336for as_dir in $PATH
19337do
19338  IFS=$as_save_IFS
19339  test -z "$as_dir" && as_dir=.
19340    for ac_exec_ext in '' $ac_executable_extensions; do
19341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19342    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19344    break 2
19345  fi
19346done
19347  done
19348IFS=$as_save_IFS
19349
19350  ;;
19351esac
19352fi
19353CODESIGN=$ac_cv_path_CODESIGN
19354if test -n "$CODESIGN"; then
19355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19356$as_echo "$CODESIGN" >&6; }
19357else
19358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19359$as_echo "no" >&6; }
19360fi
19361
19362
19363  test -n "$CODESIGN" && break
19364done
19365
19366  else
19367    # The variable is set, but is it from the command line or the environment?
19368
19369    # Try to remove the string !CODESIGN! from our list.
19370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19372      # If it failed, the variable was not from the command line. Ignore it,
19373      # but warn the user (except for BASH, which is always set by the calling BASH).
19374      if test "xCODESIGN" != xBASH; then
19375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19376$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19377      fi
19378      # Try to locate tool using the code snippet
19379      for ac_prog in codesign
19380do
19381  # Extract the first word of "$ac_prog", so it can be a program name with args.
19382set dummy $ac_prog; ac_word=$2
19383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19384$as_echo_n "checking for $ac_word... " >&6; }
19385if ${ac_cv_path_CODESIGN+:} false; then :
19386  $as_echo_n "(cached) " >&6
19387else
19388  case $CODESIGN in
19389  [\\/]* | ?:[\\/]*)
19390  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19391  ;;
19392  *)
19393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19394for as_dir in $PATH
19395do
19396  IFS=$as_save_IFS
19397  test -z "$as_dir" && as_dir=.
19398    for ac_exec_ext in '' $ac_executable_extensions; do
19399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19400    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19402    break 2
19403  fi
19404done
19405  done
19406IFS=$as_save_IFS
19407
19408  ;;
19409esac
19410fi
19411CODESIGN=$ac_cv_path_CODESIGN
19412if test -n "$CODESIGN"; then
19413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19414$as_echo "$CODESIGN" >&6; }
19415else
19416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19417$as_echo "no" >&6; }
19418fi
19419
19420
19421  test -n "$CODESIGN" && break
19422done
19423
19424    else
19425      # If it succeeded, then it was overridden by the user. We will use it
19426      # for the tool.
19427
19428      # First remove it from the list of overridden variables, so we can test
19429      # for unknown variables in the end.
19430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19431
19432      # Check if the provided tool contains a complete path.
19433      tool_specified="$CODESIGN"
19434      tool_basename="${tool_specified##*/}"
19435      if test "x$tool_basename" = "x$tool_specified"; then
19436        # A command without a complete path is provided, search $PATH.
19437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19438$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19439        # Extract the first word of "$tool_basename", so it can be a program name with args.
19440set dummy $tool_basename; ac_word=$2
19441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19442$as_echo_n "checking for $ac_word... " >&6; }
19443if ${ac_cv_path_CODESIGN+:} false; then :
19444  $as_echo_n "(cached) " >&6
19445else
19446  case $CODESIGN in
19447  [\\/]* | ?:[\\/]*)
19448  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19449  ;;
19450  *)
19451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19452for as_dir in $PATH
19453do
19454  IFS=$as_save_IFS
19455  test -z "$as_dir" && as_dir=.
19456    for ac_exec_ext in '' $ac_executable_extensions; do
19457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19458    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19460    break 2
19461  fi
19462done
19463  done
19464IFS=$as_save_IFS
19465
19466  ;;
19467esac
19468fi
19469CODESIGN=$ac_cv_path_CODESIGN
19470if test -n "$CODESIGN"; then
19471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19472$as_echo "$CODESIGN" >&6; }
19473else
19474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19475$as_echo "no" >&6; }
19476fi
19477
19478
19479        if test "x$CODESIGN" = x; then
19480          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19481        fi
19482      else
19483        # Otherwise we believe it is a complete path. Use it as it is.
19484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19485$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19487$as_echo_n "checking for CODESIGN... " >&6; }
19488        if test ! -x "$tool_specified"; then
19489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19490$as_echo "not found" >&6; }
19491          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19492        fi
19493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19494$as_echo "$tool_specified" >&6; }
19495      fi
19496    fi
19497  fi
19498
19499
19500    if test "x$CODESIGN" != "x"; then
19501      # Verify that the openjdk_codesign certificate is present
19502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19503$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19504      rm -f codesign-testfile
19505      touch codesign-testfile
19506      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19507      rm -f codesign-testfile
19508      if test "x$CODESIGN" = x; then
19509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19510$as_echo "no" >&6; }
19511      else
19512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19513$as_echo "yes" >&6; }
19514      fi
19515    fi
19516  fi
19517
19518
19519  # Test if bash supports pipefail.
19520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19521$as_echo_n "checking if bash supports pipefail... " >&6; }
19522  if ${BASH} -c 'set -o pipefail'; then
19523    BASH_ARGS="$BASH_ARGS -o pipefail"
19524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19525$as_echo "yes" >&6; }
19526  else
19527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19528$as_echo "no" >&6; }
19529  fi
19530
19531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19532$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19533  if ${BASH} -e -c 'true'; then
19534    BASH_ARGS="$BASH_ARGS -e"
19535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19536$as_echo "yes" >&6; }
19537  else
19538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19539$as_echo "no" >&6; }
19540  fi
19541
19542
19543
19544
19545# Check if pkg-config is available.
19546
19547
19548if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19549	if test -n "$ac_tool_prefix"; then
19550  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19551set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19553$as_echo_n "checking for $ac_word... " >&6; }
19554if ${ac_cv_path_PKG_CONFIG+:} false; then :
19555  $as_echo_n "(cached) " >&6
19556else
19557  case $PKG_CONFIG in
19558  [\\/]* | ?:[\\/]*)
19559  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19560  ;;
19561  *)
19562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19563for as_dir in $PATH
19564do
19565  IFS=$as_save_IFS
19566  test -z "$as_dir" && as_dir=.
19567    for ac_exec_ext in '' $ac_executable_extensions; do
19568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19569    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19571    break 2
19572  fi
19573done
19574  done
19575IFS=$as_save_IFS
19576
19577  ;;
19578esac
19579fi
19580PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19581if test -n "$PKG_CONFIG"; then
19582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19583$as_echo "$PKG_CONFIG" >&6; }
19584else
19585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19586$as_echo "no" >&6; }
19587fi
19588
19589
19590fi
19591if test -z "$ac_cv_path_PKG_CONFIG"; then
19592  ac_pt_PKG_CONFIG=$PKG_CONFIG
19593  # Extract the first word of "pkg-config", so it can be a program name with args.
19594set dummy pkg-config; ac_word=$2
19595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19596$as_echo_n "checking for $ac_word... " >&6; }
19597if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19598  $as_echo_n "(cached) " >&6
19599else
19600  case $ac_pt_PKG_CONFIG in
19601  [\\/]* | ?:[\\/]*)
19602  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19603  ;;
19604  *)
19605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19606for as_dir in $PATH
19607do
19608  IFS=$as_save_IFS
19609  test -z "$as_dir" && as_dir=.
19610    for ac_exec_ext in '' $ac_executable_extensions; do
19611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19612    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19614    break 2
19615  fi
19616done
19617  done
19618IFS=$as_save_IFS
19619
19620  ;;
19621esac
19622fi
19623ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19624if test -n "$ac_pt_PKG_CONFIG"; then
19625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19626$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19627else
19628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19629$as_echo "no" >&6; }
19630fi
19631
19632  if test "x$ac_pt_PKG_CONFIG" = x; then
19633    PKG_CONFIG=""
19634  else
19635    case $cross_compiling:$ac_tool_warned in
19636yes:)
19637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19639ac_tool_warned=yes ;;
19640esac
19641    PKG_CONFIG=$ac_pt_PKG_CONFIG
19642  fi
19643else
19644  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19645fi
19646
19647fi
19648if test -n "$PKG_CONFIG"; then
19649	_pkg_min_version=0.9.0
19650	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19651$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19652	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19653		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19654$as_echo "yes" >&6; }
19655	else
19656		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19657$as_echo "no" >&6; }
19658		PKG_CONFIG=""
19659	fi
19660
19661fi
19662
19663# After basic tools have been setup, we can check build os specific details.
19664
19665  ###############################################################################
19666
19667  # Note that this is the build platform OS version!
19668
19669  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19670  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19671  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19672  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19673
19674
19675
19676
19677
19678# Setup builddeps, for automatic downloading of tools we need.
19679# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19680# boot-jdk setup, but we need to have basic tools setup first.
19681
19682
19683# Check whether --with-builddeps-conf was given.
19684if test "${with_builddeps_conf+set}" = set; then :
19685  withval=$with_builddeps_conf;
19686fi
19687
19688
19689
19690# Check whether --with-builddeps-server was given.
19691if test "${with_builddeps_server+set}" = set; then :
19692  withval=$with_builddeps_server;
19693fi
19694
19695
19696
19697# Check whether --with-builddeps-dir was given.
19698if test "${with_builddeps_dir+set}" = set; then :
19699  withval=$with_builddeps_dir;
19700else
19701  with_builddeps_dir=/localhome/builddeps
19702fi
19703
19704
19705
19706# Check whether --with-builddeps-group was given.
19707if test "${with_builddeps_group+set}" = set; then :
19708  withval=$with_builddeps_group;
19709fi
19710
19711
19712
19713
19714  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19715    if test "x$with_builddeps_conf" != x; then
19716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19717$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19718      builddepsfile=$with_builddeps_conf
19719      if test -s $builddepsfile; then
19720        . $builddepsfile
19721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19722$as_echo "loaded!" >&6; }
19723      else
19724        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19725      fi
19726    else
19727      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19728$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19729      builddepsfile=`mktemp`
19730      touch $builddepsfile
19731      # Put all found confs into a single file.
19732      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19733      # Source the file to acquire the variables
19734      if test -s $builddepsfile; then
19735        . $builddepsfile
19736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19737$as_echo "found at least one!" >&6; }
19738      else
19739        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19740      fi
19741    fi
19742    # Create build and target names that use _ instead of "-" and ".".
19743    # This is necessary to use them in variable names.
19744    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19745    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19746    # Extract rewrite information for build and target
19747    eval rewritten_build=\${REWRITE_${build_var}}
19748    if test "x$rewritten_build" = x; then
19749      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19750      echo Build stays the same $rewritten_build
19751    else
19752      echo Rewriting build for builddeps into $rewritten_build
19753    fi
19754    eval rewritten_target=\${REWRITE_${target_var}}
19755    if test "x$rewritten_target" = x; then
19756      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19757      echo Target stays the same $rewritten_target
19758    else
19759      echo Rewriting target for builddeps into $rewritten_target
19760    fi
19761    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19762    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19763  fi
19764  for ac_prog in 7z unzip
19765do
19766  # Extract the first word of "$ac_prog", so it can be a program name with args.
19767set dummy $ac_prog; ac_word=$2
19768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19769$as_echo_n "checking for $ac_word... " >&6; }
19770if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19771  $as_echo_n "(cached) " >&6
19772else
19773  if test -n "$BDEPS_UNZIP"; then
19774  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19775else
19776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19777for as_dir in $PATH
19778do
19779  IFS=$as_save_IFS
19780  test -z "$as_dir" && as_dir=.
19781    for ac_exec_ext in '' $ac_executable_extensions; do
19782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19783    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19785    break 2
19786  fi
19787done
19788  done
19789IFS=$as_save_IFS
19790
19791fi
19792fi
19793BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19794if test -n "$BDEPS_UNZIP"; then
19795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19796$as_echo "$BDEPS_UNZIP" >&6; }
19797else
19798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19799$as_echo "no" >&6; }
19800fi
19801
19802
19803  test -n "$BDEPS_UNZIP" && break
19804done
19805
19806  if test "x$BDEPS_UNZIP" = x7z; then
19807    BDEPS_UNZIP="7z x"
19808  fi
19809
19810  for ac_prog in wget lftp ftp
19811do
19812  # Extract the first word of "$ac_prog", so it can be a program name with args.
19813set dummy $ac_prog; ac_word=$2
19814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19815$as_echo_n "checking for $ac_word... " >&6; }
19816if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19817  $as_echo_n "(cached) " >&6
19818else
19819  if test -n "$BDEPS_FTP"; then
19820  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19821else
19822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19823for as_dir in $PATH
19824do
19825  IFS=$as_save_IFS
19826  test -z "$as_dir" && as_dir=.
19827    for ac_exec_ext in '' $ac_executable_extensions; do
19828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19829    ac_cv_prog_BDEPS_FTP="$ac_prog"
19830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19831    break 2
19832  fi
19833done
19834  done
19835IFS=$as_save_IFS
19836
19837fi
19838fi
19839BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19840if test -n "$BDEPS_FTP"; then
19841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19842$as_echo "$BDEPS_FTP" >&6; }
19843else
19844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19845$as_echo "no" >&6; }
19846fi
19847
19848
19849  test -n "$BDEPS_FTP" && break
19850done
19851
19852
19853
19854###############################################################################
19855#
19856# Determine OpenJDK variants, options and version numbers.
19857#
19858###############################################################################
19859
19860# We need build & target for this.
19861
19862
19863  ###############################################################################
19864  #
19865  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19866  # We always build headless support.
19867  #
19868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19869$as_echo_n "checking headful support... " >&6; }
19870  # Check whether --enable-headful was given.
19871if test "${enable_headful+set}" = set; then :
19872  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19873else
19874  SUPPORT_HEADFUL=yes
19875fi
19876
19877
19878  SUPPORT_HEADLESS=yes
19879  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19880
19881  if test "x$SUPPORT_HEADFUL" = xyes; then
19882    # We are building both headful and headless.
19883    headful_msg="include support for both headful and headless"
19884  fi
19885
19886  if test "x$SUPPORT_HEADFUL" = xno; then
19887    # Thus we are building headless only.
19888    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19889    headful_msg="headless only"
19890  fi
19891
19892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19893$as_echo "$headful_msg" >&6; }
19894
19895
19896
19897
19898
19899  # Control wether Hotspot runs Queens test after build.
19900  # Check whether --enable-hotspot-test-in-build was given.
19901if test "${enable_hotspot_test_in_build+set}" = set; then :
19902  enableval=$enable_hotspot_test_in_build;
19903else
19904  enable_hotspot_test_in_build=no
19905fi
19906
19907  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19908    TEST_IN_BUILD=true
19909  else
19910    TEST_IN_BUILD=false
19911  fi
19912
19913
19914  ###############################################################################
19915  #
19916  # Choose cacerts source file
19917  #
19918
19919# Check whether --with-cacerts-file was given.
19920if test "${with_cacerts_file+set}" = set; then :
19921  withval=$with_cacerts_file;
19922fi
19923
19924  if test "x$with_cacerts_file" != x; then
19925    CACERTS_FILE=$with_cacerts_file
19926  fi
19927
19928
19929  ###############################################################################
19930  #
19931  # Enable or disable unlimited crypto
19932  #
19933  # Check whether --enable-unlimited-crypto was given.
19934if test "${enable_unlimited_crypto+set}" = set; then :
19935  enableval=$enable_unlimited_crypto;
19936else
19937  enable_unlimited_crypto=no
19938fi
19939
19940  if test "x$enable_unlimited_crypto" = "xyes"; then
19941    UNLIMITED_CRYPTO=true
19942  else
19943    UNLIMITED_CRYPTO=false
19944  fi
19945
19946
19947  ###############################################################################
19948  #
19949  # Enable or disable the elliptic curve crypto implementation
19950  #
19951
19952
19953  ###############################################################################
19954  #
19955  # --enable-rmiconnector-iiop
19956  #
19957  # Check whether --enable-rmiconnector-iiop was given.
19958if test "${enable_rmiconnector_iiop+set}" = set; then :
19959  enableval=$enable_rmiconnector_iiop;
19960fi
19961
19962  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19963    RMICONNECTOR_IIOP=true
19964  else
19965    RMICONNECTOR_IIOP=false
19966  fi
19967
19968
19969  ###############################################################################
19970  #
19971  # Compress jars
19972  #
19973  COMPRESS_JARS=false
19974
19975
19976
19977
19978  # Source the version numbers
19979  . $AUTOCONF_DIR/version-numbers
19980
19981  # Get the settings from parameters
19982
19983# Check whether --with-milestone was given.
19984if test "${with_milestone+set}" = set; then :
19985  withval=$with_milestone;
19986fi
19987
19988  if test "x$with_milestone" = xyes; then
19989    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19990  elif test "x$with_milestone" != x; then
19991    MILESTONE="$with_milestone"
19992  fi
19993  if test "x$MILESTONE" = x; then
19994    MILESTONE=internal
19995  fi
19996
19997
19998# Check whether --with-update-version was given.
19999if test "${with_update_version+set}" = set; then :
20000  withval=$with_update_version;
20001fi
20002
20003  if test "x$with_update_version" = xyes; then
20004    as_fn_error $? "Update version must have a value" "$LINENO" 5
20005  elif test "x$with_update_version" != x; then
20006    JDK_UPDATE_VERSION="$with_update_version"
20007    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20008    # to a bug in expr (which reduces it to just X). To work around this, we
20009    # always add a 0 to one digit update versions.
20010    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20011      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20012    fi
20013  fi
20014
20015
20016# Check whether --with-user-release-suffix was given.
20017if test "${with_user_release_suffix+set}" = set; then :
20018  withval=$with_user_release_suffix;
20019fi
20020
20021  if test "x$with_user_release_suffix" = xyes; then
20022    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20023  elif test "x$with_user_release_suffix" != x; then
20024    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20025  fi
20026
20027
20028# Check whether --with-build-number was given.
20029if test "${with_build_number+set}" = set; then :
20030  withval=$with_build_number;
20031fi
20032
20033  if test "x$with_build_number" = xyes; then
20034    as_fn_error $? "Build number must have a value" "$LINENO" 5
20035  elif test "x$with_build_number" != x; then
20036    JDK_BUILD_NUMBER="$with_build_number"
20037  fi
20038  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20039  if test "x$JDK_BUILD_NUMBER" = x; then
20040    JDK_BUILD_NUMBER=b00
20041    if test "x$USER_RELEASE_SUFFIX" = x; then
20042      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20043      # Avoid [:alnum:] since it depends on the locale.
20044      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20045      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20046    fi
20047  fi
20048
20049  # Now set the JDK version, milestone, build number etc.
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066# Check whether --with-copyright-year was given.
20067if test "${with_copyright_year+set}" = set; then :
20068  withval=$with_copyright_year;
20069fi
20070
20071  if test "x$with_copyright_year" = xyes; then
20072    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20073  elif test "x$with_copyright_year" != x; then
20074    COPYRIGHT_YEAR="$with_copyright_year"
20075  else
20076    COPYRIGHT_YEAR=`date +'%Y'`
20077  fi
20078
20079
20080  if test "x$JDK_UPDATE_VERSION" != x; then
20081    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20082  else
20083    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20084  fi
20085
20086
20087  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20088
20089
20090
20091###############################################################################
20092#
20093# Setup BootJDK, used to bootstrap the build.
20094#
20095###############################################################################
20096
20097
20098  BOOT_JDK_FOUND=no
20099
20100# Check whether --with-boot-jdk was given.
20101if test "${with_boot_jdk+set}" = set; then :
20102  withval=$with_boot_jdk;
20103fi
20104
20105
20106  # We look for the Boot JDK through various means, going from more certain to
20107  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20108  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20109  # must check if this is indeed valid; otherwise we'll continue looking.
20110
20111  # Test: Is bootjdk explicitely set by command line arguments?
20112
20113  if test "x$BOOT_JDK_FOUND" = xno; then
20114    # Now execute the test
20115
20116  if test "x$with_boot_jdk" != x; then
20117    BOOT_JDK=$with_boot_jdk
20118    BOOT_JDK_FOUND=maybe
20119    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20120$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20121  fi
20122
20123
20124    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20125    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20126      # Do we have a bin/java?
20127      if test ! -x "$BOOT_JDK/bin/java"; then
20128        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20130        BOOT_JDK_FOUND=no
20131      else
20132        # Do we have a bin/javac?
20133        if test ! -x "$BOOT_JDK/bin/javac"; then
20134          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20136          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20137$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20138          BOOT_JDK_FOUND=no
20139        else
20140          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20141          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20142
20143          # Extra M4 quote needed to protect [] in grep expression.
20144          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20145          if test "x$FOUND_CORRECT_VERSION" = x; then
20146            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20148            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20149$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20150            BOOT_JDK_FOUND=no
20151          else
20152            # We're done! :-)
20153            BOOT_JDK_FOUND=yes
20154
20155  # Only process if variable expands to non-empty
20156
20157  if test "x$BOOT_JDK" != x; then
20158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20159
20160  # Input might be given as Windows format, start by converting to
20161  # unix format.
20162  path="$BOOT_JDK"
20163  new_path=`$CYGPATH -u "$path"`
20164
20165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20168  # "foo.exe" is OK but "foo" is an error.
20169  #
20170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20171  # It is also a way to make sure we got the proper file name for the real test later on.
20172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20173  if test "x$test_shortpath" = x; then
20174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20176    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20177  fi
20178
20179  # Call helper function which possibly converts this using DOS-style short mode.
20180  # If so, the updated path is stored in $new_path.
20181
20182  input_path="$new_path"
20183  # Check if we need to convert this using DOS-style short mode. If the path
20184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20185  # take no chances and rewrite it.
20186  # Note: m4 eats our [], so we need to use [ and ] instead.
20187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20188  if test "x$has_forbidden_chars" != x; then
20189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20193      # Going to short mode and back again did indeed matter. Since short mode is
20194      # case insensitive, let's make it lowercase to improve readability.
20195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20196      # Now convert it back to Unix-stile (cygpath)
20197      input_path=`$CYGPATH -u "$shortmode_path"`
20198      new_path="$input_path"
20199    fi
20200  fi
20201
20202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20203  if test "x$test_cygdrive_prefix" = x; then
20204    # As a simple fix, exclude /usr/bin since it's not a real path.
20205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20207      # a path prefixed by /cygdrive for fixpath to work.
20208      new_path="$CYGWIN_ROOT_PATH$input_path"
20209    fi
20210  fi
20211
20212
20213  if test "x$path" != "x$new_path"; then
20214    BOOT_JDK="$new_path"
20215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20216$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20217  fi
20218
20219    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20220
20221  path="$BOOT_JDK"
20222  has_colon=`$ECHO $path | $GREP ^.:`
20223  new_path="$path"
20224  if test "x$has_colon" = x; then
20225    # Not in mixed or Windows style, start by that.
20226    new_path=`cmd //c echo $path`
20227  fi
20228
20229
20230  input_path="$new_path"
20231  # Check if we need to convert this using DOS-style short mode. If the path
20232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20233  # take no chances and rewrite it.
20234  # Note: m4 eats our [], so we need to use [ and ] instead.
20235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20236  if test "x$has_forbidden_chars" != x; then
20237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20239  fi
20240
20241
20242  windows_path="$new_path"
20243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20244    unix_path=`$CYGPATH -u "$windows_path"`
20245    new_path="$unix_path"
20246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20248    new_path="$unix_path"
20249  fi
20250
20251  if test "x$path" != "x$new_path"; then
20252    BOOT_JDK="$new_path"
20253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20255  fi
20256
20257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20259
20260    else
20261      # We're on a unix platform. Hooray! :)
20262      path="$BOOT_JDK"
20263      has_space=`$ECHO "$path" | $GREP " "`
20264      if test "x$has_space" != x; then
20265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20266$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20267        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20268      fi
20269
20270      # Use eval to expand a potential ~
20271      eval path="$path"
20272      if test ! -f "$path" && test ! -d "$path"; then
20273        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20274      fi
20275
20276      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20277    fi
20278  fi
20279
20280            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20281$as_echo_n "checking for Boot JDK... " >&6; }
20282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20283$as_echo "$BOOT_JDK" >&6; }
20284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20285$as_echo_n "checking Boot JDK version... " >&6; }
20286            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20288$as_echo "$BOOT_JDK_VERSION" >&6; }
20289          fi # end check jdk version
20290        fi # end check javac
20291      fi # end check java
20292    fi # end check boot jdk found
20293  fi
20294
20295  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20296    # Having specified an argument which is incorrect will produce an instant failure;
20297    # we should not go on looking
20298    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20299  fi
20300
20301  # Test: Is bootjdk available from builddeps?
20302
20303  if test "x$BOOT_JDK_FOUND" = xno; then
20304    # Now execute the test
20305
20306
20307
20308  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20309    # Source the builddeps file again, to make sure it uses the latest variables!
20310    . $builddepsfile
20311    # Look for a target and build machine specific resource!
20312    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20313    if test "x$resource" = x; then
20314      # Ok, lets instead look for a target specific resource
20315      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20316    fi
20317    if test "x$resource" = x; then
20318      # Ok, lets instead look for a build specific resource
20319      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20320    fi
20321    if test "x$resource" = x; then
20322      # Ok, lets instead look for a generic resource
20323      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20324      resource=${builddep_bootjdk}
20325    fi
20326    if test "x$resource" != x; then
20327      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20328$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20329      # If the resource in the builddeps.conf file is an existing directory,
20330      # for example /java/linux/cups
20331      if test -d ${resource}; then
20332        depdir=${resource}
20333      else
20334
20335  # bootjdk is for example mymodule
20336  # $resource is for example libs/general/libmymod_1_2_3.zip
20337  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20338  # $with_builddeps_dir is for example /localhome/builddeps
20339  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20340  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20341  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20342  filename=`basename $resource`
20343  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20344  filebase=${filename%%.*}
20345  extension=${filename#*.}
20346  installdir=$with_builddeps_dir/$filebase
20347  if test ! -f $installdir/$filename.unpacked; then
20348    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20349$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20350    if test ! -d $installdir; then
20351      mkdir -p $installdir
20352    fi
20353    if test ! -d $installdir; then
20354      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20355    fi
20356    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20357    touch $tmpfile
20358    if test ! -f $tmpfile; then
20359      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20360    fi
20361
20362  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20363  # $tmpfile is the local file name for the downloaded file.
20364  VALID_TOOL=no
20365  if test "x$BDEPS_FTP" = xwget; then
20366    VALID_TOOL=yes
20367    wget -O $tmpfile $with_builddeps_server/$resource
20368  fi
20369  if test "x$BDEPS_FTP" = xlftp; then
20370    VALID_TOOL=yes
20371    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20372  fi
20373  if test "x$BDEPS_FTP" = xftp; then
20374    VALID_TOOL=yes
20375    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20376    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20377    FTPUSERPWD=${FTPSERVER%%@*}
20378    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20379      FTPUSER=${userpwd%%:*}
20380      FTPPWD=${userpwd#*@}
20381      FTPSERVER=${FTPSERVER#*@}
20382    else
20383      FTPUSER=ftp
20384      FTPPWD=ftp
20385    fi
20386    # the "pass" command does not work on some
20387    # ftp clients (read ftp.exe) but if it works,
20388    # passive mode is better!
20389    ( \
20390        echo "user $FTPUSER $FTPPWD"        ; \
20391        echo "pass"                         ; \
20392        echo "bin"                          ; \
20393        echo "get $FTPPATH $tmpfile"              ; \
20394    ) | ftp -in $FTPSERVER
20395  fi
20396  if test "x$VALID_TOOL" != xyes; then
20397    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20398  fi
20399
20400    mv $tmpfile $installdir/$filename
20401    if test ! -s $installdir/$filename; then
20402      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20403    fi
20404    case "$extension" in
20405      zip)  echo "Unzipping $installdir/$filename..."
20406        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20407        ;;
20408      tar.gz) echo "Untaring $installdir/$filename..."
20409        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20410        ;;
20411      tgz) echo "Untaring $installdir/$filename..."
20412        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20413        ;;
20414      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20415        ;;
20416    esac
20417  fi
20418  if test -f $installdir/$filename.unpacked; then
20419    depdir=$installdir
20420  fi
20421
20422      fi
20423      # Source the builddeps file again, because in the previous command, the depdir
20424      # was updated to point at the current build dependency install directory.
20425      . $builddepsfile
20426      # Now extract variables from the builddeps.conf files.
20427      theroot=${builddep_bootjdk_ROOT}
20428      thecflags=${builddep_bootjdk_CFLAGS}
20429      thelibs=${builddep_bootjdk_LIBS}
20430      if test "x$depdir" = x; then
20431        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20432      fi
20433      BOOT_JDK=$depdir
20434      if test "x$theroot" != x; then
20435        BOOT_JDK="$theroot"
20436      fi
20437      if test "x$thecflags" != x; then
20438        BOOT_JDK_CFLAGS="$thecflags"
20439      fi
20440      if test "x$thelibs" != x; then
20441        BOOT_JDK_LIBS="$thelibs"
20442      fi
20443      BOOT_JDK_FOUND=maybe
20444      else BOOT_JDK_FOUND=no
20445
20446    fi
20447    else BOOT_JDK_FOUND=no
20448
20449  fi
20450
20451
20452
20453    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20454    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20455      # Do we have a bin/java?
20456      if test ! -x "$BOOT_JDK/bin/java"; then
20457        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20459        BOOT_JDK_FOUND=no
20460      else
20461        # Do we have a bin/javac?
20462        if test ! -x "$BOOT_JDK/bin/javac"; then
20463          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20465          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20466$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20467          BOOT_JDK_FOUND=no
20468        else
20469          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20470          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20471
20472          # Extra M4 quote needed to protect [] in grep expression.
20473          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20474          if test "x$FOUND_CORRECT_VERSION" = x; then
20475            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20477            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20478$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20479            BOOT_JDK_FOUND=no
20480          else
20481            # We're done! :-)
20482            BOOT_JDK_FOUND=yes
20483
20484  # Only process if variable expands to non-empty
20485
20486  if test "x$BOOT_JDK" != x; then
20487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20488
20489  # Input might be given as Windows format, start by converting to
20490  # unix format.
20491  path="$BOOT_JDK"
20492  new_path=`$CYGPATH -u "$path"`
20493
20494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20497  # "foo.exe" is OK but "foo" is an error.
20498  #
20499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20500  # It is also a way to make sure we got the proper file name for the real test later on.
20501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20502  if test "x$test_shortpath" = x; then
20503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20504$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20505    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20506  fi
20507
20508  # Call helper function which possibly converts this using DOS-style short mode.
20509  # If so, the updated path is stored in $new_path.
20510
20511  input_path="$new_path"
20512  # Check if we need to convert this using DOS-style short mode. If the path
20513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20514  # take no chances and rewrite it.
20515  # Note: m4 eats our [], so we need to use [ and ] instead.
20516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20517  if test "x$has_forbidden_chars" != x; then
20518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20522      # Going to short mode and back again did indeed matter. Since short mode is
20523      # case insensitive, let's make it lowercase to improve readability.
20524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20525      # Now convert it back to Unix-stile (cygpath)
20526      input_path=`$CYGPATH -u "$shortmode_path"`
20527      new_path="$input_path"
20528    fi
20529  fi
20530
20531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20532  if test "x$test_cygdrive_prefix" = x; then
20533    # As a simple fix, exclude /usr/bin since it's not a real path.
20534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20536      # a path prefixed by /cygdrive for fixpath to work.
20537      new_path="$CYGWIN_ROOT_PATH$input_path"
20538    fi
20539  fi
20540
20541
20542  if test "x$path" != "x$new_path"; then
20543    BOOT_JDK="$new_path"
20544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20545$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20546  fi
20547
20548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20549
20550  path="$BOOT_JDK"
20551  has_colon=`$ECHO $path | $GREP ^.:`
20552  new_path="$path"
20553  if test "x$has_colon" = x; then
20554    # Not in mixed or Windows style, start by that.
20555    new_path=`cmd //c echo $path`
20556  fi
20557
20558
20559  input_path="$new_path"
20560  # Check if we need to convert this using DOS-style short mode. If the path
20561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20562  # take no chances and rewrite it.
20563  # Note: m4 eats our [], so we need to use [ and ] instead.
20564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20565  if test "x$has_forbidden_chars" != x; then
20566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20568  fi
20569
20570
20571  windows_path="$new_path"
20572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20573    unix_path=`$CYGPATH -u "$windows_path"`
20574    new_path="$unix_path"
20575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20577    new_path="$unix_path"
20578  fi
20579
20580  if test "x$path" != "x$new_path"; then
20581    BOOT_JDK="$new_path"
20582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20584  fi
20585
20586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20588
20589    else
20590      # We're on a unix platform. Hooray! :)
20591      path="$BOOT_JDK"
20592      has_space=`$ECHO "$path" | $GREP " "`
20593      if test "x$has_space" != x; then
20594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20596        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20597      fi
20598
20599      # Use eval to expand a potential ~
20600      eval path="$path"
20601      if test ! -f "$path" && test ! -d "$path"; then
20602        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20603      fi
20604
20605      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20606    fi
20607  fi
20608
20609            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20610$as_echo_n "checking for Boot JDK... " >&6; }
20611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20612$as_echo "$BOOT_JDK" >&6; }
20613            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20614$as_echo_n "checking Boot JDK version... " >&6; }
20615            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20617$as_echo "$BOOT_JDK_VERSION" >&6; }
20618          fi # end check jdk version
20619        fi # end check javac
20620      fi # end check java
20621    fi # end check boot jdk found
20622  fi
20623
20624
20625  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20626
20627  if test "x$BOOT_JDK_FOUND" = xno; then
20628    # Now execute the test
20629
20630  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20631    # First check at user selected default
20632
20633  if test "x$BOOT_JDK_FOUND" = xno; then
20634    # Now execute the test
20635
20636  if test -x /usr/libexec/java_home; then
20637    BOOT_JDK=`/usr/libexec/java_home `
20638    BOOT_JDK_FOUND=maybe
20639    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20640$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20641  fi
20642
20643
20644    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20645    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20646      # Do we have a bin/java?
20647      if test ! -x "$BOOT_JDK/bin/java"; then
20648        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20650        BOOT_JDK_FOUND=no
20651      else
20652        # Do we have a bin/javac?
20653        if test ! -x "$BOOT_JDK/bin/javac"; then
20654          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20656          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20657$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20658          BOOT_JDK_FOUND=no
20659        else
20660          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20661          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20662
20663          # Extra M4 quote needed to protect [] in grep expression.
20664          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20665          if test "x$FOUND_CORRECT_VERSION" = x; then
20666            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20668            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20669$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20670            BOOT_JDK_FOUND=no
20671          else
20672            # We're done! :-)
20673            BOOT_JDK_FOUND=yes
20674
20675  # Only process if variable expands to non-empty
20676
20677  if test "x$BOOT_JDK" != x; then
20678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20679
20680  # Input might be given as Windows format, start by converting to
20681  # unix format.
20682  path="$BOOT_JDK"
20683  new_path=`$CYGPATH -u "$path"`
20684
20685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20688  # "foo.exe" is OK but "foo" is an error.
20689  #
20690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20691  # It is also a way to make sure we got the proper file name for the real test later on.
20692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20693  if test "x$test_shortpath" = x; then
20694    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20696    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20697  fi
20698
20699  # Call helper function which possibly converts this using DOS-style short mode.
20700  # If so, the updated path is stored in $new_path.
20701
20702  input_path="$new_path"
20703  # Check if we need to convert this using DOS-style short mode. If the path
20704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20705  # take no chances and rewrite it.
20706  # Note: m4 eats our [], so we need to use [ and ] instead.
20707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20708  if test "x$has_forbidden_chars" != x; then
20709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20713      # Going to short mode and back again did indeed matter. Since short mode is
20714      # case insensitive, let's make it lowercase to improve readability.
20715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20716      # Now convert it back to Unix-stile (cygpath)
20717      input_path=`$CYGPATH -u "$shortmode_path"`
20718      new_path="$input_path"
20719    fi
20720  fi
20721
20722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20723  if test "x$test_cygdrive_prefix" = x; then
20724    # As a simple fix, exclude /usr/bin since it's not a real path.
20725    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20727      # a path prefixed by /cygdrive for fixpath to work.
20728      new_path="$CYGWIN_ROOT_PATH$input_path"
20729    fi
20730  fi
20731
20732
20733  if test "x$path" != "x$new_path"; then
20734    BOOT_JDK="$new_path"
20735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20737  fi
20738
20739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20740
20741  path="$BOOT_JDK"
20742  has_colon=`$ECHO $path | $GREP ^.:`
20743  new_path="$path"
20744  if test "x$has_colon" = x; then
20745    # Not in mixed or Windows style, start by that.
20746    new_path=`cmd //c echo $path`
20747  fi
20748
20749
20750  input_path="$new_path"
20751  # Check if we need to convert this using DOS-style short mode. If the path
20752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20753  # take no chances and rewrite it.
20754  # Note: m4 eats our [], so we need to use [ and ] instead.
20755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20756  if test "x$has_forbidden_chars" != x; then
20757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20758    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20759  fi
20760
20761
20762  windows_path="$new_path"
20763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20764    unix_path=`$CYGPATH -u "$windows_path"`
20765    new_path="$unix_path"
20766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20768    new_path="$unix_path"
20769  fi
20770
20771  if test "x$path" != "x$new_path"; then
20772    BOOT_JDK="$new_path"
20773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20775  fi
20776
20777  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20778  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20779
20780    else
20781      # We're on a unix platform. Hooray! :)
20782      path="$BOOT_JDK"
20783      has_space=`$ECHO "$path" | $GREP " "`
20784      if test "x$has_space" != x; then
20785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20787        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20788      fi
20789
20790      # Use eval to expand a potential ~
20791      eval path="$path"
20792      if test ! -f "$path" && test ! -d "$path"; then
20793        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20794      fi
20795
20796      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20797    fi
20798  fi
20799
20800            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20801$as_echo_n "checking for Boot JDK... " >&6; }
20802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20803$as_echo "$BOOT_JDK" >&6; }
20804            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20805$as_echo_n "checking Boot JDK version... " >&6; }
20806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20808$as_echo "$BOOT_JDK_VERSION" >&6; }
20809          fi # end check jdk version
20810        fi # end check javac
20811      fi # end check java
20812    fi # end check boot jdk found
20813  fi
20814
20815    # If that did not work out (e.g. too old), try explicit versions instead
20816
20817  if test "x$BOOT_JDK_FOUND" = xno; then
20818    # Now execute the test
20819
20820  if test -x /usr/libexec/java_home; then
20821    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20822    BOOT_JDK_FOUND=maybe
20823    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20824$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20825  fi
20826
20827
20828    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20829    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20830      # Do we have a bin/java?
20831      if test ! -x "$BOOT_JDK/bin/java"; then
20832        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20834        BOOT_JDK_FOUND=no
20835      else
20836        # Do we have a bin/javac?
20837        if test ! -x "$BOOT_JDK/bin/javac"; then
20838          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20840          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20841$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20842          BOOT_JDK_FOUND=no
20843        else
20844          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20845          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20846
20847          # Extra M4 quote needed to protect [] in grep expression.
20848          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20849          if test "x$FOUND_CORRECT_VERSION" = x; then
20850            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20852            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20853$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20854            BOOT_JDK_FOUND=no
20855          else
20856            # We're done! :-)
20857            BOOT_JDK_FOUND=yes
20858
20859  # Only process if variable expands to non-empty
20860
20861  if test "x$BOOT_JDK" != x; then
20862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20863
20864  # Input might be given as Windows format, start by converting to
20865  # unix format.
20866  path="$BOOT_JDK"
20867  new_path=`$CYGPATH -u "$path"`
20868
20869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20872  # "foo.exe" is OK but "foo" is an error.
20873  #
20874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20875  # It is also a way to make sure we got the proper file name for the real test later on.
20876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20877  if test "x$test_shortpath" = x; then
20878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20880    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20881  fi
20882
20883  # Call helper function which possibly converts this using DOS-style short mode.
20884  # If so, the updated path is stored in $new_path.
20885
20886  input_path="$new_path"
20887  # Check if we need to convert this using DOS-style short mode. If the path
20888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20889  # take no chances and rewrite it.
20890  # Note: m4 eats our [], so we need to use [ and ] instead.
20891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20892  if test "x$has_forbidden_chars" != x; then
20893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20897      # Going to short mode and back again did indeed matter. Since short mode is
20898      # case insensitive, let's make it lowercase to improve readability.
20899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20900      # Now convert it back to Unix-stile (cygpath)
20901      input_path=`$CYGPATH -u "$shortmode_path"`
20902      new_path="$input_path"
20903    fi
20904  fi
20905
20906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20907  if test "x$test_cygdrive_prefix" = x; then
20908    # As a simple fix, exclude /usr/bin since it's not a real path.
20909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20911      # a path prefixed by /cygdrive for fixpath to work.
20912      new_path="$CYGWIN_ROOT_PATH$input_path"
20913    fi
20914  fi
20915
20916
20917  if test "x$path" != "x$new_path"; then
20918    BOOT_JDK="$new_path"
20919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20921  fi
20922
20923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20924
20925  path="$BOOT_JDK"
20926  has_colon=`$ECHO $path | $GREP ^.:`
20927  new_path="$path"
20928  if test "x$has_colon" = x; then
20929    # Not in mixed or Windows style, start by that.
20930    new_path=`cmd //c echo $path`
20931  fi
20932
20933
20934  input_path="$new_path"
20935  # Check if we need to convert this using DOS-style short mode. If the path
20936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20937  # take no chances and rewrite it.
20938  # Note: m4 eats our [], so we need to use [ and ] instead.
20939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20940  if test "x$has_forbidden_chars" != x; then
20941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20943  fi
20944
20945
20946  windows_path="$new_path"
20947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20948    unix_path=`$CYGPATH -u "$windows_path"`
20949    new_path="$unix_path"
20950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20952    new_path="$unix_path"
20953  fi
20954
20955  if test "x$path" != "x$new_path"; then
20956    BOOT_JDK="$new_path"
20957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20959  fi
20960
20961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20963
20964    else
20965      # We're on a unix platform. Hooray! :)
20966      path="$BOOT_JDK"
20967      has_space=`$ECHO "$path" | $GREP " "`
20968      if test "x$has_space" != x; then
20969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20970$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20971        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20972      fi
20973
20974      # Use eval to expand a potential ~
20975      eval path="$path"
20976      if test ! -f "$path" && test ! -d "$path"; then
20977        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20978      fi
20979
20980      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20981    fi
20982  fi
20983
20984            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20985$as_echo_n "checking for Boot JDK... " >&6; }
20986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20987$as_echo "$BOOT_JDK" >&6; }
20988            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20989$as_echo_n "checking Boot JDK version... " >&6; }
20990            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20992$as_echo "$BOOT_JDK_VERSION" >&6; }
20993          fi # end check jdk version
20994        fi # end check javac
20995      fi # end check java
20996    fi # end check boot jdk found
20997  fi
20998
20999
21000  if test "x$BOOT_JDK_FOUND" = xno; then
21001    # Now execute the test
21002
21003  if test -x /usr/libexec/java_home; then
21004    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21005    BOOT_JDK_FOUND=maybe
21006    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21007$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21008  fi
21009
21010
21011    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21012    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21013      # Do we have a bin/java?
21014      if test ! -x "$BOOT_JDK/bin/java"; then
21015        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21017        BOOT_JDK_FOUND=no
21018      else
21019        # Do we have a bin/javac?
21020        if test ! -x "$BOOT_JDK/bin/javac"; then
21021          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21023          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21024$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21025          BOOT_JDK_FOUND=no
21026        else
21027          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21028          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21029
21030          # Extra M4 quote needed to protect [] in grep expression.
21031          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21032          if test "x$FOUND_CORRECT_VERSION" = x; then
21033            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21035            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21036$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21037            BOOT_JDK_FOUND=no
21038          else
21039            # We're done! :-)
21040            BOOT_JDK_FOUND=yes
21041
21042  # Only process if variable expands to non-empty
21043
21044  if test "x$BOOT_JDK" != x; then
21045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21046
21047  # Input might be given as Windows format, start by converting to
21048  # unix format.
21049  path="$BOOT_JDK"
21050  new_path=`$CYGPATH -u "$path"`
21051
21052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21055  # "foo.exe" is OK but "foo" is an error.
21056  #
21057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21058  # It is also a way to make sure we got the proper file name for the real test later on.
21059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21060  if test "x$test_shortpath" = x; then
21061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21064  fi
21065
21066  # Call helper function which possibly converts this using DOS-style short mode.
21067  # If so, the updated path is stored in $new_path.
21068
21069  input_path="$new_path"
21070  # Check if we need to convert this using DOS-style short mode. If the path
21071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21072  # take no chances and rewrite it.
21073  # Note: m4 eats our [], so we need to use [ and ] instead.
21074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21075  if test "x$has_forbidden_chars" != x; then
21076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21080      # Going to short mode and back again did indeed matter. Since short mode is
21081      # case insensitive, let's make it lowercase to improve readability.
21082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21083      # Now convert it back to Unix-stile (cygpath)
21084      input_path=`$CYGPATH -u "$shortmode_path"`
21085      new_path="$input_path"
21086    fi
21087  fi
21088
21089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21090  if test "x$test_cygdrive_prefix" = x; then
21091    # As a simple fix, exclude /usr/bin since it's not a real path.
21092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21094      # a path prefixed by /cygdrive for fixpath to work.
21095      new_path="$CYGWIN_ROOT_PATH$input_path"
21096    fi
21097  fi
21098
21099
21100  if test "x$path" != "x$new_path"; then
21101    BOOT_JDK="$new_path"
21102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21104  fi
21105
21106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21107
21108  path="$BOOT_JDK"
21109  has_colon=`$ECHO $path | $GREP ^.:`
21110  new_path="$path"
21111  if test "x$has_colon" = x; then
21112    # Not in mixed or Windows style, start by that.
21113    new_path=`cmd //c echo $path`
21114  fi
21115
21116
21117  input_path="$new_path"
21118  # Check if we need to convert this using DOS-style short mode. If the path
21119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21120  # take no chances and rewrite it.
21121  # Note: m4 eats our [], so we need to use [ and ] instead.
21122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21123  if test "x$has_forbidden_chars" != x; then
21124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21126  fi
21127
21128
21129  windows_path="$new_path"
21130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21131    unix_path=`$CYGPATH -u "$windows_path"`
21132    new_path="$unix_path"
21133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21135    new_path="$unix_path"
21136  fi
21137
21138  if test "x$path" != "x$new_path"; then
21139    BOOT_JDK="$new_path"
21140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21142  fi
21143
21144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21146
21147    else
21148      # We're on a unix platform. Hooray! :)
21149      path="$BOOT_JDK"
21150      has_space=`$ECHO "$path" | $GREP " "`
21151      if test "x$has_space" != x; then
21152        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21154        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21155      fi
21156
21157      # Use eval to expand a potential ~
21158      eval path="$path"
21159      if test ! -f "$path" && test ! -d "$path"; then
21160        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21161      fi
21162
21163      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21164    fi
21165  fi
21166
21167            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21168$as_echo_n "checking for Boot JDK... " >&6; }
21169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21170$as_echo "$BOOT_JDK" >&6; }
21171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21172$as_echo_n "checking Boot JDK version... " >&6; }
21173            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21175$as_echo "$BOOT_JDK_VERSION" >&6; }
21176          fi # end check jdk version
21177        fi # end check javac
21178      fi # end check java
21179    fi # end check boot jdk found
21180  fi
21181
21182
21183  if test "x$BOOT_JDK_FOUND" = xno; then
21184    # Now execute the test
21185
21186  if test -x /usr/libexec/java_home; then
21187    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21188    BOOT_JDK_FOUND=maybe
21189    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21190$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21191  fi
21192
21193
21194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21196      # Do we have a bin/java?
21197      if test ! -x "$BOOT_JDK/bin/java"; then
21198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21200        BOOT_JDK_FOUND=no
21201      else
21202        # Do we have a bin/javac?
21203        if test ! -x "$BOOT_JDK/bin/javac"; then
21204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21208          BOOT_JDK_FOUND=no
21209        else
21210          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21211          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21212
21213          # Extra M4 quote needed to protect [] in grep expression.
21214          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21215          if test "x$FOUND_CORRECT_VERSION" = x; then
21216            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21218            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21219$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21220            BOOT_JDK_FOUND=no
21221          else
21222            # We're done! :-)
21223            BOOT_JDK_FOUND=yes
21224
21225  # Only process if variable expands to non-empty
21226
21227  if test "x$BOOT_JDK" != x; then
21228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21229
21230  # Input might be given as Windows format, start by converting to
21231  # unix format.
21232  path="$BOOT_JDK"
21233  new_path=`$CYGPATH -u "$path"`
21234
21235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21238  # "foo.exe" is OK but "foo" is an error.
21239  #
21240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21241  # It is also a way to make sure we got the proper file name for the real test later on.
21242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21243  if test "x$test_shortpath" = x; then
21244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21247  fi
21248
21249  # Call helper function which possibly converts this using DOS-style short mode.
21250  # If so, the updated path is stored in $new_path.
21251
21252  input_path="$new_path"
21253  # Check if we need to convert this using DOS-style short mode. If the path
21254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21255  # take no chances and rewrite it.
21256  # Note: m4 eats our [], so we need to use [ and ] instead.
21257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21258  if test "x$has_forbidden_chars" != x; then
21259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21263      # Going to short mode and back again did indeed matter. Since short mode is
21264      # case insensitive, let's make it lowercase to improve readability.
21265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21266      # Now convert it back to Unix-stile (cygpath)
21267      input_path=`$CYGPATH -u "$shortmode_path"`
21268      new_path="$input_path"
21269    fi
21270  fi
21271
21272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21273  if test "x$test_cygdrive_prefix" = x; then
21274    # As a simple fix, exclude /usr/bin since it's not a real path.
21275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21277      # a path prefixed by /cygdrive for fixpath to work.
21278      new_path="$CYGWIN_ROOT_PATH$input_path"
21279    fi
21280  fi
21281
21282
21283  if test "x$path" != "x$new_path"; then
21284    BOOT_JDK="$new_path"
21285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21287  fi
21288
21289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21290
21291  path="$BOOT_JDK"
21292  has_colon=`$ECHO $path | $GREP ^.:`
21293  new_path="$path"
21294  if test "x$has_colon" = x; then
21295    # Not in mixed or Windows style, start by that.
21296    new_path=`cmd //c echo $path`
21297  fi
21298
21299
21300  input_path="$new_path"
21301  # Check if we need to convert this using DOS-style short mode. If the path
21302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21303  # take no chances and rewrite it.
21304  # Note: m4 eats our [], so we need to use [ and ] instead.
21305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21306  if test "x$has_forbidden_chars" != x; then
21307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21309  fi
21310
21311
21312  windows_path="$new_path"
21313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21314    unix_path=`$CYGPATH -u "$windows_path"`
21315    new_path="$unix_path"
21316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21318    new_path="$unix_path"
21319  fi
21320
21321  if test "x$path" != "x$new_path"; then
21322    BOOT_JDK="$new_path"
21323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21325  fi
21326
21327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21329
21330    else
21331      # We're on a unix platform. Hooray! :)
21332      path="$BOOT_JDK"
21333      has_space=`$ECHO "$path" | $GREP " "`
21334      if test "x$has_space" != x; then
21335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21338      fi
21339
21340      # Use eval to expand a potential ~
21341      eval path="$path"
21342      if test ! -f "$path" && test ! -d "$path"; then
21343        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21344      fi
21345
21346      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21347    fi
21348  fi
21349
21350            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21351$as_echo_n "checking for Boot JDK... " >&6; }
21352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21353$as_echo "$BOOT_JDK" >&6; }
21354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21355$as_echo_n "checking Boot JDK version... " >&6; }
21356            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21358$as_echo "$BOOT_JDK_VERSION" >&6; }
21359          fi # end check jdk version
21360        fi # end check javac
21361      fi # end check java
21362    fi # end check boot jdk found
21363  fi
21364
21365  fi
21366
21367
21368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21370      # Do we have a bin/java?
21371      if test ! -x "$BOOT_JDK/bin/java"; then
21372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21374        BOOT_JDK_FOUND=no
21375      else
21376        # Do we have a bin/javac?
21377        if test ! -x "$BOOT_JDK/bin/javac"; then
21378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21382          BOOT_JDK_FOUND=no
21383        else
21384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21386
21387          # Extra M4 quote needed to protect [] in grep expression.
21388          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21389          if test "x$FOUND_CORRECT_VERSION" = x; then
21390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21394            BOOT_JDK_FOUND=no
21395          else
21396            # We're done! :-)
21397            BOOT_JDK_FOUND=yes
21398
21399  # Only process if variable expands to non-empty
21400
21401  if test "x$BOOT_JDK" != x; then
21402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21403
21404  # Input might be given as Windows format, start by converting to
21405  # unix format.
21406  path="$BOOT_JDK"
21407  new_path=`$CYGPATH -u "$path"`
21408
21409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21412  # "foo.exe" is OK but "foo" is an error.
21413  #
21414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21415  # It is also a way to make sure we got the proper file name for the real test later on.
21416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21417  if test "x$test_shortpath" = x; then
21418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21421  fi
21422
21423  # Call helper function which possibly converts this using DOS-style short mode.
21424  # If so, the updated path is stored in $new_path.
21425
21426  input_path="$new_path"
21427  # Check if we need to convert this using DOS-style short mode. If the path
21428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21429  # take no chances and rewrite it.
21430  # Note: m4 eats our [], so we need to use [ and ] instead.
21431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21432  if test "x$has_forbidden_chars" != x; then
21433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21437      # Going to short mode and back again did indeed matter. Since short mode is
21438      # case insensitive, let's make it lowercase to improve readability.
21439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21440      # Now convert it back to Unix-stile (cygpath)
21441      input_path=`$CYGPATH -u "$shortmode_path"`
21442      new_path="$input_path"
21443    fi
21444  fi
21445
21446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21447  if test "x$test_cygdrive_prefix" = x; then
21448    # As a simple fix, exclude /usr/bin since it's not a real path.
21449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21451      # a path prefixed by /cygdrive for fixpath to work.
21452      new_path="$CYGWIN_ROOT_PATH$input_path"
21453    fi
21454  fi
21455
21456
21457  if test "x$path" != "x$new_path"; then
21458    BOOT_JDK="$new_path"
21459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21461  fi
21462
21463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21464
21465  path="$BOOT_JDK"
21466  has_colon=`$ECHO $path | $GREP ^.:`
21467  new_path="$path"
21468  if test "x$has_colon" = x; then
21469    # Not in mixed or Windows style, start by that.
21470    new_path=`cmd //c echo $path`
21471  fi
21472
21473
21474  input_path="$new_path"
21475  # Check if we need to convert this using DOS-style short mode. If the path
21476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21477  # take no chances and rewrite it.
21478  # Note: m4 eats our [], so we need to use [ and ] instead.
21479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21480  if test "x$has_forbidden_chars" != x; then
21481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21483  fi
21484
21485
21486  windows_path="$new_path"
21487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21488    unix_path=`$CYGPATH -u "$windows_path"`
21489    new_path="$unix_path"
21490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21492    new_path="$unix_path"
21493  fi
21494
21495  if test "x$path" != "x$new_path"; then
21496    BOOT_JDK="$new_path"
21497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21499  fi
21500
21501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21503
21504    else
21505      # We're on a unix platform. Hooray! :)
21506      path="$BOOT_JDK"
21507      has_space=`$ECHO "$path" | $GREP " "`
21508      if test "x$has_space" != x; then
21509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21512      fi
21513
21514      # Use eval to expand a potential ~
21515      eval path="$path"
21516      if test ! -f "$path" && test ! -d "$path"; then
21517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21518      fi
21519
21520      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21521    fi
21522  fi
21523
21524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21525$as_echo_n "checking for Boot JDK... " >&6; }
21526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21527$as_echo "$BOOT_JDK" >&6; }
21528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21529$as_echo_n "checking Boot JDK version... " >&6; }
21530            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21532$as_echo "$BOOT_JDK_VERSION" >&6; }
21533          fi # end check jdk version
21534        fi # end check javac
21535      fi # end check java
21536    fi # end check boot jdk found
21537  fi
21538
21539
21540  # Test: Is $JAVA_HOME set?
21541
21542  if test "x$BOOT_JDK_FOUND" = xno; then
21543    # Now execute the test
21544
21545  if test "x$JAVA_HOME" != x; then
21546    JAVA_HOME_PROCESSED="$JAVA_HOME"
21547
21548  # Only process if variable expands to non-empty
21549
21550  if test "x$JAVA_HOME_PROCESSED" != x; then
21551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21552
21553  # Input might be given as Windows format, start by converting to
21554  # unix format.
21555  path="$JAVA_HOME_PROCESSED"
21556  new_path=`$CYGPATH -u "$path"`
21557
21558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21561  # "foo.exe" is OK but "foo" is an error.
21562  #
21563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21564  # It is also a way to make sure we got the proper file name for the real test later on.
21565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21566  if test "x$test_shortpath" = x; then
21567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21568$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21569    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21570  fi
21571
21572  # Call helper function which possibly converts this using DOS-style short mode.
21573  # If so, the updated path is stored in $new_path.
21574
21575  input_path="$new_path"
21576  # Check if we need to convert this using DOS-style short mode. If the path
21577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21578  # take no chances and rewrite it.
21579  # Note: m4 eats our [], so we need to use [ and ] instead.
21580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21581  if test "x$has_forbidden_chars" != x; then
21582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21586      # Going to short mode and back again did indeed matter. Since short mode is
21587      # case insensitive, let's make it lowercase to improve readability.
21588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21589      # Now convert it back to Unix-stile (cygpath)
21590      input_path=`$CYGPATH -u "$shortmode_path"`
21591      new_path="$input_path"
21592    fi
21593  fi
21594
21595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21596  if test "x$test_cygdrive_prefix" = x; then
21597    # As a simple fix, exclude /usr/bin since it's not a real path.
21598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21600      # a path prefixed by /cygdrive for fixpath to work.
21601      new_path="$CYGWIN_ROOT_PATH$input_path"
21602    fi
21603  fi
21604
21605
21606  if test "x$path" != "x$new_path"; then
21607    JAVA_HOME_PROCESSED="$new_path"
21608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21609$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21610  fi
21611
21612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21613
21614  path="$JAVA_HOME_PROCESSED"
21615  has_colon=`$ECHO $path | $GREP ^.:`
21616  new_path="$path"
21617  if test "x$has_colon" = x; then
21618    # Not in mixed or Windows style, start by that.
21619    new_path=`cmd //c echo $path`
21620  fi
21621
21622
21623  input_path="$new_path"
21624  # Check if we need to convert this using DOS-style short mode. If the path
21625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21626  # take no chances and rewrite it.
21627  # Note: m4 eats our [], so we need to use [ and ] instead.
21628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21629  if test "x$has_forbidden_chars" != x; then
21630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21632  fi
21633
21634
21635  windows_path="$new_path"
21636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21637    unix_path=`$CYGPATH -u "$windows_path"`
21638    new_path="$unix_path"
21639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21641    new_path="$unix_path"
21642  fi
21643
21644  if test "x$path" != "x$new_path"; then
21645    JAVA_HOME_PROCESSED="$new_path"
21646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21647$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21648  fi
21649
21650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21652
21653    else
21654      # We're on a unix platform. Hooray! :)
21655      path="$JAVA_HOME_PROCESSED"
21656      has_space=`$ECHO "$path" | $GREP " "`
21657      if test "x$has_space" != x; then
21658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21659$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21661      fi
21662
21663      # Use eval to expand a potential ~
21664      eval path="$path"
21665      if test ! -f "$path" && test ! -d "$path"; then
21666        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21667      fi
21668
21669      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21670    fi
21671  fi
21672
21673    if test ! -d "$JAVA_HOME_PROCESSED"; then
21674      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21675$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21676    else
21677      # Aha, the user has set a JAVA_HOME
21678      # let us use that as the Boot JDK.
21679      BOOT_JDK="$JAVA_HOME_PROCESSED"
21680      BOOT_JDK_FOUND=maybe
21681      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21682$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21683    fi
21684  fi
21685
21686
21687    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21688    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21689      # Do we have a bin/java?
21690      if test ! -x "$BOOT_JDK/bin/java"; then
21691        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21693        BOOT_JDK_FOUND=no
21694      else
21695        # Do we have a bin/javac?
21696        if test ! -x "$BOOT_JDK/bin/javac"; then
21697          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21699          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21700$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21701          BOOT_JDK_FOUND=no
21702        else
21703          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21704          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21705
21706          # Extra M4 quote needed to protect [] in grep expression.
21707          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21708          if test "x$FOUND_CORRECT_VERSION" = x; then
21709            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21711            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21712$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21713            BOOT_JDK_FOUND=no
21714          else
21715            # We're done! :-)
21716            BOOT_JDK_FOUND=yes
21717
21718  # Only process if variable expands to non-empty
21719
21720  if test "x$BOOT_JDK" != x; then
21721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21722
21723  # Input might be given as Windows format, start by converting to
21724  # unix format.
21725  path="$BOOT_JDK"
21726  new_path=`$CYGPATH -u "$path"`
21727
21728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21731  # "foo.exe" is OK but "foo" is an error.
21732  #
21733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21734  # It is also a way to make sure we got the proper file name for the real test later on.
21735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21736  if test "x$test_shortpath" = x; then
21737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21739    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21740  fi
21741
21742  # Call helper function which possibly converts this using DOS-style short mode.
21743  # If so, the updated path is stored in $new_path.
21744
21745  input_path="$new_path"
21746  # Check if we need to convert this using DOS-style short mode. If the path
21747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21748  # take no chances and rewrite it.
21749  # Note: m4 eats our [], so we need to use [ and ] instead.
21750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21751  if test "x$has_forbidden_chars" != x; then
21752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21756      # Going to short mode and back again did indeed matter. Since short mode is
21757      # case insensitive, let's make it lowercase to improve readability.
21758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21759      # Now convert it back to Unix-stile (cygpath)
21760      input_path=`$CYGPATH -u "$shortmode_path"`
21761      new_path="$input_path"
21762    fi
21763  fi
21764
21765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21766  if test "x$test_cygdrive_prefix" = x; then
21767    # As a simple fix, exclude /usr/bin since it's not a real path.
21768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21770      # a path prefixed by /cygdrive for fixpath to work.
21771      new_path="$CYGWIN_ROOT_PATH$input_path"
21772    fi
21773  fi
21774
21775
21776  if test "x$path" != "x$new_path"; then
21777    BOOT_JDK="$new_path"
21778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21780  fi
21781
21782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21783
21784  path="$BOOT_JDK"
21785  has_colon=`$ECHO $path | $GREP ^.:`
21786  new_path="$path"
21787  if test "x$has_colon" = x; then
21788    # Not in mixed or Windows style, start by that.
21789    new_path=`cmd //c echo $path`
21790  fi
21791
21792
21793  input_path="$new_path"
21794  # Check if we need to convert this using DOS-style short mode. If the path
21795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21796  # take no chances and rewrite it.
21797  # Note: m4 eats our [], so we need to use [ and ] instead.
21798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21799  if test "x$has_forbidden_chars" != x; then
21800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21802  fi
21803
21804
21805  windows_path="$new_path"
21806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21807    unix_path=`$CYGPATH -u "$windows_path"`
21808    new_path="$unix_path"
21809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21811    new_path="$unix_path"
21812  fi
21813
21814  if test "x$path" != "x$new_path"; then
21815    BOOT_JDK="$new_path"
21816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21818  fi
21819
21820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21822
21823    else
21824      # We're on a unix platform. Hooray! :)
21825      path="$BOOT_JDK"
21826      has_space=`$ECHO "$path" | $GREP " "`
21827      if test "x$has_space" != x; then
21828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21831      fi
21832
21833      # Use eval to expand a potential ~
21834      eval path="$path"
21835      if test ! -f "$path" && test ! -d "$path"; then
21836        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21837      fi
21838
21839      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21840    fi
21841  fi
21842
21843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21844$as_echo_n "checking for Boot JDK... " >&6; }
21845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21846$as_echo "$BOOT_JDK" >&6; }
21847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21848$as_echo_n "checking Boot JDK version... " >&6; }
21849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21851$as_echo "$BOOT_JDK_VERSION" >&6; }
21852          fi # end check jdk version
21853        fi # end check javac
21854      fi # end check java
21855    fi # end check boot jdk found
21856  fi
21857
21858
21859  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21860
21861  if test "x$BOOT_JDK_FOUND" = xno; then
21862    # Now execute the test
21863
21864  # Extract the first word of "javac", so it can be a program name with args.
21865set dummy javac; ac_word=$2
21866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21867$as_echo_n "checking for $ac_word... " >&6; }
21868if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21869  $as_echo_n "(cached) " >&6
21870else
21871  case $JAVAC_CHECK in
21872  [\\/]* | ?:[\\/]*)
21873  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21874  ;;
21875  *)
21876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21877for as_dir in $PATH
21878do
21879  IFS=$as_save_IFS
21880  test -z "$as_dir" && as_dir=.
21881    for ac_exec_ext in '' $ac_executable_extensions; do
21882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21883    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21885    break 2
21886  fi
21887done
21888  done
21889IFS=$as_save_IFS
21890
21891  ;;
21892esac
21893fi
21894JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21895if test -n "$JAVAC_CHECK"; then
21896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21897$as_echo "$JAVAC_CHECK" >&6; }
21898else
21899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21900$as_echo "no" >&6; }
21901fi
21902
21903
21904  # Extract the first word of "java", so it can be a program name with args.
21905set dummy java; ac_word=$2
21906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21907$as_echo_n "checking for $ac_word... " >&6; }
21908if ${ac_cv_path_JAVA_CHECK+:} false; then :
21909  $as_echo_n "(cached) " >&6
21910else
21911  case $JAVA_CHECK in
21912  [\\/]* | ?:[\\/]*)
21913  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21914  ;;
21915  *)
21916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21917for as_dir in $PATH
21918do
21919  IFS=$as_save_IFS
21920  test -z "$as_dir" && as_dir=.
21921    for ac_exec_ext in '' $ac_executable_extensions; do
21922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21923    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21925    break 2
21926  fi
21927done
21928  done
21929IFS=$as_save_IFS
21930
21931  ;;
21932esac
21933fi
21934JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21935if test -n "$JAVA_CHECK"; then
21936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21937$as_echo "$JAVA_CHECK" >&6; }
21938else
21939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21940$as_echo "no" >&6; }
21941fi
21942
21943
21944  BINARY="$JAVAC_CHECK"
21945  if test "x$JAVAC_CHECK" = x; then
21946    BINARY="$JAVA_CHECK"
21947  fi
21948  if test "x$BINARY" != x; then
21949    # So there is a java(c) binary, it might be part of a JDK.
21950    # Lets find the JDK/JRE directory by following symbolic links.
21951    # Linux/GNU systems often have links from /usr/bin/java to
21952    # /etc/alternatives/java to the real JDK binary.
21953
21954  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21955    # Follow a chain of symbolic links. Use readlink
21956    # where it exists, else fall back to horribly
21957    # complicated shell code.
21958    if test "x$READLINK_TESTED" != yes; then
21959      # On MacOSX there is a readlink tool with a different
21960      # purpose than the GNU readlink tool. Check the found readlink.
21961      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21962      if test "x$ISGNU" = x; then
21963        # A readlink that we do not know how to use.
21964        # Are there other non-GNU readlinks out there?
21965        READLINK_TESTED=yes
21966        READLINK=
21967      fi
21968    fi
21969
21970    if test "x$READLINK" != x; then
21971      BINARY=`$READLINK -f $BINARY`
21972    else
21973      # Save the current directory for restoring afterwards
21974      STARTDIR=$PWD
21975      COUNTER=0
21976      sym_link_dir=`$DIRNAME $BINARY`
21977      sym_link_file=`$BASENAME $BINARY`
21978      cd $sym_link_dir
21979      # Use -P flag to resolve symlinks in directories.
21980      cd `$THEPWDCMD -P`
21981      sym_link_dir=`$THEPWDCMD -P`
21982      # Resolve file symlinks
21983      while test $COUNTER -lt 20; do
21984        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21985        if test "x$ISLINK" == x; then
21986          # This is not a symbolic link! We are done!
21987          break
21988        fi
21989        # Again resolve directory symlinks since the target of the just found
21990        # link could be in a different directory
21991        cd `$DIRNAME $ISLINK`
21992        sym_link_dir=`$THEPWDCMD -P`
21993        sym_link_file=`$BASENAME $ISLINK`
21994        let COUNTER=COUNTER+1
21995      done
21996      cd $STARTDIR
21997      BINARY=$sym_link_dir/$sym_link_file
21998    fi
21999  fi
22000
22001    BOOT_JDK=`dirname "$BINARY"`
22002    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22003    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22004      # Looks like we found ourselves an JDK
22005      BOOT_JDK_FOUND=maybe
22006      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22007$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22008    fi
22009  fi
22010
22011
22012    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22013    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22014      # Do we have a bin/java?
22015      if test ! -x "$BOOT_JDK/bin/java"; then
22016        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22018        BOOT_JDK_FOUND=no
22019      else
22020        # Do we have a bin/javac?
22021        if test ! -x "$BOOT_JDK/bin/javac"; then
22022          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22024          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22025$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22026          BOOT_JDK_FOUND=no
22027        else
22028          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22029          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22030
22031          # Extra M4 quote needed to protect [] in grep expression.
22032          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22033          if test "x$FOUND_CORRECT_VERSION" = x; then
22034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22036            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22037$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22038            BOOT_JDK_FOUND=no
22039          else
22040            # We're done! :-)
22041            BOOT_JDK_FOUND=yes
22042
22043  # Only process if variable expands to non-empty
22044
22045  if test "x$BOOT_JDK" != x; then
22046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22047
22048  # Input might be given as Windows format, start by converting to
22049  # unix format.
22050  path="$BOOT_JDK"
22051  new_path=`$CYGPATH -u "$path"`
22052
22053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22056  # "foo.exe" is OK but "foo" is an error.
22057  #
22058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22059  # It is also a way to make sure we got the proper file name for the real test later on.
22060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22061  if test "x$test_shortpath" = x; then
22062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22065  fi
22066
22067  # Call helper function which possibly converts this using DOS-style short mode.
22068  # If so, the updated path is stored in $new_path.
22069
22070  input_path="$new_path"
22071  # Check if we need to convert this using DOS-style short mode. If the path
22072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22073  # take no chances and rewrite it.
22074  # Note: m4 eats our [], so we need to use [ and ] instead.
22075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22076  if test "x$has_forbidden_chars" != x; then
22077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22081      # Going to short mode and back again did indeed matter. Since short mode is
22082      # case insensitive, let's make it lowercase to improve readability.
22083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22084      # Now convert it back to Unix-stile (cygpath)
22085      input_path=`$CYGPATH -u "$shortmode_path"`
22086      new_path="$input_path"
22087    fi
22088  fi
22089
22090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22091  if test "x$test_cygdrive_prefix" = x; then
22092    # As a simple fix, exclude /usr/bin since it's not a real path.
22093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22095      # a path prefixed by /cygdrive for fixpath to work.
22096      new_path="$CYGWIN_ROOT_PATH$input_path"
22097    fi
22098  fi
22099
22100
22101  if test "x$path" != "x$new_path"; then
22102    BOOT_JDK="$new_path"
22103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22105  fi
22106
22107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22108
22109  path="$BOOT_JDK"
22110  has_colon=`$ECHO $path | $GREP ^.:`
22111  new_path="$path"
22112  if test "x$has_colon" = x; then
22113    # Not in mixed or Windows style, start by that.
22114    new_path=`cmd //c echo $path`
22115  fi
22116
22117
22118  input_path="$new_path"
22119  # Check if we need to convert this using DOS-style short mode. If the path
22120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22121  # take no chances and rewrite it.
22122  # Note: m4 eats our [], so we need to use [ and ] instead.
22123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22124  if test "x$has_forbidden_chars" != x; then
22125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22127  fi
22128
22129
22130  windows_path="$new_path"
22131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22132    unix_path=`$CYGPATH -u "$windows_path"`
22133    new_path="$unix_path"
22134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22136    new_path="$unix_path"
22137  fi
22138
22139  if test "x$path" != "x$new_path"; then
22140    BOOT_JDK="$new_path"
22141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22143  fi
22144
22145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22147
22148    else
22149      # We're on a unix platform. Hooray! :)
22150      path="$BOOT_JDK"
22151      has_space=`$ECHO "$path" | $GREP " "`
22152      if test "x$has_space" != x; then
22153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22156      fi
22157
22158      # Use eval to expand a potential ~
22159      eval path="$path"
22160      if test ! -f "$path" && test ! -d "$path"; then
22161        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22162      fi
22163
22164      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22165    fi
22166  fi
22167
22168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22169$as_echo_n "checking for Boot JDK... " >&6; }
22170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22171$as_echo "$BOOT_JDK" >&6; }
22172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22173$as_echo_n "checking Boot JDK version... " >&6; }
22174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22176$as_echo "$BOOT_JDK_VERSION" >&6; }
22177          fi # end check jdk version
22178        fi # end check javac
22179      fi # end check java
22180    fi # end check boot jdk found
22181  fi
22182
22183
22184  # Test: Is there a JDK installed in default, well-known locations?
22185
22186  if test "x$BOOT_JDK_FOUND" = xno; then
22187    # Now execute the test
22188
22189  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22190
22191  if test "x$BOOT_JDK_FOUND" = xno; then
22192    # Now execute the test
22193
22194  if test "x$ProgramW6432" != x; then
22195    VIRTUAL_DIR="$ProgramW6432/Java"
22196
22197  windows_path="$VIRTUAL_DIR"
22198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22199    unix_path=`$CYGPATH -u "$windows_path"`
22200    VIRTUAL_DIR="$unix_path"
22201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22203    VIRTUAL_DIR="$unix_path"
22204  fi
22205
22206
22207  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22208  BOOT_JDK_SUFFIX=""
22209  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22210  if test "x$ALL_JDKS_FOUND" != x; then
22211    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22212
22213  if test "x$BOOT_JDK_FOUND" = xno; then
22214    # Now execute the test
22215
22216        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22217        if test -d "$BOOT_JDK"; then
22218          BOOT_JDK_FOUND=maybe
22219          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22220$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22221        fi
22222
22223
22224    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22225    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22226      # Do we have a bin/java?
22227      if test ! -x "$BOOT_JDK/bin/java"; then
22228        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22230        BOOT_JDK_FOUND=no
22231      else
22232        # Do we have a bin/javac?
22233        if test ! -x "$BOOT_JDK/bin/javac"; then
22234          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22236          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22237$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22238          BOOT_JDK_FOUND=no
22239        else
22240          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22241          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22242
22243          # Extra M4 quote needed to protect [] in grep expression.
22244          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22245          if test "x$FOUND_CORRECT_VERSION" = x; then
22246            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22248            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22249$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22250            BOOT_JDK_FOUND=no
22251          else
22252            # We're done! :-)
22253            BOOT_JDK_FOUND=yes
22254
22255  # Only process if variable expands to non-empty
22256
22257  if test "x$BOOT_JDK" != x; then
22258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22259
22260  # Input might be given as Windows format, start by converting to
22261  # unix format.
22262  path="$BOOT_JDK"
22263  new_path=`$CYGPATH -u "$path"`
22264
22265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22268  # "foo.exe" is OK but "foo" is an error.
22269  #
22270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22271  # It is also a way to make sure we got the proper file name for the real test later on.
22272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22273  if test "x$test_shortpath" = x; then
22274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22276    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22277  fi
22278
22279  # Call helper function which possibly converts this using DOS-style short mode.
22280  # If so, the updated path is stored in $new_path.
22281
22282  input_path="$new_path"
22283  # Check if we need to convert this using DOS-style short mode. If the path
22284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22285  # take no chances and rewrite it.
22286  # Note: m4 eats our [], so we need to use [ and ] instead.
22287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22288  if test "x$has_forbidden_chars" != x; then
22289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22293      # Going to short mode and back again did indeed matter. Since short mode is
22294      # case insensitive, let's make it lowercase to improve readability.
22295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22296      # Now convert it back to Unix-stile (cygpath)
22297      input_path=`$CYGPATH -u "$shortmode_path"`
22298      new_path="$input_path"
22299    fi
22300  fi
22301
22302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22303  if test "x$test_cygdrive_prefix" = x; then
22304    # As a simple fix, exclude /usr/bin since it's not a real path.
22305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22307      # a path prefixed by /cygdrive for fixpath to work.
22308      new_path="$CYGWIN_ROOT_PATH$input_path"
22309    fi
22310  fi
22311
22312
22313  if test "x$path" != "x$new_path"; then
22314    BOOT_JDK="$new_path"
22315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22317  fi
22318
22319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22320
22321  path="$BOOT_JDK"
22322  has_colon=`$ECHO $path | $GREP ^.:`
22323  new_path="$path"
22324  if test "x$has_colon" = x; then
22325    # Not in mixed or Windows style, start by that.
22326    new_path=`cmd //c echo $path`
22327  fi
22328
22329
22330  input_path="$new_path"
22331  # Check if we need to convert this using DOS-style short mode. If the path
22332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22333  # take no chances and rewrite it.
22334  # Note: m4 eats our [], so we need to use [ and ] instead.
22335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22336  if test "x$has_forbidden_chars" != x; then
22337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22339  fi
22340
22341
22342  windows_path="$new_path"
22343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22344    unix_path=`$CYGPATH -u "$windows_path"`
22345    new_path="$unix_path"
22346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22348    new_path="$unix_path"
22349  fi
22350
22351  if test "x$path" != "x$new_path"; then
22352    BOOT_JDK="$new_path"
22353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22355  fi
22356
22357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22359
22360    else
22361      # We're on a unix platform. Hooray! :)
22362      path="$BOOT_JDK"
22363      has_space=`$ECHO "$path" | $GREP " "`
22364      if test "x$has_space" != x; then
22365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22368      fi
22369
22370      # Use eval to expand a potential ~
22371      eval path="$path"
22372      if test ! -f "$path" && test ! -d "$path"; then
22373        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22374      fi
22375
22376      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22377    fi
22378  fi
22379
22380            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22381$as_echo_n "checking for Boot JDK... " >&6; }
22382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22383$as_echo "$BOOT_JDK" >&6; }
22384            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22385$as_echo_n "checking Boot JDK version... " >&6; }
22386            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22388$as_echo "$BOOT_JDK_VERSION" >&6; }
22389          fi # end check jdk version
22390        fi # end check javac
22391      fi # end check java
22392    fi # end check boot jdk found
22393  fi
22394
22395    done
22396  fi
22397
22398  fi
22399
22400
22401    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22402    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22403      # Do we have a bin/java?
22404      if test ! -x "$BOOT_JDK/bin/java"; then
22405        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22407        BOOT_JDK_FOUND=no
22408      else
22409        # Do we have a bin/javac?
22410        if test ! -x "$BOOT_JDK/bin/javac"; then
22411          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22413          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22414$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22415          BOOT_JDK_FOUND=no
22416        else
22417          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22418          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22419
22420          # Extra M4 quote needed to protect [] in grep expression.
22421          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22422          if test "x$FOUND_CORRECT_VERSION" = x; then
22423            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22425            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22426$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22427            BOOT_JDK_FOUND=no
22428          else
22429            # We're done! :-)
22430            BOOT_JDK_FOUND=yes
22431
22432  # Only process if variable expands to non-empty
22433
22434  if test "x$BOOT_JDK" != x; then
22435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22436
22437  # Input might be given as Windows format, start by converting to
22438  # unix format.
22439  path="$BOOT_JDK"
22440  new_path=`$CYGPATH -u "$path"`
22441
22442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22445  # "foo.exe" is OK but "foo" is an error.
22446  #
22447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22448  # It is also a way to make sure we got the proper file name for the real test later on.
22449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22450  if test "x$test_shortpath" = x; then
22451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22453    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22454  fi
22455
22456  # Call helper function which possibly converts this using DOS-style short mode.
22457  # If so, the updated path is stored in $new_path.
22458
22459  input_path="$new_path"
22460  # Check if we need to convert this using DOS-style short mode. If the path
22461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22462  # take no chances and rewrite it.
22463  # Note: m4 eats our [], so we need to use [ and ] instead.
22464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22465  if test "x$has_forbidden_chars" != x; then
22466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22470      # Going to short mode and back again did indeed matter. Since short mode is
22471      # case insensitive, let's make it lowercase to improve readability.
22472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22473      # Now convert it back to Unix-stile (cygpath)
22474      input_path=`$CYGPATH -u "$shortmode_path"`
22475      new_path="$input_path"
22476    fi
22477  fi
22478
22479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22480  if test "x$test_cygdrive_prefix" = x; then
22481    # As a simple fix, exclude /usr/bin since it's not a real path.
22482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22484      # a path prefixed by /cygdrive for fixpath to work.
22485      new_path="$CYGWIN_ROOT_PATH$input_path"
22486    fi
22487  fi
22488
22489
22490  if test "x$path" != "x$new_path"; then
22491    BOOT_JDK="$new_path"
22492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22494  fi
22495
22496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22497
22498  path="$BOOT_JDK"
22499  has_colon=`$ECHO $path | $GREP ^.:`
22500  new_path="$path"
22501  if test "x$has_colon" = x; then
22502    # Not in mixed or Windows style, start by that.
22503    new_path=`cmd //c echo $path`
22504  fi
22505
22506
22507  input_path="$new_path"
22508  # Check if we need to convert this using DOS-style short mode. If the path
22509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22510  # take no chances and rewrite it.
22511  # Note: m4 eats our [], so we need to use [ and ] instead.
22512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22513  if test "x$has_forbidden_chars" != x; then
22514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22516  fi
22517
22518
22519  windows_path="$new_path"
22520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22521    unix_path=`$CYGPATH -u "$windows_path"`
22522    new_path="$unix_path"
22523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22525    new_path="$unix_path"
22526  fi
22527
22528  if test "x$path" != "x$new_path"; then
22529    BOOT_JDK="$new_path"
22530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22532  fi
22533
22534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22536
22537    else
22538      # We're on a unix platform. Hooray! :)
22539      path="$BOOT_JDK"
22540      has_space=`$ECHO "$path" | $GREP " "`
22541      if test "x$has_space" != x; then
22542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22543$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22545      fi
22546
22547      # Use eval to expand a potential ~
22548      eval path="$path"
22549      if test ! -f "$path" && test ! -d "$path"; then
22550        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22551      fi
22552
22553      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22554    fi
22555  fi
22556
22557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22558$as_echo_n "checking for Boot JDK... " >&6; }
22559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22560$as_echo "$BOOT_JDK" >&6; }
22561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22562$as_echo_n "checking Boot JDK version... " >&6; }
22563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22565$as_echo "$BOOT_JDK_VERSION" >&6; }
22566          fi # end check jdk version
22567        fi # end check javac
22568      fi # end check java
22569    fi # end check boot jdk found
22570  fi
22571
22572
22573  if test "x$BOOT_JDK_FOUND" = xno; then
22574    # Now execute the test
22575
22576  if test "x$PROGRAMW6432" != x; then
22577    VIRTUAL_DIR="$PROGRAMW6432/Java"
22578
22579  windows_path="$VIRTUAL_DIR"
22580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22581    unix_path=`$CYGPATH -u "$windows_path"`
22582    VIRTUAL_DIR="$unix_path"
22583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22585    VIRTUAL_DIR="$unix_path"
22586  fi
22587
22588
22589  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22590  BOOT_JDK_SUFFIX=""
22591  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22592  if test "x$ALL_JDKS_FOUND" != x; then
22593    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22594
22595  if test "x$BOOT_JDK_FOUND" = xno; then
22596    # Now execute the test
22597
22598        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22599        if test -d "$BOOT_JDK"; then
22600          BOOT_JDK_FOUND=maybe
22601          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22602$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22603        fi
22604
22605
22606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22608      # Do we have a bin/java?
22609      if test ! -x "$BOOT_JDK/bin/java"; then
22610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22612        BOOT_JDK_FOUND=no
22613      else
22614        # Do we have a bin/javac?
22615        if test ! -x "$BOOT_JDK/bin/javac"; then
22616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22620          BOOT_JDK_FOUND=no
22621        else
22622          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22623          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22624
22625          # Extra M4 quote needed to protect [] in grep expression.
22626          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22627          if test "x$FOUND_CORRECT_VERSION" = x; then
22628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22630            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22631$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22632            BOOT_JDK_FOUND=no
22633          else
22634            # We're done! :-)
22635            BOOT_JDK_FOUND=yes
22636
22637  # Only process if variable expands to non-empty
22638
22639  if test "x$BOOT_JDK" != x; then
22640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22641
22642  # Input might be given as Windows format, start by converting to
22643  # unix format.
22644  path="$BOOT_JDK"
22645  new_path=`$CYGPATH -u "$path"`
22646
22647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22650  # "foo.exe" is OK but "foo" is an error.
22651  #
22652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22653  # It is also a way to make sure we got the proper file name for the real test later on.
22654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22655  if test "x$test_shortpath" = x; then
22656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22659  fi
22660
22661  # Call helper function which possibly converts this using DOS-style short mode.
22662  # If so, the updated path is stored in $new_path.
22663
22664  input_path="$new_path"
22665  # Check if we need to convert this using DOS-style short mode. If the path
22666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22667  # take no chances and rewrite it.
22668  # Note: m4 eats our [], so we need to use [ and ] instead.
22669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22670  if test "x$has_forbidden_chars" != x; then
22671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22675      # Going to short mode and back again did indeed matter. Since short mode is
22676      # case insensitive, let's make it lowercase to improve readability.
22677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22678      # Now convert it back to Unix-stile (cygpath)
22679      input_path=`$CYGPATH -u "$shortmode_path"`
22680      new_path="$input_path"
22681    fi
22682  fi
22683
22684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22685  if test "x$test_cygdrive_prefix" = x; then
22686    # As a simple fix, exclude /usr/bin since it's not a real path.
22687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22689      # a path prefixed by /cygdrive for fixpath to work.
22690      new_path="$CYGWIN_ROOT_PATH$input_path"
22691    fi
22692  fi
22693
22694
22695  if test "x$path" != "x$new_path"; then
22696    BOOT_JDK="$new_path"
22697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22699  fi
22700
22701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22702
22703  path="$BOOT_JDK"
22704  has_colon=`$ECHO $path | $GREP ^.:`
22705  new_path="$path"
22706  if test "x$has_colon" = x; then
22707    # Not in mixed or Windows style, start by that.
22708    new_path=`cmd //c echo $path`
22709  fi
22710
22711
22712  input_path="$new_path"
22713  # Check if we need to convert this using DOS-style short mode. If the path
22714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22715  # take no chances and rewrite it.
22716  # Note: m4 eats our [], so we need to use [ and ] instead.
22717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22718  if test "x$has_forbidden_chars" != x; then
22719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22721  fi
22722
22723
22724  windows_path="$new_path"
22725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22726    unix_path=`$CYGPATH -u "$windows_path"`
22727    new_path="$unix_path"
22728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22730    new_path="$unix_path"
22731  fi
22732
22733  if test "x$path" != "x$new_path"; then
22734    BOOT_JDK="$new_path"
22735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22737  fi
22738
22739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22741
22742    else
22743      # We're on a unix platform. Hooray! :)
22744      path="$BOOT_JDK"
22745      has_space=`$ECHO "$path" | $GREP " "`
22746      if test "x$has_space" != x; then
22747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22750      fi
22751
22752      # Use eval to expand a potential ~
22753      eval path="$path"
22754      if test ! -f "$path" && test ! -d "$path"; then
22755        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22756      fi
22757
22758      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22759    fi
22760  fi
22761
22762            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22763$as_echo_n "checking for Boot JDK... " >&6; }
22764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22765$as_echo "$BOOT_JDK" >&6; }
22766            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22767$as_echo_n "checking Boot JDK version... " >&6; }
22768            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22770$as_echo "$BOOT_JDK_VERSION" >&6; }
22771          fi # end check jdk version
22772        fi # end check javac
22773      fi # end check java
22774    fi # end check boot jdk found
22775  fi
22776
22777    done
22778  fi
22779
22780  fi
22781
22782
22783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22785      # Do we have a bin/java?
22786      if test ! -x "$BOOT_JDK/bin/java"; then
22787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22789        BOOT_JDK_FOUND=no
22790      else
22791        # Do we have a bin/javac?
22792        if test ! -x "$BOOT_JDK/bin/javac"; then
22793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22797          BOOT_JDK_FOUND=no
22798        else
22799          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22800          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22801
22802          # Extra M4 quote needed to protect [] in grep expression.
22803          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22804          if test "x$FOUND_CORRECT_VERSION" = x; then
22805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22807            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22808$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22809            BOOT_JDK_FOUND=no
22810          else
22811            # We're done! :-)
22812            BOOT_JDK_FOUND=yes
22813
22814  # Only process if variable expands to non-empty
22815
22816  if test "x$BOOT_JDK" != x; then
22817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22818
22819  # Input might be given as Windows format, start by converting to
22820  # unix format.
22821  path="$BOOT_JDK"
22822  new_path=`$CYGPATH -u "$path"`
22823
22824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22827  # "foo.exe" is OK but "foo" is an error.
22828  #
22829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22830  # It is also a way to make sure we got the proper file name for the real test later on.
22831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22832  if test "x$test_shortpath" = x; then
22833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22835    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22836  fi
22837
22838  # Call helper function which possibly converts this using DOS-style short mode.
22839  # If so, the updated path is stored in $new_path.
22840
22841  input_path="$new_path"
22842  # Check if we need to convert this using DOS-style short mode. If the path
22843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22844  # take no chances and rewrite it.
22845  # Note: m4 eats our [], so we need to use [ and ] instead.
22846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22847  if test "x$has_forbidden_chars" != x; then
22848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22852      # Going to short mode and back again did indeed matter. Since short mode is
22853      # case insensitive, let's make it lowercase to improve readability.
22854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22855      # Now convert it back to Unix-stile (cygpath)
22856      input_path=`$CYGPATH -u "$shortmode_path"`
22857      new_path="$input_path"
22858    fi
22859  fi
22860
22861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22862  if test "x$test_cygdrive_prefix" = x; then
22863    # As a simple fix, exclude /usr/bin since it's not a real path.
22864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22866      # a path prefixed by /cygdrive for fixpath to work.
22867      new_path="$CYGWIN_ROOT_PATH$input_path"
22868    fi
22869  fi
22870
22871
22872  if test "x$path" != "x$new_path"; then
22873    BOOT_JDK="$new_path"
22874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22876  fi
22877
22878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22879
22880  path="$BOOT_JDK"
22881  has_colon=`$ECHO $path | $GREP ^.:`
22882  new_path="$path"
22883  if test "x$has_colon" = x; then
22884    # Not in mixed or Windows style, start by that.
22885    new_path=`cmd //c echo $path`
22886  fi
22887
22888
22889  input_path="$new_path"
22890  # Check if we need to convert this using DOS-style short mode. If the path
22891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22892  # take no chances and rewrite it.
22893  # Note: m4 eats our [], so we need to use [ and ] instead.
22894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22895  if test "x$has_forbidden_chars" != x; then
22896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22898  fi
22899
22900
22901  windows_path="$new_path"
22902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22903    unix_path=`$CYGPATH -u "$windows_path"`
22904    new_path="$unix_path"
22905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22907    new_path="$unix_path"
22908  fi
22909
22910  if test "x$path" != "x$new_path"; then
22911    BOOT_JDK="$new_path"
22912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22914  fi
22915
22916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22918
22919    else
22920      # We're on a unix platform. Hooray! :)
22921      path="$BOOT_JDK"
22922      has_space=`$ECHO "$path" | $GREP " "`
22923      if test "x$has_space" != x; then
22924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22927      fi
22928
22929      # Use eval to expand a potential ~
22930      eval path="$path"
22931      if test ! -f "$path" && test ! -d "$path"; then
22932        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22933      fi
22934
22935      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22936    fi
22937  fi
22938
22939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22940$as_echo_n "checking for Boot JDK... " >&6; }
22941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22942$as_echo "$BOOT_JDK" >&6; }
22943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22944$as_echo_n "checking Boot JDK version... " >&6; }
22945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22947$as_echo "$BOOT_JDK_VERSION" >&6; }
22948          fi # end check jdk version
22949        fi # end check javac
22950      fi # end check java
22951    fi # end check boot jdk found
22952  fi
22953
22954
22955  if test "x$BOOT_JDK_FOUND" = xno; then
22956    # Now execute the test
22957
22958  if test "x$PROGRAMFILES" != x; then
22959    VIRTUAL_DIR="$PROGRAMFILES/Java"
22960
22961  windows_path="$VIRTUAL_DIR"
22962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22963    unix_path=`$CYGPATH -u "$windows_path"`
22964    VIRTUAL_DIR="$unix_path"
22965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22967    VIRTUAL_DIR="$unix_path"
22968  fi
22969
22970
22971  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22972  BOOT_JDK_SUFFIX=""
22973  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22974  if test "x$ALL_JDKS_FOUND" != x; then
22975    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22976
22977  if test "x$BOOT_JDK_FOUND" = xno; then
22978    # Now execute the test
22979
22980        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22981        if test -d "$BOOT_JDK"; then
22982          BOOT_JDK_FOUND=maybe
22983          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22984$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22985        fi
22986
22987
22988    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22989    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22990      # Do we have a bin/java?
22991      if test ! -x "$BOOT_JDK/bin/java"; then
22992        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22994        BOOT_JDK_FOUND=no
22995      else
22996        # Do we have a bin/javac?
22997        if test ! -x "$BOOT_JDK/bin/javac"; then
22998          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23000          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23001$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23002          BOOT_JDK_FOUND=no
23003        else
23004          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23005          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23006
23007          # Extra M4 quote needed to protect [] in grep expression.
23008          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23009          if test "x$FOUND_CORRECT_VERSION" = x; then
23010            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23012            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23013$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23014            BOOT_JDK_FOUND=no
23015          else
23016            # We're done! :-)
23017            BOOT_JDK_FOUND=yes
23018
23019  # Only process if variable expands to non-empty
23020
23021  if test "x$BOOT_JDK" != x; then
23022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23023
23024  # Input might be given as Windows format, start by converting to
23025  # unix format.
23026  path="$BOOT_JDK"
23027  new_path=`$CYGPATH -u "$path"`
23028
23029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23032  # "foo.exe" is OK but "foo" is an error.
23033  #
23034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23035  # It is also a way to make sure we got the proper file name for the real test later on.
23036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23037  if test "x$test_shortpath" = x; then
23038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23041  fi
23042
23043  # Call helper function which possibly converts this using DOS-style short mode.
23044  # If so, the updated path is stored in $new_path.
23045
23046  input_path="$new_path"
23047  # Check if we need to convert this using DOS-style short mode. If the path
23048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23049  # take no chances and rewrite it.
23050  # Note: m4 eats our [], so we need to use [ and ] instead.
23051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23052  if test "x$has_forbidden_chars" != x; then
23053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23057      # Going to short mode and back again did indeed matter. Since short mode is
23058      # case insensitive, let's make it lowercase to improve readability.
23059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23060      # Now convert it back to Unix-stile (cygpath)
23061      input_path=`$CYGPATH -u "$shortmode_path"`
23062      new_path="$input_path"
23063    fi
23064  fi
23065
23066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23067  if test "x$test_cygdrive_prefix" = x; then
23068    # As a simple fix, exclude /usr/bin since it's not a real path.
23069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23071      # a path prefixed by /cygdrive for fixpath to work.
23072      new_path="$CYGWIN_ROOT_PATH$input_path"
23073    fi
23074  fi
23075
23076
23077  if test "x$path" != "x$new_path"; then
23078    BOOT_JDK="$new_path"
23079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23081  fi
23082
23083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23084
23085  path="$BOOT_JDK"
23086  has_colon=`$ECHO $path | $GREP ^.:`
23087  new_path="$path"
23088  if test "x$has_colon" = x; then
23089    # Not in mixed or Windows style, start by that.
23090    new_path=`cmd //c echo $path`
23091  fi
23092
23093
23094  input_path="$new_path"
23095  # Check if we need to convert this using DOS-style short mode. If the path
23096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23097  # take no chances and rewrite it.
23098  # Note: m4 eats our [], so we need to use [ and ] instead.
23099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23100  if test "x$has_forbidden_chars" != x; then
23101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23103  fi
23104
23105
23106  windows_path="$new_path"
23107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23108    unix_path=`$CYGPATH -u "$windows_path"`
23109    new_path="$unix_path"
23110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23112    new_path="$unix_path"
23113  fi
23114
23115  if test "x$path" != "x$new_path"; then
23116    BOOT_JDK="$new_path"
23117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23119  fi
23120
23121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23123
23124    else
23125      # We're on a unix platform. Hooray! :)
23126      path="$BOOT_JDK"
23127      has_space=`$ECHO "$path" | $GREP " "`
23128      if test "x$has_space" != x; then
23129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23131        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23132      fi
23133
23134      # Use eval to expand a potential ~
23135      eval path="$path"
23136      if test ! -f "$path" && test ! -d "$path"; then
23137        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23138      fi
23139
23140      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23141    fi
23142  fi
23143
23144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23145$as_echo_n "checking for Boot JDK... " >&6; }
23146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23147$as_echo "$BOOT_JDK" >&6; }
23148            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23149$as_echo_n "checking Boot JDK version... " >&6; }
23150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23152$as_echo "$BOOT_JDK_VERSION" >&6; }
23153          fi # end check jdk version
23154        fi # end check javac
23155      fi # end check java
23156    fi # end check boot jdk found
23157  fi
23158
23159    done
23160  fi
23161
23162  fi
23163
23164
23165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23167      # Do we have a bin/java?
23168      if test ! -x "$BOOT_JDK/bin/java"; then
23169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23171        BOOT_JDK_FOUND=no
23172      else
23173        # Do we have a bin/javac?
23174        if test ! -x "$BOOT_JDK/bin/javac"; then
23175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23179          BOOT_JDK_FOUND=no
23180        else
23181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23183
23184          # Extra M4 quote needed to protect [] in grep expression.
23185          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23186          if test "x$FOUND_CORRECT_VERSION" = x; then
23187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23191            BOOT_JDK_FOUND=no
23192          else
23193            # We're done! :-)
23194            BOOT_JDK_FOUND=yes
23195
23196  # Only process if variable expands to non-empty
23197
23198  if test "x$BOOT_JDK" != x; then
23199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23200
23201  # Input might be given as Windows format, start by converting to
23202  # unix format.
23203  path="$BOOT_JDK"
23204  new_path=`$CYGPATH -u "$path"`
23205
23206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23209  # "foo.exe" is OK but "foo" is an error.
23210  #
23211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23212  # It is also a way to make sure we got the proper file name for the real test later on.
23213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23214  if test "x$test_shortpath" = x; then
23215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23218  fi
23219
23220  # Call helper function which possibly converts this using DOS-style short mode.
23221  # If so, the updated path is stored in $new_path.
23222
23223  input_path="$new_path"
23224  # Check if we need to convert this using DOS-style short mode. If the path
23225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23226  # take no chances and rewrite it.
23227  # Note: m4 eats our [], so we need to use [ and ] instead.
23228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23229  if test "x$has_forbidden_chars" != x; then
23230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23234      # Going to short mode and back again did indeed matter. Since short mode is
23235      # case insensitive, let's make it lowercase to improve readability.
23236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23237      # Now convert it back to Unix-stile (cygpath)
23238      input_path=`$CYGPATH -u "$shortmode_path"`
23239      new_path="$input_path"
23240    fi
23241  fi
23242
23243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23244  if test "x$test_cygdrive_prefix" = x; then
23245    # As a simple fix, exclude /usr/bin since it's not a real path.
23246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23248      # a path prefixed by /cygdrive for fixpath to work.
23249      new_path="$CYGWIN_ROOT_PATH$input_path"
23250    fi
23251  fi
23252
23253
23254  if test "x$path" != "x$new_path"; then
23255    BOOT_JDK="$new_path"
23256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23258  fi
23259
23260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23261
23262  path="$BOOT_JDK"
23263  has_colon=`$ECHO $path | $GREP ^.:`
23264  new_path="$path"
23265  if test "x$has_colon" = x; then
23266    # Not in mixed or Windows style, start by that.
23267    new_path=`cmd //c echo $path`
23268  fi
23269
23270
23271  input_path="$new_path"
23272  # Check if we need to convert this using DOS-style short mode. If the path
23273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23274  # take no chances and rewrite it.
23275  # Note: m4 eats our [], so we need to use [ and ] instead.
23276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23277  if test "x$has_forbidden_chars" != x; then
23278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23280  fi
23281
23282
23283  windows_path="$new_path"
23284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23285    unix_path=`$CYGPATH -u "$windows_path"`
23286    new_path="$unix_path"
23287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23289    new_path="$unix_path"
23290  fi
23291
23292  if test "x$path" != "x$new_path"; then
23293    BOOT_JDK="$new_path"
23294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23296  fi
23297
23298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23300
23301    else
23302      # We're on a unix platform. Hooray! :)
23303      path="$BOOT_JDK"
23304      has_space=`$ECHO "$path" | $GREP " "`
23305      if test "x$has_space" != x; then
23306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23309      fi
23310
23311      # Use eval to expand a potential ~
23312      eval path="$path"
23313      if test ! -f "$path" && test ! -d "$path"; then
23314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23315      fi
23316
23317      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23318    fi
23319  fi
23320
23321            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23322$as_echo_n "checking for Boot JDK... " >&6; }
23323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23324$as_echo "$BOOT_JDK" >&6; }
23325            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23326$as_echo_n "checking Boot JDK version... " >&6; }
23327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23329$as_echo "$BOOT_JDK_VERSION" >&6; }
23330          fi # end check jdk version
23331        fi # end check javac
23332      fi # end check java
23333    fi # end check boot jdk found
23334  fi
23335
23336
23337  if test "x$BOOT_JDK_FOUND" = xno; then
23338    # Now execute the test
23339
23340  if test "x$ProgramFiles" != x; then
23341    VIRTUAL_DIR="$ProgramFiles/Java"
23342
23343  windows_path="$VIRTUAL_DIR"
23344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23345    unix_path=`$CYGPATH -u "$windows_path"`
23346    VIRTUAL_DIR="$unix_path"
23347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23349    VIRTUAL_DIR="$unix_path"
23350  fi
23351
23352
23353  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23354  BOOT_JDK_SUFFIX=""
23355  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23356  if test "x$ALL_JDKS_FOUND" != x; then
23357    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23358
23359  if test "x$BOOT_JDK_FOUND" = xno; then
23360    # Now execute the test
23361
23362        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23363        if test -d "$BOOT_JDK"; then
23364          BOOT_JDK_FOUND=maybe
23365          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23366$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23367        fi
23368
23369
23370    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23371    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23372      # Do we have a bin/java?
23373      if test ! -x "$BOOT_JDK/bin/java"; then
23374        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23376        BOOT_JDK_FOUND=no
23377      else
23378        # Do we have a bin/javac?
23379        if test ! -x "$BOOT_JDK/bin/javac"; then
23380          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23382          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23383$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23384          BOOT_JDK_FOUND=no
23385        else
23386          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23387          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23388
23389          # Extra M4 quote needed to protect [] in grep expression.
23390          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23391          if test "x$FOUND_CORRECT_VERSION" = x; then
23392            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23394            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23395$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23396            BOOT_JDK_FOUND=no
23397          else
23398            # We're done! :-)
23399            BOOT_JDK_FOUND=yes
23400
23401  # Only process if variable expands to non-empty
23402
23403  if test "x$BOOT_JDK" != x; then
23404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23405
23406  # Input might be given as Windows format, start by converting to
23407  # unix format.
23408  path="$BOOT_JDK"
23409  new_path=`$CYGPATH -u "$path"`
23410
23411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23414  # "foo.exe" is OK but "foo" is an error.
23415  #
23416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23417  # It is also a way to make sure we got the proper file name for the real test later on.
23418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23419  if test "x$test_shortpath" = x; then
23420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23421$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23422    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23423  fi
23424
23425  # Call helper function which possibly converts this using DOS-style short mode.
23426  # If so, the updated path is stored in $new_path.
23427
23428  input_path="$new_path"
23429  # Check if we need to convert this using DOS-style short mode. If the path
23430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23431  # take no chances and rewrite it.
23432  # Note: m4 eats our [], so we need to use [ and ] instead.
23433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23434  if test "x$has_forbidden_chars" != x; then
23435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23439      # Going to short mode and back again did indeed matter. Since short mode is
23440      # case insensitive, let's make it lowercase to improve readability.
23441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23442      # Now convert it back to Unix-stile (cygpath)
23443      input_path=`$CYGPATH -u "$shortmode_path"`
23444      new_path="$input_path"
23445    fi
23446  fi
23447
23448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23449  if test "x$test_cygdrive_prefix" = x; then
23450    # As a simple fix, exclude /usr/bin since it's not a real path.
23451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23453      # a path prefixed by /cygdrive for fixpath to work.
23454      new_path="$CYGWIN_ROOT_PATH$input_path"
23455    fi
23456  fi
23457
23458
23459  if test "x$path" != "x$new_path"; then
23460    BOOT_JDK="$new_path"
23461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23462$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23463  fi
23464
23465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23466
23467  path="$BOOT_JDK"
23468  has_colon=`$ECHO $path | $GREP ^.:`
23469  new_path="$path"
23470  if test "x$has_colon" = x; then
23471    # Not in mixed or Windows style, start by that.
23472    new_path=`cmd //c echo $path`
23473  fi
23474
23475
23476  input_path="$new_path"
23477  # Check if we need to convert this using DOS-style short mode. If the path
23478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23479  # take no chances and rewrite it.
23480  # Note: m4 eats our [], so we need to use [ and ] instead.
23481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23482  if test "x$has_forbidden_chars" != x; then
23483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23485  fi
23486
23487
23488  windows_path="$new_path"
23489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23490    unix_path=`$CYGPATH -u "$windows_path"`
23491    new_path="$unix_path"
23492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23494    new_path="$unix_path"
23495  fi
23496
23497  if test "x$path" != "x$new_path"; then
23498    BOOT_JDK="$new_path"
23499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23500$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23501  fi
23502
23503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23505
23506    else
23507      # We're on a unix platform. Hooray! :)
23508      path="$BOOT_JDK"
23509      has_space=`$ECHO "$path" | $GREP " "`
23510      if test "x$has_space" != x; then
23511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23512$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23514      fi
23515
23516      # Use eval to expand a potential ~
23517      eval path="$path"
23518      if test ! -f "$path" && test ! -d "$path"; then
23519        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23520      fi
23521
23522      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23523    fi
23524  fi
23525
23526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23527$as_echo_n "checking for Boot JDK... " >&6; }
23528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23529$as_echo "$BOOT_JDK" >&6; }
23530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23531$as_echo_n "checking Boot JDK version... " >&6; }
23532            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23534$as_echo "$BOOT_JDK_VERSION" >&6; }
23535          fi # end check jdk version
23536        fi # end check javac
23537      fi # end check java
23538    fi # end check boot jdk found
23539  fi
23540
23541    done
23542  fi
23543
23544  fi
23545
23546
23547    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23548    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23549      # Do we have a bin/java?
23550      if test ! -x "$BOOT_JDK/bin/java"; then
23551        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23553        BOOT_JDK_FOUND=no
23554      else
23555        # Do we have a bin/javac?
23556        if test ! -x "$BOOT_JDK/bin/javac"; then
23557          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23559          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23560$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23561          BOOT_JDK_FOUND=no
23562        else
23563          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23564          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23565
23566          # Extra M4 quote needed to protect [] in grep expression.
23567          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23568          if test "x$FOUND_CORRECT_VERSION" = x; then
23569            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23571            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23572$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23573            BOOT_JDK_FOUND=no
23574          else
23575            # We're done! :-)
23576            BOOT_JDK_FOUND=yes
23577
23578  # Only process if variable expands to non-empty
23579
23580  if test "x$BOOT_JDK" != x; then
23581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23582
23583  # Input might be given as Windows format, start by converting to
23584  # unix format.
23585  path="$BOOT_JDK"
23586  new_path=`$CYGPATH -u "$path"`
23587
23588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23591  # "foo.exe" is OK but "foo" is an error.
23592  #
23593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23594  # It is also a way to make sure we got the proper file name for the real test later on.
23595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23596  if test "x$test_shortpath" = x; then
23597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23599    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23600  fi
23601
23602  # Call helper function which possibly converts this using DOS-style short mode.
23603  # If so, the updated path is stored in $new_path.
23604
23605  input_path="$new_path"
23606  # Check if we need to convert this using DOS-style short mode. If the path
23607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23608  # take no chances and rewrite it.
23609  # Note: m4 eats our [], so we need to use [ and ] instead.
23610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23611  if test "x$has_forbidden_chars" != x; then
23612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23616      # Going to short mode and back again did indeed matter. Since short mode is
23617      # case insensitive, let's make it lowercase to improve readability.
23618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23619      # Now convert it back to Unix-stile (cygpath)
23620      input_path=`$CYGPATH -u "$shortmode_path"`
23621      new_path="$input_path"
23622    fi
23623  fi
23624
23625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23626  if test "x$test_cygdrive_prefix" = x; then
23627    # As a simple fix, exclude /usr/bin since it's not a real path.
23628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23630      # a path prefixed by /cygdrive for fixpath to work.
23631      new_path="$CYGWIN_ROOT_PATH$input_path"
23632    fi
23633  fi
23634
23635
23636  if test "x$path" != "x$new_path"; then
23637    BOOT_JDK="$new_path"
23638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23640  fi
23641
23642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23643
23644  path="$BOOT_JDK"
23645  has_colon=`$ECHO $path | $GREP ^.:`
23646  new_path="$path"
23647  if test "x$has_colon" = x; then
23648    # Not in mixed or Windows style, start by that.
23649    new_path=`cmd //c echo $path`
23650  fi
23651
23652
23653  input_path="$new_path"
23654  # Check if we need to convert this using DOS-style short mode. If the path
23655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23656  # take no chances and rewrite it.
23657  # Note: m4 eats our [], so we need to use [ and ] instead.
23658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23659  if test "x$has_forbidden_chars" != x; then
23660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23662  fi
23663
23664
23665  windows_path="$new_path"
23666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23667    unix_path=`$CYGPATH -u "$windows_path"`
23668    new_path="$unix_path"
23669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23671    new_path="$unix_path"
23672  fi
23673
23674  if test "x$path" != "x$new_path"; then
23675    BOOT_JDK="$new_path"
23676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23678  fi
23679
23680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23682
23683    else
23684      # We're on a unix platform. Hooray! :)
23685      path="$BOOT_JDK"
23686      has_space=`$ECHO "$path" | $GREP " "`
23687      if test "x$has_space" != x; then
23688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23691      fi
23692
23693      # Use eval to expand a potential ~
23694      eval path="$path"
23695      if test ! -f "$path" && test ! -d "$path"; then
23696        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23697      fi
23698
23699      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23700    fi
23701  fi
23702
23703            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23704$as_echo_n "checking for Boot JDK... " >&6; }
23705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23706$as_echo "$BOOT_JDK" >&6; }
23707            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23708$as_echo_n "checking Boot JDK version... " >&6; }
23709            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23711$as_echo "$BOOT_JDK_VERSION" >&6; }
23712          fi # end check jdk version
23713        fi # end check javac
23714      fi # end check java
23715    fi # end check boot jdk found
23716  fi
23717
23718
23719  if test "x$BOOT_JDK_FOUND" = xno; then
23720    # Now execute the test
23721
23722  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23723  BOOT_JDK_SUFFIX=""
23724  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23725  if test "x$ALL_JDKS_FOUND" != x; then
23726    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23727
23728  if test "x$BOOT_JDK_FOUND" = xno; then
23729    # Now execute the test
23730
23731        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23732        if test -d "$BOOT_JDK"; then
23733          BOOT_JDK_FOUND=maybe
23734          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23735$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23736        fi
23737
23738
23739    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23740    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23741      # Do we have a bin/java?
23742      if test ! -x "$BOOT_JDK/bin/java"; then
23743        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23745        BOOT_JDK_FOUND=no
23746      else
23747        # Do we have a bin/javac?
23748        if test ! -x "$BOOT_JDK/bin/javac"; then
23749          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23751          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23752$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23753          BOOT_JDK_FOUND=no
23754        else
23755          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23756          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23757
23758          # Extra M4 quote needed to protect [] in grep expression.
23759          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23760          if test "x$FOUND_CORRECT_VERSION" = x; then
23761            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23763            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23764$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23765            BOOT_JDK_FOUND=no
23766          else
23767            # We're done! :-)
23768            BOOT_JDK_FOUND=yes
23769
23770  # Only process if variable expands to non-empty
23771
23772  if test "x$BOOT_JDK" != x; then
23773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23774
23775  # Input might be given as Windows format, start by converting to
23776  # unix format.
23777  path="$BOOT_JDK"
23778  new_path=`$CYGPATH -u "$path"`
23779
23780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23783  # "foo.exe" is OK but "foo" is an error.
23784  #
23785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23786  # It is also a way to make sure we got the proper file name for the real test later on.
23787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23788  if test "x$test_shortpath" = x; then
23789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23791    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23792  fi
23793
23794  # Call helper function which possibly converts this using DOS-style short mode.
23795  # If so, the updated path is stored in $new_path.
23796
23797  input_path="$new_path"
23798  # Check if we need to convert this using DOS-style short mode. If the path
23799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23800  # take no chances and rewrite it.
23801  # Note: m4 eats our [], so we need to use [ and ] instead.
23802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23803  if test "x$has_forbidden_chars" != x; then
23804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23808      # Going to short mode and back again did indeed matter. Since short mode is
23809      # case insensitive, let's make it lowercase to improve readability.
23810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23811      # Now convert it back to Unix-stile (cygpath)
23812      input_path=`$CYGPATH -u "$shortmode_path"`
23813      new_path="$input_path"
23814    fi
23815  fi
23816
23817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23818  if test "x$test_cygdrive_prefix" = x; then
23819    # As a simple fix, exclude /usr/bin since it's not a real path.
23820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23822      # a path prefixed by /cygdrive for fixpath to work.
23823      new_path="$CYGWIN_ROOT_PATH$input_path"
23824    fi
23825  fi
23826
23827
23828  if test "x$path" != "x$new_path"; then
23829    BOOT_JDK="$new_path"
23830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23832  fi
23833
23834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23835
23836  path="$BOOT_JDK"
23837  has_colon=`$ECHO $path | $GREP ^.:`
23838  new_path="$path"
23839  if test "x$has_colon" = x; then
23840    # Not in mixed or Windows style, start by that.
23841    new_path=`cmd //c echo $path`
23842  fi
23843
23844
23845  input_path="$new_path"
23846  # Check if we need to convert this using DOS-style short mode. If the path
23847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23848  # take no chances and rewrite it.
23849  # Note: m4 eats our [], so we need to use [ and ] instead.
23850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23851  if test "x$has_forbidden_chars" != x; then
23852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23854  fi
23855
23856
23857  windows_path="$new_path"
23858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23859    unix_path=`$CYGPATH -u "$windows_path"`
23860    new_path="$unix_path"
23861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23863    new_path="$unix_path"
23864  fi
23865
23866  if test "x$path" != "x$new_path"; then
23867    BOOT_JDK="$new_path"
23868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23870  fi
23871
23872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23874
23875    else
23876      # We're on a unix platform. Hooray! :)
23877      path="$BOOT_JDK"
23878      has_space=`$ECHO "$path" | $GREP " "`
23879      if test "x$has_space" != x; then
23880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23883      fi
23884
23885      # Use eval to expand a potential ~
23886      eval path="$path"
23887      if test ! -f "$path" && test ! -d "$path"; then
23888        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23889      fi
23890
23891      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23892    fi
23893  fi
23894
23895            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23896$as_echo_n "checking for Boot JDK... " >&6; }
23897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23898$as_echo "$BOOT_JDK" >&6; }
23899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23900$as_echo_n "checking Boot JDK version... " >&6; }
23901            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23903$as_echo "$BOOT_JDK_VERSION" >&6; }
23904          fi # end check jdk version
23905        fi # end check javac
23906      fi # end check java
23907    fi # end check boot jdk found
23908  fi
23909
23910    done
23911  fi
23912
23913
23914    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23915    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23916      # Do we have a bin/java?
23917      if test ! -x "$BOOT_JDK/bin/java"; then
23918        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23920        BOOT_JDK_FOUND=no
23921      else
23922        # Do we have a bin/javac?
23923        if test ! -x "$BOOT_JDK/bin/javac"; then
23924          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23926          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23927$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23928          BOOT_JDK_FOUND=no
23929        else
23930          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23931          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23932
23933          # Extra M4 quote needed to protect [] in grep expression.
23934          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23935          if test "x$FOUND_CORRECT_VERSION" = x; then
23936            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23938            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23939$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23940            BOOT_JDK_FOUND=no
23941          else
23942            # We're done! :-)
23943            BOOT_JDK_FOUND=yes
23944
23945  # Only process if variable expands to non-empty
23946
23947  if test "x$BOOT_JDK" != x; then
23948    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23949
23950  # Input might be given as Windows format, start by converting to
23951  # unix format.
23952  path="$BOOT_JDK"
23953  new_path=`$CYGPATH -u "$path"`
23954
23955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23958  # "foo.exe" is OK but "foo" is an error.
23959  #
23960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23961  # It is also a way to make sure we got the proper file name for the real test later on.
23962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23963  if test "x$test_shortpath" = x; then
23964    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23965$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23966    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23967  fi
23968
23969  # Call helper function which possibly converts this using DOS-style short mode.
23970  # If so, the updated path is stored in $new_path.
23971
23972  input_path="$new_path"
23973  # Check if we need to convert this using DOS-style short mode. If the path
23974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23975  # take no chances and rewrite it.
23976  # Note: m4 eats our [], so we need to use [ and ] instead.
23977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23978  if test "x$has_forbidden_chars" != x; then
23979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23983      # Going to short mode and back again did indeed matter. Since short mode is
23984      # case insensitive, let's make it lowercase to improve readability.
23985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23986      # Now convert it back to Unix-stile (cygpath)
23987      input_path=`$CYGPATH -u "$shortmode_path"`
23988      new_path="$input_path"
23989    fi
23990  fi
23991
23992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23993  if test "x$test_cygdrive_prefix" = x; then
23994    # As a simple fix, exclude /usr/bin since it's not a real path.
23995    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23997      # a path prefixed by /cygdrive for fixpath to work.
23998      new_path="$CYGWIN_ROOT_PATH$input_path"
23999    fi
24000  fi
24001
24002
24003  if test "x$path" != "x$new_path"; then
24004    BOOT_JDK="$new_path"
24005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24007  fi
24008
24009    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24010
24011  path="$BOOT_JDK"
24012  has_colon=`$ECHO $path | $GREP ^.:`
24013  new_path="$path"
24014  if test "x$has_colon" = x; then
24015    # Not in mixed or Windows style, start by that.
24016    new_path=`cmd //c echo $path`
24017  fi
24018
24019
24020  input_path="$new_path"
24021  # Check if we need to convert this using DOS-style short mode. If the path
24022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24023  # take no chances and rewrite it.
24024  # Note: m4 eats our [], so we need to use [ and ] instead.
24025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24026  if test "x$has_forbidden_chars" != x; then
24027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24029  fi
24030
24031
24032  windows_path="$new_path"
24033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24034    unix_path=`$CYGPATH -u "$windows_path"`
24035    new_path="$unix_path"
24036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24038    new_path="$unix_path"
24039  fi
24040
24041  if test "x$path" != "x$new_path"; then
24042    BOOT_JDK="$new_path"
24043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24045  fi
24046
24047  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24048  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24049
24050    else
24051      # We're on a unix platform. Hooray! :)
24052      path="$BOOT_JDK"
24053      has_space=`$ECHO "$path" | $GREP " "`
24054      if test "x$has_space" != x; then
24055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24057        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24058      fi
24059
24060      # Use eval to expand a potential ~
24061      eval path="$path"
24062      if test ! -f "$path" && test ! -d "$path"; then
24063        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24064      fi
24065
24066      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24067    fi
24068  fi
24069
24070            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24071$as_echo_n "checking for Boot JDK... " >&6; }
24072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24073$as_echo "$BOOT_JDK" >&6; }
24074            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24075$as_echo_n "checking Boot JDK version... " >&6; }
24076            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24078$as_echo "$BOOT_JDK_VERSION" >&6; }
24079          fi # end check jdk version
24080        fi # end check javac
24081      fi # end check java
24082    fi # end check boot jdk found
24083  fi
24084
24085  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24086
24087  if test "x$BOOT_JDK_FOUND" = xno; then
24088    # Now execute the test
24089
24090  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24091  BOOT_JDK_SUFFIX="/Contents/Home"
24092  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24093  if test "x$ALL_JDKS_FOUND" != x; then
24094    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24095
24096  if test "x$BOOT_JDK_FOUND" = xno; then
24097    # Now execute the test
24098
24099        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24100        if test -d "$BOOT_JDK"; then
24101          BOOT_JDK_FOUND=maybe
24102          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24103$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24104        fi
24105
24106
24107    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24108    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24109      # Do we have a bin/java?
24110      if test ! -x "$BOOT_JDK/bin/java"; then
24111        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24113        BOOT_JDK_FOUND=no
24114      else
24115        # Do we have a bin/javac?
24116        if test ! -x "$BOOT_JDK/bin/javac"; then
24117          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24119          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24120$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24121          BOOT_JDK_FOUND=no
24122        else
24123          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24124          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24125
24126          # Extra M4 quote needed to protect [] in grep expression.
24127          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24128          if test "x$FOUND_CORRECT_VERSION" = x; then
24129            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24131            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24132$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24133            BOOT_JDK_FOUND=no
24134          else
24135            # We're done! :-)
24136            BOOT_JDK_FOUND=yes
24137
24138  # Only process if variable expands to non-empty
24139
24140  if test "x$BOOT_JDK" != x; then
24141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24142
24143  # Input might be given as Windows format, start by converting to
24144  # unix format.
24145  path="$BOOT_JDK"
24146  new_path=`$CYGPATH -u "$path"`
24147
24148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24151  # "foo.exe" is OK but "foo" is an error.
24152  #
24153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24154  # It is also a way to make sure we got the proper file name for the real test later on.
24155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24156  if test "x$test_shortpath" = x; then
24157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24159    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24160  fi
24161
24162  # Call helper function which possibly converts this using DOS-style short mode.
24163  # If so, the updated path is stored in $new_path.
24164
24165  input_path="$new_path"
24166  # Check if we need to convert this using DOS-style short mode. If the path
24167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24168  # take no chances and rewrite it.
24169  # Note: m4 eats our [], so we need to use [ and ] instead.
24170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24171  if test "x$has_forbidden_chars" != x; then
24172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24176      # Going to short mode and back again did indeed matter. Since short mode is
24177      # case insensitive, let's make it lowercase to improve readability.
24178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24179      # Now convert it back to Unix-stile (cygpath)
24180      input_path=`$CYGPATH -u "$shortmode_path"`
24181      new_path="$input_path"
24182    fi
24183  fi
24184
24185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24186  if test "x$test_cygdrive_prefix" = x; then
24187    # As a simple fix, exclude /usr/bin since it's not a real path.
24188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24190      # a path prefixed by /cygdrive for fixpath to work.
24191      new_path="$CYGWIN_ROOT_PATH$input_path"
24192    fi
24193  fi
24194
24195
24196  if test "x$path" != "x$new_path"; then
24197    BOOT_JDK="$new_path"
24198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24200  fi
24201
24202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24203
24204  path="$BOOT_JDK"
24205  has_colon=`$ECHO $path | $GREP ^.:`
24206  new_path="$path"
24207  if test "x$has_colon" = x; then
24208    # Not in mixed or Windows style, start by that.
24209    new_path=`cmd //c echo $path`
24210  fi
24211
24212
24213  input_path="$new_path"
24214  # Check if we need to convert this using DOS-style short mode. If the path
24215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24216  # take no chances and rewrite it.
24217  # Note: m4 eats our [], so we need to use [ and ] instead.
24218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24219  if test "x$has_forbidden_chars" != x; then
24220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24222  fi
24223
24224
24225  windows_path="$new_path"
24226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24227    unix_path=`$CYGPATH -u "$windows_path"`
24228    new_path="$unix_path"
24229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24231    new_path="$unix_path"
24232  fi
24233
24234  if test "x$path" != "x$new_path"; then
24235    BOOT_JDK="$new_path"
24236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24237$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24238  fi
24239
24240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24242
24243    else
24244      # We're on a unix platform. Hooray! :)
24245      path="$BOOT_JDK"
24246      has_space=`$ECHO "$path" | $GREP " "`
24247      if test "x$has_space" != x; then
24248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24251      fi
24252
24253      # Use eval to expand a potential ~
24254      eval path="$path"
24255      if test ! -f "$path" && test ! -d "$path"; then
24256        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24257      fi
24258
24259      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24260    fi
24261  fi
24262
24263            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24264$as_echo_n "checking for Boot JDK... " >&6; }
24265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24266$as_echo "$BOOT_JDK" >&6; }
24267            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24268$as_echo_n "checking Boot JDK version... " >&6; }
24269            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24271$as_echo "$BOOT_JDK_VERSION" >&6; }
24272          fi # end check jdk version
24273        fi # end check javac
24274      fi # end check java
24275    fi # end check boot jdk found
24276  fi
24277
24278    done
24279  fi
24280
24281
24282    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24283    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24284      # Do we have a bin/java?
24285      if test ! -x "$BOOT_JDK/bin/java"; then
24286        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24288        BOOT_JDK_FOUND=no
24289      else
24290        # Do we have a bin/javac?
24291        if test ! -x "$BOOT_JDK/bin/javac"; then
24292          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24294          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24295$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24296          BOOT_JDK_FOUND=no
24297        else
24298          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24299          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24300
24301          # Extra M4 quote needed to protect [] in grep expression.
24302          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24303          if test "x$FOUND_CORRECT_VERSION" = x; then
24304            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24306            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24307$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24308            BOOT_JDK_FOUND=no
24309          else
24310            # We're done! :-)
24311            BOOT_JDK_FOUND=yes
24312
24313  # Only process if variable expands to non-empty
24314
24315  if test "x$BOOT_JDK" != x; then
24316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24317
24318  # Input might be given as Windows format, start by converting to
24319  # unix format.
24320  path="$BOOT_JDK"
24321  new_path=`$CYGPATH -u "$path"`
24322
24323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24326  # "foo.exe" is OK but "foo" is an error.
24327  #
24328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24329  # It is also a way to make sure we got the proper file name for the real test later on.
24330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24331  if test "x$test_shortpath" = x; then
24332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24334    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24335  fi
24336
24337  # Call helper function which possibly converts this using DOS-style short mode.
24338  # If so, the updated path is stored in $new_path.
24339
24340  input_path="$new_path"
24341  # Check if we need to convert this using DOS-style short mode. If the path
24342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24343  # take no chances and rewrite it.
24344  # Note: m4 eats our [], so we need to use [ and ] instead.
24345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24346  if test "x$has_forbidden_chars" != x; then
24347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24351      # Going to short mode and back again did indeed matter. Since short mode is
24352      # case insensitive, let's make it lowercase to improve readability.
24353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24354      # Now convert it back to Unix-stile (cygpath)
24355      input_path=`$CYGPATH -u "$shortmode_path"`
24356      new_path="$input_path"
24357    fi
24358  fi
24359
24360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24361  if test "x$test_cygdrive_prefix" = x; then
24362    # As a simple fix, exclude /usr/bin since it's not a real path.
24363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24365      # a path prefixed by /cygdrive for fixpath to work.
24366      new_path="$CYGWIN_ROOT_PATH$input_path"
24367    fi
24368  fi
24369
24370
24371  if test "x$path" != "x$new_path"; then
24372    BOOT_JDK="$new_path"
24373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24375  fi
24376
24377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24378
24379  path="$BOOT_JDK"
24380  has_colon=`$ECHO $path | $GREP ^.:`
24381  new_path="$path"
24382  if test "x$has_colon" = x; then
24383    # Not in mixed or Windows style, start by that.
24384    new_path=`cmd //c echo $path`
24385  fi
24386
24387
24388  input_path="$new_path"
24389  # Check if we need to convert this using DOS-style short mode. If the path
24390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24391  # take no chances and rewrite it.
24392  # Note: m4 eats our [], so we need to use [ and ] instead.
24393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24394  if test "x$has_forbidden_chars" != x; then
24395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24397  fi
24398
24399
24400  windows_path="$new_path"
24401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24402    unix_path=`$CYGPATH -u "$windows_path"`
24403    new_path="$unix_path"
24404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24406    new_path="$unix_path"
24407  fi
24408
24409  if test "x$path" != "x$new_path"; then
24410    BOOT_JDK="$new_path"
24411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24413  fi
24414
24415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24417
24418    else
24419      # We're on a unix platform. Hooray! :)
24420      path="$BOOT_JDK"
24421      has_space=`$ECHO "$path" | $GREP " "`
24422      if test "x$has_space" != x; then
24423        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24424$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24425        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24426      fi
24427
24428      # Use eval to expand a potential ~
24429      eval path="$path"
24430      if test ! -f "$path" && test ! -d "$path"; then
24431        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24432      fi
24433
24434      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24435    fi
24436  fi
24437
24438            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24439$as_echo_n "checking for Boot JDK... " >&6; }
24440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24441$as_echo "$BOOT_JDK" >&6; }
24442            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24443$as_echo_n "checking Boot JDK version... " >&6; }
24444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24446$as_echo "$BOOT_JDK_VERSION" >&6; }
24447          fi # end check jdk version
24448        fi # end check javac
24449      fi # end check java
24450    fi # end check boot jdk found
24451  fi
24452
24453
24454  if test "x$BOOT_JDK_FOUND" = xno; then
24455    # Now execute the test
24456
24457  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24458  BOOT_JDK_SUFFIX="/Contents/Home"
24459  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24460  if test "x$ALL_JDKS_FOUND" != x; then
24461    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24462
24463  if test "x$BOOT_JDK_FOUND" = xno; then
24464    # Now execute the test
24465
24466        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24467        if test -d "$BOOT_JDK"; then
24468          BOOT_JDK_FOUND=maybe
24469          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24470$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24471        fi
24472
24473
24474    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24475    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24476      # Do we have a bin/java?
24477      if test ! -x "$BOOT_JDK/bin/java"; then
24478        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24480        BOOT_JDK_FOUND=no
24481      else
24482        # Do we have a bin/javac?
24483        if test ! -x "$BOOT_JDK/bin/javac"; then
24484          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24486          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24487$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24488          BOOT_JDK_FOUND=no
24489        else
24490          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24491          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24492
24493          # Extra M4 quote needed to protect [] in grep expression.
24494          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24495          if test "x$FOUND_CORRECT_VERSION" = x; then
24496            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24498            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24499$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24500            BOOT_JDK_FOUND=no
24501          else
24502            # We're done! :-)
24503            BOOT_JDK_FOUND=yes
24504
24505  # Only process if variable expands to non-empty
24506
24507  if test "x$BOOT_JDK" != x; then
24508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24509
24510  # Input might be given as Windows format, start by converting to
24511  # unix format.
24512  path="$BOOT_JDK"
24513  new_path=`$CYGPATH -u "$path"`
24514
24515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24518  # "foo.exe" is OK but "foo" is an error.
24519  #
24520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24521  # It is also a way to make sure we got the proper file name for the real test later on.
24522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24523  if test "x$test_shortpath" = x; then
24524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24526    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24527  fi
24528
24529  # Call helper function which possibly converts this using DOS-style short mode.
24530  # If so, the updated path is stored in $new_path.
24531
24532  input_path="$new_path"
24533  # Check if we need to convert this using DOS-style short mode. If the path
24534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24535  # take no chances and rewrite it.
24536  # Note: m4 eats our [], so we need to use [ and ] instead.
24537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24538  if test "x$has_forbidden_chars" != x; then
24539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24543      # Going to short mode and back again did indeed matter. Since short mode is
24544      # case insensitive, let's make it lowercase to improve readability.
24545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24546      # Now convert it back to Unix-stile (cygpath)
24547      input_path=`$CYGPATH -u "$shortmode_path"`
24548      new_path="$input_path"
24549    fi
24550  fi
24551
24552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24553  if test "x$test_cygdrive_prefix" = x; then
24554    # As a simple fix, exclude /usr/bin since it's not a real path.
24555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24557      # a path prefixed by /cygdrive for fixpath to work.
24558      new_path="$CYGWIN_ROOT_PATH$input_path"
24559    fi
24560  fi
24561
24562
24563  if test "x$path" != "x$new_path"; then
24564    BOOT_JDK="$new_path"
24565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24567  fi
24568
24569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24570
24571  path="$BOOT_JDK"
24572  has_colon=`$ECHO $path | $GREP ^.:`
24573  new_path="$path"
24574  if test "x$has_colon" = x; then
24575    # Not in mixed or Windows style, start by that.
24576    new_path=`cmd //c echo $path`
24577  fi
24578
24579
24580  input_path="$new_path"
24581  # Check if we need to convert this using DOS-style short mode. If the path
24582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24583  # take no chances and rewrite it.
24584  # Note: m4 eats our [], so we need to use [ and ] instead.
24585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24586  if test "x$has_forbidden_chars" != x; then
24587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24589  fi
24590
24591
24592  windows_path="$new_path"
24593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24594    unix_path=`$CYGPATH -u "$windows_path"`
24595    new_path="$unix_path"
24596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24598    new_path="$unix_path"
24599  fi
24600
24601  if test "x$path" != "x$new_path"; then
24602    BOOT_JDK="$new_path"
24603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24605  fi
24606
24607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24609
24610    else
24611      # We're on a unix platform. Hooray! :)
24612      path="$BOOT_JDK"
24613      has_space=`$ECHO "$path" | $GREP " "`
24614      if test "x$has_space" != x; then
24615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24618      fi
24619
24620      # Use eval to expand a potential ~
24621      eval path="$path"
24622      if test ! -f "$path" && test ! -d "$path"; then
24623        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24624      fi
24625
24626      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24627    fi
24628  fi
24629
24630            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24631$as_echo_n "checking for Boot JDK... " >&6; }
24632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24633$as_echo "$BOOT_JDK" >&6; }
24634            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24635$as_echo_n "checking Boot JDK version... " >&6; }
24636            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24638$as_echo "$BOOT_JDK_VERSION" >&6; }
24639          fi # end check jdk version
24640        fi # end check javac
24641      fi # end check java
24642    fi # end check boot jdk found
24643  fi
24644
24645    done
24646  fi
24647
24648
24649    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24650    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24651      # Do we have a bin/java?
24652      if test ! -x "$BOOT_JDK/bin/java"; then
24653        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24655        BOOT_JDK_FOUND=no
24656      else
24657        # Do we have a bin/javac?
24658        if test ! -x "$BOOT_JDK/bin/javac"; then
24659          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24661          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24662$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24663          BOOT_JDK_FOUND=no
24664        else
24665          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24666          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24667
24668          # Extra M4 quote needed to protect [] in grep expression.
24669          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24670          if test "x$FOUND_CORRECT_VERSION" = x; then
24671            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24672$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24673            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24674$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24675            BOOT_JDK_FOUND=no
24676          else
24677            # We're done! :-)
24678            BOOT_JDK_FOUND=yes
24679
24680  # Only process if variable expands to non-empty
24681
24682  if test "x$BOOT_JDK" != x; then
24683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24684
24685  # Input might be given as Windows format, start by converting to
24686  # unix format.
24687  path="$BOOT_JDK"
24688  new_path=`$CYGPATH -u "$path"`
24689
24690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24693  # "foo.exe" is OK but "foo" is an error.
24694  #
24695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24696  # It is also a way to make sure we got the proper file name for the real test later on.
24697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24698  if test "x$test_shortpath" = x; then
24699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24701    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24702  fi
24703
24704  # Call helper function which possibly converts this using DOS-style short mode.
24705  # If so, the updated path is stored in $new_path.
24706
24707  input_path="$new_path"
24708  # Check if we need to convert this using DOS-style short mode. If the path
24709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24710  # take no chances and rewrite it.
24711  # Note: m4 eats our [], so we need to use [ and ] instead.
24712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24713  if test "x$has_forbidden_chars" != x; then
24714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24718      # Going to short mode and back again did indeed matter. Since short mode is
24719      # case insensitive, let's make it lowercase to improve readability.
24720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24721      # Now convert it back to Unix-stile (cygpath)
24722      input_path=`$CYGPATH -u "$shortmode_path"`
24723      new_path="$input_path"
24724    fi
24725  fi
24726
24727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24728  if test "x$test_cygdrive_prefix" = x; then
24729    # As a simple fix, exclude /usr/bin since it's not a real path.
24730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24732      # a path prefixed by /cygdrive for fixpath to work.
24733      new_path="$CYGWIN_ROOT_PATH$input_path"
24734    fi
24735  fi
24736
24737
24738  if test "x$path" != "x$new_path"; then
24739    BOOT_JDK="$new_path"
24740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24741$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24742  fi
24743
24744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24745
24746  path="$BOOT_JDK"
24747  has_colon=`$ECHO $path | $GREP ^.:`
24748  new_path="$path"
24749  if test "x$has_colon" = x; then
24750    # Not in mixed or Windows style, start by that.
24751    new_path=`cmd //c echo $path`
24752  fi
24753
24754
24755  input_path="$new_path"
24756  # Check if we need to convert this using DOS-style short mode. If the path
24757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24758  # take no chances and rewrite it.
24759  # Note: m4 eats our [], so we need to use [ and ] instead.
24760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24761  if test "x$has_forbidden_chars" != x; then
24762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24764  fi
24765
24766
24767  windows_path="$new_path"
24768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24769    unix_path=`$CYGPATH -u "$windows_path"`
24770    new_path="$unix_path"
24771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24773    new_path="$unix_path"
24774  fi
24775
24776  if test "x$path" != "x$new_path"; then
24777    BOOT_JDK="$new_path"
24778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24780  fi
24781
24782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24784
24785    else
24786      # We're on a unix platform. Hooray! :)
24787      path="$BOOT_JDK"
24788      has_space=`$ECHO "$path" | $GREP " "`
24789      if test "x$has_space" != x; then
24790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24791$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24792        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24793      fi
24794
24795      # Use eval to expand a potential ~
24796      eval path="$path"
24797      if test ! -f "$path" && test ! -d "$path"; then
24798        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24799      fi
24800
24801      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24802    fi
24803  fi
24804
24805            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24806$as_echo_n "checking for Boot JDK... " >&6; }
24807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24808$as_echo "$BOOT_JDK" >&6; }
24809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24810$as_echo_n "checking Boot JDK version... " >&6; }
24811            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24813$as_echo "$BOOT_JDK_VERSION" >&6; }
24814          fi # end check jdk version
24815        fi # end check javac
24816      fi # end check java
24817    fi # end check boot jdk found
24818  fi
24819
24820  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24821
24822  if test "x$BOOT_JDK_FOUND" = xno; then
24823    # Now execute the test
24824
24825  BOOT_JDK_PREFIX="/usr/lib/jvm"
24826  BOOT_JDK_SUFFIX=""
24827  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24828  if test "x$ALL_JDKS_FOUND" != x; then
24829    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24830
24831  if test "x$BOOT_JDK_FOUND" = xno; then
24832    # Now execute the test
24833
24834        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24835        if test -d "$BOOT_JDK"; then
24836          BOOT_JDK_FOUND=maybe
24837          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24838$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24839        fi
24840
24841
24842    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24843    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24844      # Do we have a bin/java?
24845      if test ! -x "$BOOT_JDK/bin/java"; then
24846        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24848        BOOT_JDK_FOUND=no
24849      else
24850        # Do we have a bin/javac?
24851        if test ! -x "$BOOT_JDK/bin/javac"; then
24852          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24854          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24855$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24856          BOOT_JDK_FOUND=no
24857        else
24858          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24859          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24860
24861          # Extra M4 quote needed to protect [] in grep expression.
24862          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24863          if test "x$FOUND_CORRECT_VERSION" = x; then
24864            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24866            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24867$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24868            BOOT_JDK_FOUND=no
24869          else
24870            # We're done! :-)
24871            BOOT_JDK_FOUND=yes
24872
24873  # Only process if variable expands to non-empty
24874
24875  if test "x$BOOT_JDK" != x; then
24876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24877
24878  # Input might be given as Windows format, start by converting to
24879  # unix format.
24880  path="$BOOT_JDK"
24881  new_path=`$CYGPATH -u "$path"`
24882
24883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24886  # "foo.exe" is OK but "foo" is an error.
24887  #
24888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24889  # It is also a way to make sure we got the proper file name for the real test later on.
24890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24891  if test "x$test_shortpath" = x; then
24892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24894    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24895  fi
24896
24897  # Call helper function which possibly converts this using DOS-style short mode.
24898  # If so, the updated path is stored in $new_path.
24899
24900  input_path="$new_path"
24901  # Check if we need to convert this using DOS-style short mode. If the path
24902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24903  # take no chances and rewrite it.
24904  # Note: m4 eats our [], so we need to use [ and ] instead.
24905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24906  if test "x$has_forbidden_chars" != x; then
24907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24911      # Going to short mode and back again did indeed matter. Since short mode is
24912      # case insensitive, let's make it lowercase to improve readability.
24913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24914      # Now convert it back to Unix-stile (cygpath)
24915      input_path=`$CYGPATH -u "$shortmode_path"`
24916      new_path="$input_path"
24917    fi
24918  fi
24919
24920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24921  if test "x$test_cygdrive_prefix" = x; then
24922    # As a simple fix, exclude /usr/bin since it's not a real path.
24923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24925      # a path prefixed by /cygdrive for fixpath to work.
24926      new_path="$CYGWIN_ROOT_PATH$input_path"
24927    fi
24928  fi
24929
24930
24931  if test "x$path" != "x$new_path"; then
24932    BOOT_JDK="$new_path"
24933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24935  fi
24936
24937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24938
24939  path="$BOOT_JDK"
24940  has_colon=`$ECHO $path | $GREP ^.:`
24941  new_path="$path"
24942  if test "x$has_colon" = x; then
24943    # Not in mixed or Windows style, start by that.
24944    new_path=`cmd //c echo $path`
24945  fi
24946
24947
24948  input_path="$new_path"
24949  # Check if we need to convert this using DOS-style short mode. If the path
24950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24951  # take no chances and rewrite it.
24952  # Note: m4 eats our [], so we need to use [ and ] instead.
24953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24954  if test "x$has_forbidden_chars" != x; then
24955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24957  fi
24958
24959
24960  windows_path="$new_path"
24961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24962    unix_path=`$CYGPATH -u "$windows_path"`
24963    new_path="$unix_path"
24964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24966    new_path="$unix_path"
24967  fi
24968
24969  if test "x$path" != "x$new_path"; then
24970    BOOT_JDK="$new_path"
24971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24973  fi
24974
24975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24977
24978    else
24979      # We're on a unix platform. Hooray! :)
24980      path="$BOOT_JDK"
24981      has_space=`$ECHO "$path" | $GREP " "`
24982      if test "x$has_space" != x; then
24983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24984$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24985        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24986      fi
24987
24988      # Use eval to expand a potential ~
24989      eval path="$path"
24990      if test ! -f "$path" && test ! -d "$path"; then
24991        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24992      fi
24993
24994      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24995    fi
24996  fi
24997
24998            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24999$as_echo_n "checking for Boot JDK... " >&6; }
25000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25001$as_echo "$BOOT_JDK" >&6; }
25002            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25003$as_echo_n "checking Boot JDK version... " >&6; }
25004            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25006$as_echo "$BOOT_JDK_VERSION" >&6; }
25007          fi # end check jdk version
25008        fi # end check javac
25009      fi # end check java
25010    fi # end check boot jdk found
25011  fi
25012
25013    done
25014  fi
25015
25016
25017    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25018    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25019      # Do we have a bin/java?
25020      if test ! -x "$BOOT_JDK/bin/java"; then
25021        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25023        BOOT_JDK_FOUND=no
25024      else
25025        # Do we have a bin/javac?
25026        if test ! -x "$BOOT_JDK/bin/javac"; then
25027          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25029          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25030$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25031          BOOT_JDK_FOUND=no
25032        else
25033          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25034          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25035
25036          # Extra M4 quote needed to protect [] in grep expression.
25037          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25038          if test "x$FOUND_CORRECT_VERSION" = x; then
25039            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25041            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25042$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25043            BOOT_JDK_FOUND=no
25044          else
25045            # We're done! :-)
25046            BOOT_JDK_FOUND=yes
25047
25048  # Only process if variable expands to non-empty
25049
25050  if test "x$BOOT_JDK" != x; then
25051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25052
25053  # Input might be given as Windows format, start by converting to
25054  # unix format.
25055  path="$BOOT_JDK"
25056  new_path=`$CYGPATH -u "$path"`
25057
25058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25061  # "foo.exe" is OK but "foo" is an error.
25062  #
25063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25064  # It is also a way to make sure we got the proper file name for the real test later on.
25065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25066  if test "x$test_shortpath" = x; then
25067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25069    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25070  fi
25071
25072  # Call helper function which possibly converts this using DOS-style short mode.
25073  # If so, the updated path is stored in $new_path.
25074
25075  input_path="$new_path"
25076  # Check if we need to convert this using DOS-style short mode. If the path
25077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25078  # take no chances and rewrite it.
25079  # Note: m4 eats our [], so we need to use [ and ] instead.
25080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25081  if test "x$has_forbidden_chars" != x; then
25082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25086      # Going to short mode and back again did indeed matter. Since short mode is
25087      # case insensitive, let's make it lowercase to improve readability.
25088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25089      # Now convert it back to Unix-stile (cygpath)
25090      input_path=`$CYGPATH -u "$shortmode_path"`
25091      new_path="$input_path"
25092    fi
25093  fi
25094
25095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25096  if test "x$test_cygdrive_prefix" = x; then
25097    # As a simple fix, exclude /usr/bin since it's not a real path.
25098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25100      # a path prefixed by /cygdrive for fixpath to work.
25101      new_path="$CYGWIN_ROOT_PATH$input_path"
25102    fi
25103  fi
25104
25105
25106  if test "x$path" != "x$new_path"; then
25107    BOOT_JDK="$new_path"
25108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25110  fi
25111
25112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25113
25114  path="$BOOT_JDK"
25115  has_colon=`$ECHO $path | $GREP ^.:`
25116  new_path="$path"
25117  if test "x$has_colon" = x; then
25118    # Not in mixed or Windows style, start by that.
25119    new_path=`cmd //c echo $path`
25120  fi
25121
25122
25123  input_path="$new_path"
25124  # Check if we need to convert this using DOS-style short mode. If the path
25125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25126  # take no chances and rewrite it.
25127  # Note: m4 eats our [], so we need to use [ and ] instead.
25128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25129  if test "x$has_forbidden_chars" != x; then
25130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25132  fi
25133
25134
25135  windows_path="$new_path"
25136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25137    unix_path=`$CYGPATH -u "$windows_path"`
25138    new_path="$unix_path"
25139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25141    new_path="$unix_path"
25142  fi
25143
25144  if test "x$path" != "x$new_path"; then
25145    BOOT_JDK="$new_path"
25146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25148  fi
25149
25150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25152
25153    else
25154      # We're on a unix platform. Hooray! :)
25155      path="$BOOT_JDK"
25156      has_space=`$ECHO "$path" | $GREP " "`
25157      if test "x$has_space" != x; then
25158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25161      fi
25162
25163      # Use eval to expand a potential ~
25164      eval path="$path"
25165      if test ! -f "$path" && test ! -d "$path"; then
25166        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25167      fi
25168
25169      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25170    fi
25171  fi
25172
25173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25174$as_echo_n "checking for Boot JDK... " >&6; }
25175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25176$as_echo "$BOOT_JDK" >&6; }
25177            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25178$as_echo_n "checking Boot JDK version... " >&6; }
25179            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25181$as_echo "$BOOT_JDK_VERSION" >&6; }
25182          fi # end check jdk version
25183        fi # end check javac
25184      fi # end check java
25185    fi # end check boot jdk found
25186  fi
25187
25188  fi
25189
25190
25191    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25192    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25193      # Do we have a bin/java?
25194      if test ! -x "$BOOT_JDK/bin/java"; then
25195        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25197        BOOT_JDK_FOUND=no
25198      else
25199        # Do we have a bin/javac?
25200        if test ! -x "$BOOT_JDK/bin/javac"; then
25201          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25203          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25204$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25205          BOOT_JDK_FOUND=no
25206        else
25207          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25208          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25209
25210          # Extra M4 quote needed to protect [] in grep expression.
25211          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25212          if test "x$FOUND_CORRECT_VERSION" = x; then
25213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25215            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25216$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25217            BOOT_JDK_FOUND=no
25218          else
25219            # We're done! :-)
25220            BOOT_JDK_FOUND=yes
25221
25222  # Only process if variable expands to non-empty
25223
25224  if test "x$BOOT_JDK" != x; then
25225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25226
25227  # Input might be given as Windows format, start by converting to
25228  # unix format.
25229  path="$BOOT_JDK"
25230  new_path=`$CYGPATH -u "$path"`
25231
25232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25235  # "foo.exe" is OK but "foo" is an error.
25236  #
25237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25238  # It is also a way to make sure we got the proper file name for the real test later on.
25239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25240  if test "x$test_shortpath" = x; then
25241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25243    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25244  fi
25245
25246  # Call helper function which possibly converts this using DOS-style short mode.
25247  # If so, the updated path is stored in $new_path.
25248
25249  input_path="$new_path"
25250  # Check if we need to convert this using DOS-style short mode. If the path
25251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25252  # take no chances and rewrite it.
25253  # Note: m4 eats our [], so we need to use [ and ] instead.
25254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25255  if test "x$has_forbidden_chars" != x; then
25256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25260      # Going to short mode and back again did indeed matter. Since short mode is
25261      # case insensitive, let's make it lowercase to improve readability.
25262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25263      # Now convert it back to Unix-stile (cygpath)
25264      input_path=`$CYGPATH -u "$shortmode_path"`
25265      new_path="$input_path"
25266    fi
25267  fi
25268
25269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25270  if test "x$test_cygdrive_prefix" = x; then
25271    # As a simple fix, exclude /usr/bin since it's not a real path.
25272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25274      # a path prefixed by /cygdrive for fixpath to work.
25275      new_path="$CYGWIN_ROOT_PATH$input_path"
25276    fi
25277  fi
25278
25279
25280  if test "x$path" != "x$new_path"; then
25281    BOOT_JDK="$new_path"
25282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25284  fi
25285
25286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25287
25288  path="$BOOT_JDK"
25289  has_colon=`$ECHO $path | $GREP ^.:`
25290  new_path="$path"
25291  if test "x$has_colon" = x; then
25292    # Not in mixed or Windows style, start by that.
25293    new_path=`cmd //c echo $path`
25294  fi
25295
25296
25297  input_path="$new_path"
25298  # Check if we need to convert this using DOS-style short mode. If the path
25299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25300  # take no chances and rewrite it.
25301  # Note: m4 eats our [], so we need to use [ and ] instead.
25302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25303  if test "x$has_forbidden_chars" != x; then
25304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25306  fi
25307
25308
25309  windows_path="$new_path"
25310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25311    unix_path=`$CYGPATH -u "$windows_path"`
25312    new_path="$unix_path"
25313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25315    new_path="$unix_path"
25316  fi
25317
25318  if test "x$path" != "x$new_path"; then
25319    BOOT_JDK="$new_path"
25320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25322  fi
25323
25324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25326
25327    else
25328      # We're on a unix platform. Hooray! :)
25329      path="$BOOT_JDK"
25330      has_space=`$ECHO "$path" | $GREP " "`
25331      if test "x$has_space" != x; then
25332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25335      fi
25336
25337      # Use eval to expand a potential ~
25338      eval path="$path"
25339      if test ! -f "$path" && test ! -d "$path"; then
25340        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25341      fi
25342
25343      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25344    fi
25345  fi
25346
25347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25348$as_echo_n "checking for Boot JDK... " >&6; }
25349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25350$as_echo "$BOOT_JDK" >&6; }
25351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25352$as_echo_n "checking Boot JDK version... " >&6; }
25353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25355$as_echo "$BOOT_JDK_VERSION" >&6; }
25356          fi # end check jdk version
25357        fi # end check javac
25358      fi # end check java
25359    fi # end check boot jdk found
25360  fi
25361
25362
25363  # If we haven't found anything yet, we've truly lost. Give up.
25364  if test "x$BOOT_JDK_FOUND" = xno; then
25365
25366  # Print a helpful message on how to acquire the necessary build dependency.
25367  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25368  MISSING_DEPENDENCY=openjdk
25369
25370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25371    cygwin_help $MISSING_DEPENDENCY
25372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25373    msys_help $MISSING_DEPENDENCY
25374  else
25375    PKGHANDLER_COMMAND=
25376
25377    case $PKGHANDLER in
25378      apt-get)
25379        apt_help     $MISSING_DEPENDENCY ;;
25380      yum)
25381        yum_help     $MISSING_DEPENDENCY ;;
25382      port)
25383        port_help    $MISSING_DEPENDENCY ;;
25384      pkgutil)
25385        pkgutil_help $MISSING_DEPENDENCY ;;
25386      pkgadd)
25387        pkgadd_help  $MISSING_DEPENDENCY ;;
25388    esac
25389
25390    if test "x$PKGHANDLER_COMMAND" != x; then
25391      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25392    fi
25393  fi
25394
25395    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25396$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25397    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25398$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25399    as_fn_error $? "Cannot continue" "$LINENO" 5
25400  fi
25401
25402
25403
25404  # Setup tools from the Boot JDK.
25405
25406  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25407
25408  # Publish this variable in the help.
25409
25410
25411  if test "x$JAVA" = x; then
25412    # The variable is not set by user, try to locate tool using the code snippet
25413
25414      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25415$as_echo_n "checking for java in Boot JDK... " >&6; }
25416      JAVA=$BOOT_JDK/bin/java
25417      if test ! -x $JAVA; then
25418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25419$as_echo "not found" >&6; }
25420        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25421$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25422        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25423      fi
25424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25425$as_echo "ok" >&6; }
25426
25427
25428  else
25429    # The variable is set, but is it from the command line or the environment?
25430
25431    # Try to remove the string !JAVA! from our list.
25432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25434      # If it failed, the variable was not from the command line. Ignore it,
25435      # but warn the user (except for BASH, which is always set by the calling BASH).
25436      if test "xJAVA" != xBASH; then
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25438$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25439      fi
25440      # Try to locate tool using the code snippet
25441
25442      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25443$as_echo_n "checking for java in Boot JDK... " >&6; }
25444      JAVA=$BOOT_JDK/bin/java
25445      if test ! -x $JAVA; then
25446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25447$as_echo "not found" >&6; }
25448        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25449$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25450        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25451      fi
25452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25453$as_echo "ok" >&6; }
25454
25455
25456    else
25457      # If it succeeded, then it was overridden by the user. We will use it
25458      # for the tool.
25459
25460      # First remove it from the list of overridden variables, so we can test
25461      # for unknown variables in the end.
25462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25463
25464      # Check if the provided tool contains a complete path.
25465      tool_specified="$JAVA"
25466      tool_basename="${tool_specified##*/}"
25467      if test "x$tool_basename" = "x$tool_specified"; then
25468        # A command without a complete path is provided, search $PATH.
25469        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25470$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25471        # Extract the first word of "$tool_basename", so it can be a program name with args.
25472set dummy $tool_basename; ac_word=$2
25473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25474$as_echo_n "checking for $ac_word... " >&6; }
25475if ${ac_cv_path_JAVA+:} false; then :
25476  $as_echo_n "(cached) " >&6
25477else
25478  case $JAVA in
25479  [\\/]* | ?:[\\/]*)
25480  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25481  ;;
25482  *)
25483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25484for as_dir in $PATH
25485do
25486  IFS=$as_save_IFS
25487  test -z "$as_dir" && as_dir=.
25488    for ac_exec_ext in '' $ac_executable_extensions; do
25489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25490    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25492    break 2
25493  fi
25494done
25495  done
25496IFS=$as_save_IFS
25497
25498  ;;
25499esac
25500fi
25501JAVA=$ac_cv_path_JAVA
25502if test -n "$JAVA"; then
25503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25504$as_echo "$JAVA" >&6; }
25505else
25506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25507$as_echo "no" >&6; }
25508fi
25509
25510
25511        if test "x$JAVA" = x; then
25512          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25513        fi
25514      else
25515        # Otherwise we believe it is a complete path. Use it as it is.
25516        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25517$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25519$as_echo_n "checking for JAVA... " >&6; }
25520        if test ! -x "$tool_specified"; then
25521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25522$as_echo "not found" >&6; }
25523          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25524        fi
25525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25526$as_echo "$tool_specified" >&6; }
25527      fi
25528    fi
25529  fi
25530
25531
25532
25533  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25534
25535  # Publish this variable in the help.
25536
25537
25538  if test "x$JAVAC" = x; then
25539    # The variable is not set by user, try to locate tool using the code snippet
25540
25541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25542$as_echo_n "checking for javac in Boot JDK... " >&6; }
25543      JAVAC=$BOOT_JDK/bin/javac
25544      if test ! -x $JAVAC; then
25545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25546$as_echo "not found" >&6; }
25547        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25548$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25549        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25550      fi
25551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25552$as_echo "ok" >&6; }
25553
25554
25555  else
25556    # The variable is set, but is it from the command line or the environment?
25557
25558    # Try to remove the string !JAVAC! from our list.
25559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25561      # If it failed, the variable was not from the command line. Ignore it,
25562      # but warn the user (except for BASH, which is always set by the calling BASH).
25563      if test "xJAVAC" != xBASH; then
25564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25565$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25566      fi
25567      # Try to locate tool using the code snippet
25568
25569      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25570$as_echo_n "checking for javac in Boot JDK... " >&6; }
25571      JAVAC=$BOOT_JDK/bin/javac
25572      if test ! -x $JAVAC; then
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25574$as_echo "not found" >&6; }
25575        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25576$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25577        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25578      fi
25579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25580$as_echo "ok" >&6; }
25581
25582
25583    else
25584      # If it succeeded, then it was overridden by the user. We will use it
25585      # for the tool.
25586
25587      # First remove it from the list of overridden variables, so we can test
25588      # for unknown variables in the end.
25589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25590
25591      # Check if the provided tool contains a complete path.
25592      tool_specified="$JAVAC"
25593      tool_basename="${tool_specified##*/}"
25594      if test "x$tool_basename" = "x$tool_specified"; then
25595        # A command without a complete path is provided, search $PATH.
25596        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25597$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25598        # Extract the first word of "$tool_basename", so it can be a program name with args.
25599set dummy $tool_basename; ac_word=$2
25600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25601$as_echo_n "checking for $ac_word... " >&6; }
25602if ${ac_cv_path_JAVAC+:} false; then :
25603  $as_echo_n "(cached) " >&6
25604else
25605  case $JAVAC in
25606  [\\/]* | ?:[\\/]*)
25607  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25608  ;;
25609  *)
25610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25611for as_dir in $PATH
25612do
25613  IFS=$as_save_IFS
25614  test -z "$as_dir" && as_dir=.
25615    for ac_exec_ext in '' $ac_executable_extensions; do
25616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25617    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25619    break 2
25620  fi
25621done
25622  done
25623IFS=$as_save_IFS
25624
25625  ;;
25626esac
25627fi
25628JAVAC=$ac_cv_path_JAVAC
25629if test -n "$JAVAC"; then
25630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25631$as_echo "$JAVAC" >&6; }
25632else
25633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25634$as_echo "no" >&6; }
25635fi
25636
25637
25638        if test "x$JAVAC" = x; then
25639          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25640        fi
25641      else
25642        # Otherwise we believe it is a complete path. Use it as it is.
25643        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25644$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25646$as_echo_n "checking for JAVAC... " >&6; }
25647        if test ! -x "$tool_specified"; then
25648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25649$as_echo "not found" >&6; }
25650          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25651        fi
25652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25653$as_echo "$tool_specified" >&6; }
25654      fi
25655    fi
25656  fi
25657
25658
25659
25660  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25661
25662  # Publish this variable in the help.
25663
25664
25665  if test "x$JAVAH" = x; then
25666    # The variable is not set by user, try to locate tool using the code snippet
25667
25668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25669$as_echo_n "checking for javah in Boot JDK... " >&6; }
25670      JAVAH=$BOOT_JDK/bin/javah
25671      if test ! -x $JAVAH; then
25672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25673$as_echo "not found" >&6; }
25674        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25675$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25676        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25677      fi
25678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25679$as_echo "ok" >&6; }
25680
25681
25682  else
25683    # The variable is set, but is it from the command line or the environment?
25684
25685    # Try to remove the string !JAVAH! from our list.
25686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25688      # If it failed, the variable was not from the command line. Ignore it,
25689      # but warn the user (except for BASH, which is always set by the calling BASH).
25690      if test "xJAVAH" != xBASH; then
25691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25692$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25693      fi
25694      # Try to locate tool using the code snippet
25695
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25697$as_echo_n "checking for javah in Boot JDK... " >&6; }
25698      JAVAH=$BOOT_JDK/bin/javah
25699      if test ! -x $JAVAH; then
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25701$as_echo "not found" >&6; }
25702        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25703$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25704        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25705      fi
25706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25707$as_echo "ok" >&6; }
25708
25709
25710    else
25711      # If it succeeded, then it was overridden by the user. We will use it
25712      # for the tool.
25713
25714      # First remove it from the list of overridden variables, so we can test
25715      # for unknown variables in the end.
25716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25717
25718      # Check if the provided tool contains a complete path.
25719      tool_specified="$JAVAH"
25720      tool_basename="${tool_specified##*/}"
25721      if test "x$tool_basename" = "x$tool_specified"; then
25722        # A command without a complete path is provided, search $PATH.
25723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25724$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25725        # Extract the first word of "$tool_basename", so it can be a program name with args.
25726set dummy $tool_basename; ac_word=$2
25727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25728$as_echo_n "checking for $ac_word... " >&6; }
25729if ${ac_cv_path_JAVAH+:} false; then :
25730  $as_echo_n "(cached) " >&6
25731else
25732  case $JAVAH in
25733  [\\/]* | ?:[\\/]*)
25734  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25735  ;;
25736  *)
25737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25738for as_dir in $PATH
25739do
25740  IFS=$as_save_IFS
25741  test -z "$as_dir" && as_dir=.
25742    for ac_exec_ext in '' $ac_executable_extensions; do
25743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25744    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25746    break 2
25747  fi
25748done
25749  done
25750IFS=$as_save_IFS
25751
25752  ;;
25753esac
25754fi
25755JAVAH=$ac_cv_path_JAVAH
25756if test -n "$JAVAH"; then
25757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25758$as_echo "$JAVAH" >&6; }
25759else
25760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25761$as_echo "no" >&6; }
25762fi
25763
25764
25765        if test "x$JAVAH" = x; then
25766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25767        fi
25768      else
25769        # Otherwise we believe it is a complete path. Use it as it is.
25770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25771$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25773$as_echo_n "checking for JAVAH... " >&6; }
25774        if test ! -x "$tool_specified"; then
25775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25776$as_echo "not found" >&6; }
25777          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25778        fi
25779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25780$as_echo "$tool_specified" >&6; }
25781      fi
25782    fi
25783  fi
25784
25785
25786
25787  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25788
25789  # Publish this variable in the help.
25790
25791
25792  if test "x$JAR" = x; then
25793    # The variable is not set by user, try to locate tool using the code snippet
25794
25795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25796$as_echo_n "checking for jar in Boot JDK... " >&6; }
25797      JAR=$BOOT_JDK/bin/jar
25798      if test ! -x $JAR; then
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25800$as_echo "not found" >&6; }
25801        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25802$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25803        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25804      fi
25805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25806$as_echo "ok" >&6; }
25807
25808
25809  else
25810    # The variable is set, but is it from the command line or the environment?
25811
25812    # Try to remove the string !JAR! from our list.
25813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25815      # If it failed, the variable was not from the command line. Ignore it,
25816      # but warn the user (except for BASH, which is always set by the calling BASH).
25817      if test "xJAR" != xBASH; then
25818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25819$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25820      fi
25821      # Try to locate tool using the code snippet
25822
25823      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25824$as_echo_n "checking for jar in Boot JDK... " >&6; }
25825      JAR=$BOOT_JDK/bin/jar
25826      if test ! -x $JAR; then
25827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25828$as_echo "not found" >&6; }
25829        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25830$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25831        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25832      fi
25833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25834$as_echo "ok" >&6; }
25835
25836
25837    else
25838      # If it succeeded, then it was overridden by the user. We will use it
25839      # for the tool.
25840
25841      # First remove it from the list of overridden variables, so we can test
25842      # for unknown variables in the end.
25843      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25844
25845      # Check if the provided tool contains a complete path.
25846      tool_specified="$JAR"
25847      tool_basename="${tool_specified##*/}"
25848      if test "x$tool_basename" = "x$tool_specified"; then
25849        # A command without a complete path is provided, search $PATH.
25850        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25851$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25852        # Extract the first word of "$tool_basename", so it can be a program name with args.
25853set dummy $tool_basename; ac_word=$2
25854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25855$as_echo_n "checking for $ac_word... " >&6; }
25856if ${ac_cv_path_JAR+:} false; then :
25857  $as_echo_n "(cached) " >&6
25858else
25859  case $JAR in
25860  [\\/]* | ?:[\\/]*)
25861  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25862  ;;
25863  *)
25864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25865for as_dir in $PATH
25866do
25867  IFS=$as_save_IFS
25868  test -z "$as_dir" && as_dir=.
25869    for ac_exec_ext in '' $ac_executable_extensions; do
25870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25871    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25873    break 2
25874  fi
25875done
25876  done
25877IFS=$as_save_IFS
25878
25879  ;;
25880esac
25881fi
25882JAR=$ac_cv_path_JAR
25883if test -n "$JAR"; then
25884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25885$as_echo "$JAR" >&6; }
25886else
25887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25888$as_echo "no" >&6; }
25889fi
25890
25891
25892        if test "x$JAR" = x; then
25893          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25894        fi
25895      else
25896        # Otherwise we believe it is a complete path. Use it as it is.
25897        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25898$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25900$as_echo_n "checking for JAR... " >&6; }
25901        if test ! -x "$tool_specified"; then
25902          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25903$as_echo "not found" >&6; }
25904          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25905        fi
25906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25907$as_echo "$tool_specified" >&6; }
25908      fi
25909    fi
25910  fi
25911
25912
25913
25914  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25915
25916  # Publish this variable in the help.
25917
25918
25919  if test "x$NATIVE2ASCII" = x; then
25920    # The variable is not set by user, try to locate tool using the code snippet
25921
25922      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25923$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25924      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25925      if test ! -x $NATIVE2ASCII; then
25926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25927$as_echo "not found" >&6; }
25928        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25929$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25930        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25931      fi
25932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25933$as_echo "ok" >&6; }
25934
25935
25936  else
25937    # The variable is set, but is it from the command line or the environment?
25938
25939    # Try to remove the string !NATIVE2ASCII! from our list.
25940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25942      # If it failed, the variable was not from the command line. Ignore it,
25943      # but warn the user (except for BASH, which is always set by the calling BASH).
25944      if test "xNATIVE2ASCII" != xBASH; then
25945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25946$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25947      fi
25948      # Try to locate tool using the code snippet
25949
25950      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25951$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25952      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25953      if test ! -x $NATIVE2ASCII; then
25954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25955$as_echo "not found" >&6; }
25956        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25957$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25958        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25959      fi
25960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25961$as_echo "ok" >&6; }
25962
25963
25964    else
25965      # If it succeeded, then it was overridden by the user. We will use it
25966      # for the tool.
25967
25968      # First remove it from the list of overridden variables, so we can test
25969      # for unknown variables in the end.
25970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25971
25972      # Check if the provided tool contains a complete path.
25973      tool_specified="$NATIVE2ASCII"
25974      tool_basename="${tool_specified##*/}"
25975      if test "x$tool_basename" = "x$tool_specified"; then
25976        # A command without a complete path is provided, search $PATH.
25977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25978$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25979        # Extract the first word of "$tool_basename", so it can be a program name with args.
25980set dummy $tool_basename; ac_word=$2
25981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25982$as_echo_n "checking for $ac_word... " >&6; }
25983if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25984  $as_echo_n "(cached) " >&6
25985else
25986  case $NATIVE2ASCII in
25987  [\\/]* | ?:[\\/]*)
25988  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25989  ;;
25990  *)
25991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25992for as_dir in $PATH
25993do
25994  IFS=$as_save_IFS
25995  test -z "$as_dir" && as_dir=.
25996    for ac_exec_ext in '' $ac_executable_extensions; do
25997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25998    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26000    break 2
26001  fi
26002done
26003  done
26004IFS=$as_save_IFS
26005
26006  ;;
26007esac
26008fi
26009NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26010if test -n "$NATIVE2ASCII"; then
26011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26012$as_echo "$NATIVE2ASCII" >&6; }
26013else
26014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26015$as_echo "no" >&6; }
26016fi
26017
26018
26019        if test "x$NATIVE2ASCII" = x; then
26020          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26021        fi
26022      else
26023        # Otherwise we believe it is a complete path. Use it as it is.
26024        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26025$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26027$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26028        if test ! -x "$tool_specified"; then
26029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26030$as_echo "not found" >&6; }
26031          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26032        fi
26033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26034$as_echo "$tool_specified" >&6; }
26035      fi
26036    fi
26037  fi
26038
26039
26040
26041  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26042
26043  # Publish this variable in the help.
26044
26045
26046  if test "x$JARSIGNER" = x; then
26047    # The variable is not set by user, try to locate tool using the code snippet
26048
26049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26050$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26051      JARSIGNER=$BOOT_JDK/bin/jarsigner
26052      if test ! -x $JARSIGNER; then
26053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26054$as_echo "not found" >&6; }
26055        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26056$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26057        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26058      fi
26059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26060$as_echo "ok" >&6; }
26061
26062
26063  else
26064    # The variable is set, but is it from the command line or the environment?
26065
26066    # Try to remove the string !JARSIGNER! from our list.
26067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26069      # If it failed, the variable was not from the command line. Ignore it,
26070      # but warn the user (except for BASH, which is always set by the calling BASH).
26071      if test "xJARSIGNER" != xBASH; then
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26073$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26074      fi
26075      # Try to locate tool using the code snippet
26076
26077      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26078$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26079      JARSIGNER=$BOOT_JDK/bin/jarsigner
26080      if test ! -x $JARSIGNER; then
26081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26082$as_echo "not found" >&6; }
26083        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26084$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26085        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26086      fi
26087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26088$as_echo "ok" >&6; }
26089
26090
26091    else
26092      # If it succeeded, then it was overridden by the user. We will use it
26093      # for the tool.
26094
26095      # First remove it from the list of overridden variables, so we can test
26096      # for unknown variables in the end.
26097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26098
26099      # Check if the provided tool contains a complete path.
26100      tool_specified="$JARSIGNER"
26101      tool_basename="${tool_specified##*/}"
26102      if test "x$tool_basename" = "x$tool_specified"; then
26103        # A command without a complete path is provided, search $PATH.
26104        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26105$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26106        # Extract the first word of "$tool_basename", so it can be a program name with args.
26107set dummy $tool_basename; ac_word=$2
26108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26109$as_echo_n "checking for $ac_word... " >&6; }
26110if ${ac_cv_path_JARSIGNER+:} false; then :
26111  $as_echo_n "(cached) " >&6
26112else
26113  case $JARSIGNER in
26114  [\\/]* | ?:[\\/]*)
26115  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26116  ;;
26117  *)
26118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26119for as_dir in $PATH
26120do
26121  IFS=$as_save_IFS
26122  test -z "$as_dir" && as_dir=.
26123    for ac_exec_ext in '' $ac_executable_extensions; do
26124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26125    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26127    break 2
26128  fi
26129done
26130  done
26131IFS=$as_save_IFS
26132
26133  ;;
26134esac
26135fi
26136JARSIGNER=$ac_cv_path_JARSIGNER
26137if test -n "$JARSIGNER"; then
26138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26139$as_echo "$JARSIGNER" >&6; }
26140else
26141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26142$as_echo "no" >&6; }
26143fi
26144
26145
26146        if test "x$JARSIGNER" = x; then
26147          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26148        fi
26149      else
26150        # Otherwise we believe it is a complete path. Use it as it is.
26151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26152$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26154$as_echo_n "checking for JARSIGNER... " >&6; }
26155        if test ! -x "$tool_specified"; then
26156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26157$as_echo "not found" >&6; }
26158          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26159        fi
26160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26161$as_echo "$tool_specified" >&6; }
26162      fi
26163    fi
26164  fi
26165
26166
26167
26168  # Finally, set some other options...
26169
26170  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26171  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26172
26173
26174
26175
26176###############################################################################
26177#
26178# Configure the sources to use. We can add or override individual directories.
26179#
26180###############################################################################
26181
26182
26183  # Where are the sources. Any of these can be overridden
26184  # using --with-override-corba and the likes.
26185  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26186  CORBA_TOPDIR="$SRC_ROOT/corba"
26187  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26188  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26189  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26190  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26191  JDK_TOPDIR="$SRC_ROOT/jdk"
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202  ###############################################################################
26203  #
26204  # Pickup additional source for a component from outside of the source root
26205  # or override source for a component.
26206  #
26207
26208# Check whether --with-add-source-root was given.
26209if test "${with_add_source_root+set}" = set; then :
26210  withval=$with_add_source_root;
26211fi
26212
26213
26214
26215# Check whether --with-override-source-root was given.
26216if test "${with_override_source_root+set}" = set; then :
26217  withval=$with_override_source_root;
26218fi
26219
26220
26221
26222# Check whether --with-adds-and-overrides was given.
26223if test "${with_adds_and_overrides+set}" = set; then :
26224  withval=$with_adds_and_overrides;
26225fi
26226
26227
26228  if test "x$with_adds_and_overrides" != x; then
26229    with_add_source_root="$with_adds_and_overrides/adds"
26230    with_override_source_root="$with_adds_and_overrides/overrides"
26231  fi
26232
26233  if test "x$with_add_source_root" != x; then
26234    if ! test -d $with_add_source_root; then
26235      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26236    fi
26237    CURDIR="$PWD"
26238    cd "$with_add_source_root"
26239    ADD_SRC_ROOT="`pwd`"
26240    cd "$CURDIR"
26241    # Verify that the addon source root does not have any root makefiles.
26242    # If it does, then it is usually an error, prevent this.
26243    if test -f $with_add_source_root/langtools/make/Makefile; then
26244      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
26245    fi
26246    if test -f $with_add_source_root/corba/make/Makefile; then
26247      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
26248    fi
26249    if test -f $with_add_source_root/jaxp/make/Makefile; then
26250      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
26251    fi
26252    if test -f $with_add_source_root/jaxws/make/Makefile; then
26253      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
26254    fi
26255    if test -f $with_add_source_root/hotspot/make/Makefile; then
26256      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
26257    fi
26258    if test -f $with_add_source_root/nashorn/make/Makefile; then
26259      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
26260    fi
26261    if test -f $with_add_source_root/jdk/make/Makefile; then
26262      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
26263    fi
26264  fi
26265
26266
26267  if test "x$with_override_source_root" != x; then
26268    if ! test -d $with_override_source_root; then
26269      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26270    fi
26271    CURDIR="$PWD"
26272    cd "$with_override_source_root"
26273    OVERRIDE_SRC_ROOT="`pwd`"
26274    cd "$CURDIR"
26275    if test -f $with_override_source_root/langtools/make/Makefile; then
26276      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
26277    fi
26278    if test -f $with_override_source_root/corba/make/Makefile; then
26279      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
26280    fi
26281    if test -f $with_override_source_root/jaxp/make/Makefile; then
26282      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
26283    fi
26284    if test -f $with_override_source_root/jaxws/make/Makefile; then
26285      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
26286    fi
26287    if test -f $with_override_source_root/hotspot/make/Makefile; then
26288      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
26289    fi
26290    if test -f $with_override_source_root/nashorn/make/Makefile; then
26291      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
26292    fi
26293    if test -f $with_override_source_root/jdk/make/Makefile; then
26294      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
26295    fi
26296  fi
26297
26298
26299  ###############################################################################
26300  #
26301  # Override a repo completely, this is used for example when you have 3 small
26302  # development sandboxes of the langtools sources and want to avoid having 3 full
26303  # OpenJDK sources checked out on disk.
26304  #
26305  # Assuming that the 3 langtools sandboxes are located here:
26306  # /home/fredrik/sandbox1/langtools
26307  # /home/fredrik/sandbox2/langtools
26308  # /home/fredrik/sandbox3/langtools
26309  #
26310  # From the source root you create build subdirs manually:
26311  #     mkdir -p build1 build2 build3
26312  # in each build directory run:
26313  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26314  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26315  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26316  #
26317
26318
26319# Check whether --with-override-langtools was given.
26320if test "${with_override_langtools+set}" = set; then :
26321  withval=$with_override_langtools;
26322fi
26323
26324
26325
26326# Check whether --with-override-corba was given.
26327if test "${with_override_corba+set}" = set; then :
26328  withval=$with_override_corba;
26329fi
26330
26331
26332
26333# Check whether --with-override-jaxp was given.
26334if test "${with_override_jaxp+set}" = set; then :
26335  withval=$with_override_jaxp;
26336fi
26337
26338
26339
26340# Check whether --with-override-jaxws was given.
26341if test "${with_override_jaxws+set}" = set; then :
26342  withval=$with_override_jaxws;
26343fi
26344
26345
26346
26347# Check whether --with-override-hotspot was given.
26348if test "${with_override_hotspot+set}" = set; then :
26349  withval=$with_override_hotspot;
26350fi
26351
26352
26353
26354# Check whether --with-override-nashorn was given.
26355if test "${with_override_nashorn+set}" = set; then :
26356  withval=$with_override_nashorn;
26357fi
26358
26359
26360
26361# Check whether --with-override-jdk was given.
26362if test "${with_override_jdk+set}" = set; then :
26363  withval=$with_override_jdk;
26364fi
26365
26366
26367  if test "x$with_override_langtools" != x; then
26368    CURDIR="$PWD"
26369    cd "$with_override_langtools"
26370    LANGTOOLS_TOPDIR="`pwd`"
26371    cd "$CURDIR"
26372    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26373      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26374    fi
26375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26376$as_echo_n "checking if langtools should be overridden... " >&6; }
26377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26378$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26379  fi
26380  if test "x$with_override_corba" != x; then
26381    CURDIR="$PWD"
26382    cd "$with_override_corba"
26383    CORBA_TOPDIR="`pwd`"
26384    cd "$CURDIR"
26385    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26386      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26387    fi
26388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26389$as_echo_n "checking if corba should be overridden... " >&6; }
26390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26391$as_echo "yes with $CORBA_TOPDIR" >&6; }
26392  fi
26393  if test "x$with_override_jaxp" != x; then
26394    CURDIR="$PWD"
26395    cd "$with_override_jaxp"
26396    JAXP_TOPDIR="`pwd`"
26397    cd "$CURDIR"
26398    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26399      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26400    fi
26401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26402$as_echo_n "checking if jaxp should be overridden... " >&6; }
26403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26404$as_echo "yes with $JAXP_TOPDIR" >&6; }
26405  fi
26406  if test "x$with_override_jaxws" != x; then
26407    CURDIR="$PWD"
26408    cd "$with_override_jaxws"
26409    JAXWS_TOPDIR="`pwd`"
26410    cd "$CURDIR"
26411    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26412      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26413    fi
26414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26415$as_echo_n "checking if jaxws should be overridden... " >&6; }
26416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26417$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26418  fi
26419  if test "x$with_override_hotspot" != x; then
26420    CURDIR="$PWD"
26421    cd "$with_override_hotspot"
26422    HOTSPOT_TOPDIR="`pwd`"
26423    cd "$CURDIR"
26424    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26425      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26426    fi
26427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26428$as_echo_n "checking if hotspot should be overridden... " >&6; }
26429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26430$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26431  fi
26432  if test "x$with_override_nashorn" != x; then
26433    CURDIR="$PWD"
26434    cd "$with_override_nashorn"
26435    NASHORN_TOPDIR="`pwd`"
26436    cd "$CURDIR"
26437    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26438      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26439    fi
26440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26441$as_echo_n "checking if nashorn should be overridden... " >&6; }
26442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26443$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26444  fi
26445  if test "x$with_override_jdk" != x; then
26446    CURDIR="$PWD"
26447    cd "$with_override_jdk"
26448    JDK_TOPDIR="`pwd`"
26449    cd "$CURDIR"
26450    if ! test -f $JDK_TOPDIR/make/Makefile; then
26451      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26452    fi
26453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26454$as_echo_n "checking if JDK should be overridden... " >&6; }
26455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26456$as_echo "yes with $JDK_TOPDIR" >&6; }
26457  fi
26458
26459
26460  BUILD_OUTPUT="$OUTPUT_ROOT"
26461
26462
26463  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26464  BUILD_HOTSPOT=true
26465
26466
26467
26468# Check whether --with-import-hotspot was given.
26469if test "${with_import_hotspot+set}" = set; then :
26470  withval=$with_import_hotspot;
26471fi
26472
26473  if test "x$with_import_hotspot" != x; then
26474    CURDIR="$PWD"
26475    cd "$with_import_hotspot"
26476    HOTSPOT_DIST="`pwd`"
26477    cd "$CURDIR"
26478    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26479      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26480    fi
26481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26482$as_echo_n "checking if hotspot should be imported... " >&6; }
26483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26484$as_echo "yes from $HOTSPOT_DIST" >&6; }
26485    BUILD_HOTSPOT=false
26486  fi
26487
26488  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26489
26490
26491###############################################################################
26492#
26493# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26494# native code.
26495#
26496###############################################################################
26497
26498# First determine the toolchain type (compiler family)
26499
26500
26501# Check whether --with-toolchain-type was given.
26502if test "${with_toolchain_type+set}" = set; then :
26503  withval=$with_toolchain_type;
26504fi
26505
26506
26507  # Use indirect variable referencing
26508  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26509  VALID_TOOLCHAINS=${!toolchain_var_name}
26510
26511  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26512    if test -n "$XCODEBUILD"; then
26513      # On Mac OS X, default toolchain to clang after Xcode 5
26514      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26515      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26516      if test $? -ne 0; then
26517        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26518      fi
26519      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26520          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26521          $CUT -f 1 -d .`
26522      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26523$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26524      if test $XCODE_MAJOR_VERSION -ge 5; then
26525          DEFAULT_TOOLCHAIN="clang"
26526      else
26527          DEFAULT_TOOLCHAIN="gcc"
26528      fi
26529    else
26530      # If Xcode is not installed, but the command line tools are
26531      # then we can't run xcodebuild. On these systems we should
26532      # default to clang
26533      DEFAULT_TOOLCHAIN="clang"
26534    fi
26535  else
26536    # First toolchain type in the list is the default
26537    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26538  fi
26539
26540  if test "x$with_toolchain_type" = xlist; then
26541    # List all toolchains
26542    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26543$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26544    for toolchain in $VALID_TOOLCHAINS; do
26545      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26546      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26547      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26548    done
26549
26550    exit 0
26551  elif test "x$with_toolchain_type" != x; then
26552    # User override; check that it is valid
26553    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26554      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26555$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26556      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26557$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26558      as_fn_error $? "Cannot continue." "$LINENO" 5
26559    fi
26560    TOOLCHAIN_TYPE=$with_toolchain_type
26561  else
26562    # No flag given, use default
26563    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26564  fi
26565
26566
26567  TOOLCHAIN_CC_BINARY_clang="clang"
26568  TOOLCHAIN_CC_BINARY_gcc="gcc"
26569  TOOLCHAIN_CC_BINARY_microsoft="cl"
26570  TOOLCHAIN_CC_BINARY_solstudio="cc"
26571  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26572
26573  TOOLCHAIN_CXX_BINARY_clang="clang++"
26574  TOOLCHAIN_CXX_BINARY_gcc="g++"
26575  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26576  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26577  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26578
26579  # Use indirect variable referencing
26580  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26581  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26582  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26583  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26584  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26585  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26586
26587
26588  # Define filename patterns
26589  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26590    LIBRARY_PREFIX=
26591    SHARED_LIBRARY_SUFFIX='.dll'
26592    STATIC_LIBRARY_SUFFIX='.lib'
26593    SHARED_LIBRARY='$1.dll'
26594    STATIC_LIBRARY='$1.lib'
26595    OBJ_SUFFIX='.obj'
26596    EXE_SUFFIX='.exe'
26597  else
26598    LIBRARY_PREFIX=lib
26599    SHARED_LIBRARY_SUFFIX='.so'
26600    STATIC_LIBRARY_SUFFIX='.a'
26601    SHARED_LIBRARY='lib$1.so'
26602    STATIC_LIBRARY='lib$1.a'
26603    OBJ_SUFFIX='.o'
26604    EXE_SUFFIX=''
26605    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26606      SHARED_LIBRARY='lib$1.dylib'
26607      SHARED_LIBRARY_SUFFIX='.dylib'
26608    fi
26609  fi
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26621    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26622$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26623  else
26624    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26625$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26626  fi
26627
26628
26629# Then detect the actual binaries needed
26630
26631  # FIXME: Is this needed?
26632  ac_ext=cpp
26633ac_cpp='$CXXCPP $CPPFLAGS'
26634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26637
26638
26639  # Store the CFLAGS etc passed to the configure script.
26640  ORG_CFLAGS="$CFLAGS"
26641  ORG_CXXFLAGS="$CXXFLAGS"
26642  ORG_OBJCFLAGS="$OBJCFLAGS"
26643
26644  # On Windows, we need to detect the visual studio installation first.
26645  # This will change the PATH, but we need to keep that new PATH even
26646  # after toolchain detection is done, since the compiler (on x86) uses
26647  # it for DLL resolution in runtime.
26648  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26649
26650  # Store path to cygwin link.exe to help excluding it when searching for
26651  # VS linker. This must be done before changing the PATH when looking for VS.
26652  # Extract the first word of "link", so it can be a program name with args.
26653set dummy link; ac_word=$2
26654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26655$as_echo_n "checking for $ac_word... " >&6; }
26656if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26657  $as_echo_n "(cached) " >&6
26658else
26659  case $CYGWIN_LINK in
26660  [\\/]* | ?:[\\/]*)
26661  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26662  ;;
26663  *)
26664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26665for as_dir in $PATH
26666do
26667  IFS=$as_save_IFS
26668  test -z "$as_dir" && as_dir=.
26669    for ac_exec_ext in '' $ac_executable_extensions; do
26670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26671    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26673    break 2
26674  fi
26675done
26676  done
26677IFS=$as_save_IFS
26678
26679  ;;
26680esac
26681fi
26682CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26683if test -n "$CYGWIN_LINK"; then
26684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26685$as_echo "$CYGWIN_LINK" >&6; }
26686else
26687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26688$as_echo "no" >&6; }
26689fi
26690
26691
26692  if test "x$CYGWIN_LINK" != x; then
26693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26694$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26695    "$CYGWIN_LINK" --version > /dev/null
26696    if test $? -eq 0 ; then
26697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26698$as_echo "yes" >&6; }
26699    else
26700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26701$as_echo "no" >&6; }
26702      # This might be the VS linker. Don't exclude it later on.
26703      CYGWIN_LINK=""
26704    fi
26705  fi
26706
26707  # First-hand choice is to locate and run the vsvars bat file.
26708
26709
26710# Check whether --with-toolchain-version was given.
26711if test "${with_toolchain_version+set}" = set; then :
26712  withval=$with_toolchain_version;
26713fi
26714
26715
26716  if test "x$with_toolchain_version" = xlist; then
26717    # List all toolchains
26718    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26719$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26720    for version in $VALID_VS_VERSIONS; do
26721      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26722      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26723    done
26724
26725    exit 0
26726  elif test "x$with_toolchain_version" != x; then
26727    # User override; check that it is valid
26728    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26729      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26730$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26731      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26732$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26733      as_fn_error $? "Cannot continue." "$LINENO" 5
26734    fi
26735    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26736  else
26737    # No flag given, use default
26738    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26739  fi
26740
26741  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26742
26743  VS_VERSION="$VS_VERSION"
26744  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26745  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26746  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26747  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26748
26749  # When using --with-tools-dir, assume it points to the correct and default
26750  # version of Visual Studio or that --with-toolchain-version was also set.
26751  if test "x$with_tools_dir" != x; then
26752
26753  if test "x$VS_ENV_CMD" = x; then
26754    VS_VERSION="${VS_VERSION}"
26755    VS_BASE="$with_tools_dir/../.."
26756    METHOD="--with-tools-dir"
26757
26758    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26759      VCVARSFILE="vc/bin/vcvars32.bat"
26760    else
26761      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26762    fi
26763
26764
26765  windows_path="$VS_BASE"
26766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26767    unix_path=`$CYGPATH -u "$windows_path"`
26768    VS_BASE="$unix_path"
26769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26771    VS_BASE="$unix_path"
26772  fi
26773
26774    if test -d "$VS_BASE"; then
26775      if test -f "$VS_BASE/$VCVARSFILE"; then
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26777$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26778        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26779        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26780        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26781        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26782      else
26783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26784$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26785        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26786$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26787      fi
26788    fi
26789  fi
26790
26791
26792  if test "x$VS_ENV_CMD" = x; then
26793    VS_VERSION="${VS_VERSION}"
26794    VS_BASE="$with_tools_dir/../../.."
26795    METHOD="--with-tools-dir"
26796
26797    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26798      VCVARSFILE="vc/bin/vcvars32.bat"
26799    else
26800      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26801    fi
26802
26803
26804  windows_path="$VS_BASE"
26805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26806    unix_path=`$CYGPATH -u "$windows_path"`
26807    VS_BASE="$unix_path"
26808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26810    VS_BASE="$unix_path"
26811  fi
26812
26813    if test -d "$VS_BASE"; then
26814      if test -f "$VS_BASE/$VCVARSFILE"; then
26815        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26816$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26817        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26818        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26819        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26820        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26821      else
26822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26823$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26824        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26825$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26826      fi
26827    fi
26828  fi
26829
26830    if test "x$VS_ENV_CMD" = x; then
26831      # Having specified an argument which is incorrect will produce an instant failure;
26832      # we should not go on looking
26833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26834$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26835      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26836$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26837      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26838$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26839      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26840    fi
26841  fi
26842
26843  VS_ENV_CMD=""
26844  VS_ENV_ARGS=""
26845
26846  if test "x$VS_COMNTOOLS" != x; then
26847
26848  if test "x$VS_ENV_CMD" = x; then
26849    VS_VERSION="${VS_VERSION}"
26850    VS_BASE="$VS_COMNTOOLS/../.."
26851    METHOD="$VS_COMNTOOLS_VAR variable"
26852
26853    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26854      VCVARSFILE="vc/bin/vcvars32.bat"
26855    else
26856      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26857    fi
26858
26859
26860  windows_path="$VS_BASE"
26861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26862    unix_path=`$CYGPATH -u "$windows_path"`
26863    VS_BASE="$unix_path"
26864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26866    VS_BASE="$unix_path"
26867  fi
26868
26869    if test -d "$VS_BASE"; then
26870      if test -f "$VS_BASE/$VCVARSFILE"; then
26871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26872$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26873        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26874        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26875        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26876        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26877      else
26878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26879$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26880        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26881$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26882      fi
26883    fi
26884  fi
26885
26886  fi
26887  if test "x$PROGRAMFILES" != x; then
26888
26889  if test "x$VS_ENV_CMD" = x; then
26890    VS_VERSION="${VS_VERSION}"
26891    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26892    METHOD="well-known name"
26893
26894    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26895      VCVARSFILE="vc/bin/vcvars32.bat"
26896    else
26897      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26898    fi
26899
26900
26901  windows_path="$VS_BASE"
26902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26903    unix_path=`$CYGPATH -u "$windows_path"`
26904    VS_BASE="$unix_path"
26905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26907    VS_BASE="$unix_path"
26908  fi
26909
26910    if test -d "$VS_BASE"; then
26911      if test -f "$VS_BASE/$VCVARSFILE"; then
26912        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26913$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26914        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26915        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26916        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26917        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26918      else
26919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26920$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26922$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26923      fi
26924    fi
26925  fi
26926
26927  fi
26928  # Work around the insanely named ProgramFiles(x86) env variable
26929  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26930  if test "x$PROGRAMFILES_X86" != x; then
26931
26932  if test "x$VS_ENV_CMD" = x; then
26933    VS_VERSION="${VS_VERSION}"
26934    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26935    METHOD="well-known name"
26936
26937    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26938      VCVARSFILE="vc/bin/vcvars32.bat"
26939    else
26940      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26941    fi
26942
26943
26944  windows_path="$VS_BASE"
26945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26946    unix_path=`$CYGPATH -u "$windows_path"`
26947    VS_BASE="$unix_path"
26948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26950    VS_BASE="$unix_path"
26951  fi
26952
26953    if test -d "$VS_BASE"; then
26954      if test -f "$VS_BASE/$VCVARSFILE"; then
26955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26956$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26957        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26958        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26959        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26960        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26961      else
26962        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26963$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26964        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26965$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26966      fi
26967    fi
26968  fi
26969
26970  fi
26971
26972  if test "x$VS_ENV_CMD" = x; then
26973    VS_VERSION="${VS_VERSION}"
26974    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26975    METHOD="well-known name"
26976
26977    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26978      VCVARSFILE="vc/bin/vcvars32.bat"
26979    else
26980      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26981    fi
26982
26983
26984  windows_path="$VS_BASE"
26985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26986    unix_path=`$CYGPATH -u "$windows_path"`
26987    VS_BASE="$unix_path"
26988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26990    VS_BASE="$unix_path"
26991  fi
26992
26993    if test -d "$VS_BASE"; then
26994      if test -f "$VS_BASE/$VCVARSFILE"; then
26995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26996$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26997        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26998        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26999        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27000        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27001      else
27002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27003$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27004        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27005$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27006      fi
27007    fi
27008  fi
27009
27010
27011  if test "x$VS_ENV_CMD" = x; then
27012    VS_VERSION="${VS_VERSION}"
27013    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27014    METHOD="well-known name"
27015
27016    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27017      VCVARSFILE="vc/bin/vcvars32.bat"
27018    else
27019      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27020    fi
27021
27022
27023  windows_path="$VS_BASE"
27024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27025    unix_path=`$CYGPATH -u "$windows_path"`
27026    VS_BASE="$unix_path"
27027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27029    VS_BASE="$unix_path"
27030  fi
27031
27032    if test -d "$VS_BASE"; then
27033      if test -f "$VS_BASE/$VCVARSFILE"; then
27034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27035$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27036        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27037        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27038        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27039        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27040      else
27041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27042$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27043        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27044$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27045      fi
27046    fi
27047  fi
27048
27049
27050  if test "x$SDK_INSTALL_DIR" != x; then
27051    if test "x$ProgramW6432" != x; then
27052
27053  if test "x$VS_ENV_CMD" = x; then
27054    VS_VERSION="${VS_VERSION}"
27055    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27056    METHOD="well-known name"
27057
27058  windows_path="$WIN_SDK_BASE"
27059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27060    unix_path=`$CYGPATH -u "$windows_path"`
27061    WIN_SDK_BASE="$unix_path"
27062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27064    WIN_SDK_BASE="$unix_path"
27065  fi
27066
27067    if test -d "$WIN_SDK_BASE"; then
27068      # There have been cases of partial or broken SDK installations. A missing
27069      # lib dir is not going to work.
27070      if test ! -d "$WIN_SDK_BASE/lib"; then
27071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27072$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27073        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27074$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27075      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27076        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27077$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27078        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27079        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27080          VS_ENV_ARGS="/x86"
27081        else
27082          VS_ENV_ARGS="/x64"
27083        fi
27084        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27085        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27086        # TODO: improve detection for other versions of SDK
27087        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27088      else
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27090$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27091        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27092$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27093      fi
27094    fi
27095  fi
27096
27097    fi
27098    if test "x$PROGRAMW6432" != x; then
27099
27100  if test "x$VS_ENV_CMD" = x; then
27101    VS_VERSION="${VS_VERSION}"
27102    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27103    METHOD="well-known name"
27104
27105  windows_path="$WIN_SDK_BASE"
27106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27107    unix_path=`$CYGPATH -u "$windows_path"`
27108    WIN_SDK_BASE="$unix_path"
27109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27111    WIN_SDK_BASE="$unix_path"
27112  fi
27113
27114    if test -d "$WIN_SDK_BASE"; then
27115      # There have been cases of partial or broken SDK installations. A missing
27116      # lib dir is not going to work.
27117      if test ! -d "$WIN_SDK_BASE/lib"; then
27118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27120        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27121$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27122      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27124$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27125        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27126        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27127          VS_ENV_ARGS="/x86"
27128        else
27129          VS_ENV_ARGS="/x64"
27130        fi
27131        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27132        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27133        # TODO: improve detection for other versions of SDK
27134        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27135      else
27136        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27137$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27138        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27139$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27140      fi
27141    fi
27142  fi
27143
27144    fi
27145    if test "x$PROGRAMFILES" != x; then
27146
27147  if test "x$VS_ENV_CMD" = x; then
27148    VS_VERSION="${VS_VERSION}"
27149    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27150    METHOD="well-known name"
27151
27152  windows_path="$WIN_SDK_BASE"
27153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27154    unix_path=`$CYGPATH -u "$windows_path"`
27155    WIN_SDK_BASE="$unix_path"
27156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27158    WIN_SDK_BASE="$unix_path"
27159  fi
27160
27161    if test -d "$WIN_SDK_BASE"; then
27162      # There have been cases of partial or broken SDK installations. A missing
27163      # lib dir is not going to work.
27164      if test ! -d "$WIN_SDK_BASE/lib"; then
27165        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27166$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27167        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27168$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27169      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27170        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27171$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27172        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27173        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27174          VS_ENV_ARGS="/x86"
27175        else
27176          VS_ENV_ARGS="/x64"
27177        fi
27178        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27179        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27180        # TODO: improve detection for other versions of SDK
27181        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27182      else
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27184$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27185        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27186$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27187      fi
27188    fi
27189  fi
27190
27191    fi
27192
27193  if test "x$VS_ENV_CMD" = x; then
27194    VS_VERSION="${VS_VERSION}"
27195    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27196    METHOD="well-known name"
27197
27198  windows_path="$WIN_SDK_BASE"
27199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27200    unix_path=`$CYGPATH -u "$windows_path"`
27201    WIN_SDK_BASE="$unix_path"
27202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27204    WIN_SDK_BASE="$unix_path"
27205  fi
27206
27207    if test -d "$WIN_SDK_BASE"; then
27208      # There have been cases of partial or broken SDK installations. A missing
27209      # lib dir is not going to work.
27210      if test ! -d "$WIN_SDK_BASE/lib"; then
27211        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27212$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27213        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27214$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27215      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27216        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27217$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27218        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27219        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27220          VS_ENV_ARGS="/x86"
27221        else
27222          VS_ENV_ARGS="/x64"
27223        fi
27224        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27225        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27226        # TODO: improve detection for other versions of SDK
27227        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27228      else
27229        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27230$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27231        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27232$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27233      fi
27234    fi
27235  fi
27236
27237
27238  if test "x$VS_ENV_CMD" = x; then
27239    VS_VERSION="${VS_VERSION}"
27240    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27241    METHOD="well-known name"
27242
27243  windows_path="$WIN_SDK_BASE"
27244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27245    unix_path=`$CYGPATH -u "$windows_path"`
27246    WIN_SDK_BASE="$unix_path"
27247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27249    WIN_SDK_BASE="$unix_path"
27250  fi
27251
27252    if test -d "$WIN_SDK_BASE"; then
27253      # There have been cases of partial or broken SDK installations. A missing
27254      # lib dir is not going to work.
27255      if test ! -d "$WIN_SDK_BASE/lib"; then
27256        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27257$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27258        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27259$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27260      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27261        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27262$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27263        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27264        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27265          VS_ENV_ARGS="/x86"
27266        else
27267          VS_ENV_ARGS="/x64"
27268        fi
27269        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27270        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27271        # TODO: improve detection for other versions of SDK
27272        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27273      else
27274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27275$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27277$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27278      fi
27279    fi
27280  fi
27281
27282  fi
27283
27284    if test "x$VS_ENV_CMD" != x; then
27285      TOOLCHAIN_VERSION=$VS_VERSION
27286      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27287      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27288      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27289      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27290      # The rest of the variables are already evaled while probing
27291      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27292$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27293      break
27294    fi
27295  done
27296
27297
27298  if test "x$VS_ENV_CMD" != x; then
27299    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27300
27301  # Only process if variable expands to non-empty
27302
27303  if test "x$VS_ENV_CMD" != x; then
27304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27305
27306  # First separate the path from the arguments. This will split at the first
27307  # space.
27308  complete="$VS_ENV_CMD"
27309  path="${complete%% *}"
27310  tmp="$complete EOL"
27311  arguments="${tmp#* }"
27312
27313  # Input might be given as Windows format, start by converting to
27314  # unix format.
27315  new_path=`$CYGPATH -u "$path"`
27316
27317  # Now try to locate executable using which
27318  new_path=`$WHICH "$new_path" 2> /dev/null`
27319  # bat and cmd files are not always considered executable in cygwin causing which
27320  # to not find them
27321  if test "x$new_path" = x \
27322      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27323      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27324    new_path=`$CYGPATH -u "$path"`
27325  fi
27326  if test "x$new_path" = x; then
27327    # Oops. Which didn't find the executable.
27328    # The splitting of arguments from the executable at a space might have been incorrect,
27329    # since paths with space are more likely in Windows. Give it another try with the whole
27330    # argument.
27331    path="$complete"
27332    arguments="EOL"
27333    new_path=`$CYGPATH -u "$path"`
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      # It's still not found. Now this is an unrecoverable error.
27344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27345$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27346      has_space=`$ECHO "$complete" | $GREP " "`
27347      if test "x$has_space" != x; then
27348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27350      fi
27351      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27352    fi
27353  fi
27354
27355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27358  # "foo.exe" is OK but "foo" is an error.
27359  #
27360  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27361  # It is also a way to make sure we got the proper file name for the real test later on.
27362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27363  if test "x$test_shortpath" = x; then
27364    # Short path failed, file does not exist as specified.
27365    # Try adding .exe or .cmd
27366    if test -f "${new_path}.exe"; then
27367      input_to_shortpath="${new_path}.exe"
27368    elif test -f "${new_path}.cmd"; then
27369      input_to_shortpath="${new_path}.cmd"
27370    else
27371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27372$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27373      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27374$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27375      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27376    fi
27377  else
27378    input_to_shortpath="$new_path"
27379  fi
27380
27381  # Call helper function which possibly converts this using DOS-style short mode.
27382  # If so, the updated path is stored in $new_path.
27383  new_path="$input_to_shortpath"
27384
27385  input_path="$input_to_shortpath"
27386  # Check if we need to convert this using DOS-style short mode. If the path
27387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27388  # take no chances and rewrite it.
27389  # Note: m4 eats our [], so we need to use [ and ] instead.
27390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27391  if test "x$has_forbidden_chars" != x; then
27392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27396      # Going to short mode and back again did indeed matter. Since short mode is
27397      # case insensitive, let's make it lowercase to improve readability.
27398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27399      # Now convert it back to Unix-stile (cygpath)
27400      input_path=`$CYGPATH -u "$shortmode_path"`
27401      new_path="$input_path"
27402    fi
27403  fi
27404
27405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27406  if test "x$test_cygdrive_prefix" = x; then
27407    # As a simple fix, exclude /usr/bin since it's not a real path.
27408    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27410      # a path prefixed by /cygdrive for fixpath to work.
27411      new_path="$CYGWIN_ROOT_PATH$input_path"
27412    fi
27413  fi
27414
27415  # remove trailing .exe if any
27416  new_path="${new_path/%.exe/}"
27417
27418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27419
27420  # First separate the path from the arguments. This will split at the first
27421  # space.
27422  complete="$VS_ENV_CMD"
27423  path="${complete%% *}"
27424  tmp="$complete EOL"
27425  arguments="${tmp#* }"
27426
27427  # Input might be given as Windows format, start by converting to
27428  # unix format.
27429  new_path="$path"
27430
27431  windows_path="$new_path"
27432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27433    unix_path=`$CYGPATH -u "$windows_path"`
27434    new_path="$unix_path"
27435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27437    new_path="$unix_path"
27438  fi
27439
27440
27441  # Now try to locate executable using which
27442  new_path=`$WHICH "$new_path" 2> /dev/null`
27443
27444  if test "x$new_path" = x; then
27445    # Oops. Which didn't find the executable.
27446    # The splitting of arguments from the executable at a space might have been incorrect,
27447    # since paths with space are more likely in Windows. Give it another try with the whole
27448    # argument.
27449    path="$complete"
27450    arguments="EOL"
27451    new_path="$path"
27452
27453  windows_path="$new_path"
27454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27455    unix_path=`$CYGPATH -u "$windows_path"`
27456    new_path="$unix_path"
27457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27459    new_path="$unix_path"
27460  fi
27461
27462
27463    new_path=`$WHICH "$new_path" 2> /dev/null`
27464    # bat and cmd files are not always considered executable in MSYS causing which
27465    # to not find them
27466    if test "x$new_path" = x \
27467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27469      new_path="$path"
27470
27471  windows_path="$new_path"
27472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27473    unix_path=`$CYGPATH -u "$windows_path"`
27474    new_path="$unix_path"
27475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27477    new_path="$unix_path"
27478  fi
27479
27480    fi
27481
27482    if test "x$new_path" = x; then
27483      # It's still not found. Now this is an unrecoverable error.
27484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27485$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27486      has_space=`$ECHO "$complete" | $GREP " "`
27487      if test "x$has_space" != x; then
27488        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27489$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27490      fi
27491      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27492    fi
27493  fi
27494
27495  # Now new_path has a complete unix path to the binary
27496  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27497    # Keep paths in /bin as-is, but remove trailing .exe if any
27498    new_path="${new_path/%.exe/}"
27499    # Do not save /bin paths to all_fixpath_prefixes!
27500  else
27501    # Not in mixed or Windows style, start by that.
27502    new_path=`cmd //c echo $new_path`
27503
27504  input_path="$new_path"
27505  # Check if we need to convert this using DOS-style short mode. If the path
27506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27507  # take no chances and rewrite it.
27508  # Note: m4 eats our [], so we need to use [ and ] instead.
27509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27510  if test "x$has_forbidden_chars" != x; then
27511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27513  fi
27514
27515    # Output is in $new_path
27516
27517  windows_path="$new_path"
27518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27519    unix_path=`$CYGPATH -u "$windows_path"`
27520    new_path="$unix_path"
27521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27523    new_path="$unix_path"
27524  fi
27525
27526    # remove trailing .exe if any
27527    new_path="${new_path/%.exe/}"
27528
27529    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27530    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27531  fi
27532
27533    else
27534      # We're on a unix platform. Hooray! :)
27535      # First separate the path from the arguments. This will split at the first
27536      # space.
27537      complete="$VS_ENV_CMD"
27538      path="${complete%% *}"
27539      tmp="$complete EOL"
27540      arguments="${tmp#* }"
27541
27542      # Cannot rely on the command "which" here since it doesn't always work.
27543      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27544      if test -z "$is_absolute_path"; then
27545        # Path to executable is not absolute. Find it.
27546        IFS_save="$IFS"
27547        IFS=:
27548        for p in $PATH; do
27549          if test -f "$p/$path" && test -x "$p/$path"; then
27550            new_path="$p/$path"
27551            break
27552          fi
27553        done
27554        IFS="$IFS_save"
27555      else
27556        # This is an absolute path, we can use it without further modifications.
27557        new_path="$path"
27558      fi
27559
27560      if test "x$new_path" = x; then
27561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27562$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27563        has_space=`$ECHO "$complete" | $GREP " "`
27564        if test "x$has_space" != x; then
27565          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27566$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27567        fi
27568        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27569      fi
27570    fi
27571
27572    # Now join together the path and the arguments once again
27573    if test "x$arguments" != xEOL; then
27574      new_complete="$new_path ${arguments% *}"
27575    else
27576      new_complete="$new_path"
27577    fi
27578
27579    if test "x$complete" != "x$new_complete"; then
27580      VS_ENV_CMD="$new_complete"
27581      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27582$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27583    fi
27584  fi
27585
27586
27587    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27588    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27589$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27590
27591    # We need to create a couple of temporary files.
27592    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27593    $MKDIR -p $VS_ENV_TMP_DIR
27594
27595    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27596    # Instead create a shell script which will set the relevant variables when run.
27597    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27598
27599  unix_path="$WINPATH_VS_ENV_CMD"
27600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27601    windows_path=`$CYGPATH -m "$unix_path"`
27602    WINPATH_VS_ENV_CMD="$windows_path"
27603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27604    windows_path=`cmd //c echo $unix_path`
27605    WINPATH_VS_ENV_CMD="$windows_path"
27606  fi
27607
27608    WINPATH_BASH="$BASH"
27609
27610  unix_path="$WINPATH_BASH"
27611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27612    windows_path=`$CYGPATH -m "$unix_path"`
27613    WINPATH_BASH="$windows_path"
27614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27615    windows_path=`cmd //c echo $unix_path`
27616    WINPATH_BASH="$windows_path"
27617  fi
27618
27619
27620    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27621    # script (executable by bash) that will setup the important variables.
27622    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27623    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27624    # This will end up something like:
27625    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27626    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27627    # These will end up something like:
27628    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27629    # The trailing space for everyone except PATH is no typo, but is needed due
27630    # to trailing \ in the Windows paths. These will be stripped later.
27631    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27632    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27633    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27634    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27635    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27636    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27637
27638    # Now execute the newly created bat file.
27639    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27640    # Change directory so we don't need to mess with Windows paths in redirects.
27641    cd $VS_ENV_TMP_DIR
27642    cmd /c extract-vs-env.bat | $CAT
27643    cd $CURDIR
27644
27645    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27646      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27647$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27648      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27649$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27650      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27651$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27652      as_fn_error $? "Cannot continue" "$LINENO" 5
27653    fi
27654
27655    # Now set all paths and other env variables. This will allow the rest of
27656    # the configure script to find and run the compiler in the proper way.
27657    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27658$as_echo "$as_me: Setting extracted environment variables" >&6;}
27659    . $VS_ENV_TMP_DIR/set-vs-env.sh
27660    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27661    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27662  else
27663    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27664    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27665$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27666  fi
27667
27668  # At this point, we should have correct variables in the environment, or we can't continue.
27669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27670$as_echo_n "checking for Visual Studio variables... " >&6; }
27671
27672  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27673    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27675$as_echo "present but broken" >&6; }
27676      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27677    else
27678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27679$as_echo "ok" >&6; }
27680      # Remove any trailing "\" ";" and " " from the variables.
27681      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27682      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27683      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27684      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27685      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27686      # Remove any paths containing # (typically F#) as that messes up make. This
27687      # is needed if visual studio was installed with F# support.
27688      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27689
27690
27691
27692
27693
27694      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27695      OLDIFS="$IFS"
27696      IFS=";"
27697      for i in $VS_INCLUDE; do
27698        ipath=$i
27699	IFS="$OLDIFS"
27700
27701  # Only process if variable expands to non-empty
27702
27703  if test "x$ipath" != x; then
27704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27705
27706  # Input might be given as Windows format, start by converting to
27707  # unix format.
27708  path="$ipath"
27709  new_path=`$CYGPATH -u "$path"`
27710
27711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27714  # "foo.exe" is OK but "foo" is an error.
27715  #
27716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27717  # It is also a way to make sure we got the proper file name for the real test later on.
27718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27719  if test "x$test_shortpath" = x; then
27720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27721$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27722    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27723  fi
27724
27725  # Call helper function which possibly converts this using DOS-style short mode.
27726  # If so, the updated path is stored in $new_path.
27727
27728  input_path="$new_path"
27729  # Check if we need to convert this using DOS-style short mode. If the path
27730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27731  # take no chances and rewrite it.
27732  # Note: m4 eats our [], so we need to use [ and ] instead.
27733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27734  if test "x$has_forbidden_chars" != x; then
27735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27739      # Going to short mode and back again did indeed matter. Since short mode is
27740      # case insensitive, let's make it lowercase to improve readability.
27741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27742      # Now convert it back to Unix-stile (cygpath)
27743      input_path=`$CYGPATH -u "$shortmode_path"`
27744      new_path="$input_path"
27745    fi
27746  fi
27747
27748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27749  if test "x$test_cygdrive_prefix" = x; then
27750    # As a simple fix, exclude /usr/bin since it's not a real path.
27751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27753      # a path prefixed by /cygdrive for fixpath to work.
27754      new_path="$CYGWIN_ROOT_PATH$input_path"
27755    fi
27756  fi
27757
27758
27759  if test "x$path" != "x$new_path"; then
27760    ipath="$new_path"
27761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27762$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27763  fi
27764
27765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27766
27767  path="$ipath"
27768  has_colon=`$ECHO $path | $GREP ^.:`
27769  new_path="$path"
27770  if test "x$has_colon" = x; then
27771    # Not in mixed or Windows style, start by that.
27772    new_path=`cmd //c echo $path`
27773  fi
27774
27775
27776  input_path="$new_path"
27777  # Check if we need to convert this using DOS-style short mode. If the path
27778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27779  # take no chances and rewrite it.
27780  # Note: m4 eats our [], so we need to use [ and ] instead.
27781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27782  if test "x$has_forbidden_chars" != x; then
27783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27785  fi
27786
27787
27788  windows_path="$new_path"
27789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27790    unix_path=`$CYGPATH -u "$windows_path"`
27791    new_path="$unix_path"
27792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27794    new_path="$unix_path"
27795  fi
27796
27797  if test "x$path" != "x$new_path"; then
27798    ipath="$new_path"
27799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27800$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27801  fi
27802
27803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27805
27806    else
27807      # We're on a unix platform. Hooray! :)
27808      path="$ipath"
27809      has_space=`$ECHO "$path" | $GREP " "`
27810      if test "x$has_space" != x; then
27811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27812$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27814      fi
27815
27816      # Use eval to expand a potential ~
27817      eval path="$path"
27818      if test ! -f "$path" && test ! -d "$path"; then
27819        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27820      fi
27821
27822      ipath="`cd "$path"; $THEPWDCMD -L`"
27823    fi
27824  fi
27825
27826	IFS=";"
27827      	SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27828      done
27829      # Convert VS_LIB into SYSROOT_LDFLAGS
27830      for i in $VS_LIB; do
27831        libpath=$i
27832	IFS="$OLDIFS"
27833
27834  # Only process if variable expands to non-empty
27835
27836  if test "x$libpath" != x; then
27837    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27838
27839  # Input might be given as Windows format, start by converting to
27840  # unix format.
27841  path="$libpath"
27842  new_path=`$CYGPATH -u "$path"`
27843
27844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27847  # "foo.exe" is OK but "foo" is an error.
27848  #
27849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27850  # It is also a way to make sure we got the proper file name for the real test later on.
27851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27852  if test "x$test_shortpath" = x; then
27853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27854$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27855    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27856  fi
27857
27858  # Call helper function which possibly converts this using DOS-style short mode.
27859  # If so, the updated path is stored in $new_path.
27860
27861  input_path="$new_path"
27862  # Check if we need to convert this using DOS-style short mode. If the path
27863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27864  # take no chances and rewrite it.
27865  # Note: m4 eats our [], so we need to use [ and ] instead.
27866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27867  if test "x$has_forbidden_chars" != x; then
27868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27872      # Going to short mode and back again did indeed matter. Since short mode is
27873      # case insensitive, let's make it lowercase to improve readability.
27874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27875      # Now convert it back to Unix-stile (cygpath)
27876      input_path=`$CYGPATH -u "$shortmode_path"`
27877      new_path="$input_path"
27878    fi
27879  fi
27880
27881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27882  if test "x$test_cygdrive_prefix" = x; then
27883    # As a simple fix, exclude /usr/bin since it's not a real path.
27884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27886      # a path prefixed by /cygdrive for fixpath to work.
27887      new_path="$CYGWIN_ROOT_PATH$input_path"
27888    fi
27889  fi
27890
27891
27892  if test "x$path" != "x$new_path"; then
27893    libpath="$new_path"
27894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27895$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27896  fi
27897
27898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27899
27900  path="$libpath"
27901  has_colon=`$ECHO $path | $GREP ^.:`
27902  new_path="$path"
27903  if test "x$has_colon" = x; then
27904    # Not in mixed or Windows style, start by that.
27905    new_path=`cmd //c echo $path`
27906  fi
27907
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27918  fi
27919
27920
27921  windows_path="$new_path"
27922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27923    unix_path=`$CYGPATH -u "$windows_path"`
27924    new_path="$unix_path"
27925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27927    new_path="$unix_path"
27928  fi
27929
27930  if test "x$path" != "x$new_path"; then
27931    libpath="$new_path"
27932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27933$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27934  fi
27935
27936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27938
27939    else
27940      # We're on a unix platform. Hooray! :)
27941      path="$libpath"
27942      has_space=`$ECHO "$path" | $GREP " "`
27943      if test "x$has_space" != x; then
27944        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27945$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27946        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27947      fi
27948
27949      # Use eval to expand a potential ~
27950      eval path="$path"
27951      if test ! -f "$path" && test ! -d "$path"; then
27952        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
27953      fi
27954
27955      libpath="`cd "$path"; $THEPWDCMD -L`"
27956    fi
27957  fi
27958
27959	IFS=";"
27960      	SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
27961      done
27962      IFS="$OLDIFS"
27963    fi
27964  else
27965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27966$as_echo "not found" >&6; }
27967
27968    if test "x$VS_ENV_CMD" = x; then
27969      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27970$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27971      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27972$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27973    else
27974      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27975$as_echo "$as_me: Running the extraction script failed." >&6;}
27976    fi
27977    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27978$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27979    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27980$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27981    as_fn_error $? "Cannot continue" "$LINENO" 5
27982  fi
27983
27984    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27985    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27986    PATH="$VS_PATH"
27987    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27988    export INCLUDE="$VS_INCLUDE"
27989    export LIB="$VS_LIB"
27990  fi
27991
27992  # autoconf magic only relies on PATH, so update it if tools dir is specified
27993  OLD_PATH="$PATH"
27994
27995  # For solaris we really need solaris tools, and not the GNU equivalent.
27996  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27997  # so add that to path before starting to probe.
27998  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27999  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28000    PATH="/usr/ccs/bin:$PATH"
28001  fi
28002
28003  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28004  # override all other locations.
28005  if test "x$TOOLCHAIN_PATH" != x; then
28006    PATH=$TOOLCHAIN_PATH:$PATH
28007  fi
28008
28009
28010  #
28011  # Setup the compilers (CC and CXX)
28012  #
28013
28014  COMPILER_NAME=C
28015  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28016
28017  if test "x$CC" != x; then
28018    # User has supplied compiler name already, always let that override.
28019    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28020$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28021    if test "x`basename $CC`" = "x$CC"; then
28022      # A command without a complete path is provided, search $PATH.
28023
28024      for ac_prog in $CC
28025do
28026  # Extract the first word of "$ac_prog", so it can be a program name with args.
28027set dummy $ac_prog; ac_word=$2
28028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28029$as_echo_n "checking for $ac_word... " >&6; }
28030if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28031  $as_echo_n "(cached) " >&6
28032else
28033  case $POTENTIAL_CC in
28034  [\\/]* | ?:[\\/]*)
28035  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28036  ;;
28037  *)
28038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28039for as_dir in $PATH
28040do
28041  IFS=$as_save_IFS
28042  test -z "$as_dir" && as_dir=.
28043    for ac_exec_ext in '' $ac_executable_extensions; do
28044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28045    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28047    break 2
28048  fi
28049done
28050  done
28051IFS=$as_save_IFS
28052
28053  ;;
28054esac
28055fi
28056POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28057if test -n "$POTENTIAL_CC"; then
28058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28059$as_echo "$POTENTIAL_CC" >&6; }
28060else
28061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28062$as_echo "no" >&6; }
28063fi
28064
28065
28066  test -n "$POTENTIAL_CC" && break
28067done
28068
28069      if test "x$POTENTIAL_CC" != x; then
28070        CC=$POTENTIAL_CC
28071      else
28072        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28073      fi
28074    else
28075      # Otherwise it might already be a complete path
28076      if test ! -x "$CC"; then
28077        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28078      fi
28079    fi
28080  else
28081    # No user supplied value. Locate compiler ourselves.
28082
28083    # If we are cross compiling, assume cross compilation tools follows the
28084    # cross compilation standard where they are prefixed with the autoconf
28085    # standard name for the target. For example the binary
28086    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28087    # If we are not cross compiling, then the default compiler name will be
28088    # used.
28089
28090    CC=
28091    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28092    # before checking the rest of the PATH.
28093    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28094    # step, this should not be necessary.
28095    if test -n "$TOOLCHAIN_PATH"; then
28096      PATH_save="$PATH"
28097      PATH="$TOOLCHAIN_PATH"
28098      for ac_prog in $SEARCH_LIST
28099do
28100  # Extract the first word of "$ac_prog", so it can be a program name with args.
28101set dummy $ac_prog; ac_word=$2
28102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28103$as_echo_n "checking for $ac_word... " >&6; }
28104if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28105  $as_echo_n "(cached) " >&6
28106else
28107  case $TOOLCHAIN_PATH_CC in
28108  [\\/]* | ?:[\\/]*)
28109  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28110  ;;
28111  *)
28112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28113for as_dir in $PATH
28114do
28115  IFS=$as_save_IFS
28116  test -z "$as_dir" && as_dir=.
28117    for ac_exec_ext in '' $ac_executable_extensions; do
28118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28119    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28121    break 2
28122  fi
28123done
28124  done
28125IFS=$as_save_IFS
28126
28127  ;;
28128esac
28129fi
28130TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28131if test -n "$TOOLCHAIN_PATH_CC"; then
28132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28133$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28134else
28135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28136$as_echo "no" >&6; }
28137fi
28138
28139
28140  test -n "$TOOLCHAIN_PATH_CC" && break
28141done
28142
28143      CC=$TOOLCHAIN_PATH_CC
28144      PATH="$PATH_save"
28145    fi
28146
28147    # AC_PATH_PROGS can't be run multiple times with the same variable,
28148    # so create a new name for this run.
28149    if test "x$CC" = x; then
28150      for ac_prog in $SEARCH_LIST
28151do
28152  # Extract the first word of "$ac_prog", so it can be a program name with args.
28153set dummy $ac_prog; ac_word=$2
28154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28155$as_echo_n "checking for $ac_word... " >&6; }
28156if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28157  $as_echo_n "(cached) " >&6
28158else
28159  case $POTENTIAL_CC in
28160  [\\/]* | ?:[\\/]*)
28161  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28162  ;;
28163  *)
28164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28165for as_dir in $PATH
28166do
28167  IFS=$as_save_IFS
28168  test -z "$as_dir" && as_dir=.
28169    for ac_exec_ext in '' $ac_executable_extensions; do
28170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28171    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28173    break 2
28174  fi
28175done
28176  done
28177IFS=$as_save_IFS
28178
28179  ;;
28180esac
28181fi
28182POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28183if test -n "$POTENTIAL_CC"; then
28184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28185$as_echo "$POTENTIAL_CC" >&6; }
28186else
28187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28188$as_echo "no" >&6; }
28189fi
28190
28191
28192  test -n "$POTENTIAL_CC" && break
28193done
28194
28195      CC=$POTENTIAL_CC
28196    fi
28197
28198    if test "x$CC" = x; then
28199
28200  # Print a helpful message on how to acquire the necessary build dependency.
28201  # devkit is the help tag: freetype, cups, pulse, alsa etc
28202  MISSING_DEPENDENCY=devkit
28203
28204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28205    cygwin_help $MISSING_DEPENDENCY
28206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28207    msys_help $MISSING_DEPENDENCY
28208  else
28209    PKGHANDLER_COMMAND=
28210
28211    case $PKGHANDLER in
28212      apt-get)
28213        apt_help     $MISSING_DEPENDENCY ;;
28214      yum)
28215        yum_help     $MISSING_DEPENDENCY ;;
28216      port)
28217        port_help    $MISSING_DEPENDENCY ;;
28218      pkgutil)
28219        pkgutil_help $MISSING_DEPENDENCY ;;
28220      pkgadd)
28221        pkgadd_help  $MISSING_DEPENDENCY ;;
28222    esac
28223
28224    if test "x$PKGHANDLER_COMMAND" != x; then
28225      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28226    fi
28227  fi
28228
28229      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28230    fi
28231  fi
28232
28233  # Now we have a compiler binary in CC. Make sure it's okay.
28234
28235  # Only process if variable expands to non-empty
28236
28237  if test "x$CC" != x; then
28238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28239
28240  # First separate the path from the arguments. This will split at the first
28241  # space.
28242  complete="$CC"
28243  path="${complete%% *}"
28244  tmp="$complete EOL"
28245  arguments="${tmp#* }"
28246
28247  # Input might be given as Windows format, start by converting to
28248  # unix format.
28249  new_path=`$CYGPATH -u "$path"`
28250
28251  # Now try to locate executable using which
28252  new_path=`$WHICH "$new_path" 2> /dev/null`
28253  # bat and cmd files are not always considered executable in cygwin causing which
28254  # to not find them
28255  if test "x$new_path" = x \
28256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28258    new_path=`$CYGPATH -u "$path"`
28259  fi
28260  if test "x$new_path" = x; then
28261    # Oops. Which didn't find the executable.
28262    # The splitting of arguments from the executable at a space might have been incorrect,
28263    # since paths with space are more likely in Windows. Give it another try with the whole
28264    # argument.
28265    path="$complete"
28266    arguments="EOL"
28267    new_path=`$CYGPATH -u "$path"`
28268    new_path=`$WHICH "$new_path" 2> /dev/null`
28269    # bat and cmd files are not always considered executable in cygwin causing which
28270    # to not find them
28271    if test "x$new_path" = x \
28272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28274      new_path=`$CYGPATH -u "$path"`
28275    fi
28276    if test "x$new_path" = x; then
28277      # It's still not found. Now this is an unrecoverable error.
28278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28279$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28280      has_space=`$ECHO "$complete" | $GREP " "`
28281      if test "x$has_space" != x; then
28282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28284      fi
28285      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28286    fi
28287  fi
28288
28289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28292  # "foo.exe" is OK but "foo" is an error.
28293  #
28294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28295  # It is also a way to make sure we got the proper file name for the real test later on.
28296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28297  if test "x$test_shortpath" = x; then
28298    # Short path failed, file does not exist as specified.
28299    # Try adding .exe or .cmd
28300    if test -f "${new_path}.exe"; then
28301      input_to_shortpath="${new_path}.exe"
28302    elif test -f "${new_path}.cmd"; then
28303      input_to_shortpath="${new_path}.cmd"
28304    else
28305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28306$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28309      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28310    fi
28311  else
28312    input_to_shortpath="$new_path"
28313  fi
28314
28315  # Call helper function which possibly converts this using DOS-style short mode.
28316  # If so, the updated path is stored in $new_path.
28317  new_path="$input_to_shortpath"
28318
28319  input_path="$input_to_shortpath"
28320  # Check if we need to convert this using DOS-style short mode. If the path
28321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28322  # take no chances and rewrite it.
28323  # Note: m4 eats our [], so we need to use [ and ] instead.
28324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28325  if test "x$has_forbidden_chars" != x; then
28326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28330      # Going to short mode and back again did indeed matter. Since short mode is
28331      # case insensitive, let's make it lowercase to improve readability.
28332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28333      # Now convert it back to Unix-stile (cygpath)
28334      input_path=`$CYGPATH -u "$shortmode_path"`
28335      new_path="$input_path"
28336    fi
28337  fi
28338
28339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28340  if test "x$test_cygdrive_prefix" = x; then
28341    # As a simple fix, exclude /usr/bin since it's not a real path.
28342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28344      # a path prefixed by /cygdrive for fixpath to work.
28345      new_path="$CYGWIN_ROOT_PATH$input_path"
28346    fi
28347  fi
28348
28349  # remove trailing .exe if any
28350  new_path="${new_path/%.exe/}"
28351
28352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28353
28354  # First separate the path from the arguments. This will split at the first
28355  # space.
28356  complete="$CC"
28357  path="${complete%% *}"
28358  tmp="$complete EOL"
28359  arguments="${tmp#* }"
28360
28361  # Input might be given as Windows format, start by converting to
28362  # unix format.
28363  new_path="$path"
28364
28365  windows_path="$new_path"
28366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28367    unix_path=`$CYGPATH -u "$windows_path"`
28368    new_path="$unix_path"
28369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28371    new_path="$unix_path"
28372  fi
28373
28374
28375  # Now try to locate executable using which
28376  new_path=`$WHICH "$new_path" 2> /dev/null`
28377
28378  if test "x$new_path" = x; then
28379    # Oops. Which didn't find the executable.
28380    # The splitting of arguments from the executable at a space might have been incorrect,
28381    # since paths with space are more likely in Windows. Give it another try with the whole
28382    # argument.
28383    path="$complete"
28384    arguments="EOL"
28385    new_path="$path"
28386
28387  windows_path="$new_path"
28388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28389    unix_path=`$CYGPATH -u "$windows_path"`
28390    new_path="$unix_path"
28391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28393    new_path="$unix_path"
28394  fi
28395
28396
28397    new_path=`$WHICH "$new_path" 2> /dev/null`
28398    # bat and cmd files are not always considered executable in MSYS causing which
28399    # to not find them
28400    if test "x$new_path" = x \
28401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28403      new_path="$path"
28404
28405  windows_path="$new_path"
28406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28407    unix_path=`$CYGPATH -u "$windows_path"`
28408    new_path="$unix_path"
28409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28411    new_path="$unix_path"
28412  fi
28413
28414    fi
28415
28416    if test "x$new_path" = x; then
28417      # It's still not found. Now this is an unrecoverable error.
28418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28419$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28420      has_space=`$ECHO "$complete" | $GREP " "`
28421      if test "x$has_space" != x; then
28422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28424      fi
28425      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28426    fi
28427  fi
28428
28429  # Now new_path has a complete unix path to the binary
28430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28431    # Keep paths in /bin as-is, but remove trailing .exe if any
28432    new_path="${new_path/%.exe/}"
28433    # Do not save /bin paths to all_fixpath_prefixes!
28434  else
28435    # Not in mixed or Windows style, start by that.
28436    new_path=`cmd //c echo $new_path`
28437
28438  input_path="$new_path"
28439  # Check if we need to convert this using DOS-style short mode. If the path
28440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28441  # take no chances and rewrite it.
28442  # Note: m4 eats our [], so we need to use [ and ] instead.
28443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28444  if test "x$has_forbidden_chars" != x; then
28445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28447  fi
28448
28449    # Output is in $new_path
28450
28451  windows_path="$new_path"
28452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28453    unix_path=`$CYGPATH -u "$windows_path"`
28454    new_path="$unix_path"
28455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28457    new_path="$unix_path"
28458  fi
28459
28460    # remove trailing .exe if any
28461    new_path="${new_path/%.exe/}"
28462
28463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28465  fi
28466
28467    else
28468      # We're on a unix platform. Hooray! :)
28469      # First separate the path from the arguments. This will split at the first
28470      # space.
28471      complete="$CC"
28472      path="${complete%% *}"
28473      tmp="$complete EOL"
28474      arguments="${tmp#* }"
28475
28476      # Cannot rely on the command "which" here since it doesn't always work.
28477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28478      if test -z "$is_absolute_path"; then
28479        # Path to executable is not absolute. Find it.
28480        IFS_save="$IFS"
28481        IFS=:
28482        for p in $PATH; do
28483          if test -f "$p/$path" && test -x "$p/$path"; then
28484            new_path="$p/$path"
28485            break
28486          fi
28487        done
28488        IFS="$IFS_save"
28489      else
28490        # This is an absolute path, we can use it without further modifications.
28491        new_path="$path"
28492      fi
28493
28494      if test "x$new_path" = x; then
28495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28496$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28497        has_space=`$ECHO "$complete" | $GREP " "`
28498        if test "x$has_space" != x; then
28499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28501        fi
28502        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28503      fi
28504    fi
28505
28506    # Now join together the path and the arguments once again
28507    if test "x$arguments" != xEOL; then
28508      new_complete="$new_path ${arguments% *}"
28509    else
28510      new_complete="$new_path"
28511    fi
28512
28513    if test "x$complete" != "x$new_complete"; then
28514      CC="$new_complete"
28515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28516$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28517    fi
28518  fi
28519
28520  TEST_COMPILER="$CC"
28521  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28522  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28523  if test "x$OPENJDK_BUILD_OS" != xaix; then
28524    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28526$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28527
28528  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28529    # Follow a chain of symbolic links. Use readlink
28530    # where it exists, else fall back to horribly
28531    # complicated shell code.
28532    if test "x$READLINK_TESTED" != yes; then
28533      # On MacOSX there is a readlink tool with a different
28534      # purpose than the GNU readlink tool. Check the found readlink.
28535      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28536      if test "x$ISGNU" = x; then
28537        # A readlink that we do not know how to use.
28538        # Are there other non-GNU readlinks out there?
28539        READLINK_TESTED=yes
28540        READLINK=
28541      fi
28542    fi
28543
28544    if test "x$READLINK" != x; then
28545      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28546    else
28547      # Save the current directory for restoring afterwards
28548      STARTDIR=$PWD
28549      COUNTER=0
28550      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28551      sym_link_file=`$BASENAME $TEST_COMPILER`
28552      cd $sym_link_dir
28553      # Use -P flag to resolve symlinks in directories.
28554      cd `$THEPWDCMD -P`
28555      sym_link_dir=`$THEPWDCMD -P`
28556      # Resolve file symlinks
28557      while test $COUNTER -lt 20; do
28558        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28559        if test "x$ISLINK" == x; then
28560          # This is not a symbolic link! We are done!
28561          break
28562        fi
28563        # Again resolve directory symlinks since the target of the just found
28564        # link could be in a different directory
28565        cd `$DIRNAME $ISLINK`
28566        sym_link_dir=`$THEPWDCMD -P`
28567        sym_link_file=`$BASENAME $ISLINK`
28568        let COUNTER=COUNTER+1
28569      done
28570      cd $STARTDIR
28571      TEST_COMPILER=$sym_link_dir/$sym_link_file
28572    fi
28573  fi
28574
28575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28576$as_echo "$TEST_COMPILER" >&6; }
28577  fi
28578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28579$as_echo_n "checking if CC is disguised ccache... " >&6; }
28580
28581  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28582  if test "x$COMPILER_BASENAME" = "xccache"; then
28583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28584$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28585    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28586    # We want to control ccache invocation ourselves, so ignore this cc and try
28587    # searching again.
28588
28589    # Remove the path to the fake ccache cc from the PATH
28590    RETRY_COMPILER_SAVED_PATH="$PATH"
28591    COMPILER_DIRNAME=`$DIRNAME $CC`
28592    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28593
28594    # Try again looking for our compiler
28595    if test -n "$ac_tool_prefix"; then
28596  for ac_prog in $TOOLCHAIN_CC_BINARY
28597  do
28598    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28599set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28601$as_echo_n "checking for $ac_word... " >&6; }
28602if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28603  $as_echo_n "(cached) " >&6
28604else
28605  if test -n "$PROPER_COMPILER_CC"; then
28606  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28607else
28608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28609for as_dir in $PATH
28610do
28611  IFS=$as_save_IFS
28612  test -z "$as_dir" && as_dir=.
28613    for ac_exec_ext in '' $ac_executable_extensions; do
28614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28615    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28617    break 2
28618  fi
28619done
28620  done
28621IFS=$as_save_IFS
28622
28623fi
28624fi
28625PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28626if test -n "$PROPER_COMPILER_CC"; then
28627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28628$as_echo "$PROPER_COMPILER_CC" >&6; }
28629else
28630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28631$as_echo "no" >&6; }
28632fi
28633
28634
28635    test -n "$PROPER_COMPILER_CC" && break
28636  done
28637fi
28638if test -z "$PROPER_COMPILER_CC"; then
28639  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28640  for ac_prog in $TOOLCHAIN_CC_BINARY
28641do
28642  # Extract the first word of "$ac_prog", so it can be a program name with args.
28643set dummy $ac_prog; ac_word=$2
28644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28645$as_echo_n "checking for $ac_word... " >&6; }
28646if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28647  $as_echo_n "(cached) " >&6
28648else
28649  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28650  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28651else
28652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28653for as_dir in $PATH
28654do
28655  IFS=$as_save_IFS
28656  test -z "$as_dir" && as_dir=.
28657    for ac_exec_ext in '' $ac_executable_extensions; do
28658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28659    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28661    break 2
28662  fi
28663done
28664  done
28665IFS=$as_save_IFS
28666
28667fi
28668fi
28669ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28670if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28672$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28673else
28674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28675$as_echo "no" >&6; }
28676fi
28677
28678
28679  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28680done
28681
28682  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28683    PROPER_COMPILER_CC=""
28684  else
28685    case $cross_compiling:$ac_tool_warned in
28686yes:)
28687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28689ac_tool_warned=yes ;;
28690esac
28691    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28692  fi
28693fi
28694
28695
28696  # Only process if variable expands to non-empty
28697
28698  if test "x$PROPER_COMPILER_CC" != x; then
28699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28700
28701  # First separate the path from the arguments. This will split at the first
28702  # space.
28703  complete="$PROPER_COMPILER_CC"
28704  path="${complete%% *}"
28705  tmp="$complete EOL"
28706  arguments="${tmp#* }"
28707
28708  # Input might be given as Windows format, start by converting to
28709  # unix format.
28710  new_path=`$CYGPATH -u "$path"`
28711
28712  # Now try to locate executable using which
28713  new_path=`$WHICH "$new_path" 2> /dev/null`
28714  # bat and cmd files are not always considered executable in cygwin causing which
28715  # to not find them
28716  if test "x$new_path" = x \
28717      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28718      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28719    new_path=`$CYGPATH -u "$path"`
28720  fi
28721  if test "x$new_path" = x; then
28722    # Oops. Which didn't find the executable.
28723    # The splitting of arguments from the executable at a space might have been incorrect,
28724    # since paths with space are more likely in Windows. Give it another try with the whole
28725    # argument.
28726    path="$complete"
28727    arguments="EOL"
28728    new_path=`$CYGPATH -u "$path"`
28729    new_path=`$WHICH "$new_path" 2> /dev/null`
28730    # bat and cmd files are not always considered executable in cygwin causing which
28731    # to not find them
28732    if test "x$new_path" = x \
28733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28735      new_path=`$CYGPATH -u "$path"`
28736    fi
28737    if test "x$new_path" = x; then
28738      # It's still not found. Now this is an unrecoverable error.
28739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28740$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28741      has_space=`$ECHO "$complete" | $GREP " "`
28742      if test "x$has_space" != x; then
28743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28745      fi
28746      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28747    fi
28748  fi
28749
28750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28753  # "foo.exe" is OK but "foo" is an error.
28754  #
28755  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28756  # It is also a way to make sure we got the proper file name for the real test later on.
28757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28758  if test "x$test_shortpath" = x; then
28759    # Short path failed, file does not exist as specified.
28760    # Try adding .exe or .cmd
28761    if test -f "${new_path}.exe"; then
28762      input_to_shortpath="${new_path}.exe"
28763    elif test -f "${new_path}.cmd"; then
28764      input_to_shortpath="${new_path}.cmd"
28765    else
28766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28767$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28770      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28771    fi
28772  else
28773    input_to_shortpath="$new_path"
28774  fi
28775
28776  # Call helper function which possibly converts this using DOS-style short mode.
28777  # If so, the updated path is stored in $new_path.
28778  new_path="$input_to_shortpath"
28779
28780  input_path="$input_to_shortpath"
28781  # Check if we need to convert this using DOS-style short mode. If the path
28782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28783  # take no chances and rewrite it.
28784  # Note: m4 eats our [], so we need to use [ and ] instead.
28785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28786  if test "x$has_forbidden_chars" != x; then
28787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28791      # Going to short mode and back again did indeed matter. Since short mode is
28792      # case insensitive, let's make it lowercase to improve readability.
28793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28794      # Now convert it back to Unix-stile (cygpath)
28795      input_path=`$CYGPATH -u "$shortmode_path"`
28796      new_path="$input_path"
28797    fi
28798  fi
28799
28800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28801  if test "x$test_cygdrive_prefix" = x; then
28802    # As a simple fix, exclude /usr/bin since it's not a real path.
28803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28805      # a path prefixed by /cygdrive for fixpath to work.
28806      new_path="$CYGWIN_ROOT_PATH$input_path"
28807    fi
28808  fi
28809
28810  # remove trailing .exe if any
28811  new_path="${new_path/%.exe/}"
28812
28813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28814
28815  # First separate the path from the arguments. This will split at the first
28816  # space.
28817  complete="$PROPER_COMPILER_CC"
28818  path="${complete%% *}"
28819  tmp="$complete EOL"
28820  arguments="${tmp#* }"
28821
28822  # Input might be given as Windows format, start by converting to
28823  # unix format.
28824  new_path="$path"
28825
28826  windows_path="$new_path"
28827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28828    unix_path=`$CYGPATH -u "$windows_path"`
28829    new_path="$unix_path"
28830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28832    new_path="$unix_path"
28833  fi
28834
28835
28836  # Now try to locate executable using which
28837  new_path=`$WHICH "$new_path" 2> /dev/null`
28838
28839  if test "x$new_path" = x; then
28840    # Oops. Which didn't find the executable.
28841    # The splitting of arguments from the executable at a space might have been incorrect,
28842    # since paths with space are more likely in Windows. Give it another try with the whole
28843    # argument.
28844    path="$complete"
28845    arguments="EOL"
28846    new_path="$path"
28847
28848  windows_path="$new_path"
28849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28850    unix_path=`$CYGPATH -u "$windows_path"`
28851    new_path="$unix_path"
28852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28854    new_path="$unix_path"
28855  fi
28856
28857
28858    new_path=`$WHICH "$new_path" 2> /dev/null`
28859    # bat and cmd files are not always considered executable in MSYS causing which
28860    # to not find them
28861    if test "x$new_path" = x \
28862        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28863        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28864      new_path="$path"
28865
28866  windows_path="$new_path"
28867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28868    unix_path=`$CYGPATH -u "$windows_path"`
28869    new_path="$unix_path"
28870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28872    new_path="$unix_path"
28873  fi
28874
28875    fi
28876
28877    if test "x$new_path" = x; then
28878      # It's still not found. Now this is an unrecoverable error.
28879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28880$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28881      has_space=`$ECHO "$complete" | $GREP " "`
28882      if test "x$has_space" != x; then
28883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28885      fi
28886      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28887    fi
28888  fi
28889
28890  # Now new_path has a complete unix path to the binary
28891  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28892    # Keep paths in /bin as-is, but remove trailing .exe if any
28893    new_path="${new_path/%.exe/}"
28894    # Do not save /bin paths to all_fixpath_prefixes!
28895  else
28896    # Not in mixed or Windows style, start by that.
28897    new_path=`cmd //c echo $new_path`
28898
28899  input_path="$new_path"
28900  # Check if we need to convert this using DOS-style short mode. If the path
28901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28902  # take no chances and rewrite it.
28903  # Note: m4 eats our [], so we need to use [ and ] instead.
28904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28905  if test "x$has_forbidden_chars" != x; then
28906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28908  fi
28909
28910    # Output is in $new_path
28911
28912  windows_path="$new_path"
28913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28914    unix_path=`$CYGPATH -u "$windows_path"`
28915    new_path="$unix_path"
28916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28918    new_path="$unix_path"
28919  fi
28920
28921    # remove trailing .exe if any
28922    new_path="${new_path/%.exe/}"
28923
28924    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28925    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28926  fi
28927
28928    else
28929      # We're on a unix platform. Hooray! :)
28930      # First separate the path from the arguments. This will split at the first
28931      # space.
28932      complete="$PROPER_COMPILER_CC"
28933      path="${complete%% *}"
28934      tmp="$complete EOL"
28935      arguments="${tmp#* }"
28936
28937      # Cannot rely on the command "which" here since it doesn't always work.
28938      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28939      if test -z "$is_absolute_path"; then
28940        # Path to executable is not absolute. Find it.
28941        IFS_save="$IFS"
28942        IFS=:
28943        for p in $PATH; do
28944          if test -f "$p/$path" && test -x "$p/$path"; then
28945            new_path="$p/$path"
28946            break
28947          fi
28948        done
28949        IFS="$IFS_save"
28950      else
28951        # This is an absolute path, we can use it without further modifications.
28952        new_path="$path"
28953      fi
28954
28955      if test "x$new_path" = x; then
28956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28957$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28958        has_space=`$ECHO "$complete" | $GREP " "`
28959        if test "x$has_space" != x; then
28960          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28962        fi
28963        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28964      fi
28965    fi
28966
28967    # Now join together the path and the arguments once again
28968    if test "x$arguments" != xEOL; then
28969      new_complete="$new_path ${arguments% *}"
28970    else
28971      new_complete="$new_path"
28972    fi
28973
28974    if test "x$complete" != "x$new_complete"; then
28975      PROPER_COMPILER_CC="$new_complete"
28976      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28977$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28978    fi
28979  fi
28980
28981    PATH="$RETRY_COMPILER_SAVED_PATH"
28982
28983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28984$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28985
28986  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28987    # Follow a chain of symbolic links. Use readlink
28988    # where it exists, else fall back to horribly
28989    # complicated shell code.
28990    if test "x$READLINK_TESTED" != yes; then
28991      # On MacOSX there is a readlink tool with a different
28992      # purpose than the GNU readlink tool. Check the found readlink.
28993      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28994      if test "x$ISGNU" = x; then
28995        # A readlink that we do not know how to use.
28996        # Are there other non-GNU readlinks out there?
28997        READLINK_TESTED=yes
28998        READLINK=
28999      fi
29000    fi
29001
29002    if test "x$READLINK" != x; then
29003      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29004    else
29005      # Save the current directory for restoring afterwards
29006      STARTDIR=$PWD
29007      COUNTER=0
29008      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29009      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29010      cd $sym_link_dir
29011      # Use -P flag to resolve symlinks in directories.
29012      cd `$THEPWDCMD -P`
29013      sym_link_dir=`$THEPWDCMD -P`
29014      # Resolve file symlinks
29015      while test $COUNTER -lt 20; do
29016        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29017        if test "x$ISLINK" == x; then
29018          # This is not a symbolic link! We are done!
29019          break
29020        fi
29021        # Again resolve directory symlinks since the target of the just found
29022        # link could be in a different directory
29023        cd `$DIRNAME $ISLINK`
29024        sym_link_dir=`$THEPWDCMD -P`
29025        sym_link_file=`$BASENAME $ISLINK`
29026        let COUNTER=COUNTER+1
29027      done
29028      cd $STARTDIR
29029      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29030    fi
29031  fi
29032
29033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29034$as_echo "$PROPER_COMPILER_CC" >&6; }
29035    CC="$PROPER_COMPILER_CC"
29036  else
29037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29038$as_echo "no, keeping CC" >&6; }
29039  fi
29040
29041
29042  COMPILER=$CC
29043  COMPILER_NAME=$COMPILER_NAME
29044
29045  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29046    # cc -V output typically looks like
29047    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29048    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29049    # Check that this is likely to be the Solaris Studio cc.
29050    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29051    if test $? -ne 0; then
29052      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29053      { $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
29054$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29055      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29056$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29057      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29058$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29059      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29060    fi
29061    # Remove usage instructions (if present), and
29062    # collapse compiler output into a single line
29063    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29064        $SED -e 's/ *[Uu]sage:.*//'`
29065    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29066        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29067  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29068    # xlc -qversion output typically looks like
29069    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29070    #     Version: 11.01.0000.0015
29071    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29072    # Check that this is likely to be the IBM XL C compiler.
29073    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29074    if test $? -ne 0; then
29075      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29076      { $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
29077$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29078      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29079$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29080      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29081$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29082      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29083    fi
29084    # Collapse compiler output into a single line
29085    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29086    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29087        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29088  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29089    # There is no specific version flag, but all output starts with a version string.
29090    # First line typically looks something like:
29091    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29092    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29093    # Check that this is likely to be Microsoft CL.EXE.
29094    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29095    if test $? -ne 0; then
29096      { $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
29097$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29098      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29099$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29100      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29101    fi
29102    # Collapse compiler output into a single line
29103    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29104    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29105        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29106  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29107    # gcc --version output typically looks like
29108    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29109    #     Copyright (C) 2013 Free Software Foundation, Inc.
29110    #     This is free software; see the source for copying conditions.  There is NO
29111    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29112    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29113    # Check that this is likely to be GCC.
29114    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29115    if test $? -ne 0; then
29116      { $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
29117$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29119$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29120      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29121    fi
29122    # Remove Copyright and legalese from version string, and
29123    # collapse into a single line
29124    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29125        $SED -e 's/ *Copyright .*//'`
29126    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29127        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29128  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29129    # clang --version output typically looks like
29130    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29131    #    clang version 3.3 (tags/RELEASE_33/final)
29132    # or
29133    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29134    #    Target: x86_64-pc-linux-gnu
29135    #    Thread model: posix
29136    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29137    # Check that this is likely to be clang
29138    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29139    if test $? -ne 0; then
29140      { $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
29141$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29142      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29143$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29144      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29145    fi
29146    # Collapse compiler output into a single line
29147    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29148    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29149        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29150  else
29151      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29152  fi
29153  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29154  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29155  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29156  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29157
29158  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29159$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29160
29161
29162  # Now that we have resolved CC ourself, let autoconf have its go at it
29163  ac_ext=c
29164ac_cpp='$CPP $CPPFLAGS'
29165ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29166ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29167ac_compiler_gnu=$ac_cv_c_compiler_gnu
29168if test -n "$ac_tool_prefix"; then
29169  for ac_prog in $CC
29170  do
29171    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29172set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29174$as_echo_n "checking for $ac_word... " >&6; }
29175if ${ac_cv_prog_CC+:} false; then :
29176  $as_echo_n "(cached) " >&6
29177else
29178  if test -n "$CC"; then
29179  ac_cv_prog_CC="$CC" # Let the user override the test.
29180else
29181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29182for as_dir in $PATH
29183do
29184  IFS=$as_save_IFS
29185  test -z "$as_dir" && as_dir=.
29186    for ac_exec_ext in '' $ac_executable_extensions; do
29187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29188    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29190    break 2
29191  fi
29192done
29193  done
29194IFS=$as_save_IFS
29195
29196fi
29197fi
29198CC=$ac_cv_prog_CC
29199if test -n "$CC"; then
29200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29201$as_echo "$CC" >&6; }
29202else
29203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29204$as_echo "no" >&6; }
29205fi
29206
29207
29208    test -n "$CC" && break
29209  done
29210fi
29211if test -z "$CC"; then
29212  ac_ct_CC=$CC
29213  for ac_prog in $CC
29214do
29215  # Extract the first word of "$ac_prog", so it can be a program name with args.
29216set dummy $ac_prog; ac_word=$2
29217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29218$as_echo_n "checking for $ac_word... " >&6; }
29219if ${ac_cv_prog_ac_ct_CC+:} false; then :
29220  $as_echo_n "(cached) " >&6
29221else
29222  if test -n "$ac_ct_CC"; then
29223  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29224else
29225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29226for as_dir in $PATH
29227do
29228  IFS=$as_save_IFS
29229  test -z "$as_dir" && as_dir=.
29230    for ac_exec_ext in '' $ac_executable_extensions; do
29231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29232    ac_cv_prog_ac_ct_CC="$ac_prog"
29233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29234    break 2
29235  fi
29236done
29237  done
29238IFS=$as_save_IFS
29239
29240fi
29241fi
29242ac_ct_CC=$ac_cv_prog_ac_ct_CC
29243if test -n "$ac_ct_CC"; then
29244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29245$as_echo "$ac_ct_CC" >&6; }
29246else
29247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29248$as_echo "no" >&6; }
29249fi
29250
29251
29252  test -n "$ac_ct_CC" && break
29253done
29254
29255  if test "x$ac_ct_CC" = x; then
29256    CC=""
29257  else
29258    case $cross_compiling:$ac_tool_warned in
29259yes:)
29260{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29261$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29262ac_tool_warned=yes ;;
29263esac
29264    CC=$ac_ct_CC
29265  fi
29266fi
29267
29268
29269test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29271as_fn_error $? "no acceptable C compiler found in \$PATH
29272See \`config.log' for more details" "$LINENO" 5; }
29273
29274# Provide some information about the compiler.
29275$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29276set X $ac_compile
29277ac_compiler=$2
29278for ac_option in --version -v -V -qversion; do
29279  { { ac_try="$ac_compiler $ac_option >&5"
29280case "(($ac_try" in
29281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29282  *) ac_try_echo=$ac_try;;
29283esac
29284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29285$as_echo "$ac_try_echo"; } >&5
29286  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29287  ac_status=$?
29288  if test -s conftest.err; then
29289    sed '10a\
29290... rest of stderr output deleted ...
29291         10q' conftest.err >conftest.er1
29292    cat conftest.er1 >&5
29293  fi
29294  rm -f conftest.er1 conftest.err
29295  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29296  test $ac_status = 0; }
29297done
29298
29299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29300/* end confdefs.h.  */
29301
29302int
29303main ()
29304{
29305
29306  ;
29307  return 0;
29308}
29309_ACEOF
29310ac_clean_files_save=$ac_clean_files
29311ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29312# Try to create an executable without -o first, disregard a.out.
29313# It will help us diagnose broken compilers, and finding out an intuition
29314# of exeext.
29315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29316$as_echo_n "checking whether the C compiler works... " >&6; }
29317ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29318
29319# The possible output files:
29320ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29321
29322ac_rmfiles=
29323for ac_file in $ac_files
29324do
29325  case $ac_file in
29326    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29327    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29328  esac
29329done
29330rm -f $ac_rmfiles
29331
29332if { { ac_try="$ac_link_default"
29333case "(($ac_try" in
29334  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29335  *) ac_try_echo=$ac_try;;
29336esac
29337eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29338$as_echo "$ac_try_echo"; } >&5
29339  (eval "$ac_link_default") 2>&5
29340  ac_status=$?
29341  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29342  test $ac_status = 0; }; then :
29343  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29344# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29345# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29346# so that the user can short-circuit this test for compilers unknown to
29347# Autoconf.
29348for ac_file in $ac_files ''
29349do
29350  test -f "$ac_file" || continue
29351  case $ac_file in
29352    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29353	;;
29354    [ab].out )
29355	# We found the default executable, but exeext='' is most
29356	# certainly right.
29357	break;;
29358    *.* )
29359	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29360	then :; else
29361	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29362	fi
29363	# We set ac_cv_exeext here because the later test for it is not
29364	# safe: cross compilers may not add the suffix if given an `-o'
29365	# argument, so we may need to know it at that point already.
29366	# Even if this section looks crufty: it has the advantage of
29367	# actually working.
29368	break;;
29369    * )
29370	break;;
29371  esac
29372done
29373test "$ac_cv_exeext" = no && ac_cv_exeext=
29374
29375else
29376  ac_file=''
29377fi
29378if test -z "$ac_file"; then :
29379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29380$as_echo "no" >&6; }
29381$as_echo "$as_me: failed program was:" >&5
29382sed 's/^/| /' conftest.$ac_ext >&5
29383
29384{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29386as_fn_error 77 "C compiler cannot create executables
29387See \`config.log' for more details" "$LINENO" 5; }
29388else
29389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29390$as_echo "yes" >&6; }
29391fi
29392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29393$as_echo_n "checking for C compiler default output file name... " >&6; }
29394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29395$as_echo "$ac_file" >&6; }
29396ac_exeext=$ac_cv_exeext
29397
29398rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29399ac_clean_files=$ac_clean_files_save
29400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29401$as_echo_n "checking for suffix of executables... " >&6; }
29402if { { ac_try="$ac_link"
29403case "(($ac_try" in
29404  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29405  *) ac_try_echo=$ac_try;;
29406esac
29407eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29408$as_echo "$ac_try_echo"; } >&5
29409  (eval "$ac_link") 2>&5
29410  ac_status=$?
29411  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29412  test $ac_status = 0; }; then :
29413  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29414# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29415# work properly (i.e., refer to `conftest.exe'), while it won't with
29416# `rm'.
29417for ac_file in conftest.exe conftest conftest.*; do
29418  test -f "$ac_file" || continue
29419  case $ac_file in
29420    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29421    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29422	  break;;
29423    * ) break;;
29424  esac
29425done
29426else
29427  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29429as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29430See \`config.log' for more details" "$LINENO" 5; }
29431fi
29432rm -f conftest conftest$ac_cv_exeext
29433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29434$as_echo "$ac_cv_exeext" >&6; }
29435
29436rm -f conftest.$ac_ext
29437EXEEXT=$ac_cv_exeext
29438ac_exeext=$EXEEXT
29439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29440/* end confdefs.h.  */
29441#include <stdio.h>
29442int
29443main ()
29444{
29445FILE *f = fopen ("conftest.out", "w");
29446 return ferror (f) || fclose (f) != 0;
29447
29448  ;
29449  return 0;
29450}
29451_ACEOF
29452ac_clean_files="$ac_clean_files conftest.out"
29453# Check that the compiler produces executables we can run.  If not, either
29454# the compiler is broken, or we cross compile.
29455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29456$as_echo_n "checking whether we are cross compiling... " >&6; }
29457if test "$cross_compiling" != yes; then
29458  { { ac_try="$ac_link"
29459case "(($ac_try" in
29460  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29461  *) ac_try_echo=$ac_try;;
29462esac
29463eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29464$as_echo "$ac_try_echo"; } >&5
29465  (eval "$ac_link") 2>&5
29466  ac_status=$?
29467  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29468  test $ac_status = 0; }
29469  if { ac_try='./conftest$ac_cv_exeext'
29470  { { case "(($ac_try" in
29471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29472  *) ac_try_echo=$ac_try;;
29473esac
29474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29475$as_echo "$ac_try_echo"; } >&5
29476  (eval "$ac_try") 2>&5
29477  ac_status=$?
29478  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29479  test $ac_status = 0; }; }; then
29480    cross_compiling=no
29481  else
29482    if test "$cross_compiling" = maybe; then
29483	cross_compiling=yes
29484    else
29485	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29487as_fn_error $? "cannot run C compiled programs.
29488If you meant to cross compile, use \`--host'.
29489See \`config.log' for more details" "$LINENO" 5; }
29490    fi
29491  fi
29492fi
29493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29494$as_echo "$cross_compiling" >&6; }
29495
29496rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29497ac_clean_files=$ac_clean_files_save
29498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29499$as_echo_n "checking for suffix of object files... " >&6; }
29500if ${ac_cv_objext+:} false; then :
29501  $as_echo_n "(cached) " >&6
29502else
29503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29504/* end confdefs.h.  */
29505
29506int
29507main ()
29508{
29509
29510  ;
29511  return 0;
29512}
29513_ACEOF
29514rm -f conftest.o conftest.obj
29515if { { ac_try="$ac_compile"
29516case "(($ac_try" in
29517  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29518  *) ac_try_echo=$ac_try;;
29519esac
29520eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29521$as_echo "$ac_try_echo"; } >&5
29522  (eval "$ac_compile") 2>&5
29523  ac_status=$?
29524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29525  test $ac_status = 0; }; then :
29526  for ac_file in conftest.o conftest.obj conftest.*; do
29527  test -f "$ac_file" || continue;
29528  case $ac_file in
29529    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29530    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29531       break;;
29532  esac
29533done
29534else
29535  $as_echo "$as_me: failed program was:" >&5
29536sed 's/^/| /' conftest.$ac_ext >&5
29537
29538{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29539$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29540as_fn_error $? "cannot compute suffix of object files: cannot compile
29541See \`config.log' for more details" "$LINENO" 5; }
29542fi
29543rm -f conftest.$ac_cv_objext conftest.$ac_ext
29544fi
29545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29546$as_echo "$ac_cv_objext" >&6; }
29547OBJEXT=$ac_cv_objext
29548ac_objext=$OBJEXT
29549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29550$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29551if ${ac_cv_c_compiler_gnu+:} false; then :
29552  $as_echo_n "(cached) " >&6
29553else
29554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29555/* end confdefs.h.  */
29556
29557int
29558main ()
29559{
29560#ifndef __GNUC__
29561       choke me
29562#endif
29563
29564  ;
29565  return 0;
29566}
29567_ACEOF
29568if ac_fn_c_try_compile "$LINENO"; then :
29569  ac_compiler_gnu=yes
29570else
29571  ac_compiler_gnu=no
29572fi
29573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29574ac_cv_c_compiler_gnu=$ac_compiler_gnu
29575
29576fi
29577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29578$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29579if test $ac_compiler_gnu = yes; then
29580  GCC=yes
29581else
29582  GCC=
29583fi
29584ac_test_CFLAGS=${CFLAGS+set}
29585ac_save_CFLAGS=$CFLAGS
29586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29587$as_echo_n "checking whether $CC accepts -g... " >&6; }
29588if ${ac_cv_prog_cc_g+:} false; then :
29589  $as_echo_n "(cached) " >&6
29590else
29591  ac_save_c_werror_flag=$ac_c_werror_flag
29592   ac_c_werror_flag=yes
29593   ac_cv_prog_cc_g=no
29594   CFLAGS="-g"
29595   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29596/* end confdefs.h.  */
29597
29598int
29599main ()
29600{
29601
29602  ;
29603  return 0;
29604}
29605_ACEOF
29606if ac_fn_c_try_compile "$LINENO"; then :
29607  ac_cv_prog_cc_g=yes
29608else
29609  CFLAGS=""
29610      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29611/* end confdefs.h.  */
29612
29613int
29614main ()
29615{
29616
29617  ;
29618  return 0;
29619}
29620_ACEOF
29621if ac_fn_c_try_compile "$LINENO"; then :
29622
29623else
29624  ac_c_werror_flag=$ac_save_c_werror_flag
29625	 CFLAGS="-g"
29626	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29627/* end confdefs.h.  */
29628
29629int
29630main ()
29631{
29632
29633  ;
29634  return 0;
29635}
29636_ACEOF
29637if ac_fn_c_try_compile "$LINENO"; then :
29638  ac_cv_prog_cc_g=yes
29639fi
29640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29641fi
29642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29643fi
29644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29645   ac_c_werror_flag=$ac_save_c_werror_flag
29646fi
29647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29648$as_echo "$ac_cv_prog_cc_g" >&6; }
29649if test "$ac_test_CFLAGS" = set; then
29650  CFLAGS=$ac_save_CFLAGS
29651elif test $ac_cv_prog_cc_g = yes; then
29652  if test "$GCC" = yes; then
29653    CFLAGS="-g -O2"
29654  else
29655    CFLAGS="-g"
29656  fi
29657else
29658  if test "$GCC" = yes; then
29659    CFLAGS="-O2"
29660  else
29661    CFLAGS=
29662  fi
29663fi
29664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29665$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29666if ${ac_cv_prog_cc_c89+:} false; then :
29667  $as_echo_n "(cached) " >&6
29668else
29669  ac_cv_prog_cc_c89=no
29670ac_save_CC=$CC
29671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29672/* end confdefs.h.  */
29673#include <stdarg.h>
29674#include <stdio.h>
29675struct stat;
29676/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29677struct buf { int x; };
29678FILE * (*rcsopen) (struct buf *, struct stat *, int);
29679static char *e (p, i)
29680     char **p;
29681     int i;
29682{
29683  return p[i];
29684}
29685static char *f (char * (*g) (char **, int), char **p, ...)
29686{
29687  char *s;
29688  va_list v;
29689  va_start (v,p);
29690  s = g (p, va_arg (v,int));
29691  va_end (v);
29692  return s;
29693}
29694
29695/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29696   function prototypes and stuff, but not '\xHH' hex character constants.
29697   These don't provoke an error unfortunately, instead are silently treated
29698   as 'x'.  The following induces an error, until -std is added to get
29699   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29700   array size at least.  It's necessary to write '\x00'==0 to get something
29701   that's true only with -std.  */
29702int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29703
29704/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29705   inside strings and character constants.  */
29706#define FOO(x) 'x'
29707int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29708
29709int test (int i, double x);
29710struct s1 {int (*f) (int a);};
29711struct s2 {int (*f) (double a);};
29712int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29713int argc;
29714char **argv;
29715int
29716main ()
29717{
29718return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29719  ;
29720  return 0;
29721}
29722_ACEOF
29723for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29724	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29725do
29726  CC="$ac_save_CC $ac_arg"
29727  if ac_fn_c_try_compile "$LINENO"; then :
29728  ac_cv_prog_cc_c89=$ac_arg
29729fi
29730rm -f core conftest.err conftest.$ac_objext
29731  test "x$ac_cv_prog_cc_c89" != "xno" && break
29732done
29733rm -f conftest.$ac_ext
29734CC=$ac_save_CC
29735
29736fi
29737# AC_CACHE_VAL
29738case "x$ac_cv_prog_cc_c89" in
29739  x)
29740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29741$as_echo "none needed" >&6; } ;;
29742  xno)
29743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29744$as_echo "unsupported" >&6; } ;;
29745  *)
29746    CC="$CC $ac_cv_prog_cc_c89"
29747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29748$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29749esac
29750if test "x$ac_cv_prog_cc_c89" != xno; then :
29751
29752fi
29753
29754ac_ext=cpp
29755ac_cpp='$CXXCPP $CPPFLAGS'
29756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29757ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29759
29760
29761
29762  COMPILER_NAME=C++
29763  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29764
29765  if test "x$CXX" != x; then
29766    # User has supplied compiler name already, always let that override.
29767    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29768$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29769    if test "x`basename $CXX`" = "x$CXX"; then
29770      # A command without a complete path is provided, search $PATH.
29771
29772      for ac_prog in $CXX
29773do
29774  # Extract the first word of "$ac_prog", so it can be a program name with args.
29775set dummy $ac_prog; ac_word=$2
29776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29777$as_echo_n "checking for $ac_word... " >&6; }
29778if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29779  $as_echo_n "(cached) " >&6
29780else
29781  case $POTENTIAL_CXX in
29782  [\\/]* | ?:[\\/]*)
29783  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29784  ;;
29785  *)
29786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29787for as_dir in $PATH
29788do
29789  IFS=$as_save_IFS
29790  test -z "$as_dir" && as_dir=.
29791    for ac_exec_ext in '' $ac_executable_extensions; do
29792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29793    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29795    break 2
29796  fi
29797done
29798  done
29799IFS=$as_save_IFS
29800
29801  ;;
29802esac
29803fi
29804POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29805if test -n "$POTENTIAL_CXX"; then
29806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29807$as_echo "$POTENTIAL_CXX" >&6; }
29808else
29809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29810$as_echo "no" >&6; }
29811fi
29812
29813
29814  test -n "$POTENTIAL_CXX" && break
29815done
29816
29817      if test "x$POTENTIAL_CXX" != x; then
29818        CXX=$POTENTIAL_CXX
29819      else
29820        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29821      fi
29822    else
29823      # Otherwise it might already be a complete path
29824      if test ! -x "$CXX"; then
29825        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29826      fi
29827    fi
29828  else
29829    # No user supplied value. Locate compiler ourselves.
29830
29831    # If we are cross compiling, assume cross compilation tools follows the
29832    # cross compilation standard where they are prefixed with the autoconf
29833    # standard name for the target. For example the binary
29834    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29835    # If we are not cross compiling, then the default compiler name will be
29836    # used.
29837
29838    CXX=
29839    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29840    # before checking the rest of the PATH.
29841    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29842    # step, this should not be necessary.
29843    if test -n "$TOOLCHAIN_PATH"; then
29844      PATH_save="$PATH"
29845      PATH="$TOOLCHAIN_PATH"
29846      for ac_prog in $SEARCH_LIST
29847do
29848  # Extract the first word of "$ac_prog", so it can be a program name with args.
29849set dummy $ac_prog; ac_word=$2
29850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29851$as_echo_n "checking for $ac_word... " >&6; }
29852if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29853  $as_echo_n "(cached) " >&6
29854else
29855  case $TOOLCHAIN_PATH_CXX in
29856  [\\/]* | ?:[\\/]*)
29857  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29858  ;;
29859  *)
29860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29861for as_dir in $PATH
29862do
29863  IFS=$as_save_IFS
29864  test -z "$as_dir" && as_dir=.
29865    for ac_exec_ext in '' $ac_executable_extensions; do
29866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29867    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29869    break 2
29870  fi
29871done
29872  done
29873IFS=$as_save_IFS
29874
29875  ;;
29876esac
29877fi
29878TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29879if test -n "$TOOLCHAIN_PATH_CXX"; then
29880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29881$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29882else
29883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29884$as_echo "no" >&6; }
29885fi
29886
29887
29888  test -n "$TOOLCHAIN_PATH_CXX" && break
29889done
29890
29891      CXX=$TOOLCHAIN_PATH_CXX
29892      PATH="$PATH_save"
29893    fi
29894
29895    # AC_PATH_PROGS can't be run multiple times with the same variable,
29896    # so create a new name for this run.
29897    if test "x$CXX" = x; then
29898      for ac_prog in $SEARCH_LIST
29899do
29900  # Extract the first word of "$ac_prog", so it can be a program name with args.
29901set dummy $ac_prog; ac_word=$2
29902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29903$as_echo_n "checking for $ac_word... " >&6; }
29904if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29905  $as_echo_n "(cached) " >&6
29906else
29907  case $POTENTIAL_CXX in
29908  [\\/]* | ?:[\\/]*)
29909  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29910  ;;
29911  *)
29912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29913for as_dir in $PATH
29914do
29915  IFS=$as_save_IFS
29916  test -z "$as_dir" && as_dir=.
29917    for ac_exec_ext in '' $ac_executable_extensions; do
29918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29919    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29921    break 2
29922  fi
29923done
29924  done
29925IFS=$as_save_IFS
29926
29927  ;;
29928esac
29929fi
29930POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29931if test -n "$POTENTIAL_CXX"; then
29932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29933$as_echo "$POTENTIAL_CXX" >&6; }
29934else
29935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29936$as_echo "no" >&6; }
29937fi
29938
29939
29940  test -n "$POTENTIAL_CXX" && break
29941done
29942
29943      CXX=$POTENTIAL_CXX
29944    fi
29945
29946    if test "x$CXX" = x; then
29947
29948  # Print a helpful message on how to acquire the necessary build dependency.
29949  # devkit is the help tag: freetype, cups, pulse, alsa etc
29950  MISSING_DEPENDENCY=devkit
29951
29952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29953    cygwin_help $MISSING_DEPENDENCY
29954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29955    msys_help $MISSING_DEPENDENCY
29956  else
29957    PKGHANDLER_COMMAND=
29958
29959    case $PKGHANDLER in
29960      apt-get)
29961        apt_help     $MISSING_DEPENDENCY ;;
29962      yum)
29963        yum_help     $MISSING_DEPENDENCY ;;
29964      port)
29965        port_help    $MISSING_DEPENDENCY ;;
29966      pkgutil)
29967        pkgutil_help $MISSING_DEPENDENCY ;;
29968      pkgadd)
29969        pkgadd_help  $MISSING_DEPENDENCY ;;
29970    esac
29971
29972    if test "x$PKGHANDLER_COMMAND" != x; then
29973      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29974    fi
29975  fi
29976
29977      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29978    fi
29979  fi
29980
29981  # Now we have a compiler binary in CXX. Make sure it's okay.
29982
29983  # Only process if variable expands to non-empty
29984
29985  if test "x$CXX" != x; then
29986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29987
29988  # First separate the path from the arguments. This will split at the first
29989  # space.
29990  complete="$CXX"
29991  path="${complete%% *}"
29992  tmp="$complete EOL"
29993  arguments="${tmp#* }"
29994
29995  # Input might be given as Windows format, start by converting to
29996  # unix format.
29997  new_path=`$CYGPATH -u "$path"`
29998
29999  # Now try to locate executable using which
30000  new_path=`$WHICH "$new_path" 2> /dev/null`
30001  # bat and cmd files are not always considered executable in cygwin causing which
30002  # to not find them
30003  if test "x$new_path" = x \
30004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30006    new_path=`$CYGPATH -u "$path"`
30007  fi
30008  if test "x$new_path" = x; then
30009    # Oops. Which didn't find the executable.
30010    # The splitting of arguments from the executable at a space might have been incorrect,
30011    # since paths with space are more likely in Windows. Give it another try with the whole
30012    # argument.
30013    path="$complete"
30014    arguments="EOL"
30015    new_path=`$CYGPATH -u "$path"`
30016    new_path=`$WHICH "$new_path" 2> /dev/null`
30017    # bat and cmd files are not always considered executable in cygwin causing which
30018    # to not find them
30019    if test "x$new_path" = x \
30020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30022      new_path=`$CYGPATH -u "$path"`
30023    fi
30024    if test "x$new_path" = x; then
30025      # It's still not found. Now this is an unrecoverable error.
30026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30027$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30028      has_space=`$ECHO "$complete" | $GREP " "`
30029      if test "x$has_space" != x; then
30030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30032      fi
30033      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30034    fi
30035  fi
30036
30037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30040  # "foo.exe" is OK but "foo" is an error.
30041  #
30042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30043  # It is also a way to make sure we got the proper file name for the real test later on.
30044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30045  if test "x$test_shortpath" = x; then
30046    # Short path failed, file does not exist as specified.
30047    # Try adding .exe or .cmd
30048    if test -f "${new_path}.exe"; then
30049      input_to_shortpath="${new_path}.exe"
30050    elif test -f "${new_path}.cmd"; then
30051      input_to_shortpath="${new_path}.cmd"
30052    else
30053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30054$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30057      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30058    fi
30059  else
30060    input_to_shortpath="$new_path"
30061  fi
30062
30063  # Call helper function which possibly converts this using DOS-style short mode.
30064  # If so, the updated path is stored in $new_path.
30065  new_path="$input_to_shortpath"
30066
30067  input_path="$input_to_shortpath"
30068  # Check if we need to convert this using DOS-style short mode. If the path
30069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30070  # take no chances and rewrite it.
30071  # Note: m4 eats our [], so we need to use [ and ] instead.
30072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30073  if test "x$has_forbidden_chars" != x; then
30074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30078      # Going to short mode and back again did indeed matter. Since short mode is
30079      # case insensitive, let's make it lowercase to improve readability.
30080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30081      # Now convert it back to Unix-stile (cygpath)
30082      input_path=`$CYGPATH -u "$shortmode_path"`
30083      new_path="$input_path"
30084    fi
30085  fi
30086
30087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30088  if test "x$test_cygdrive_prefix" = x; then
30089    # As a simple fix, exclude /usr/bin since it's not a real path.
30090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30092      # a path prefixed by /cygdrive for fixpath to work.
30093      new_path="$CYGWIN_ROOT_PATH$input_path"
30094    fi
30095  fi
30096
30097  # remove trailing .exe if any
30098  new_path="${new_path/%.exe/}"
30099
30100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30101
30102  # First separate the path from the arguments. This will split at the first
30103  # space.
30104  complete="$CXX"
30105  path="${complete%% *}"
30106  tmp="$complete EOL"
30107  arguments="${tmp#* }"
30108
30109  # Input might be given as Windows format, start by converting to
30110  # unix format.
30111  new_path="$path"
30112
30113  windows_path="$new_path"
30114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30115    unix_path=`$CYGPATH -u "$windows_path"`
30116    new_path="$unix_path"
30117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30119    new_path="$unix_path"
30120  fi
30121
30122
30123  # Now try to locate executable using which
30124  new_path=`$WHICH "$new_path" 2> /dev/null`
30125
30126  if test "x$new_path" = x; then
30127    # Oops. Which didn't find the executable.
30128    # The splitting of arguments from the executable at a space might have been incorrect,
30129    # since paths with space are more likely in Windows. Give it another try with the whole
30130    # argument.
30131    path="$complete"
30132    arguments="EOL"
30133    new_path="$path"
30134
30135  windows_path="$new_path"
30136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30137    unix_path=`$CYGPATH -u "$windows_path"`
30138    new_path="$unix_path"
30139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30141    new_path="$unix_path"
30142  fi
30143
30144
30145    new_path=`$WHICH "$new_path" 2> /dev/null`
30146    # bat and cmd files are not always considered executable in MSYS causing which
30147    # to not find them
30148    if test "x$new_path" = x \
30149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30151      new_path="$path"
30152
30153  windows_path="$new_path"
30154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30155    unix_path=`$CYGPATH -u "$windows_path"`
30156    new_path="$unix_path"
30157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30159    new_path="$unix_path"
30160  fi
30161
30162    fi
30163
30164    if test "x$new_path" = x; then
30165      # It's still not found. Now this is an unrecoverable error.
30166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30167$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30168      has_space=`$ECHO "$complete" | $GREP " "`
30169      if test "x$has_space" != x; then
30170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30172      fi
30173      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30174    fi
30175  fi
30176
30177  # Now new_path has a complete unix path to the binary
30178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30179    # Keep paths in /bin as-is, but remove trailing .exe if any
30180    new_path="${new_path/%.exe/}"
30181    # Do not save /bin paths to all_fixpath_prefixes!
30182  else
30183    # Not in mixed or Windows style, start by that.
30184    new_path=`cmd //c echo $new_path`
30185
30186  input_path="$new_path"
30187  # Check if we need to convert this using DOS-style short mode. If the path
30188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30189  # take no chances and rewrite it.
30190  # Note: m4 eats our [], so we need to use [ and ] instead.
30191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30192  if test "x$has_forbidden_chars" != x; then
30193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30195  fi
30196
30197    # Output is in $new_path
30198
30199  windows_path="$new_path"
30200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30201    unix_path=`$CYGPATH -u "$windows_path"`
30202    new_path="$unix_path"
30203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30205    new_path="$unix_path"
30206  fi
30207
30208    # remove trailing .exe if any
30209    new_path="${new_path/%.exe/}"
30210
30211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30213  fi
30214
30215    else
30216      # We're on a unix platform. Hooray! :)
30217      # First separate the path from the arguments. This will split at the first
30218      # space.
30219      complete="$CXX"
30220      path="${complete%% *}"
30221      tmp="$complete EOL"
30222      arguments="${tmp#* }"
30223
30224      # Cannot rely on the command "which" here since it doesn't always work.
30225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30226      if test -z "$is_absolute_path"; then
30227        # Path to executable is not absolute. Find it.
30228        IFS_save="$IFS"
30229        IFS=:
30230        for p in $PATH; do
30231          if test -f "$p/$path" && test -x "$p/$path"; then
30232            new_path="$p/$path"
30233            break
30234          fi
30235        done
30236        IFS="$IFS_save"
30237      else
30238        # This is an absolute path, we can use it without further modifications.
30239        new_path="$path"
30240      fi
30241
30242      if test "x$new_path" = x; then
30243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30244$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30245        has_space=`$ECHO "$complete" | $GREP " "`
30246        if test "x$has_space" != x; then
30247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30249        fi
30250        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30251      fi
30252    fi
30253
30254    # Now join together the path and the arguments once again
30255    if test "x$arguments" != xEOL; then
30256      new_complete="$new_path ${arguments% *}"
30257    else
30258      new_complete="$new_path"
30259    fi
30260
30261    if test "x$complete" != "x$new_complete"; then
30262      CXX="$new_complete"
30263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30264$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30265    fi
30266  fi
30267
30268  TEST_COMPILER="$CXX"
30269  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30270  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30271  if test "x$OPENJDK_BUILD_OS" != xaix; then
30272    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30274$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30275
30276  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30277    # Follow a chain of symbolic links. Use readlink
30278    # where it exists, else fall back to horribly
30279    # complicated shell code.
30280    if test "x$READLINK_TESTED" != yes; then
30281      # On MacOSX there is a readlink tool with a different
30282      # purpose than the GNU readlink tool. Check the found readlink.
30283      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30284      if test "x$ISGNU" = x; then
30285        # A readlink that we do not know how to use.
30286        # Are there other non-GNU readlinks out there?
30287        READLINK_TESTED=yes
30288        READLINK=
30289      fi
30290    fi
30291
30292    if test "x$READLINK" != x; then
30293      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30294    else
30295      # Save the current directory for restoring afterwards
30296      STARTDIR=$PWD
30297      COUNTER=0
30298      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30299      sym_link_file=`$BASENAME $TEST_COMPILER`
30300      cd $sym_link_dir
30301      # Use -P flag to resolve symlinks in directories.
30302      cd `$THEPWDCMD -P`
30303      sym_link_dir=`$THEPWDCMD -P`
30304      # Resolve file symlinks
30305      while test $COUNTER -lt 20; do
30306        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30307        if test "x$ISLINK" == x; then
30308          # This is not a symbolic link! We are done!
30309          break
30310        fi
30311        # Again resolve directory symlinks since the target of the just found
30312        # link could be in a different directory
30313        cd `$DIRNAME $ISLINK`
30314        sym_link_dir=`$THEPWDCMD -P`
30315        sym_link_file=`$BASENAME $ISLINK`
30316        let COUNTER=COUNTER+1
30317      done
30318      cd $STARTDIR
30319      TEST_COMPILER=$sym_link_dir/$sym_link_file
30320    fi
30321  fi
30322
30323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30324$as_echo "$TEST_COMPILER" >&6; }
30325  fi
30326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30327$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30328
30329  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30330  if test "x$COMPILER_BASENAME" = "xccache"; then
30331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30332$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30333    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30334    # We want to control ccache invocation ourselves, so ignore this cc and try
30335    # searching again.
30336
30337    # Remove the path to the fake ccache cc from the PATH
30338    RETRY_COMPILER_SAVED_PATH="$PATH"
30339    COMPILER_DIRNAME=`$DIRNAME $CXX`
30340    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30341
30342    # Try again looking for our compiler
30343    if test -n "$ac_tool_prefix"; then
30344  for ac_prog in $TOOLCHAIN_CXX_BINARY
30345  do
30346    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30347set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30349$as_echo_n "checking for $ac_word... " >&6; }
30350if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30351  $as_echo_n "(cached) " >&6
30352else
30353  if test -n "$PROPER_COMPILER_CXX"; then
30354  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30355else
30356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30357for as_dir in $PATH
30358do
30359  IFS=$as_save_IFS
30360  test -z "$as_dir" && as_dir=.
30361    for ac_exec_ext in '' $ac_executable_extensions; do
30362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30363    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30365    break 2
30366  fi
30367done
30368  done
30369IFS=$as_save_IFS
30370
30371fi
30372fi
30373PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30374if test -n "$PROPER_COMPILER_CXX"; then
30375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30376$as_echo "$PROPER_COMPILER_CXX" >&6; }
30377else
30378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30379$as_echo "no" >&6; }
30380fi
30381
30382
30383    test -n "$PROPER_COMPILER_CXX" && break
30384  done
30385fi
30386if test -z "$PROPER_COMPILER_CXX"; then
30387  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30388  for ac_prog in $TOOLCHAIN_CXX_BINARY
30389do
30390  # Extract the first word of "$ac_prog", so it can be a program name with args.
30391set dummy $ac_prog; ac_word=$2
30392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30393$as_echo_n "checking for $ac_word... " >&6; }
30394if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30395  $as_echo_n "(cached) " >&6
30396else
30397  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30398  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30399else
30400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30401for as_dir in $PATH
30402do
30403  IFS=$as_save_IFS
30404  test -z "$as_dir" && as_dir=.
30405    for ac_exec_ext in '' $ac_executable_extensions; do
30406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30407    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30409    break 2
30410  fi
30411done
30412  done
30413IFS=$as_save_IFS
30414
30415fi
30416fi
30417ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30418if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30420$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30421else
30422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30423$as_echo "no" >&6; }
30424fi
30425
30426
30427  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30428done
30429
30430  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30431    PROPER_COMPILER_CXX=""
30432  else
30433    case $cross_compiling:$ac_tool_warned in
30434yes:)
30435{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30436$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30437ac_tool_warned=yes ;;
30438esac
30439    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30440  fi
30441fi
30442
30443
30444  # Only process if variable expands to non-empty
30445
30446  if test "x$PROPER_COMPILER_CXX" != x; then
30447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30448
30449  # First separate the path from the arguments. This will split at the first
30450  # space.
30451  complete="$PROPER_COMPILER_CXX"
30452  path="${complete%% *}"
30453  tmp="$complete EOL"
30454  arguments="${tmp#* }"
30455
30456  # Input might be given as Windows format, start by converting to
30457  # unix format.
30458  new_path=`$CYGPATH -u "$path"`
30459
30460  # Now try to locate executable using which
30461  new_path=`$WHICH "$new_path" 2> /dev/null`
30462  # bat and cmd files are not always considered executable in cygwin causing which
30463  # to not find them
30464  if test "x$new_path" = x \
30465      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30466      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30467    new_path=`$CYGPATH -u "$path"`
30468  fi
30469  if test "x$new_path" = x; then
30470    # Oops. Which didn't find the executable.
30471    # The splitting of arguments from the executable at a space might have been incorrect,
30472    # since paths with space are more likely in Windows. Give it another try with the whole
30473    # argument.
30474    path="$complete"
30475    arguments="EOL"
30476    new_path=`$CYGPATH -u "$path"`
30477    new_path=`$WHICH "$new_path" 2> /dev/null`
30478    # bat and cmd files are not always considered executable in cygwin causing which
30479    # to not find them
30480    if test "x$new_path" = x \
30481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30483      new_path=`$CYGPATH -u "$path"`
30484    fi
30485    if test "x$new_path" = x; then
30486      # It's still not found. Now this is an unrecoverable error.
30487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30488$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30489      has_space=`$ECHO "$complete" | $GREP " "`
30490      if test "x$has_space" != x; then
30491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30493      fi
30494      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30495    fi
30496  fi
30497
30498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30501  # "foo.exe" is OK but "foo" is an error.
30502  #
30503  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30504  # It is also a way to make sure we got the proper file name for the real test later on.
30505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30506  if test "x$test_shortpath" = x; then
30507    # Short path failed, file does not exist as specified.
30508    # Try adding .exe or .cmd
30509    if test -f "${new_path}.exe"; then
30510      input_to_shortpath="${new_path}.exe"
30511    elif test -f "${new_path}.cmd"; then
30512      input_to_shortpath="${new_path}.cmd"
30513    else
30514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30515$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30516      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30517$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30518      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30519    fi
30520  else
30521    input_to_shortpath="$new_path"
30522  fi
30523
30524  # Call helper function which possibly converts this using DOS-style short mode.
30525  # If so, the updated path is stored in $new_path.
30526  new_path="$input_to_shortpath"
30527
30528  input_path="$input_to_shortpath"
30529  # Check if we need to convert this using DOS-style short mode. If the path
30530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30531  # take no chances and rewrite it.
30532  # Note: m4 eats our [], so we need to use [ and ] instead.
30533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30534  if test "x$has_forbidden_chars" != x; then
30535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30539      # Going to short mode and back again did indeed matter. Since short mode is
30540      # case insensitive, let's make it lowercase to improve readability.
30541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30542      # Now convert it back to Unix-stile (cygpath)
30543      input_path=`$CYGPATH -u "$shortmode_path"`
30544      new_path="$input_path"
30545    fi
30546  fi
30547
30548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30549  if test "x$test_cygdrive_prefix" = x; then
30550    # As a simple fix, exclude /usr/bin since it's not a real path.
30551    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30553      # a path prefixed by /cygdrive for fixpath to work.
30554      new_path="$CYGWIN_ROOT_PATH$input_path"
30555    fi
30556  fi
30557
30558  # remove trailing .exe if any
30559  new_path="${new_path/%.exe/}"
30560
30561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30562
30563  # First separate the path from the arguments. This will split at the first
30564  # space.
30565  complete="$PROPER_COMPILER_CXX"
30566  path="${complete%% *}"
30567  tmp="$complete EOL"
30568  arguments="${tmp#* }"
30569
30570  # Input might be given as Windows format, start by converting to
30571  # unix format.
30572  new_path="$path"
30573
30574  windows_path="$new_path"
30575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30576    unix_path=`$CYGPATH -u "$windows_path"`
30577    new_path="$unix_path"
30578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30580    new_path="$unix_path"
30581  fi
30582
30583
30584  # Now try to locate executable using which
30585  new_path=`$WHICH "$new_path" 2> /dev/null`
30586
30587  if test "x$new_path" = x; then
30588    # Oops. Which didn't find the executable.
30589    # The splitting of arguments from the executable at a space might have been incorrect,
30590    # since paths with space are more likely in Windows. Give it another try with the whole
30591    # argument.
30592    path="$complete"
30593    arguments="EOL"
30594    new_path="$path"
30595
30596  windows_path="$new_path"
30597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30598    unix_path=`$CYGPATH -u "$windows_path"`
30599    new_path="$unix_path"
30600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30602    new_path="$unix_path"
30603  fi
30604
30605
30606    new_path=`$WHICH "$new_path" 2> /dev/null`
30607    # bat and cmd files are not always considered executable in MSYS causing which
30608    # to not find them
30609    if test "x$new_path" = x \
30610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30612      new_path="$path"
30613
30614  windows_path="$new_path"
30615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30616    unix_path=`$CYGPATH -u "$windows_path"`
30617    new_path="$unix_path"
30618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30620    new_path="$unix_path"
30621  fi
30622
30623    fi
30624
30625    if test "x$new_path" = x; then
30626      # It's still not found. Now this is an unrecoverable error.
30627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30628$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30629      has_space=`$ECHO "$complete" | $GREP " "`
30630      if test "x$has_space" != x; then
30631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30633      fi
30634      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30635    fi
30636  fi
30637
30638  # Now new_path has a complete unix path to the binary
30639  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30640    # Keep paths in /bin as-is, but remove trailing .exe if any
30641    new_path="${new_path/%.exe/}"
30642    # Do not save /bin paths to all_fixpath_prefixes!
30643  else
30644    # Not in mixed or Windows style, start by that.
30645    new_path=`cmd //c echo $new_path`
30646
30647  input_path="$new_path"
30648  # Check if we need to convert this using DOS-style short mode. If the path
30649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30650  # take no chances and rewrite it.
30651  # Note: m4 eats our [], so we need to use [ and ] instead.
30652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30653  if test "x$has_forbidden_chars" != x; then
30654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30656  fi
30657
30658    # Output is in $new_path
30659
30660  windows_path="$new_path"
30661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30662    unix_path=`$CYGPATH -u "$windows_path"`
30663    new_path="$unix_path"
30664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30666    new_path="$unix_path"
30667  fi
30668
30669    # remove trailing .exe if any
30670    new_path="${new_path/%.exe/}"
30671
30672    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30673    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30674  fi
30675
30676    else
30677      # We're on a unix platform. Hooray! :)
30678      # First separate the path from the arguments. This will split at the first
30679      # space.
30680      complete="$PROPER_COMPILER_CXX"
30681      path="${complete%% *}"
30682      tmp="$complete EOL"
30683      arguments="${tmp#* }"
30684
30685      # Cannot rely on the command "which" here since it doesn't always work.
30686      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30687      if test -z "$is_absolute_path"; then
30688        # Path to executable is not absolute. Find it.
30689        IFS_save="$IFS"
30690        IFS=:
30691        for p in $PATH; do
30692          if test -f "$p/$path" && test -x "$p/$path"; then
30693            new_path="$p/$path"
30694            break
30695          fi
30696        done
30697        IFS="$IFS_save"
30698      else
30699        # This is an absolute path, we can use it without further modifications.
30700        new_path="$path"
30701      fi
30702
30703      if test "x$new_path" = x; then
30704        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30705$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30706        has_space=`$ECHO "$complete" | $GREP " "`
30707        if test "x$has_space" != x; then
30708          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30709$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30710        fi
30711        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30712      fi
30713    fi
30714
30715    # Now join together the path and the arguments once again
30716    if test "x$arguments" != xEOL; then
30717      new_complete="$new_path ${arguments% *}"
30718    else
30719      new_complete="$new_path"
30720    fi
30721
30722    if test "x$complete" != "x$new_complete"; then
30723      PROPER_COMPILER_CXX="$new_complete"
30724      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30725$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30726    fi
30727  fi
30728
30729    PATH="$RETRY_COMPILER_SAVED_PATH"
30730
30731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30732$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30733
30734  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30735    # Follow a chain of symbolic links. Use readlink
30736    # where it exists, else fall back to horribly
30737    # complicated shell code.
30738    if test "x$READLINK_TESTED" != yes; then
30739      # On MacOSX there is a readlink tool with a different
30740      # purpose than the GNU readlink tool. Check the found readlink.
30741      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30742      if test "x$ISGNU" = x; then
30743        # A readlink that we do not know how to use.
30744        # Are there other non-GNU readlinks out there?
30745        READLINK_TESTED=yes
30746        READLINK=
30747      fi
30748    fi
30749
30750    if test "x$READLINK" != x; then
30751      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30752    else
30753      # Save the current directory for restoring afterwards
30754      STARTDIR=$PWD
30755      COUNTER=0
30756      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30757      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30758      cd $sym_link_dir
30759      # Use -P flag to resolve symlinks in directories.
30760      cd `$THEPWDCMD -P`
30761      sym_link_dir=`$THEPWDCMD -P`
30762      # Resolve file symlinks
30763      while test $COUNTER -lt 20; do
30764        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30765        if test "x$ISLINK" == x; then
30766          # This is not a symbolic link! We are done!
30767          break
30768        fi
30769        # Again resolve directory symlinks since the target of the just found
30770        # link could be in a different directory
30771        cd `$DIRNAME $ISLINK`
30772        sym_link_dir=`$THEPWDCMD -P`
30773        sym_link_file=`$BASENAME $ISLINK`
30774        let COUNTER=COUNTER+1
30775      done
30776      cd $STARTDIR
30777      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30778    fi
30779  fi
30780
30781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30782$as_echo "$PROPER_COMPILER_CXX" >&6; }
30783    CXX="$PROPER_COMPILER_CXX"
30784  else
30785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30786$as_echo "no, keeping CXX" >&6; }
30787  fi
30788
30789
30790  COMPILER=$CXX
30791  COMPILER_NAME=$COMPILER_NAME
30792
30793  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30794    # cc -V output typically looks like
30795    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30796    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30797    # Check that this is likely to be the Solaris Studio cc.
30798    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30799    if test $? -ne 0; then
30800      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30801      { $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
30802$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30803      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30804$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30805      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30806$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30807      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30808    fi
30809    # Remove usage instructions (if present), and
30810    # collapse compiler output into a single line
30811    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30812        $SED -e 's/ *[Uu]sage:.*//'`
30813    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30814        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30815  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30816    # xlc -qversion output typically looks like
30817    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30818    #     Version: 11.01.0000.0015
30819    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30820    # Check that this is likely to be the IBM XL C compiler.
30821    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30822    if test $? -ne 0; then
30823      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30824      { $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
30825$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30826      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30827$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30828      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30829$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30830      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30831    fi
30832    # Collapse compiler output into a single line
30833    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30834    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30835        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30836  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30837    # There is no specific version flag, but all output starts with a version string.
30838    # First line typically looks something like:
30839    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30840    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30841    # Check that this is likely to be Microsoft CL.EXE.
30842    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30843    if test $? -ne 0; then
30844      { $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
30845$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30846      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30847$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30848      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30849    fi
30850    # Collapse compiler output into a single line
30851    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30852    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30853        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30854  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30855    # gcc --version output typically looks like
30856    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30857    #     Copyright (C) 2013 Free Software Foundation, Inc.
30858    #     This is free software; see the source for copying conditions.  There is NO
30859    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30860    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30861    # Check that this is likely to be GCC.
30862    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30863    if test $? -ne 0; then
30864      { $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
30865$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30866      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30867$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30868      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30869    fi
30870    # Remove Copyright and legalese from version string, and
30871    # collapse into a single line
30872    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30873        $SED -e 's/ *Copyright .*//'`
30874    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30875        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30876  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30877    # clang --version output typically looks like
30878    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30879    #    clang version 3.3 (tags/RELEASE_33/final)
30880    # or
30881    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30882    #    Target: x86_64-pc-linux-gnu
30883    #    Thread model: posix
30884    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30885    # Check that this is likely to be clang
30886    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30887    if test $? -ne 0; then
30888      { $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
30889$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30890      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30891$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30892      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30893    fi
30894    # Collapse compiler output into a single line
30895    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30896    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30897        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30898  else
30899      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30900  fi
30901  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30902  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30903  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30904  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30905
30906  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30907$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30908
30909
30910  # Now that we have resolved CXX ourself, let autoconf have its go at it
30911  ac_ext=cpp
30912ac_cpp='$CXXCPP $CPPFLAGS'
30913ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30914ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30915ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30916if test -z "$CXX"; then
30917  if test -n "$CCC"; then
30918    CXX=$CCC
30919  else
30920    if test -n "$ac_tool_prefix"; then
30921  for ac_prog in $CXX
30922  do
30923    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30924set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30926$as_echo_n "checking for $ac_word... " >&6; }
30927if ${ac_cv_prog_CXX+:} false; then :
30928  $as_echo_n "(cached) " >&6
30929else
30930  if test -n "$CXX"; then
30931  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30932else
30933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30934for as_dir in $PATH
30935do
30936  IFS=$as_save_IFS
30937  test -z "$as_dir" && as_dir=.
30938    for ac_exec_ext in '' $ac_executable_extensions; do
30939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30940    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30942    break 2
30943  fi
30944done
30945  done
30946IFS=$as_save_IFS
30947
30948fi
30949fi
30950CXX=$ac_cv_prog_CXX
30951if test -n "$CXX"; then
30952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30953$as_echo "$CXX" >&6; }
30954else
30955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30956$as_echo "no" >&6; }
30957fi
30958
30959
30960    test -n "$CXX" && break
30961  done
30962fi
30963if test -z "$CXX"; then
30964  ac_ct_CXX=$CXX
30965  for ac_prog in $CXX
30966do
30967  # Extract the first word of "$ac_prog", so it can be a program name with args.
30968set dummy $ac_prog; ac_word=$2
30969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30970$as_echo_n "checking for $ac_word... " >&6; }
30971if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30972  $as_echo_n "(cached) " >&6
30973else
30974  if test -n "$ac_ct_CXX"; then
30975  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30976else
30977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30978for as_dir in $PATH
30979do
30980  IFS=$as_save_IFS
30981  test -z "$as_dir" && as_dir=.
30982    for ac_exec_ext in '' $ac_executable_extensions; do
30983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30984    ac_cv_prog_ac_ct_CXX="$ac_prog"
30985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30986    break 2
30987  fi
30988done
30989  done
30990IFS=$as_save_IFS
30991
30992fi
30993fi
30994ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30995if test -n "$ac_ct_CXX"; then
30996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30997$as_echo "$ac_ct_CXX" >&6; }
30998else
30999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31000$as_echo "no" >&6; }
31001fi
31002
31003
31004  test -n "$ac_ct_CXX" && break
31005done
31006
31007  if test "x$ac_ct_CXX" = x; then
31008    CXX="g++"
31009  else
31010    case $cross_compiling:$ac_tool_warned in
31011yes:)
31012{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31013$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31014ac_tool_warned=yes ;;
31015esac
31016    CXX=$ac_ct_CXX
31017  fi
31018fi
31019
31020  fi
31021fi
31022# Provide some information about the compiler.
31023$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31024set X $ac_compile
31025ac_compiler=$2
31026for ac_option in --version -v -V -qversion; do
31027  { { ac_try="$ac_compiler $ac_option >&5"
31028case "(($ac_try" in
31029  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31030  *) ac_try_echo=$ac_try;;
31031esac
31032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31033$as_echo "$ac_try_echo"; } >&5
31034  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31035  ac_status=$?
31036  if test -s conftest.err; then
31037    sed '10a\
31038... rest of stderr output deleted ...
31039         10q' conftest.err >conftest.er1
31040    cat conftest.er1 >&5
31041  fi
31042  rm -f conftest.er1 conftest.err
31043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31044  test $ac_status = 0; }
31045done
31046
31047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31048$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31049if ${ac_cv_cxx_compiler_gnu+:} false; then :
31050  $as_echo_n "(cached) " >&6
31051else
31052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31053/* end confdefs.h.  */
31054
31055int
31056main ()
31057{
31058#ifndef __GNUC__
31059       choke me
31060#endif
31061
31062  ;
31063  return 0;
31064}
31065_ACEOF
31066if ac_fn_cxx_try_compile "$LINENO"; then :
31067  ac_compiler_gnu=yes
31068else
31069  ac_compiler_gnu=no
31070fi
31071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31072ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31073
31074fi
31075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31076$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31077if test $ac_compiler_gnu = yes; then
31078  GXX=yes
31079else
31080  GXX=
31081fi
31082ac_test_CXXFLAGS=${CXXFLAGS+set}
31083ac_save_CXXFLAGS=$CXXFLAGS
31084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31085$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31086if ${ac_cv_prog_cxx_g+:} false; then :
31087  $as_echo_n "(cached) " >&6
31088else
31089  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31090   ac_cxx_werror_flag=yes
31091   ac_cv_prog_cxx_g=no
31092   CXXFLAGS="-g"
31093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31094/* end confdefs.h.  */
31095
31096int
31097main ()
31098{
31099
31100  ;
31101  return 0;
31102}
31103_ACEOF
31104if ac_fn_cxx_try_compile "$LINENO"; then :
31105  ac_cv_prog_cxx_g=yes
31106else
31107  CXXFLAGS=""
31108      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31109/* end confdefs.h.  */
31110
31111int
31112main ()
31113{
31114
31115  ;
31116  return 0;
31117}
31118_ACEOF
31119if ac_fn_cxx_try_compile "$LINENO"; then :
31120
31121else
31122  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31123	 CXXFLAGS="-g"
31124	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31125/* end confdefs.h.  */
31126
31127int
31128main ()
31129{
31130
31131  ;
31132  return 0;
31133}
31134_ACEOF
31135if ac_fn_cxx_try_compile "$LINENO"; then :
31136  ac_cv_prog_cxx_g=yes
31137fi
31138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31139fi
31140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31141fi
31142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31143   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31144fi
31145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31146$as_echo "$ac_cv_prog_cxx_g" >&6; }
31147if test "$ac_test_CXXFLAGS" = set; then
31148  CXXFLAGS=$ac_save_CXXFLAGS
31149elif test $ac_cv_prog_cxx_g = yes; then
31150  if test "$GXX" = yes; then
31151    CXXFLAGS="-g -O2"
31152  else
31153    CXXFLAGS="-g"
31154  fi
31155else
31156  if test "$GXX" = yes; then
31157    CXXFLAGS="-O2"
31158  else
31159    CXXFLAGS=
31160  fi
31161fi
31162ac_ext=cpp
31163ac_cpp='$CXXCPP $CPPFLAGS'
31164ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31165ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31166ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31167
31168
31169  #
31170  # Setup the preprocessor (CPP and CXXCPP)
31171  #
31172  ac_ext=c
31173ac_cpp='$CPP $CPPFLAGS'
31174ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31175ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31176ac_compiler_gnu=$ac_cv_c_compiler_gnu
31177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31178$as_echo_n "checking how to run the C preprocessor... " >&6; }
31179# On Suns, sometimes $CPP names a directory.
31180if test -n "$CPP" && test -d "$CPP"; then
31181  CPP=
31182fi
31183if test -z "$CPP"; then
31184  if ${ac_cv_prog_CPP+:} false; then :
31185  $as_echo_n "(cached) " >&6
31186else
31187      # Double quotes because CPP needs to be expanded
31188    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31189    do
31190      ac_preproc_ok=false
31191for ac_c_preproc_warn_flag in '' yes
31192do
31193  # Use a header file that comes with gcc, so configuring glibc
31194  # with a fresh cross-compiler works.
31195  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31196  # <limits.h> exists even on freestanding compilers.
31197  # On the NeXT, cc -E runs the code through the compiler's parser,
31198  # not just through cpp. "Syntax error" is here to catch this case.
31199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31200/* end confdefs.h.  */
31201#ifdef __STDC__
31202# include <limits.h>
31203#else
31204# include <assert.h>
31205#endif
31206		     Syntax error
31207_ACEOF
31208if ac_fn_c_try_cpp "$LINENO"; then :
31209
31210else
31211  # Broken: fails on valid input.
31212continue
31213fi
31214rm -f conftest.err conftest.i conftest.$ac_ext
31215
31216  # OK, works on sane cases.  Now check whether nonexistent headers
31217  # can be detected and how.
31218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31219/* end confdefs.h.  */
31220#include <ac_nonexistent.h>
31221_ACEOF
31222if ac_fn_c_try_cpp "$LINENO"; then :
31223  # Broken: success on invalid input.
31224continue
31225else
31226  # Passes both tests.
31227ac_preproc_ok=:
31228break
31229fi
31230rm -f conftest.err conftest.i conftest.$ac_ext
31231
31232done
31233# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31234rm -f conftest.i conftest.err conftest.$ac_ext
31235if $ac_preproc_ok; then :
31236  break
31237fi
31238
31239    done
31240    ac_cv_prog_CPP=$CPP
31241
31242fi
31243  CPP=$ac_cv_prog_CPP
31244else
31245  ac_cv_prog_CPP=$CPP
31246fi
31247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31248$as_echo "$CPP" >&6; }
31249ac_preproc_ok=false
31250for ac_c_preproc_warn_flag in '' yes
31251do
31252  # Use a header file that comes with gcc, so configuring glibc
31253  # with a fresh cross-compiler works.
31254  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31255  # <limits.h> exists even on freestanding compilers.
31256  # On the NeXT, cc -E runs the code through the compiler's parser,
31257  # not just through cpp. "Syntax error" is here to catch this case.
31258  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31259/* end confdefs.h.  */
31260#ifdef __STDC__
31261# include <limits.h>
31262#else
31263# include <assert.h>
31264#endif
31265		     Syntax error
31266_ACEOF
31267if ac_fn_c_try_cpp "$LINENO"; then :
31268
31269else
31270  # Broken: fails on valid input.
31271continue
31272fi
31273rm -f conftest.err conftest.i conftest.$ac_ext
31274
31275  # OK, works on sane cases.  Now check whether nonexistent headers
31276  # can be detected and how.
31277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31278/* end confdefs.h.  */
31279#include <ac_nonexistent.h>
31280_ACEOF
31281if ac_fn_c_try_cpp "$LINENO"; then :
31282  # Broken: success on invalid input.
31283continue
31284else
31285  # Passes both tests.
31286ac_preproc_ok=:
31287break
31288fi
31289rm -f conftest.err conftest.i conftest.$ac_ext
31290
31291done
31292# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31293rm -f conftest.i conftest.err conftest.$ac_ext
31294if $ac_preproc_ok; then :
31295
31296else
31297  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31299as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31300See \`config.log' for more details" "$LINENO" 5; }
31301fi
31302
31303ac_ext=cpp
31304ac_cpp='$CXXCPP $CPPFLAGS'
31305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31308
31309
31310  # Only process if variable expands to non-empty
31311
31312  if test "x$CPP" != x; then
31313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31314
31315  # First separate the path from the arguments. This will split at the first
31316  # space.
31317  complete="$CPP"
31318  path="${complete%% *}"
31319  tmp="$complete EOL"
31320  arguments="${tmp#* }"
31321
31322  # Input might be given as Windows format, start by converting to
31323  # unix format.
31324  new_path=`$CYGPATH -u "$path"`
31325
31326  # Now try to locate executable using which
31327  new_path=`$WHICH "$new_path" 2> /dev/null`
31328  # bat and cmd files are not always considered executable in cygwin causing which
31329  # to not find them
31330  if test "x$new_path" = x \
31331      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31332      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31333    new_path=`$CYGPATH -u "$path"`
31334  fi
31335  if test "x$new_path" = x; then
31336    # Oops. Which didn't find the executable.
31337    # The splitting of arguments from the executable at a space might have been incorrect,
31338    # since paths with space are more likely in Windows. Give it another try with the whole
31339    # argument.
31340    path="$complete"
31341    arguments="EOL"
31342    new_path=`$CYGPATH -u "$path"`
31343    new_path=`$WHICH "$new_path" 2> /dev/null`
31344    # bat and cmd files are not always considered executable in cygwin causing which
31345    # to not find them
31346    if test "x$new_path" = x \
31347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31349      new_path=`$CYGPATH -u "$path"`
31350    fi
31351    if test "x$new_path" = x; then
31352      # It's still not found. Now this is an unrecoverable error.
31353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31354$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31355      has_space=`$ECHO "$complete" | $GREP " "`
31356      if test "x$has_space" != x; then
31357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31359      fi
31360      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31361    fi
31362  fi
31363
31364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31367  # "foo.exe" is OK but "foo" is an error.
31368  #
31369  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31370  # It is also a way to make sure we got the proper file name for the real test later on.
31371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31372  if test "x$test_shortpath" = x; then
31373    # Short path failed, file does not exist as specified.
31374    # Try adding .exe or .cmd
31375    if test -f "${new_path}.exe"; then
31376      input_to_shortpath="${new_path}.exe"
31377    elif test -f "${new_path}.cmd"; then
31378      input_to_shortpath="${new_path}.cmd"
31379    else
31380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31381$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31382      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31383$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31384      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31385    fi
31386  else
31387    input_to_shortpath="$new_path"
31388  fi
31389
31390  # Call helper function which possibly converts this using DOS-style short mode.
31391  # If so, the updated path is stored in $new_path.
31392  new_path="$input_to_shortpath"
31393
31394  input_path="$input_to_shortpath"
31395  # Check if we need to convert this using DOS-style short mode. If the path
31396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31397  # take no chances and rewrite it.
31398  # Note: m4 eats our [], so we need to use [ and ] instead.
31399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31400  if test "x$has_forbidden_chars" != x; then
31401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31405      # Going to short mode and back again did indeed matter. Since short mode is
31406      # case insensitive, let's make it lowercase to improve readability.
31407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31408      # Now convert it back to Unix-stile (cygpath)
31409      input_path=`$CYGPATH -u "$shortmode_path"`
31410      new_path="$input_path"
31411    fi
31412  fi
31413
31414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31415  if test "x$test_cygdrive_prefix" = x; then
31416    # As a simple fix, exclude /usr/bin since it's not a real path.
31417    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31419      # a path prefixed by /cygdrive for fixpath to work.
31420      new_path="$CYGWIN_ROOT_PATH$input_path"
31421    fi
31422  fi
31423
31424  # remove trailing .exe if any
31425  new_path="${new_path/%.exe/}"
31426
31427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31428
31429  # First separate the path from the arguments. This will split at the first
31430  # space.
31431  complete="$CPP"
31432  path="${complete%% *}"
31433  tmp="$complete EOL"
31434  arguments="${tmp#* }"
31435
31436  # Input might be given as Windows format, start by converting to
31437  # unix format.
31438  new_path="$path"
31439
31440  windows_path="$new_path"
31441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31442    unix_path=`$CYGPATH -u "$windows_path"`
31443    new_path="$unix_path"
31444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31446    new_path="$unix_path"
31447  fi
31448
31449
31450  # Now try to locate executable using which
31451  new_path=`$WHICH "$new_path" 2> /dev/null`
31452
31453  if test "x$new_path" = x; then
31454    # Oops. Which didn't find the executable.
31455    # The splitting of arguments from the executable at a space might have been incorrect,
31456    # since paths with space are more likely in Windows. Give it another try with the whole
31457    # argument.
31458    path="$complete"
31459    arguments="EOL"
31460    new_path="$path"
31461
31462  windows_path="$new_path"
31463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31464    unix_path=`$CYGPATH -u "$windows_path"`
31465    new_path="$unix_path"
31466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31468    new_path="$unix_path"
31469  fi
31470
31471
31472    new_path=`$WHICH "$new_path" 2> /dev/null`
31473    # bat and cmd files are not always considered executable in MSYS causing which
31474    # to not find them
31475    if test "x$new_path" = x \
31476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31478      new_path="$path"
31479
31480  windows_path="$new_path"
31481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31482    unix_path=`$CYGPATH -u "$windows_path"`
31483    new_path="$unix_path"
31484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31486    new_path="$unix_path"
31487  fi
31488
31489    fi
31490
31491    if test "x$new_path" = x; then
31492      # It's still not found. Now this is an unrecoverable error.
31493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31494$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31495      has_space=`$ECHO "$complete" | $GREP " "`
31496      if test "x$has_space" != x; then
31497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31499      fi
31500      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31501    fi
31502  fi
31503
31504  # Now new_path has a complete unix path to the binary
31505  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31506    # Keep paths in /bin as-is, but remove trailing .exe if any
31507    new_path="${new_path/%.exe/}"
31508    # Do not save /bin paths to all_fixpath_prefixes!
31509  else
31510    # Not in mixed or Windows style, start by that.
31511    new_path=`cmd //c echo $new_path`
31512
31513  input_path="$new_path"
31514  # Check if we need to convert this using DOS-style short mode. If the path
31515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31516  # take no chances and rewrite it.
31517  # Note: m4 eats our [], so we need to use [ and ] instead.
31518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31519  if test "x$has_forbidden_chars" != x; then
31520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31522  fi
31523
31524    # Output is in $new_path
31525
31526  windows_path="$new_path"
31527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31528    unix_path=`$CYGPATH -u "$windows_path"`
31529    new_path="$unix_path"
31530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31532    new_path="$unix_path"
31533  fi
31534
31535    # remove trailing .exe if any
31536    new_path="${new_path/%.exe/}"
31537
31538    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31539    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31540  fi
31541
31542    else
31543      # We're on a unix platform. Hooray! :)
31544      # First separate the path from the arguments. This will split at the first
31545      # space.
31546      complete="$CPP"
31547      path="${complete%% *}"
31548      tmp="$complete EOL"
31549      arguments="${tmp#* }"
31550
31551      # Cannot rely on the command "which" here since it doesn't always work.
31552      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31553      if test -z "$is_absolute_path"; then
31554        # Path to executable is not absolute. Find it.
31555        IFS_save="$IFS"
31556        IFS=:
31557        for p in $PATH; do
31558          if test -f "$p/$path" && test -x "$p/$path"; then
31559            new_path="$p/$path"
31560            break
31561          fi
31562        done
31563        IFS="$IFS_save"
31564      else
31565        # This is an absolute path, we can use it without further modifications.
31566        new_path="$path"
31567      fi
31568
31569      if test "x$new_path" = x; then
31570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31571$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31572        has_space=`$ECHO "$complete" | $GREP " "`
31573        if test "x$has_space" != x; then
31574          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31575$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31576        fi
31577        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31578      fi
31579    fi
31580
31581    # Now join together the path and the arguments once again
31582    if test "x$arguments" != xEOL; then
31583      new_complete="$new_path ${arguments% *}"
31584    else
31585      new_complete="$new_path"
31586    fi
31587
31588    if test "x$complete" != "x$new_complete"; then
31589      CPP="$new_complete"
31590      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31591$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31592    fi
31593  fi
31594
31595  ac_ext=cpp
31596ac_cpp='$CXXCPP $CPPFLAGS'
31597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31601$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31602if test -z "$CXXCPP"; then
31603  if ${ac_cv_prog_CXXCPP+:} false; then :
31604  $as_echo_n "(cached) " >&6
31605else
31606      # Double quotes because CXXCPP needs to be expanded
31607    for CXXCPP in "$CXX -E" "/lib/cpp"
31608    do
31609      ac_preproc_ok=false
31610for ac_cxx_preproc_warn_flag in '' yes
31611do
31612  # Use a header file that comes with gcc, so configuring glibc
31613  # with a fresh cross-compiler works.
31614  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31615  # <limits.h> exists even on freestanding compilers.
31616  # On the NeXT, cc -E runs the code through the compiler's parser,
31617  # not just through cpp. "Syntax error" is here to catch this case.
31618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31619/* end confdefs.h.  */
31620#ifdef __STDC__
31621# include <limits.h>
31622#else
31623# include <assert.h>
31624#endif
31625		     Syntax error
31626_ACEOF
31627if ac_fn_cxx_try_cpp "$LINENO"; then :
31628
31629else
31630  # Broken: fails on valid input.
31631continue
31632fi
31633rm -f conftest.err conftest.i conftest.$ac_ext
31634
31635  # OK, works on sane cases.  Now check whether nonexistent headers
31636  # can be detected and how.
31637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31638/* end confdefs.h.  */
31639#include <ac_nonexistent.h>
31640_ACEOF
31641if ac_fn_cxx_try_cpp "$LINENO"; then :
31642  # Broken: success on invalid input.
31643continue
31644else
31645  # Passes both tests.
31646ac_preproc_ok=:
31647break
31648fi
31649rm -f conftest.err conftest.i conftest.$ac_ext
31650
31651done
31652# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31653rm -f conftest.i conftest.err conftest.$ac_ext
31654if $ac_preproc_ok; then :
31655  break
31656fi
31657
31658    done
31659    ac_cv_prog_CXXCPP=$CXXCPP
31660
31661fi
31662  CXXCPP=$ac_cv_prog_CXXCPP
31663else
31664  ac_cv_prog_CXXCPP=$CXXCPP
31665fi
31666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31667$as_echo "$CXXCPP" >&6; }
31668ac_preproc_ok=false
31669for ac_cxx_preproc_warn_flag in '' yes
31670do
31671  # Use a header file that comes with gcc, so configuring glibc
31672  # with a fresh cross-compiler works.
31673  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31674  # <limits.h> exists even on freestanding compilers.
31675  # On the NeXT, cc -E runs the code through the compiler's parser,
31676  # not just through cpp. "Syntax error" is here to catch this case.
31677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31678/* end confdefs.h.  */
31679#ifdef __STDC__
31680# include <limits.h>
31681#else
31682# include <assert.h>
31683#endif
31684		     Syntax error
31685_ACEOF
31686if ac_fn_cxx_try_cpp "$LINENO"; then :
31687
31688else
31689  # Broken: fails on valid input.
31690continue
31691fi
31692rm -f conftest.err conftest.i conftest.$ac_ext
31693
31694  # OK, works on sane cases.  Now check whether nonexistent headers
31695  # can be detected and how.
31696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31697/* end confdefs.h.  */
31698#include <ac_nonexistent.h>
31699_ACEOF
31700if ac_fn_cxx_try_cpp "$LINENO"; then :
31701  # Broken: success on invalid input.
31702continue
31703else
31704  # Passes both tests.
31705ac_preproc_ok=:
31706break
31707fi
31708rm -f conftest.err conftest.i conftest.$ac_ext
31709
31710done
31711# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31712rm -f conftest.i conftest.err conftest.$ac_ext
31713if $ac_preproc_ok; then :
31714
31715else
31716  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31718as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31719See \`config.log' for more details" "$LINENO" 5; }
31720fi
31721
31722ac_ext=cpp
31723ac_cpp='$CXXCPP $CPPFLAGS'
31724ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31725ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31726ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31727
31728
31729  # Only process if variable expands to non-empty
31730
31731  if test "x$CXXCPP" != x; then
31732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31733
31734  # First separate the path from the arguments. This will split at the first
31735  # space.
31736  complete="$CXXCPP"
31737  path="${complete%% *}"
31738  tmp="$complete EOL"
31739  arguments="${tmp#* }"
31740
31741  # Input might be given as Windows format, start by converting to
31742  # unix format.
31743  new_path=`$CYGPATH -u "$path"`
31744
31745  # Now try to locate executable using which
31746  new_path=`$WHICH "$new_path" 2> /dev/null`
31747  # bat and cmd files are not always considered executable in cygwin causing which
31748  # to not find them
31749  if test "x$new_path" = x \
31750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31752    new_path=`$CYGPATH -u "$path"`
31753  fi
31754  if test "x$new_path" = x; then
31755    # Oops. Which didn't find the executable.
31756    # The splitting of arguments from the executable at a space might have been incorrect,
31757    # since paths with space are more likely in Windows. Give it another try with the whole
31758    # argument.
31759    path="$complete"
31760    arguments="EOL"
31761    new_path=`$CYGPATH -u "$path"`
31762    new_path=`$WHICH "$new_path" 2> /dev/null`
31763    # bat and cmd files are not always considered executable in cygwin causing which
31764    # to not find them
31765    if test "x$new_path" = x \
31766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31768      new_path=`$CYGPATH -u "$path"`
31769    fi
31770    if test "x$new_path" = x; then
31771      # It's still not found. Now this is an unrecoverable error.
31772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31773$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31774      has_space=`$ECHO "$complete" | $GREP " "`
31775      if test "x$has_space" != x; then
31776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31778      fi
31779      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31780    fi
31781  fi
31782
31783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31786  # "foo.exe" is OK but "foo" is an error.
31787  #
31788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31789  # It is also a way to make sure we got the proper file name for the real test later on.
31790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31791  if test "x$test_shortpath" = x; then
31792    # Short path failed, file does not exist as specified.
31793    # Try adding .exe or .cmd
31794    if test -f "${new_path}.exe"; then
31795      input_to_shortpath="${new_path}.exe"
31796    elif test -f "${new_path}.cmd"; then
31797      input_to_shortpath="${new_path}.cmd"
31798    else
31799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31800$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31803      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31804    fi
31805  else
31806    input_to_shortpath="$new_path"
31807  fi
31808
31809  # Call helper function which possibly converts this using DOS-style short mode.
31810  # If so, the updated path is stored in $new_path.
31811  new_path="$input_to_shortpath"
31812
31813  input_path="$input_to_shortpath"
31814  # Check if we need to convert this using DOS-style short mode. If the path
31815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31816  # take no chances and rewrite it.
31817  # Note: m4 eats our [], so we need to use [ and ] instead.
31818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31819  if test "x$has_forbidden_chars" != x; then
31820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31824      # Going to short mode and back again did indeed matter. Since short mode is
31825      # case insensitive, let's make it lowercase to improve readability.
31826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31827      # Now convert it back to Unix-stile (cygpath)
31828      input_path=`$CYGPATH -u "$shortmode_path"`
31829      new_path="$input_path"
31830    fi
31831  fi
31832
31833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31834  if test "x$test_cygdrive_prefix" = x; then
31835    # As a simple fix, exclude /usr/bin since it's not a real path.
31836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31838      # a path prefixed by /cygdrive for fixpath to work.
31839      new_path="$CYGWIN_ROOT_PATH$input_path"
31840    fi
31841  fi
31842
31843  # remove trailing .exe if any
31844  new_path="${new_path/%.exe/}"
31845
31846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31847
31848  # First separate the path from the arguments. This will split at the first
31849  # space.
31850  complete="$CXXCPP"
31851  path="${complete%% *}"
31852  tmp="$complete EOL"
31853  arguments="${tmp#* }"
31854
31855  # Input might be given as Windows format, start by converting to
31856  # unix format.
31857  new_path="$path"
31858
31859  windows_path="$new_path"
31860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31861    unix_path=`$CYGPATH -u "$windows_path"`
31862    new_path="$unix_path"
31863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31865    new_path="$unix_path"
31866  fi
31867
31868
31869  # Now try to locate executable using which
31870  new_path=`$WHICH "$new_path" 2> /dev/null`
31871
31872  if test "x$new_path" = x; then
31873    # Oops. Which didn't find the executable.
31874    # The splitting of arguments from the executable at a space might have been incorrect,
31875    # since paths with space are more likely in Windows. Give it another try with the whole
31876    # argument.
31877    path="$complete"
31878    arguments="EOL"
31879    new_path="$path"
31880
31881  windows_path="$new_path"
31882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31883    unix_path=`$CYGPATH -u "$windows_path"`
31884    new_path="$unix_path"
31885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31887    new_path="$unix_path"
31888  fi
31889
31890
31891    new_path=`$WHICH "$new_path" 2> /dev/null`
31892    # bat and cmd files are not always considered executable in MSYS causing which
31893    # to not find them
31894    if test "x$new_path" = x \
31895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31897      new_path="$path"
31898
31899  windows_path="$new_path"
31900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31901    unix_path=`$CYGPATH -u "$windows_path"`
31902    new_path="$unix_path"
31903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31905    new_path="$unix_path"
31906  fi
31907
31908    fi
31909
31910    if test "x$new_path" = x; then
31911      # It's still not found. Now this is an unrecoverable error.
31912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31913$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31914      has_space=`$ECHO "$complete" | $GREP " "`
31915      if test "x$has_space" != x; then
31916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31918      fi
31919      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31920    fi
31921  fi
31922
31923  # Now new_path has a complete unix path to the binary
31924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31925    # Keep paths in /bin as-is, but remove trailing .exe if any
31926    new_path="${new_path/%.exe/}"
31927    # Do not save /bin paths to all_fixpath_prefixes!
31928  else
31929    # Not in mixed or Windows style, start by that.
31930    new_path=`cmd //c echo $new_path`
31931
31932  input_path="$new_path"
31933  # Check if we need to convert this using DOS-style short mode. If the path
31934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31935  # take no chances and rewrite it.
31936  # Note: m4 eats our [], so we need to use [ and ] instead.
31937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31938  if test "x$has_forbidden_chars" != x; then
31939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31941  fi
31942
31943    # Output is in $new_path
31944
31945  windows_path="$new_path"
31946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31947    unix_path=`$CYGPATH -u "$windows_path"`
31948    new_path="$unix_path"
31949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31951    new_path="$unix_path"
31952  fi
31953
31954    # remove trailing .exe if any
31955    new_path="${new_path/%.exe/}"
31956
31957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31959  fi
31960
31961    else
31962      # We're on a unix platform. Hooray! :)
31963      # First separate the path from the arguments. This will split at the first
31964      # space.
31965      complete="$CXXCPP"
31966      path="${complete%% *}"
31967      tmp="$complete EOL"
31968      arguments="${tmp#* }"
31969
31970      # Cannot rely on the command "which" here since it doesn't always work.
31971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31972      if test -z "$is_absolute_path"; then
31973        # Path to executable is not absolute. Find it.
31974        IFS_save="$IFS"
31975        IFS=:
31976        for p in $PATH; do
31977          if test -f "$p/$path" && test -x "$p/$path"; then
31978            new_path="$p/$path"
31979            break
31980          fi
31981        done
31982        IFS="$IFS_save"
31983      else
31984        # This is an absolute path, we can use it without further modifications.
31985        new_path="$path"
31986      fi
31987
31988      if test "x$new_path" = x; then
31989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31990$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31991        has_space=`$ECHO "$complete" | $GREP " "`
31992        if test "x$has_space" != x; then
31993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31995        fi
31996        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31997      fi
31998    fi
31999
32000    # Now join together the path and the arguments once again
32001    if test "x$arguments" != xEOL; then
32002      new_complete="$new_path ${arguments% *}"
32003    else
32004      new_complete="$new_path"
32005    fi
32006
32007    if test "x$complete" != "x$new_complete"; then
32008      CXXCPP="$new_complete"
32009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32010$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32011    fi
32012  fi
32013
32014
32015  #
32016  # Setup the linker (LD)
32017  #
32018  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32019    # In the Microsoft toolchain we have a separate LD command "link".
32020    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32021    # a cygwin program for something completely different.
32022    # Extract the first word of "link", so it can be a program name with args.
32023set dummy link; ac_word=$2
32024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32025$as_echo_n "checking for $ac_word... " >&6; }
32026if ${ac_cv_prog_LD+:} false; then :
32027  $as_echo_n "(cached) " >&6
32028else
32029  if test -n "$LD"; then
32030  ac_cv_prog_LD="$LD" # Let the user override the test.
32031else
32032  ac_prog_rejected=no
32033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32034for as_dir in $PATH
32035do
32036  IFS=$as_save_IFS
32037  test -z "$as_dir" && as_dir=.
32038    for ac_exec_ext in '' $ac_executable_extensions; do
32039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32040    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32041       ac_prog_rejected=yes
32042       continue
32043     fi
32044    ac_cv_prog_LD="link"
32045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32046    break 2
32047  fi
32048done
32049  done
32050IFS=$as_save_IFS
32051
32052if test $ac_prog_rejected = yes; then
32053  # We found a bogon in the path, so make sure we never use it.
32054  set dummy $ac_cv_prog_LD
32055  shift
32056  if test $# != 0; then
32057    # We chose a different compiler from the bogus one.
32058    # However, it has the same basename, so the bogon will be chosen
32059    # first if we set LD to just the basename; use the full file name.
32060    shift
32061    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32062  fi
32063fi
32064fi
32065fi
32066LD=$ac_cv_prog_LD
32067if test -n "$LD"; then
32068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32069$as_echo "$LD" >&6; }
32070else
32071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32072$as_echo "no" >&6; }
32073fi
32074
32075
32076
32077  # Only process if variable expands to non-empty
32078
32079  if test "x$LD" != x; then
32080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32081
32082  # First separate the path from the arguments. This will split at the first
32083  # space.
32084  complete="$LD"
32085  path="${complete%% *}"
32086  tmp="$complete EOL"
32087  arguments="${tmp#* }"
32088
32089  # Input might be given as Windows format, start by converting to
32090  # unix format.
32091  new_path=`$CYGPATH -u "$path"`
32092
32093  # Now try to locate executable using which
32094  new_path=`$WHICH "$new_path" 2> /dev/null`
32095  # bat and cmd files are not always considered executable in cygwin causing which
32096  # to not find them
32097  if test "x$new_path" = x \
32098      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32099      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32100    new_path=`$CYGPATH -u "$path"`
32101  fi
32102  if test "x$new_path" = x; then
32103    # Oops. Which didn't find the executable.
32104    # The splitting of arguments from the executable at a space might have been incorrect,
32105    # since paths with space are more likely in Windows. Give it another try with the whole
32106    # argument.
32107    path="$complete"
32108    arguments="EOL"
32109    new_path=`$CYGPATH -u "$path"`
32110    new_path=`$WHICH "$new_path" 2> /dev/null`
32111    # bat and cmd files are not always considered executable in cygwin causing which
32112    # to not find them
32113    if test "x$new_path" = x \
32114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32116      new_path=`$CYGPATH -u "$path"`
32117    fi
32118    if test "x$new_path" = x; then
32119      # It's still not found. Now this is an unrecoverable error.
32120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32121$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32122      has_space=`$ECHO "$complete" | $GREP " "`
32123      if test "x$has_space" != x; then
32124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32126      fi
32127      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32128    fi
32129  fi
32130
32131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32134  # "foo.exe" is OK but "foo" is an error.
32135  #
32136  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32137  # It is also a way to make sure we got the proper file name for the real test later on.
32138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32139  if test "x$test_shortpath" = x; then
32140    # Short path failed, file does not exist as specified.
32141    # Try adding .exe or .cmd
32142    if test -f "${new_path}.exe"; then
32143      input_to_shortpath="${new_path}.exe"
32144    elif test -f "${new_path}.cmd"; then
32145      input_to_shortpath="${new_path}.cmd"
32146    else
32147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32148$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32151      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32152    fi
32153  else
32154    input_to_shortpath="$new_path"
32155  fi
32156
32157  # Call helper function which possibly converts this using DOS-style short mode.
32158  # If so, the updated path is stored in $new_path.
32159  new_path="$input_to_shortpath"
32160
32161  input_path="$input_to_shortpath"
32162  # Check if we need to convert this using DOS-style short mode. If the path
32163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32164  # take no chances and rewrite it.
32165  # Note: m4 eats our [], so we need to use [ and ] instead.
32166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32167  if test "x$has_forbidden_chars" != x; then
32168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32172      # Going to short mode and back again did indeed matter. Since short mode is
32173      # case insensitive, let's make it lowercase to improve readability.
32174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32175      # Now convert it back to Unix-stile (cygpath)
32176      input_path=`$CYGPATH -u "$shortmode_path"`
32177      new_path="$input_path"
32178    fi
32179  fi
32180
32181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32182  if test "x$test_cygdrive_prefix" = x; then
32183    # As a simple fix, exclude /usr/bin since it's not a real path.
32184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32186      # a path prefixed by /cygdrive for fixpath to work.
32187      new_path="$CYGWIN_ROOT_PATH$input_path"
32188    fi
32189  fi
32190
32191  # remove trailing .exe if any
32192  new_path="${new_path/%.exe/}"
32193
32194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32195
32196  # First separate the path from the arguments. This will split at the first
32197  # space.
32198  complete="$LD"
32199  path="${complete%% *}"
32200  tmp="$complete EOL"
32201  arguments="${tmp#* }"
32202
32203  # Input might be given as Windows format, start by converting to
32204  # unix format.
32205  new_path="$path"
32206
32207  windows_path="$new_path"
32208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32209    unix_path=`$CYGPATH -u "$windows_path"`
32210    new_path="$unix_path"
32211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32213    new_path="$unix_path"
32214  fi
32215
32216
32217  # Now try to locate executable using which
32218  new_path=`$WHICH "$new_path" 2> /dev/null`
32219
32220  if test "x$new_path" = x; then
32221    # Oops. Which didn't find the executable.
32222    # The splitting of arguments from the executable at a space might have been incorrect,
32223    # since paths with space are more likely in Windows. Give it another try with the whole
32224    # argument.
32225    path="$complete"
32226    arguments="EOL"
32227    new_path="$path"
32228
32229  windows_path="$new_path"
32230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32231    unix_path=`$CYGPATH -u "$windows_path"`
32232    new_path="$unix_path"
32233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32235    new_path="$unix_path"
32236  fi
32237
32238
32239    new_path=`$WHICH "$new_path" 2> /dev/null`
32240    # bat and cmd files are not always considered executable in MSYS causing which
32241    # to not find them
32242    if test "x$new_path" = x \
32243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32245      new_path="$path"
32246
32247  windows_path="$new_path"
32248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32249    unix_path=`$CYGPATH -u "$windows_path"`
32250    new_path="$unix_path"
32251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32253    new_path="$unix_path"
32254  fi
32255
32256    fi
32257
32258    if test "x$new_path" = x; then
32259      # It's still not found. Now this is an unrecoverable error.
32260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32261$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32262      has_space=`$ECHO "$complete" | $GREP " "`
32263      if test "x$has_space" != x; then
32264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32266      fi
32267      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32268    fi
32269  fi
32270
32271  # Now new_path has a complete unix path to the binary
32272  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32273    # Keep paths in /bin as-is, but remove trailing .exe if any
32274    new_path="${new_path/%.exe/}"
32275    # Do not save /bin paths to all_fixpath_prefixes!
32276  else
32277    # Not in mixed or Windows style, start by that.
32278    new_path=`cmd //c echo $new_path`
32279
32280  input_path="$new_path"
32281  # Check if we need to convert this using DOS-style short mode. If the path
32282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32283  # take no chances and rewrite it.
32284  # Note: m4 eats our [], so we need to use [ and ] instead.
32285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32286  if test "x$has_forbidden_chars" != x; then
32287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32289  fi
32290
32291    # Output is in $new_path
32292
32293  windows_path="$new_path"
32294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32295    unix_path=`$CYGPATH -u "$windows_path"`
32296    new_path="$unix_path"
32297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32299    new_path="$unix_path"
32300  fi
32301
32302    # remove trailing .exe if any
32303    new_path="${new_path/%.exe/}"
32304
32305    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32306    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32307  fi
32308
32309    else
32310      # We're on a unix platform. Hooray! :)
32311      # First separate the path from the arguments. This will split at the first
32312      # space.
32313      complete="$LD"
32314      path="${complete%% *}"
32315      tmp="$complete EOL"
32316      arguments="${tmp#* }"
32317
32318      # Cannot rely on the command "which" here since it doesn't always work.
32319      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32320      if test -z "$is_absolute_path"; then
32321        # Path to executable is not absolute. Find it.
32322        IFS_save="$IFS"
32323        IFS=:
32324        for p in $PATH; do
32325          if test -f "$p/$path" && test -x "$p/$path"; then
32326            new_path="$p/$path"
32327            break
32328          fi
32329        done
32330        IFS="$IFS_save"
32331      else
32332        # This is an absolute path, we can use it without further modifications.
32333        new_path="$path"
32334      fi
32335
32336      if test "x$new_path" = x; then
32337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32338$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32339        has_space=`$ECHO "$complete" | $GREP " "`
32340        if test "x$has_space" != x; then
32341          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32342$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32343        fi
32344        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32345      fi
32346    fi
32347
32348    # Now join together the path and the arguments once again
32349    if test "x$arguments" != xEOL; then
32350      new_complete="$new_path ${arguments% *}"
32351    else
32352      new_complete="$new_path"
32353    fi
32354
32355    if test "x$complete" != "x$new_complete"; then
32356      LD="$new_complete"
32357      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32358$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32359    fi
32360  fi
32361
32362    # Verify that we indeed succeeded with this trick.
32363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32364$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32365    "$LD" --version > /dev/null
32366    if test $? -eq 0 ; then
32367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32368$as_echo "no" >&6; }
32369      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32370    else
32371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32372$as_echo "yes" >&6; }
32373    fi
32374    LDCXX="$LD"
32375  else
32376    # All other toolchains use the compiler to link.
32377    LD="$CC"
32378    LDCXX="$CXX"
32379  fi
32380
32381  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32382
32383
32384  #
32385  # Setup the assembler (AS)
32386  #
32387  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32388    # FIXME: should this really be solaris, or solstudio?
32389
32390
32391  # Publish this variable in the help.
32392
32393
32394  if test "x$AS" = x; then
32395    # The variable is not set by user, try to locate tool using the code snippet
32396    for ac_prog in as
32397do
32398  # Extract the first word of "$ac_prog", so it can be a program name with args.
32399set dummy $ac_prog; ac_word=$2
32400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32401$as_echo_n "checking for $ac_word... " >&6; }
32402if ${ac_cv_path_AS+:} false; then :
32403  $as_echo_n "(cached) " >&6
32404else
32405  case $AS in
32406  [\\/]* | ?:[\\/]*)
32407  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32408  ;;
32409  *)
32410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32411for as_dir in $PATH
32412do
32413  IFS=$as_save_IFS
32414  test -z "$as_dir" && as_dir=.
32415    for ac_exec_ext in '' $ac_executable_extensions; do
32416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32417    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32419    break 2
32420  fi
32421done
32422  done
32423IFS=$as_save_IFS
32424
32425  ;;
32426esac
32427fi
32428AS=$ac_cv_path_AS
32429if test -n "$AS"; then
32430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32431$as_echo "$AS" >&6; }
32432else
32433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32434$as_echo "no" >&6; }
32435fi
32436
32437
32438  test -n "$AS" && break
32439done
32440
32441  else
32442    # The variable is set, but is it from the command line or the environment?
32443
32444    # Try to remove the string !AS! from our list.
32445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32447      # If it failed, the variable was not from the command line. Ignore it,
32448      # but warn the user (except for BASH, which is always set by the calling BASH).
32449      if test "xAS" != xBASH; then
32450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32451$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32452      fi
32453      # Try to locate tool using the code snippet
32454      for ac_prog in as
32455do
32456  # Extract the first word of "$ac_prog", so it can be a program name with args.
32457set dummy $ac_prog; ac_word=$2
32458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32459$as_echo_n "checking for $ac_word... " >&6; }
32460if ${ac_cv_path_AS+:} false; then :
32461  $as_echo_n "(cached) " >&6
32462else
32463  case $AS in
32464  [\\/]* | ?:[\\/]*)
32465  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32466  ;;
32467  *)
32468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32469for as_dir in $PATH
32470do
32471  IFS=$as_save_IFS
32472  test -z "$as_dir" && as_dir=.
32473    for ac_exec_ext in '' $ac_executable_extensions; do
32474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32475    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32477    break 2
32478  fi
32479done
32480  done
32481IFS=$as_save_IFS
32482
32483  ;;
32484esac
32485fi
32486AS=$ac_cv_path_AS
32487if test -n "$AS"; then
32488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32489$as_echo "$AS" >&6; }
32490else
32491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32492$as_echo "no" >&6; }
32493fi
32494
32495
32496  test -n "$AS" && break
32497done
32498
32499    else
32500      # If it succeeded, then it was overridden by the user. We will use it
32501      # for the tool.
32502
32503      # First remove it from the list of overridden variables, so we can test
32504      # for unknown variables in the end.
32505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32506
32507      # Check if the provided tool contains a complete path.
32508      tool_specified="$AS"
32509      tool_basename="${tool_specified##*/}"
32510      if test "x$tool_basename" = "x$tool_specified"; then
32511        # A command without a complete path is provided, search $PATH.
32512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32513$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32514        # Extract the first word of "$tool_basename", so it can be a program name with args.
32515set dummy $tool_basename; ac_word=$2
32516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32517$as_echo_n "checking for $ac_word... " >&6; }
32518if ${ac_cv_path_AS+:} false; then :
32519  $as_echo_n "(cached) " >&6
32520else
32521  case $AS in
32522  [\\/]* | ?:[\\/]*)
32523  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32524  ;;
32525  *)
32526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32527for as_dir in $PATH
32528do
32529  IFS=$as_save_IFS
32530  test -z "$as_dir" && as_dir=.
32531    for ac_exec_ext in '' $ac_executable_extensions; do
32532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32533    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32535    break 2
32536  fi
32537done
32538  done
32539IFS=$as_save_IFS
32540
32541  ;;
32542esac
32543fi
32544AS=$ac_cv_path_AS
32545if test -n "$AS"; then
32546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32547$as_echo "$AS" >&6; }
32548else
32549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32550$as_echo "no" >&6; }
32551fi
32552
32553
32554        if test "x$AS" = x; then
32555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32556        fi
32557      else
32558        # Otherwise we believe it is a complete path. Use it as it is.
32559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32560$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32562$as_echo_n "checking for AS... " >&6; }
32563        if test ! -x "$tool_specified"; then
32564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32565$as_echo "not found" >&6; }
32566          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32567        fi
32568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32569$as_echo "$tool_specified" >&6; }
32570      fi
32571    fi
32572  fi
32573
32574
32575
32576  # Only process if variable expands to non-empty
32577
32578  if test "x$AS" != x; then
32579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32580
32581  # First separate the path from the arguments. This will split at the first
32582  # space.
32583  complete="$AS"
32584  path="${complete%% *}"
32585  tmp="$complete EOL"
32586  arguments="${tmp#* }"
32587
32588  # Input might be given as Windows format, start by converting to
32589  # unix format.
32590  new_path=`$CYGPATH -u "$path"`
32591
32592  # Now try to locate executable using which
32593  new_path=`$WHICH "$new_path" 2> /dev/null`
32594  # bat and cmd files are not always considered executable in cygwin causing which
32595  # to not find them
32596  if test "x$new_path" = x \
32597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32599    new_path=`$CYGPATH -u "$path"`
32600  fi
32601  if test "x$new_path" = x; then
32602    # Oops. Which didn't find the executable.
32603    # The splitting of arguments from the executable at a space might have been incorrect,
32604    # since paths with space are more likely in Windows. Give it another try with the whole
32605    # argument.
32606    path="$complete"
32607    arguments="EOL"
32608    new_path=`$CYGPATH -u "$path"`
32609    new_path=`$WHICH "$new_path" 2> /dev/null`
32610    # bat and cmd files are not always considered executable in cygwin causing which
32611    # to not find them
32612    if test "x$new_path" = x \
32613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32615      new_path=`$CYGPATH -u "$path"`
32616    fi
32617    if test "x$new_path" = x; then
32618      # It's still not found. Now this is an unrecoverable error.
32619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32620$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32621      has_space=`$ECHO "$complete" | $GREP " "`
32622      if test "x$has_space" != x; then
32623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32625      fi
32626      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32627    fi
32628  fi
32629
32630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32633  # "foo.exe" is OK but "foo" is an error.
32634  #
32635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32636  # It is also a way to make sure we got the proper file name for the real test later on.
32637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32638  if test "x$test_shortpath" = x; then
32639    # Short path failed, file does not exist as specified.
32640    # Try adding .exe or .cmd
32641    if test -f "${new_path}.exe"; then
32642      input_to_shortpath="${new_path}.exe"
32643    elif test -f "${new_path}.cmd"; then
32644      input_to_shortpath="${new_path}.cmd"
32645    else
32646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32647$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32650      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32651    fi
32652  else
32653    input_to_shortpath="$new_path"
32654  fi
32655
32656  # Call helper function which possibly converts this using DOS-style short mode.
32657  # If so, the updated path is stored in $new_path.
32658  new_path="$input_to_shortpath"
32659
32660  input_path="$input_to_shortpath"
32661  # Check if we need to convert this using DOS-style short mode. If the path
32662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32663  # take no chances and rewrite it.
32664  # Note: m4 eats our [], so we need to use [ and ] instead.
32665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32666  if test "x$has_forbidden_chars" != x; then
32667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32671      # Going to short mode and back again did indeed matter. Since short mode is
32672      # case insensitive, let's make it lowercase to improve readability.
32673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32674      # Now convert it back to Unix-stile (cygpath)
32675      input_path=`$CYGPATH -u "$shortmode_path"`
32676      new_path="$input_path"
32677    fi
32678  fi
32679
32680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32681  if test "x$test_cygdrive_prefix" = x; then
32682    # As a simple fix, exclude /usr/bin since it's not a real path.
32683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32685      # a path prefixed by /cygdrive for fixpath to work.
32686      new_path="$CYGWIN_ROOT_PATH$input_path"
32687    fi
32688  fi
32689
32690  # remove trailing .exe if any
32691  new_path="${new_path/%.exe/}"
32692
32693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32694
32695  # First separate the path from the arguments. This will split at the first
32696  # space.
32697  complete="$AS"
32698  path="${complete%% *}"
32699  tmp="$complete EOL"
32700  arguments="${tmp#* }"
32701
32702  # Input might be given as Windows format, start by converting to
32703  # unix format.
32704  new_path="$path"
32705
32706  windows_path="$new_path"
32707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32708    unix_path=`$CYGPATH -u "$windows_path"`
32709    new_path="$unix_path"
32710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32712    new_path="$unix_path"
32713  fi
32714
32715
32716  # Now try to locate executable using which
32717  new_path=`$WHICH "$new_path" 2> /dev/null`
32718
32719  if test "x$new_path" = x; then
32720    # Oops. Which didn't find the executable.
32721    # The splitting of arguments from the executable at a space might have been incorrect,
32722    # since paths with space are more likely in Windows. Give it another try with the whole
32723    # argument.
32724    path="$complete"
32725    arguments="EOL"
32726    new_path="$path"
32727
32728  windows_path="$new_path"
32729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32730    unix_path=`$CYGPATH -u "$windows_path"`
32731    new_path="$unix_path"
32732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32734    new_path="$unix_path"
32735  fi
32736
32737
32738    new_path=`$WHICH "$new_path" 2> /dev/null`
32739    # bat and cmd files are not always considered executable in MSYS causing which
32740    # to not find them
32741    if test "x$new_path" = x \
32742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32744      new_path="$path"
32745
32746  windows_path="$new_path"
32747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32748    unix_path=`$CYGPATH -u "$windows_path"`
32749    new_path="$unix_path"
32750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32752    new_path="$unix_path"
32753  fi
32754
32755    fi
32756
32757    if test "x$new_path" = x; then
32758      # It's still not found. Now this is an unrecoverable error.
32759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32760$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32761      has_space=`$ECHO "$complete" | $GREP " "`
32762      if test "x$has_space" != x; then
32763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32765      fi
32766      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32767    fi
32768  fi
32769
32770  # Now new_path has a complete unix path to the binary
32771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32772    # Keep paths in /bin as-is, but remove trailing .exe if any
32773    new_path="${new_path/%.exe/}"
32774    # Do not save /bin paths to all_fixpath_prefixes!
32775  else
32776    # Not in mixed or Windows style, start by that.
32777    new_path=`cmd //c echo $new_path`
32778
32779  input_path="$new_path"
32780  # Check if we need to convert this using DOS-style short mode. If the path
32781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32782  # take no chances and rewrite it.
32783  # Note: m4 eats our [], so we need to use [ and ] instead.
32784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32785  if test "x$has_forbidden_chars" != x; then
32786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32788  fi
32789
32790    # Output is in $new_path
32791
32792  windows_path="$new_path"
32793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32794    unix_path=`$CYGPATH -u "$windows_path"`
32795    new_path="$unix_path"
32796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32798    new_path="$unix_path"
32799  fi
32800
32801    # remove trailing .exe if any
32802    new_path="${new_path/%.exe/}"
32803
32804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32806  fi
32807
32808    else
32809      # We're on a unix platform. Hooray! :)
32810      # First separate the path from the arguments. This will split at the first
32811      # space.
32812      complete="$AS"
32813      path="${complete%% *}"
32814      tmp="$complete EOL"
32815      arguments="${tmp#* }"
32816
32817      # Cannot rely on the command "which" here since it doesn't always work.
32818      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32819      if test -z "$is_absolute_path"; then
32820        # Path to executable is not absolute. Find it.
32821        IFS_save="$IFS"
32822        IFS=:
32823        for p in $PATH; do
32824          if test -f "$p/$path" && test -x "$p/$path"; then
32825            new_path="$p/$path"
32826            break
32827          fi
32828        done
32829        IFS="$IFS_save"
32830      else
32831        # This is an absolute path, we can use it without further modifications.
32832        new_path="$path"
32833      fi
32834
32835      if test "x$new_path" = x; then
32836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32837$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32838        has_space=`$ECHO "$complete" | $GREP " "`
32839        if test "x$has_space" != x; then
32840          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32842        fi
32843        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32844      fi
32845    fi
32846
32847    # Now join together the path and the arguments once again
32848    if test "x$arguments" != xEOL; then
32849      new_complete="$new_path ${arguments% *}"
32850    else
32851      new_complete="$new_path"
32852    fi
32853
32854    if test "x$complete" != "x$new_complete"; then
32855      AS="$new_complete"
32856      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32857$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32858    fi
32859  fi
32860
32861  else
32862    # FIXME: is this correct for microsoft?
32863    AS="$CC -c"
32864  fi
32865
32866
32867  #
32868  # Setup the archiver (AR)
32869  #
32870  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32871    # The corresponding ar tool is lib.exe (used to create static libraries)
32872    # Extract the first word of "lib", so it can be a program name with args.
32873set dummy lib; ac_word=$2
32874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32875$as_echo_n "checking for $ac_word... " >&6; }
32876if ${ac_cv_prog_AR+:} false; then :
32877  $as_echo_n "(cached) " >&6
32878else
32879  if test -n "$AR"; then
32880  ac_cv_prog_AR="$AR" # Let the user override the test.
32881else
32882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32883for as_dir in $PATH
32884do
32885  IFS=$as_save_IFS
32886  test -z "$as_dir" && as_dir=.
32887    for ac_exec_ext in '' $ac_executable_extensions; do
32888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32889    ac_cv_prog_AR="lib"
32890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32891    break 2
32892  fi
32893done
32894  done
32895IFS=$as_save_IFS
32896
32897fi
32898fi
32899AR=$ac_cv_prog_AR
32900if test -n "$AR"; then
32901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32902$as_echo "$AR" >&6; }
32903else
32904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32905$as_echo "no" >&6; }
32906fi
32907
32908
32909  else
32910
32911
32912  # Publish this variable in the help.
32913
32914
32915  if test "x$AR" = x; then
32916    # The variable is not set by user, try to locate tool using the code snippet
32917    if test -n "$ac_tool_prefix"; then
32918  for ac_prog in ar
32919  do
32920    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32921set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32923$as_echo_n "checking for $ac_word... " >&6; }
32924if ${ac_cv_prog_AR+:} false; then :
32925  $as_echo_n "(cached) " >&6
32926else
32927  if test -n "$AR"; then
32928  ac_cv_prog_AR="$AR" # Let the user override the test.
32929else
32930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32931for as_dir in $PATH
32932do
32933  IFS=$as_save_IFS
32934  test -z "$as_dir" && as_dir=.
32935    for ac_exec_ext in '' $ac_executable_extensions; do
32936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32937    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32939    break 2
32940  fi
32941done
32942  done
32943IFS=$as_save_IFS
32944
32945fi
32946fi
32947AR=$ac_cv_prog_AR
32948if test -n "$AR"; then
32949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32950$as_echo "$AR" >&6; }
32951else
32952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32953$as_echo "no" >&6; }
32954fi
32955
32956
32957    test -n "$AR" && break
32958  done
32959fi
32960if test -z "$AR"; then
32961  ac_ct_AR=$AR
32962  for ac_prog in ar
32963do
32964  # Extract the first word of "$ac_prog", so it can be a program name with args.
32965set dummy $ac_prog; ac_word=$2
32966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32967$as_echo_n "checking for $ac_word... " >&6; }
32968if ${ac_cv_prog_ac_ct_AR+:} false; then :
32969  $as_echo_n "(cached) " >&6
32970else
32971  if test -n "$ac_ct_AR"; then
32972  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32973else
32974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32975for as_dir in $PATH
32976do
32977  IFS=$as_save_IFS
32978  test -z "$as_dir" && as_dir=.
32979    for ac_exec_ext in '' $ac_executable_extensions; do
32980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32981    ac_cv_prog_ac_ct_AR="$ac_prog"
32982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32983    break 2
32984  fi
32985done
32986  done
32987IFS=$as_save_IFS
32988
32989fi
32990fi
32991ac_ct_AR=$ac_cv_prog_ac_ct_AR
32992if test -n "$ac_ct_AR"; then
32993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32994$as_echo "$ac_ct_AR" >&6; }
32995else
32996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32997$as_echo "no" >&6; }
32998fi
32999
33000
33001  test -n "$ac_ct_AR" && break
33002done
33003
33004  if test "x$ac_ct_AR" = x; then
33005    AR=""
33006  else
33007    case $cross_compiling:$ac_tool_warned in
33008yes:)
33009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33011ac_tool_warned=yes ;;
33012esac
33013    AR=$ac_ct_AR
33014  fi
33015fi
33016
33017  else
33018    # The variable is set, but is it from the command line or the environment?
33019
33020    # Try to remove the string !AR! from our list.
33021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33023      # If it failed, the variable was not from the command line. Ignore it,
33024      # but warn the user (except for BASH, which is always set by the calling BASH).
33025      if test "xAR" != xBASH; then
33026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33027$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33028      fi
33029      # Try to locate tool using the code snippet
33030      if test -n "$ac_tool_prefix"; then
33031  for ac_prog in ar
33032  do
33033    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33034set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33036$as_echo_n "checking for $ac_word... " >&6; }
33037if ${ac_cv_prog_AR+:} false; then :
33038  $as_echo_n "(cached) " >&6
33039else
33040  if test -n "$AR"; then
33041  ac_cv_prog_AR="$AR" # Let the user override the test.
33042else
33043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33044for as_dir in $PATH
33045do
33046  IFS=$as_save_IFS
33047  test -z "$as_dir" && as_dir=.
33048    for ac_exec_ext in '' $ac_executable_extensions; do
33049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33050    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33052    break 2
33053  fi
33054done
33055  done
33056IFS=$as_save_IFS
33057
33058fi
33059fi
33060AR=$ac_cv_prog_AR
33061if test -n "$AR"; then
33062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33063$as_echo "$AR" >&6; }
33064else
33065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33066$as_echo "no" >&6; }
33067fi
33068
33069
33070    test -n "$AR" && break
33071  done
33072fi
33073if test -z "$AR"; then
33074  ac_ct_AR=$AR
33075  for ac_prog in ar
33076do
33077  # Extract the first word of "$ac_prog", so it can be a program name with args.
33078set dummy $ac_prog; ac_word=$2
33079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33080$as_echo_n "checking for $ac_word... " >&6; }
33081if ${ac_cv_prog_ac_ct_AR+:} false; then :
33082  $as_echo_n "(cached) " >&6
33083else
33084  if test -n "$ac_ct_AR"; then
33085  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33086else
33087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33088for as_dir in $PATH
33089do
33090  IFS=$as_save_IFS
33091  test -z "$as_dir" && as_dir=.
33092    for ac_exec_ext in '' $ac_executable_extensions; do
33093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33094    ac_cv_prog_ac_ct_AR="$ac_prog"
33095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33096    break 2
33097  fi
33098done
33099  done
33100IFS=$as_save_IFS
33101
33102fi
33103fi
33104ac_ct_AR=$ac_cv_prog_ac_ct_AR
33105if test -n "$ac_ct_AR"; then
33106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33107$as_echo "$ac_ct_AR" >&6; }
33108else
33109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33110$as_echo "no" >&6; }
33111fi
33112
33113
33114  test -n "$ac_ct_AR" && break
33115done
33116
33117  if test "x$ac_ct_AR" = x; then
33118    AR=""
33119  else
33120    case $cross_compiling:$ac_tool_warned in
33121yes:)
33122{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33123$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33124ac_tool_warned=yes ;;
33125esac
33126    AR=$ac_ct_AR
33127  fi
33128fi
33129
33130    else
33131      # If it succeeded, then it was overridden by the user. We will use it
33132      # for the tool.
33133
33134      # First remove it from the list of overridden variables, so we can test
33135      # for unknown variables in the end.
33136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33137
33138      # Check if the provided tool contains a complete path.
33139      tool_specified="$AR"
33140      tool_basename="${tool_specified##*/}"
33141      if test "x$tool_basename" = "x$tool_specified"; then
33142        # A command without a complete path is provided, search $PATH.
33143        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33144$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33145        # Extract the first word of "$tool_basename", so it can be a program name with args.
33146set dummy $tool_basename; ac_word=$2
33147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33148$as_echo_n "checking for $ac_word... " >&6; }
33149if ${ac_cv_path_AR+:} false; then :
33150  $as_echo_n "(cached) " >&6
33151else
33152  case $AR in
33153  [\\/]* | ?:[\\/]*)
33154  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33155  ;;
33156  *)
33157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33158for as_dir in $PATH
33159do
33160  IFS=$as_save_IFS
33161  test -z "$as_dir" && as_dir=.
33162    for ac_exec_ext in '' $ac_executable_extensions; do
33163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33164    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33166    break 2
33167  fi
33168done
33169  done
33170IFS=$as_save_IFS
33171
33172  ;;
33173esac
33174fi
33175AR=$ac_cv_path_AR
33176if test -n "$AR"; then
33177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33178$as_echo "$AR" >&6; }
33179else
33180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33181$as_echo "no" >&6; }
33182fi
33183
33184
33185        if test "x$AR" = x; then
33186          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33187        fi
33188      else
33189        # Otherwise we believe it is a complete path. Use it as it is.
33190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33191$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33193$as_echo_n "checking for AR... " >&6; }
33194        if test ! -x "$tool_specified"; then
33195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33196$as_echo "not found" >&6; }
33197          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33198        fi
33199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33200$as_echo "$tool_specified" >&6; }
33201      fi
33202    fi
33203  fi
33204
33205
33206  fi
33207
33208  # Only process if variable expands to non-empty
33209
33210  if test "x$AR" != x; then
33211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33212
33213  # First separate the path from the arguments. This will split at the first
33214  # space.
33215  complete="$AR"
33216  path="${complete%% *}"
33217  tmp="$complete EOL"
33218  arguments="${tmp#* }"
33219
33220  # Input might be given as Windows format, start by converting to
33221  # unix format.
33222  new_path=`$CYGPATH -u "$path"`
33223
33224  # Now try to locate executable using which
33225  new_path=`$WHICH "$new_path" 2> /dev/null`
33226  # bat and cmd files are not always considered executable in cygwin causing which
33227  # to not find them
33228  if test "x$new_path" = x \
33229      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33230      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33231    new_path=`$CYGPATH -u "$path"`
33232  fi
33233  if test "x$new_path" = x; then
33234    # Oops. Which didn't find the executable.
33235    # The splitting of arguments from the executable at a space might have been incorrect,
33236    # since paths with space are more likely in Windows. Give it another try with the whole
33237    # argument.
33238    path="$complete"
33239    arguments="EOL"
33240    new_path=`$CYGPATH -u "$path"`
33241    new_path=`$WHICH "$new_path" 2> /dev/null`
33242    # bat and cmd files are not always considered executable in cygwin causing which
33243    # to not find them
33244    if test "x$new_path" = x \
33245        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33246        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33247      new_path=`$CYGPATH -u "$path"`
33248    fi
33249    if test "x$new_path" = x; then
33250      # It's still not found. Now this is an unrecoverable error.
33251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33252$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33253      has_space=`$ECHO "$complete" | $GREP " "`
33254      if test "x$has_space" != x; then
33255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33257      fi
33258      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33259    fi
33260  fi
33261
33262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33265  # "foo.exe" is OK but "foo" is an error.
33266  #
33267  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33268  # It is also a way to make sure we got the proper file name for the real test later on.
33269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33270  if test "x$test_shortpath" = x; then
33271    # Short path failed, file does not exist as specified.
33272    # Try adding .exe or .cmd
33273    if test -f "${new_path}.exe"; then
33274      input_to_shortpath="${new_path}.exe"
33275    elif test -f "${new_path}.cmd"; then
33276      input_to_shortpath="${new_path}.cmd"
33277    else
33278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33279$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33282      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33283    fi
33284  else
33285    input_to_shortpath="$new_path"
33286  fi
33287
33288  # Call helper function which possibly converts this using DOS-style short mode.
33289  # If so, the updated path is stored in $new_path.
33290  new_path="$input_to_shortpath"
33291
33292  input_path="$input_to_shortpath"
33293  # Check if we need to convert this using DOS-style short mode. If the path
33294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33295  # take no chances and rewrite it.
33296  # Note: m4 eats our [], so we need to use [ and ] instead.
33297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33298  if test "x$has_forbidden_chars" != x; then
33299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33303      # Going to short mode and back again did indeed matter. Since short mode is
33304      # case insensitive, let's make it lowercase to improve readability.
33305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33306      # Now convert it back to Unix-stile (cygpath)
33307      input_path=`$CYGPATH -u "$shortmode_path"`
33308      new_path="$input_path"
33309    fi
33310  fi
33311
33312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33313  if test "x$test_cygdrive_prefix" = x; then
33314    # As a simple fix, exclude /usr/bin since it's not a real path.
33315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33317      # a path prefixed by /cygdrive for fixpath to work.
33318      new_path="$CYGWIN_ROOT_PATH$input_path"
33319    fi
33320  fi
33321
33322  # remove trailing .exe if any
33323  new_path="${new_path/%.exe/}"
33324
33325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33326
33327  # First separate the path from the arguments. This will split at the first
33328  # space.
33329  complete="$AR"
33330  path="${complete%% *}"
33331  tmp="$complete EOL"
33332  arguments="${tmp#* }"
33333
33334  # Input might be given as Windows format, start by converting to
33335  # unix format.
33336  new_path="$path"
33337
33338  windows_path="$new_path"
33339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33340    unix_path=`$CYGPATH -u "$windows_path"`
33341    new_path="$unix_path"
33342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33344    new_path="$unix_path"
33345  fi
33346
33347
33348  # Now try to locate executable using which
33349  new_path=`$WHICH "$new_path" 2> /dev/null`
33350
33351  if test "x$new_path" = x; then
33352    # Oops. Which didn't find the executable.
33353    # The splitting of arguments from the executable at a space might have been incorrect,
33354    # since paths with space are more likely in Windows. Give it another try with the whole
33355    # argument.
33356    path="$complete"
33357    arguments="EOL"
33358    new_path="$path"
33359
33360  windows_path="$new_path"
33361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33362    unix_path=`$CYGPATH -u "$windows_path"`
33363    new_path="$unix_path"
33364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33366    new_path="$unix_path"
33367  fi
33368
33369
33370    new_path=`$WHICH "$new_path" 2> /dev/null`
33371    # bat and cmd files are not always considered executable in MSYS causing which
33372    # to not find them
33373    if test "x$new_path" = x \
33374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33376      new_path="$path"
33377
33378  windows_path="$new_path"
33379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33380    unix_path=`$CYGPATH -u "$windows_path"`
33381    new_path="$unix_path"
33382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33384    new_path="$unix_path"
33385  fi
33386
33387    fi
33388
33389    if test "x$new_path" = x; then
33390      # It's still not found. Now this is an unrecoverable error.
33391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33392$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33393      has_space=`$ECHO "$complete" | $GREP " "`
33394      if test "x$has_space" != x; then
33395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33397      fi
33398      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33399    fi
33400  fi
33401
33402  # Now new_path has a complete unix path to the binary
33403  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33404    # Keep paths in /bin as-is, but remove trailing .exe if any
33405    new_path="${new_path/%.exe/}"
33406    # Do not save /bin paths to all_fixpath_prefixes!
33407  else
33408    # Not in mixed or Windows style, start by that.
33409    new_path=`cmd //c echo $new_path`
33410
33411  input_path="$new_path"
33412  # Check if we need to convert this using DOS-style short mode. If the path
33413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33414  # take no chances and rewrite it.
33415  # Note: m4 eats our [], so we need to use [ and ] instead.
33416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33417  if test "x$has_forbidden_chars" != x; then
33418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33420  fi
33421
33422    # Output is in $new_path
33423
33424  windows_path="$new_path"
33425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33426    unix_path=`$CYGPATH -u "$windows_path"`
33427    new_path="$unix_path"
33428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33430    new_path="$unix_path"
33431  fi
33432
33433    # remove trailing .exe if any
33434    new_path="${new_path/%.exe/}"
33435
33436    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33437    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33438  fi
33439
33440    else
33441      # We're on a unix platform. Hooray! :)
33442      # First separate the path from the arguments. This will split at the first
33443      # space.
33444      complete="$AR"
33445      path="${complete%% *}"
33446      tmp="$complete EOL"
33447      arguments="${tmp#* }"
33448
33449      # Cannot rely on the command "which" here since it doesn't always work.
33450      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33451      if test -z "$is_absolute_path"; then
33452        # Path to executable is not absolute. Find it.
33453        IFS_save="$IFS"
33454        IFS=:
33455        for p in $PATH; do
33456          if test -f "$p/$path" && test -x "$p/$path"; then
33457            new_path="$p/$path"
33458            break
33459          fi
33460        done
33461        IFS="$IFS_save"
33462      else
33463        # This is an absolute path, we can use it without further modifications.
33464        new_path="$path"
33465      fi
33466
33467      if test "x$new_path" = x; then
33468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33469$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33470        has_space=`$ECHO "$complete" | $GREP " "`
33471        if test "x$has_space" != x; then
33472          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33473$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33474        fi
33475        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33476      fi
33477    fi
33478
33479    # Now join together the path and the arguments once again
33480    if test "x$arguments" != xEOL; then
33481      new_complete="$new_path ${arguments% *}"
33482    else
33483      new_complete="$new_path"
33484    fi
33485
33486    if test "x$complete" != "x$new_complete"; then
33487      AR="$new_complete"
33488      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33489$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33490    fi
33491  fi
33492
33493
33494
33495  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33496    ac_ext=m
33497ac_cpp='$OBJCPP $CPPFLAGS'
33498ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33499ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33500ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33501if test -n "$ac_tool_prefix"; then
33502  for ac_prog in gcc objcc objc cc CC
33503  do
33504    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33505set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33507$as_echo_n "checking for $ac_word... " >&6; }
33508if ${ac_cv_prog_OBJC+:} false; then :
33509  $as_echo_n "(cached) " >&6
33510else
33511  if test -n "$OBJC"; then
33512  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33513else
33514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33515for as_dir in $PATH
33516do
33517  IFS=$as_save_IFS
33518  test -z "$as_dir" && as_dir=.
33519    for ac_exec_ext in '' $ac_executable_extensions; do
33520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33521    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33523    break 2
33524  fi
33525done
33526  done
33527IFS=$as_save_IFS
33528
33529fi
33530fi
33531OBJC=$ac_cv_prog_OBJC
33532if test -n "$OBJC"; then
33533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33534$as_echo "$OBJC" >&6; }
33535else
33536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33537$as_echo "no" >&6; }
33538fi
33539
33540
33541    test -n "$OBJC" && break
33542  done
33543fi
33544if test -z "$OBJC"; then
33545  ac_ct_OBJC=$OBJC
33546  for ac_prog in gcc objcc objc cc CC
33547do
33548  # Extract the first word of "$ac_prog", so it can be a program name with args.
33549set dummy $ac_prog; ac_word=$2
33550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33551$as_echo_n "checking for $ac_word... " >&6; }
33552if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33553  $as_echo_n "(cached) " >&6
33554else
33555  if test -n "$ac_ct_OBJC"; then
33556  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33557else
33558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33559for as_dir in $PATH
33560do
33561  IFS=$as_save_IFS
33562  test -z "$as_dir" && as_dir=.
33563    for ac_exec_ext in '' $ac_executable_extensions; do
33564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33565    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33567    break 2
33568  fi
33569done
33570  done
33571IFS=$as_save_IFS
33572
33573fi
33574fi
33575ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33576if test -n "$ac_ct_OBJC"; then
33577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33578$as_echo "$ac_ct_OBJC" >&6; }
33579else
33580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33581$as_echo "no" >&6; }
33582fi
33583
33584
33585  test -n "$ac_ct_OBJC" && break
33586done
33587
33588  if test "x$ac_ct_OBJC" = x; then
33589    OBJC="gcc"
33590  else
33591    case $cross_compiling:$ac_tool_warned in
33592yes:)
33593{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33594$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33595ac_tool_warned=yes ;;
33596esac
33597    OBJC=$ac_ct_OBJC
33598  fi
33599fi
33600
33601# Provide some information about the compiler.
33602$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33603set X $ac_compile
33604ac_compiler=$2
33605for ac_option in --version -v -V -qversion; do
33606  { { ac_try="$ac_compiler $ac_option >&5"
33607case "(($ac_try" in
33608  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33609  *) ac_try_echo=$ac_try;;
33610esac
33611eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33612$as_echo "$ac_try_echo"; } >&5
33613  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33614  ac_status=$?
33615  if test -s conftest.err; then
33616    sed '10a\
33617... rest of stderr output deleted ...
33618         10q' conftest.err >conftest.er1
33619    cat conftest.er1 >&5
33620  fi
33621  rm -f conftest.er1 conftest.err
33622  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33623  test $ac_status = 0; }
33624done
33625
33626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33627$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33628if ${ac_cv_objc_compiler_gnu+:} false; then :
33629  $as_echo_n "(cached) " >&6
33630else
33631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33632/* end confdefs.h.  */
33633
33634int
33635main ()
33636{
33637#ifndef __GNUC__
33638       choke me
33639#endif
33640
33641  ;
33642  return 0;
33643}
33644_ACEOF
33645if ac_fn_objc_try_compile "$LINENO"; then :
33646  ac_compiler_gnu=yes
33647else
33648  ac_compiler_gnu=no
33649fi
33650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33651ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33652
33653fi
33654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33655$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33656if test $ac_compiler_gnu = yes; then
33657  GOBJC=yes
33658else
33659  GOBJC=
33660fi
33661ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33662ac_save_OBJCFLAGS=$OBJCFLAGS
33663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33664$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33665if ${ac_cv_prog_objc_g+:} false; then :
33666  $as_echo_n "(cached) " >&6
33667else
33668  ac_save_objc_werror_flag=$ac_objc_werror_flag
33669   ac_objc_werror_flag=yes
33670   ac_cv_prog_objc_g=no
33671   OBJCFLAGS="-g"
33672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33673/* end confdefs.h.  */
33674
33675int
33676main ()
33677{
33678
33679  ;
33680  return 0;
33681}
33682_ACEOF
33683if ac_fn_objc_try_compile "$LINENO"; then :
33684  ac_cv_prog_objc_g=yes
33685else
33686  OBJCFLAGS=""
33687      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33688/* end confdefs.h.  */
33689
33690int
33691main ()
33692{
33693
33694  ;
33695  return 0;
33696}
33697_ACEOF
33698if ac_fn_objc_try_compile "$LINENO"; then :
33699
33700else
33701  ac_objc_werror_flag=$ac_save_objc_werror_flag
33702	 OBJCFLAGS="-g"
33703	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33704/* end confdefs.h.  */
33705
33706int
33707main ()
33708{
33709
33710  ;
33711  return 0;
33712}
33713_ACEOF
33714if ac_fn_objc_try_compile "$LINENO"; then :
33715  ac_cv_prog_objc_g=yes
33716fi
33717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33718fi
33719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33720fi
33721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33722   ac_objc_werror_flag=$ac_save_objc_werror_flag
33723fi
33724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33725$as_echo "$ac_cv_prog_objc_g" >&6; }
33726if test "$ac_test_OBJCFLAGS" = set; then
33727  OBJCFLAGS=$ac_save_OBJCFLAGS
33728elif test $ac_cv_prog_objc_g = yes; then
33729  if test "$GOBJC" = yes; then
33730    OBJCFLAGS="-g -O2"
33731  else
33732    OBJCFLAGS="-g"
33733  fi
33734else
33735  if test "$GOBJC" = yes; then
33736    OBJCFLAGS="-O2"
33737  else
33738    OBJCFLAGS=
33739  fi
33740fi
33741ac_ext=cpp
33742ac_cpp='$CXXCPP $CPPFLAGS'
33743ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33744ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33745ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33746
33747
33748  # Only process if variable expands to non-empty
33749
33750  if test "x$OBJC" != x; then
33751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33752
33753  # First separate the path from the arguments. This will split at the first
33754  # space.
33755  complete="$OBJC"
33756  path="${complete%% *}"
33757  tmp="$complete EOL"
33758  arguments="${tmp#* }"
33759
33760  # Input might be given as Windows format, start by converting to
33761  # unix format.
33762  new_path=`$CYGPATH -u "$path"`
33763
33764  # Now try to locate executable using which
33765  new_path=`$WHICH "$new_path" 2> /dev/null`
33766  # bat and cmd files are not always considered executable in cygwin causing which
33767  # to not find them
33768  if test "x$new_path" = x \
33769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33771    new_path=`$CYGPATH -u "$path"`
33772  fi
33773  if test "x$new_path" = x; then
33774    # Oops. Which didn't find the executable.
33775    # The splitting of arguments from the executable at a space might have been incorrect,
33776    # since paths with space are more likely in Windows. Give it another try with the whole
33777    # argument.
33778    path="$complete"
33779    arguments="EOL"
33780    new_path=`$CYGPATH -u "$path"`
33781    new_path=`$WHICH "$new_path" 2> /dev/null`
33782    # bat and cmd files are not always considered executable in cygwin causing which
33783    # to not find them
33784    if test "x$new_path" = x \
33785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33787      new_path=`$CYGPATH -u "$path"`
33788    fi
33789    if test "x$new_path" = x; then
33790      # It's still not found. Now this is an unrecoverable error.
33791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33792$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33793      has_space=`$ECHO "$complete" | $GREP " "`
33794      if test "x$has_space" != x; then
33795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33797      fi
33798      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33799    fi
33800  fi
33801
33802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33805  # "foo.exe" is OK but "foo" is an error.
33806  #
33807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33808  # It is also a way to make sure we got the proper file name for the real test later on.
33809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33810  if test "x$test_shortpath" = x; then
33811    # Short path failed, file does not exist as specified.
33812    # Try adding .exe or .cmd
33813    if test -f "${new_path}.exe"; then
33814      input_to_shortpath="${new_path}.exe"
33815    elif test -f "${new_path}.cmd"; then
33816      input_to_shortpath="${new_path}.cmd"
33817    else
33818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33819$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33822      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33823    fi
33824  else
33825    input_to_shortpath="$new_path"
33826  fi
33827
33828  # Call helper function which possibly converts this using DOS-style short mode.
33829  # If so, the updated path is stored in $new_path.
33830  new_path="$input_to_shortpath"
33831
33832  input_path="$input_to_shortpath"
33833  # Check if we need to convert this using DOS-style short mode. If the path
33834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33835  # take no chances and rewrite it.
33836  # Note: m4 eats our [], so we need to use [ and ] instead.
33837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33838  if test "x$has_forbidden_chars" != x; then
33839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33843      # Going to short mode and back again did indeed matter. Since short mode is
33844      # case insensitive, let's make it lowercase to improve readability.
33845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33846      # Now convert it back to Unix-stile (cygpath)
33847      input_path=`$CYGPATH -u "$shortmode_path"`
33848      new_path="$input_path"
33849    fi
33850  fi
33851
33852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33853  if test "x$test_cygdrive_prefix" = x; then
33854    # As a simple fix, exclude /usr/bin since it's not a real path.
33855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33857      # a path prefixed by /cygdrive for fixpath to work.
33858      new_path="$CYGWIN_ROOT_PATH$input_path"
33859    fi
33860  fi
33861
33862  # remove trailing .exe if any
33863  new_path="${new_path/%.exe/}"
33864
33865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33866
33867  # First separate the path from the arguments. This will split at the first
33868  # space.
33869  complete="$OBJC"
33870  path="${complete%% *}"
33871  tmp="$complete EOL"
33872  arguments="${tmp#* }"
33873
33874  # Input might be given as Windows format, start by converting to
33875  # unix format.
33876  new_path="$path"
33877
33878  windows_path="$new_path"
33879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33880    unix_path=`$CYGPATH -u "$windows_path"`
33881    new_path="$unix_path"
33882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33884    new_path="$unix_path"
33885  fi
33886
33887
33888  # Now try to locate executable using which
33889  new_path=`$WHICH "$new_path" 2> /dev/null`
33890
33891  if test "x$new_path" = x; then
33892    # Oops. Which didn't find the executable.
33893    # The splitting of arguments from the executable at a space might have been incorrect,
33894    # since paths with space are more likely in Windows. Give it another try with the whole
33895    # argument.
33896    path="$complete"
33897    arguments="EOL"
33898    new_path="$path"
33899
33900  windows_path="$new_path"
33901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33902    unix_path=`$CYGPATH -u "$windows_path"`
33903    new_path="$unix_path"
33904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33906    new_path="$unix_path"
33907  fi
33908
33909
33910    new_path=`$WHICH "$new_path" 2> /dev/null`
33911    # bat and cmd files are not always considered executable in MSYS causing which
33912    # to not find them
33913    if test "x$new_path" = x \
33914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33916      new_path="$path"
33917
33918  windows_path="$new_path"
33919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33920    unix_path=`$CYGPATH -u "$windows_path"`
33921    new_path="$unix_path"
33922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33924    new_path="$unix_path"
33925  fi
33926
33927    fi
33928
33929    if test "x$new_path" = x; then
33930      # It's still not found. Now this is an unrecoverable error.
33931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33932$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33933      has_space=`$ECHO "$complete" | $GREP " "`
33934      if test "x$has_space" != x; then
33935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33937      fi
33938      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33939    fi
33940  fi
33941
33942  # Now new_path has a complete unix path to the binary
33943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33944    # Keep paths in /bin as-is, but remove trailing .exe if any
33945    new_path="${new_path/%.exe/}"
33946    # Do not save /bin paths to all_fixpath_prefixes!
33947  else
33948    # Not in mixed or Windows style, start by that.
33949    new_path=`cmd //c echo $new_path`
33950
33951  input_path="$new_path"
33952  # Check if we need to convert this using DOS-style short mode. If the path
33953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33954  # take no chances and rewrite it.
33955  # Note: m4 eats our [], so we need to use [ and ] instead.
33956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33957  if test "x$has_forbidden_chars" != x; then
33958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33960  fi
33961
33962    # Output is in $new_path
33963
33964  windows_path="$new_path"
33965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33966    unix_path=`$CYGPATH -u "$windows_path"`
33967    new_path="$unix_path"
33968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33970    new_path="$unix_path"
33971  fi
33972
33973    # remove trailing .exe if any
33974    new_path="${new_path/%.exe/}"
33975
33976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33978  fi
33979
33980    else
33981      # We're on a unix platform. Hooray! :)
33982      # First separate the path from the arguments. This will split at the first
33983      # space.
33984      complete="$OBJC"
33985      path="${complete%% *}"
33986      tmp="$complete EOL"
33987      arguments="${tmp#* }"
33988
33989      # Cannot rely on the command "which" here since it doesn't always work.
33990      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33991      if test -z "$is_absolute_path"; then
33992        # Path to executable is not absolute. Find it.
33993        IFS_save="$IFS"
33994        IFS=:
33995        for p in $PATH; do
33996          if test -f "$p/$path" && test -x "$p/$path"; then
33997            new_path="$p/$path"
33998            break
33999          fi
34000        done
34001        IFS="$IFS_save"
34002      else
34003        # This is an absolute path, we can use it without further modifications.
34004        new_path="$path"
34005      fi
34006
34007      if test "x$new_path" = x; then
34008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
34009$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
34010        has_space=`$ECHO "$complete" | $GREP " "`
34011        if test "x$has_space" != x; then
34012          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34014        fi
34015        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
34016      fi
34017    fi
34018
34019    # Now join together the path and the arguments once again
34020    if test "x$arguments" != xEOL; then
34021      new_complete="$new_path ${arguments% *}"
34022    else
34023      new_complete="$new_path"
34024    fi
34025
34026    if test "x$complete" != "x$new_complete"; then
34027      OBJC="$new_complete"
34028      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
34029$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
34030    fi
34031  fi
34032
34033
34034
34035  # Publish this variable in the help.
34036
34037
34038  if test "x$LIPO" = x; then
34039    # The variable is not set by user, try to locate tool using the code snippet
34040    for ac_prog in lipo
34041do
34042  # Extract the first word of "$ac_prog", so it can be a program name with args.
34043set dummy $ac_prog; ac_word=$2
34044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34045$as_echo_n "checking for $ac_word... " >&6; }
34046if ${ac_cv_path_LIPO+:} false; then :
34047  $as_echo_n "(cached) " >&6
34048else
34049  case $LIPO in
34050  [\\/]* | ?:[\\/]*)
34051  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34052  ;;
34053  *)
34054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34055for as_dir in $PATH
34056do
34057  IFS=$as_save_IFS
34058  test -z "$as_dir" && as_dir=.
34059    for ac_exec_ext in '' $ac_executable_extensions; do
34060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34061    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34063    break 2
34064  fi
34065done
34066  done
34067IFS=$as_save_IFS
34068
34069  ;;
34070esac
34071fi
34072LIPO=$ac_cv_path_LIPO
34073if test -n "$LIPO"; then
34074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34075$as_echo "$LIPO" >&6; }
34076else
34077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34078$as_echo "no" >&6; }
34079fi
34080
34081
34082  test -n "$LIPO" && break
34083done
34084
34085  else
34086    # The variable is set, but is it from the command line or the environment?
34087
34088    # Try to remove the string !LIPO! from our list.
34089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34091      # If it failed, the variable was not from the command line. Ignore it,
34092      # but warn the user (except for BASH, which is always set by the calling BASH).
34093      if test "xLIPO" != xBASH; then
34094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34095$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34096      fi
34097      # Try to locate tool using the code snippet
34098      for ac_prog in lipo
34099do
34100  # Extract the first word of "$ac_prog", so it can be a program name with args.
34101set dummy $ac_prog; ac_word=$2
34102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34103$as_echo_n "checking for $ac_word... " >&6; }
34104if ${ac_cv_path_LIPO+:} false; then :
34105  $as_echo_n "(cached) " >&6
34106else
34107  case $LIPO in
34108  [\\/]* | ?:[\\/]*)
34109  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34110  ;;
34111  *)
34112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34113for as_dir in $PATH
34114do
34115  IFS=$as_save_IFS
34116  test -z "$as_dir" && as_dir=.
34117    for ac_exec_ext in '' $ac_executable_extensions; do
34118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34119    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34121    break 2
34122  fi
34123done
34124  done
34125IFS=$as_save_IFS
34126
34127  ;;
34128esac
34129fi
34130LIPO=$ac_cv_path_LIPO
34131if test -n "$LIPO"; then
34132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34133$as_echo "$LIPO" >&6; }
34134else
34135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34136$as_echo "no" >&6; }
34137fi
34138
34139
34140  test -n "$LIPO" && break
34141done
34142
34143    else
34144      # If it succeeded, then it was overridden by the user. We will use it
34145      # for the tool.
34146
34147      # First remove it from the list of overridden variables, so we can test
34148      # for unknown variables in the end.
34149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34150
34151      # Check if the provided tool contains a complete path.
34152      tool_specified="$LIPO"
34153      tool_basename="${tool_specified##*/}"
34154      if test "x$tool_basename" = "x$tool_specified"; then
34155        # A command without a complete path is provided, search $PATH.
34156        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34157$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34158        # Extract the first word of "$tool_basename", so it can be a program name with args.
34159set dummy $tool_basename; ac_word=$2
34160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34161$as_echo_n "checking for $ac_word... " >&6; }
34162if ${ac_cv_path_LIPO+:} false; then :
34163  $as_echo_n "(cached) " >&6
34164else
34165  case $LIPO in
34166  [\\/]* | ?:[\\/]*)
34167  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34168  ;;
34169  *)
34170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34171for as_dir in $PATH
34172do
34173  IFS=$as_save_IFS
34174  test -z "$as_dir" && as_dir=.
34175    for ac_exec_ext in '' $ac_executable_extensions; do
34176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34177    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34179    break 2
34180  fi
34181done
34182  done
34183IFS=$as_save_IFS
34184
34185  ;;
34186esac
34187fi
34188LIPO=$ac_cv_path_LIPO
34189if test -n "$LIPO"; then
34190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34191$as_echo "$LIPO" >&6; }
34192else
34193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34194$as_echo "no" >&6; }
34195fi
34196
34197
34198        if test "x$LIPO" = x; then
34199          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34200        fi
34201      else
34202        # Otherwise we believe it is a complete path. Use it as it is.
34203        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34204$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34205        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34206$as_echo_n "checking for LIPO... " >&6; }
34207        if test ! -x "$tool_specified"; then
34208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34209$as_echo "not found" >&6; }
34210          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34211        fi
34212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34213$as_echo "$tool_specified" >&6; }
34214      fi
34215    fi
34216  fi
34217
34218
34219
34220  # Only process if variable expands to non-empty
34221
34222  if test "x$LIPO" != x; then
34223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34224
34225  # First separate the path from the arguments. This will split at the first
34226  # space.
34227  complete="$LIPO"
34228  path="${complete%% *}"
34229  tmp="$complete EOL"
34230  arguments="${tmp#* }"
34231
34232  # Input might be given as Windows format, start by converting to
34233  # unix format.
34234  new_path=`$CYGPATH -u "$path"`
34235
34236  # Now try to locate executable using which
34237  new_path=`$WHICH "$new_path" 2> /dev/null`
34238  # bat and cmd files are not always considered executable in cygwin causing which
34239  # to not find them
34240  if test "x$new_path" = x \
34241      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34242      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34243    new_path=`$CYGPATH -u "$path"`
34244  fi
34245  if test "x$new_path" = x; then
34246    # Oops. Which didn't find the executable.
34247    # The splitting of arguments from the executable at a space might have been incorrect,
34248    # since paths with space are more likely in Windows. Give it another try with the whole
34249    # argument.
34250    path="$complete"
34251    arguments="EOL"
34252    new_path=`$CYGPATH -u "$path"`
34253    new_path=`$WHICH "$new_path" 2> /dev/null`
34254    # bat and cmd files are not always considered executable in cygwin causing which
34255    # to not find them
34256    if test "x$new_path" = x \
34257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34259      new_path=`$CYGPATH -u "$path"`
34260    fi
34261    if test "x$new_path" = x; then
34262      # It's still not found. Now this is an unrecoverable error.
34263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34264$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34265      has_space=`$ECHO "$complete" | $GREP " "`
34266      if test "x$has_space" != x; then
34267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34269      fi
34270      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34271    fi
34272  fi
34273
34274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34277  # "foo.exe" is OK but "foo" is an error.
34278  #
34279  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34280  # It is also a way to make sure we got the proper file name for the real test later on.
34281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34282  if test "x$test_shortpath" = x; then
34283    # Short path failed, file does not exist as specified.
34284    # Try adding .exe or .cmd
34285    if test -f "${new_path}.exe"; then
34286      input_to_shortpath="${new_path}.exe"
34287    elif test -f "${new_path}.cmd"; then
34288      input_to_shortpath="${new_path}.cmd"
34289    else
34290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34291$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34294      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34295    fi
34296  else
34297    input_to_shortpath="$new_path"
34298  fi
34299
34300  # Call helper function which possibly converts this using DOS-style short mode.
34301  # If so, the updated path is stored in $new_path.
34302  new_path="$input_to_shortpath"
34303
34304  input_path="$input_to_shortpath"
34305  # Check if we need to convert this using DOS-style short mode. If the path
34306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34307  # take no chances and rewrite it.
34308  # Note: m4 eats our [], so we need to use [ and ] instead.
34309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34310  if test "x$has_forbidden_chars" != x; then
34311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34315      # Going to short mode and back again did indeed matter. Since short mode is
34316      # case insensitive, let's make it lowercase to improve readability.
34317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34318      # Now convert it back to Unix-stile (cygpath)
34319      input_path=`$CYGPATH -u "$shortmode_path"`
34320      new_path="$input_path"
34321    fi
34322  fi
34323
34324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34325  if test "x$test_cygdrive_prefix" = x; then
34326    # As a simple fix, exclude /usr/bin since it's not a real path.
34327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34329      # a path prefixed by /cygdrive for fixpath to work.
34330      new_path="$CYGWIN_ROOT_PATH$input_path"
34331    fi
34332  fi
34333
34334  # remove trailing .exe if any
34335  new_path="${new_path/%.exe/}"
34336
34337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34338
34339  # First separate the path from the arguments. This will split at the first
34340  # space.
34341  complete="$LIPO"
34342  path="${complete%% *}"
34343  tmp="$complete EOL"
34344  arguments="${tmp#* }"
34345
34346  # Input might be given as Windows format, start by converting to
34347  # unix format.
34348  new_path="$path"
34349
34350  windows_path="$new_path"
34351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34352    unix_path=`$CYGPATH -u "$windows_path"`
34353    new_path="$unix_path"
34354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34356    new_path="$unix_path"
34357  fi
34358
34359
34360  # Now try to locate executable using which
34361  new_path=`$WHICH "$new_path" 2> /dev/null`
34362
34363  if test "x$new_path" = x; then
34364    # Oops. Which didn't find the executable.
34365    # The splitting of arguments from the executable at a space might have been incorrect,
34366    # since paths with space are more likely in Windows. Give it another try with the whole
34367    # argument.
34368    path="$complete"
34369    arguments="EOL"
34370    new_path="$path"
34371
34372  windows_path="$new_path"
34373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34374    unix_path=`$CYGPATH -u "$windows_path"`
34375    new_path="$unix_path"
34376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34378    new_path="$unix_path"
34379  fi
34380
34381
34382    new_path=`$WHICH "$new_path" 2> /dev/null`
34383    # bat and cmd files are not always considered executable in MSYS causing which
34384    # to not find them
34385    if test "x$new_path" = x \
34386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34388      new_path="$path"
34389
34390  windows_path="$new_path"
34391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34392    unix_path=`$CYGPATH -u "$windows_path"`
34393    new_path="$unix_path"
34394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34396    new_path="$unix_path"
34397  fi
34398
34399    fi
34400
34401    if test "x$new_path" = x; then
34402      # It's still not found. Now this is an unrecoverable error.
34403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34404$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34405      has_space=`$ECHO "$complete" | $GREP " "`
34406      if test "x$has_space" != x; then
34407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34409      fi
34410      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34411    fi
34412  fi
34413
34414  # Now new_path has a complete unix path to the binary
34415  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34416    # Keep paths in /bin as-is, but remove trailing .exe if any
34417    new_path="${new_path/%.exe/}"
34418    # Do not save /bin paths to all_fixpath_prefixes!
34419  else
34420    # Not in mixed or Windows style, start by that.
34421    new_path=`cmd //c echo $new_path`
34422
34423  input_path="$new_path"
34424  # Check if we need to convert this using DOS-style short mode. If the path
34425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34426  # take no chances and rewrite it.
34427  # Note: m4 eats our [], so we need to use [ and ] instead.
34428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34429  if test "x$has_forbidden_chars" != x; then
34430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34432  fi
34433
34434    # Output is in $new_path
34435
34436  windows_path="$new_path"
34437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34438    unix_path=`$CYGPATH -u "$windows_path"`
34439    new_path="$unix_path"
34440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34442    new_path="$unix_path"
34443  fi
34444
34445    # remove trailing .exe if any
34446    new_path="${new_path/%.exe/}"
34447
34448    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34449    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34450  fi
34451
34452    else
34453      # We're on a unix platform. Hooray! :)
34454      # First separate the path from the arguments. This will split at the first
34455      # space.
34456      complete="$LIPO"
34457      path="${complete%% *}"
34458      tmp="$complete EOL"
34459      arguments="${tmp#* }"
34460
34461      # Cannot rely on the command "which" here since it doesn't always work.
34462      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34463      if test -z "$is_absolute_path"; then
34464        # Path to executable is not absolute. Find it.
34465        IFS_save="$IFS"
34466        IFS=:
34467        for p in $PATH; do
34468          if test -f "$p/$path" && test -x "$p/$path"; then
34469            new_path="$p/$path"
34470            break
34471          fi
34472        done
34473        IFS="$IFS_save"
34474      else
34475        # This is an absolute path, we can use it without further modifications.
34476        new_path="$path"
34477      fi
34478
34479      if test "x$new_path" = x; then
34480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34481$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34482        has_space=`$ECHO "$complete" | $GREP " "`
34483        if test "x$has_space" != x; then
34484          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34486        fi
34487        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34488      fi
34489    fi
34490
34491    # Now join together the path and the arguments once again
34492    if test "x$arguments" != xEOL; then
34493      new_complete="$new_path ${arguments% *}"
34494    else
34495      new_complete="$new_path"
34496    fi
34497
34498    if test "x$complete" != "x$new_complete"; then
34499      LIPO="$new_complete"
34500      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34501$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34502    fi
34503  fi
34504
34505  else
34506    OBJC=
34507  fi
34508
34509  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34510    # Extract the first word of "mt", so it can be a program name with args.
34511set dummy mt; ac_word=$2
34512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34513$as_echo_n "checking for $ac_word... " >&6; }
34514if ${ac_cv_prog_MT+:} false; then :
34515  $as_echo_n "(cached) " >&6
34516else
34517  if test -n "$MT"; then
34518  ac_cv_prog_MT="$MT" # Let the user override the test.
34519else
34520  ac_prog_rejected=no
34521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34522for as_dir in $PATH
34523do
34524  IFS=$as_save_IFS
34525  test -z "$as_dir" && as_dir=.
34526    for ac_exec_ext in '' $ac_executable_extensions; do
34527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34528    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34529       ac_prog_rejected=yes
34530       continue
34531     fi
34532    ac_cv_prog_MT="mt"
34533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34534    break 2
34535  fi
34536done
34537  done
34538IFS=$as_save_IFS
34539
34540if test $ac_prog_rejected = yes; then
34541  # We found a bogon in the path, so make sure we never use it.
34542  set dummy $ac_cv_prog_MT
34543  shift
34544  if test $# != 0; then
34545    # We chose a different compiler from the bogus one.
34546    # However, it has the same basename, so the bogon will be chosen
34547    # first if we set MT to just the basename; use the full file name.
34548    shift
34549    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34550  fi
34551fi
34552fi
34553fi
34554MT=$ac_cv_prog_MT
34555if test -n "$MT"; then
34556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34557$as_echo "$MT" >&6; }
34558else
34559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34560$as_echo "no" >&6; }
34561fi
34562
34563
34564
34565  # Only process if variable expands to non-empty
34566
34567  if test "x$MT" != x; then
34568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34569
34570  # First separate the path from the arguments. This will split at the first
34571  # space.
34572  complete="$MT"
34573  path="${complete%% *}"
34574  tmp="$complete EOL"
34575  arguments="${tmp#* }"
34576
34577  # Input might be given as Windows format, start by converting to
34578  # unix format.
34579  new_path=`$CYGPATH -u "$path"`
34580
34581  # Now try to locate executable using which
34582  new_path=`$WHICH "$new_path" 2> /dev/null`
34583  # bat and cmd files are not always considered executable in cygwin causing which
34584  # to not find them
34585  if test "x$new_path" = x \
34586      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34587      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34588    new_path=`$CYGPATH -u "$path"`
34589  fi
34590  if test "x$new_path" = x; then
34591    # Oops. Which didn't find the executable.
34592    # The splitting of arguments from the executable at a space might have been incorrect,
34593    # since paths with space are more likely in Windows. Give it another try with the whole
34594    # argument.
34595    path="$complete"
34596    arguments="EOL"
34597    new_path=`$CYGPATH -u "$path"`
34598    new_path=`$WHICH "$new_path" 2> /dev/null`
34599    # bat and cmd files are not always considered executable in cygwin causing which
34600    # to not find them
34601    if test "x$new_path" = x \
34602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34604      new_path=`$CYGPATH -u "$path"`
34605    fi
34606    if test "x$new_path" = x; then
34607      # It's still not found. Now this is an unrecoverable error.
34608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34609$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34610      has_space=`$ECHO "$complete" | $GREP " "`
34611      if test "x$has_space" != x; then
34612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34614      fi
34615      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34616    fi
34617  fi
34618
34619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34622  # "foo.exe" is OK but "foo" is an error.
34623  #
34624  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34625  # It is also a way to make sure we got the proper file name for the real test later on.
34626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34627  if test "x$test_shortpath" = x; then
34628    # Short path failed, file does not exist as specified.
34629    # Try adding .exe or .cmd
34630    if test -f "${new_path}.exe"; then
34631      input_to_shortpath="${new_path}.exe"
34632    elif test -f "${new_path}.cmd"; then
34633      input_to_shortpath="${new_path}.cmd"
34634    else
34635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34636$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34637      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34638$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34639      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34640    fi
34641  else
34642    input_to_shortpath="$new_path"
34643  fi
34644
34645  # Call helper function which possibly converts this using DOS-style short mode.
34646  # If so, the updated path is stored in $new_path.
34647  new_path="$input_to_shortpath"
34648
34649  input_path="$input_to_shortpath"
34650  # Check if we need to convert this using DOS-style short mode. If the path
34651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34652  # take no chances and rewrite it.
34653  # Note: m4 eats our [], so we need to use [ and ] instead.
34654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34655  if test "x$has_forbidden_chars" != x; then
34656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34660      # Going to short mode and back again did indeed matter. Since short mode is
34661      # case insensitive, let's make it lowercase to improve readability.
34662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34663      # Now convert it back to Unix-stile (cygpath)
34664      input_path=`$CYGPATH -u "$shortmode_path"`
34665      new_path="$input_path"
34666    fi
34667  fi
34668
34669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34670  if test "x$test_cygdrive_prefix" = x; then
34671    # As a simple fix, exclude /usr/bin since it's not a real path.
34672    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34674      # a path prefixed by /cygdrive for fixpath to work.
34675      new_path="$CYGWIN_ROOT_PATH$input_path"
34676    fi
34677  fi
34678
34679  # remove trailing .exe if any
34680  new_path="${new_path/%.exe/}"
34681
34682    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34683
34684  # First separate the path from the arguments. This will split at the first
34685  # space.
34686  complete="$MT"
34687  path="${complete%% *}"
34688  tmp="$complete EOL"
34689  arguments="${tmp#* }"
34690
34691  # Input might be given as Windows format, start by converting to
34692  # unix format.
34693  new_path="$path"
34694
34695  windows_path="$new_path"
34696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34697    unix_path=`$CYGPATH -u "$windows_path"`
34698    new_path="$unix_path"
34699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34701    new_path="$unix_path"
34702  fi
34703
34704
34705  # Now try to locate executable using which
34706  new_path=`$WHICH "$new_path" 2> /dev/null`
34707
34708  if test "x$new_path" = x; then
34709    # Oops. Which didn't find the executable.
34710    # The splitting of arguments from the executable at a space might have been incorrect,
34711    # since paths with space are more likely in Windows. Give it another try with the whole
34712    # argument.
34713    path="$complete"
34714    arguments="EOL"
34715    new_path="$path"
34716
34717  windows_path="$new_path"
34718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34719    unix_path=`$CYGPATH -u "$windows_path"`
34720    new_path="$unix_path"
34721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34723    new_path="$unix_path"
34724  fi
34725
34726
34727    new_path=`$WHICH "$new_path" 2> /dev/null`
34728    # bat and cmd files are not always considered executable in MSYS causing which
34729    # to not find them
34730    if test "x$new_path" = x \
34731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34733      new_path="$path"
34734
34735  windows_path="$new_path"
34736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34737    unix_path=`$CYGPATH -u "$windows_path"`
34738    new_path="$unix_path"
34739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34741    new_path="$unix_path"
34742  fi
34743
34744    fi
34745
34746    if test "x$new_path" = x; then
34747      # It's still not found. Now this is an unrecoverable error.
34748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34749$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34750      has_space=`$ECHO "$complete" | $GREP " "`
34751      if test "x$has_space" != x; then
34752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34754      fi
34755      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34756    fi
34757  fi
34758
34759  # Now new_path has a complete unix path to the binary
34760  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34761    # Keep paths in /bin as-is, but remove trailing .exe if any
34762    new_path="${new_path/%.exe/}"
34763    # Do not save /bin paths to all_fixpath_prefixes!
34764  else
34765    # Not in mixed or Windows style, start by that.
34766    new_path=`cmd //c echo $new_path`
34767
34768  input_path="$new_path"
34769  # Check if we need to convert this using DOS-style short mode. If the path
34770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34771  # take no chances and rewrite it.
34772  # Note: m4 eats our [], so we need to use [ and ] instead.
34773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34774  if test "x$has_forbidden_chars" != x; then
34775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34777  fi
34778
34779    # Output is in $new_path
34780
34781  windows_path="$new_path"
34782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34783    unix_path=`$CYGPATH -u "$windows_path"`
34784    new_path="$unix_path"
34785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34787    new_path="$unix_path"
34788  fi
34789
34790    # remove trailing .exe if any
34791    new_path="${new_path/%.exe/}"
34792
34793    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34794    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34795  fi
34796
34797    else
34798      # We're on a unix platform. Hooray! :)
34799      # First separate the path from the arguments. This will split at the first
34800      # space.
34801      complete="$MT"
34802      path="${complete%% *}"
34803      tmp="$complete EOL"
34804      arguments="${tmp#* }"
34805
34806      # Cannot rely on the command "which" here since it doesn't always work.
34807      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34808      if test -z "$is_absolute_path"; then
34809        # Path to executable is not absolute. Find it.
34810        IFS_save="$IFS"
34811        IFS=:
34812        for p in $PATH; do
34813          if test -f "$p/$path" && test -x "$p/$path"; then
34814            new_path="$p/$path"
34815            break
34816          fi
34817        done
34818        IFS="$IFS_save"
34819      else
34820        # This is an absolute path, we can use it without further modifications.
34821        new_path="$path"
34822      fi
34823
34824      if test "x$new_path" = x; then
34825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34826$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34827        has_space=`$ECHO "$complete" | $GREP " "`
34828        if test "x$has_space" != x; then
34829          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34830$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34831        fi
34832        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34833      fi
34834    fi
34835
34836    # Now join together the path and the arguments once again
34837    if test "x$arguments" != xEOL; then
34838      new_complete="$new_path ${arguments% *}"
34839    else
34840      new_complete="$new_path"
34841    fi
34842
34843    if test "x$complete" != "x$new_complete"; then
34844      MT="$new_complete"
34845      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34846$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34847    fi
34848  fi
34849
34850    # Setup the resource compiler (RC)
34851    # Extract the first word of "rc", so it can be a program name with args.
34852set dummy rc; ac_word=$2
34853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34854$as_echo_n "checking for $ac_word... " >&6; }
34855if ${ac_cv_prog_RC+:} false; then :
34856  $as_echo_n "(cached) " >&6
34857else
34858  if test -n "$RC"; then
34859  ac_cv_prog_RC="$RC" # Let the user override the test.
34860else
34861  ac_prog_rejected=no
34862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34863for as_dir in $PATH
34864do
34865  IFS=$as_save_IFS
34866  test -z "$as_dir" && as_dir=.
34867    for ac_exec_ext in '' $ac_executable_extensions; do
34868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34869    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34870       ac_prog_rejected=yes
34871       continue
34872     fi
34873    ac_cv_prog_RC="rc"
34874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34875    break 2
34876  fi
34877done
34878  done
34879IFS=$as_save_IFS
34880
34881if test $ac_prog_rejected = yes; then
34882  # We found a bogon in the path, so make sure we never use it.
34883  set dummy $ac_cv_prog_RC
34884  shift
34885  if test $# != 0; then
34886    # We chose a different compiler from the bogus one.
34887    # However, it has the same basename, so the bogon will be chosen
34888    # first if we set RC to just the basename; use the full file name.
34889    shift
34890    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34891  fi
34892fi
34893fi
34894fi
34895RC=$ac_cv_prog_RC
34896if test -n "$RC"; then
34897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34898$as_echo "$RC" >&6; }
34899else
34900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34901$as_echo "no" >&6; }
34902fi
34903
34904
34905
34906  # Only process if variable expands to non-empty
34907
34908  if test "x$RC" != x; then
34909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34910
34911  # First separate the path from the arguments. This will split at the first
34912  # space.
34913  complete="$RC"
34914  path="${complete%% *}"
34915  tmp="$complete EOL"
34916  arguments="${tmp#* }"
34917
34918  # Input might be given as Windows format, start by converting to
34919  # unix format.
34920  new_path=`$CYGPATH -u "$path"`
34921
34922  # Now try to locate executable using which
34923  new_path=`$WHICH "$new_path" 2> /dev/null`
34924  # bat and cmd files are not always considered executable in cygwin causing which
34925  # to not find them
34926  if test "x$new_path" = x \
34927      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34928      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34929    new_path=`$CYGPATH -u "$path"`
34930  fi
34931  if test "x$new_path" = x; then
34932    # Oops. Which didn't find the executable.
34933    # The splitting of arguments from the executable at a space might have been incorrect,
34934    # since paths with space are more likely in Windows. Give it another try with the whole
34935    # argument.
34936    path="$complete"
34937    arguments="EOL"
34938    new_path=`$CYGPATH -u "$path"`
34939    new_path=`$WHICH "$new_path" 2> /dev/null`
34940    # bat and cmd files are not always considered executable in cygwin causing which
34941    # to not find them
34942    if test "x$new_path" = x \
34943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34945      new_path=`$CYGPATH -u "$path"`
34946    fi
34947    if test "x$new_path" = x; then
34948      # It's still not found. Now this is an unrecoverable error.
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34950$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34951      has_space=`$ECHO "$complete" | $GREP " "`
34952      if test "x$has_space" != x; then
34953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34955      fi
34956      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34957    fi
34958  fi
34959
34960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34963  # "foo.exe" is OK but "foo" is an error.
34964  #
34965  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34966  # It is also a way to make sure we got the proper file name for the real test later on.
34967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34968  if test "x$test_shortpath" = x; then
34969    # Short path failed, file does not exist as specified.
34970    # Try adding .exe or .cmd
34971    if test -f "${new_path}.exe"; then
34972      input_to_shortpath="${new_path}.exe"
34973    elif test -f "${new_path}.cmd"; then
34974      input_to_shortpath="${new_path}.cmd"
34975    else
34976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34977$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34978      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34979$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34980      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34981    fi
34982  else
34983    input_to_shortpath="$new_path"
34984  fi
34985
34986  # Call helper function which possibly converts this using DOS-style short mode.
34987  # If so, the updated path is stored in $new_path.
34988  new_path="$input_to_shortpath"
34989
34990  input_path="$input_to_shortpath"
34991  # Check if we need to convert this using DOS-style short mode. If the path
34992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34993  # take no chances and rewrite it.
34994  # Note: m4 eats our [], so we need to use [ and ] instead.
34995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34996  if test "x$has_forbidden_chars" != x; then
34997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35001      # Going to short mode and back again did indeed matter. Since short mode is
35002      # case insensitive, let's make it lowercase to improve readability.
35003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35004      # Now convert it back to Unix-stile (cygpath)
35005      input_path=`$CYGPATH -u "$shortmode_path"`
35006      new_path="$input_path"
35007    fi
35008  fi
35009
35010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35011  if test "x$test_cygdrive_prefix" = x; then
35012    # As a simple fix, exclude /usr/bin since it's not a real path.
35013    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35015      # a path prefixed by /cygdrive for fixpath to work.
35016      new_path="$CYGWIN_ROOT_PATH$input_path"
35017    fi
35018  fi
35019
35020  # remove trailing .exe if any
35021  new_path="${new_path/%.exe/}"
35022
35023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35024
35025  # First separate the path from the arguments. This will split at the first
35026  # space.
35027  complete="$RC"
35028  path="${complete%% *}"
35029  tmp="$complete EOL"
35030  arguments="${tmp#* }"
35031
35032  # Input might be given as Windows format, start by converting to
35033  # unix format.
35034  new_path="$path"
35035
35036  windows_path="$new_path"
35037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35038    unix_path=`$CYGPATH -u "$windows_path"`
35039    new_path="$unix_path"
35040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35042    new_path="$unix_path"
35043  fi
35044
35045
35046  # Now try to locate executable using which
35047  new_path=`$WHICH "$new_path" 2> /dev/null`
35048
35049  if test "x$new_path" = x; then
35050    # Oops. Which didn't find the executable.
35051    # The splitting of arguments from the executable at a space might have been incorrect,
35052    # since paths with space are more likely in Windows. Give it another try with the whole
35053    # argument.
35054    path="$complete"
35055    arguments="EOL"
35056    new_path="$path"
35057
35058  windows_path="$new_path"
35059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35060    unix_path=`$CYGPATH -u "$windows_path"`
35061    new_path="$unix_path"
35062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35064    new_path="$unix_path"
35065  fi
35066
35067
35068    new_path=`$WHICH "$new_path" 2> /dev/null`
35069    # bat and cmd files are not always considered executable in MSYS causing which
35070    # to not find them
35071    if test "x$new_path" = x \
35072        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35073        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35074      new_path="$path"
35075
35076  windows_path="$new_path"
35077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35078    unix_path=`$CYGPATH -u "$windows_path"`
35079    new_path="$unix_path"
35080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35082    new_path="$unix_path"
35083  fi
35084
35085    fi
35086
35087    if test "x$new_path" = x; then
35088      # It's still not found. Now this is an unrecoverable error.
35089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35090$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35091      has_space=`$ECHO "$complete" | $GREP " "`
35092      if test "x$has_space" != x; then
35093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35095      fi
35096      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35097    fi
35098  fi
35099
35100  # Now new_path has a complete unix path to the binary
35101  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35102    # Keep paths in /bin as-is, but remove trailing .exe if any
35103    new_path="${new_path/%.exe/}"
35104    # Do not save /bin paths to all_fixpath_prefixes!
35105  else
35106    # Not in mixed or Windows style, start by that.
35107    new_path=`cmd //c echo $new_path`
35108
35109  input_path="$new_path"
35110  # Check if we need to convert this using DOS-style short mode. If the path
35111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35112  # take no chances and rewrite it.
35113  # Note: m4 eats our [], so we need to use [ and ] instead.
35114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35115  if test "x$has_forbidden_chars" != x; then
35116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35118  fi
35119
35120    # Output is in $new_path
35121
35122  windows_path="$new_path"
35123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35124    unix_path=`$CYGPATH -u "$windows_path"`
35125    new_path="$unix_path"
35126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35128    new_path="$unix_path"
35129  fi
35130
35131    # remove trailing .exe if any
35132    new_path="${new_path/%.exe/}"
35133
35134    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35135    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35136  fi
35137
35138    else
35139      # We're on a unix platform. Hooray! :)
35140      # First separate the path from the arguments. This will split at the first
35141      # space.
35142      complete="$RC"
35143      path="${complete%% *}"
35144      tmp="$complete EOL"
35145      arguments="${tmp#* }"
35146
35147      # Cannot rely on the command "which" here since it doesn't always work.
35148      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35149      if test -z "$is_absolute_path"; then
35150        # Path to executable is not absolute. Find it.
35151        IFS_save="$IFS"
35152        IFS=:
35153        for p in $PATH; do
35154          if test -f "$p/$path" && test -x "$p/$path"; then
35155            new_path="$p/$path"
35156            break
35157          fi
35158        done
35159        IFS="$IFS_save"
35160      else
35161        # This is an absolute path, we can use it without further modifications.
35162        new_path="$path"
35163      fi
35164
35165      if test "x$new_path" = x; then
35166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35167$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35168        has_space=`$ECHO "$complete" | $GREP " "`
35169        if test "x$has_space" != x; then
35170          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35171$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35172        fi
35173        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35174      fi
35175    fi
35176
35177    # Now join together the path and the arguments once again
35178    if test "x$arguments" != xEOL; then
35179      new_complete="$new_path ${arguments% *}"
35180    else
35181      new_complete="$new_path"
35182    fi
35183
35184    if test "x$complete" != "x$new_complete"; then
35185      RC="$new_complete"
35186      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35187$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35188    fi
35189  fi
35190
35191    # Extract the first word of "dumpbin", so it can be a program name with args.
35192set dummy dumpbin; ac_word=$2
35193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35194$as_echo_n "checking for $ac_word... " >&6; }
35195if ${ac_cv_prog_DUMPBIN+:} false; then :
35196  $as_echo_n "(cached) " >&6
35197else
35198  if test -n "$DUMPBIN"; then
35199  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35200else
35201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35202for as_dir in $PATH
35203do
35204  IFS=$as_save_IFS
35205  test -z "$as_dir" && as_dir=.
35206    for ac_exec_ext in '' $ac_executable_extensions; do
35207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35208    ac_cv_prog_DUMPBIN="dumpbin"
35209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35210    break 2
35211  fi
35212done
35213  done
35214IFS=$as_save_IFS
35215
35216fi
35217fi
35218DUMPBIN=$ac_cv_prog_DUMPBIN
35219if test -n "$DUMPBIN"; then
35220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35221$as_echo "$DUMPBIN" >&6; }
35222else
35223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35224$as_echo "no" >&6; }
35225fi
35226
35227
35228
35229  # Only process if variable expands to non-empty
35230
35231  if test "x$DUMPBIN" != x; then
35232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35233
35234  # First separate the path from the arguments. This will split at the first
35235  # space.
35236  complete="$DUMPBIN"
35237  path="${complete%% *}"
35238  tmp="$complete EOL"
35239  arguments="${tmp#* }"
35240
35241  # Input might be given as Windows format, start by converting to
35242  # unix format.
35243  new_path=`$CYGPATH -u "$path"`
35244
35245  # Now try to locate executable using which
35246  new_path=`$WHICH "$new_path" 2> /dev/null`
35247  # bat and cmd files are not always considered executable in cygwin causing which
35248  # to not find them
35249  if test "x$new_path" = x \
35250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35252    new_path=`$CYGPATH -u "$path"`
35253  fi
35254  if test "x$new_path" = x; then
35255    # Oops. Which didn't find the executable.
35256    # The splitting of arguments from the executable at a space might have been incorrect,
35257    # since paths with space are more likely in Windows. Give it another try with the whole
35258    # argument.
35259    path="$complete"
35260    arguments="EOL"
35261    new_path=`$CYGPATH -u "$path"`
35262    new_path=`$WHICH "$new_path" 2> /dev/null`
35263    # bat and cmd files are not always considered executable in cygwin causing which
35264    # to not find them
35265    if test "x$new_path" = x \
35266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35268      new_path=`$CYGPATH -u "$path"`
35269    fi
35270    if test "x$new_path" = x; then
35271      # It's still not found. Now this is an unrecoverable error.
35272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35273$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35274      has_space=`$ECHO "$complete" | $GREP " "`
35275      if test "x$has_space" != x; then
35276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35278      fi
35279      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35280    fi
35281  fi
35282
35283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35286  # "foo.exe" is OK but "foo" is an error.
35287  #
35288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35289  # It is also a way to make sure we got the proper file name for the real test later on.
35290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35291  if test "x$test_shortpath" = x; then
35292    # Short path failed, file does not exist as specified.
35293    # Try adding .exe or .cmd
35294    if test -f "${new_path}.exe"; then
35295      input_to_shortpath="${new_path}.exe"
35296    elif test -f "${new_path}.cmd"; then
35297      input_to_shortpath="${new_path}.cmd"
35298    else
35299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35300$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35303      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35304    fi
35305  else
35306    input_to_shortpath="$new_path"
35307  fi
35308
35309  # Call helper function which possibly converts this using DOS-style short mode.
35310  # If so, the updated path is stored in $new_path.
35311  new_path="$input_to_shortpath"
35312
35313  input_path="$input_to_shortpath"
35314  # Check if we need to convert this using DOS-style short mode. If the path
35315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35316  # take no chances and rewrite it.
35317  # Note: m4 eats our [], so we need to use [ and ] instead.
35318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35319  if test "x$has_forbidden_chars" != x; then
35320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35324      # Going to short mode and back again did indeed matter. Since short mode is
35325      # case insensitive, let's make it lowercase to improve readability.
35326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35327      # Now convert it back to Unix-stile (cygpath)
35328      input_path=`$CYGPATH -u "$shortmode_path"`
35329      new_path="$input_path"
35330    fi
35331  fi
35332
35333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35334  if test "x$test_cygdrive_prefix" = x; then
35335    # As a simple fix, exclude /usr/bin since it's not a real path.
35336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35338      # a path prefixed by /cygdrive for fixpath to work.
35339      new_path="$CYGWIN_ROOT_PATH$input_path"
35340    fi
35341  fi
35342
35343  # remove trailing .exe if any
35344  new_path="${new_path/%.exe/}"
35345
35346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35347
35348  # First separate the path from the arguments. This will split at the first
35349  # space.
35350  complete="$DUMPBIN"
35351  path="${complete%% *}"
35352  tmp="$complete EOL"
35353  arguments="${tmp#* }"
35354
35355  # Input might be given as Windows format, start by converting to
35356  # unix format.
35357  new_path="$path"
35358
35359  windows_path="$new_path"
35360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35361    unix_path=`$CYGPATH -u "$windows_path"`
35362    new_path="$unix_path"
35363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35365    new_path="$unix_path"
35366  fi
35367
35368
35369  # Now try to locate executable using which
35370  new_path=`$WHICH "$new_path" 2> /dev/null`
35371
35372  if test "x$new_path" = x; then
35373    # Oops. Which didn't find the executable.
35374    # The splitting of arguments from the executable at a space might have been incorrect,
35375    # since paths with space are more likely in Windows. Give it another try with the whole
35376    # argument.
35377    path="$complete"
35378    arguments="EOL"
35379    new_path="$path"
35380
35381  windows_path="$new_path"
35382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35383    unix_path=`$CYGPATH -u "$windows_path"`
35384    new_path="$unix_path"
35385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35387    new_path="$unix_path"
35388  fi
35389
35390
35391    new_path=`$WHICH "$new_path" 2> /dev/null`
35392    # bat and cmd files are not always considered executable in MSYS causing which
35393    # to not find them
35394    if test "x$new_path" = x \
35395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35397      new_path="$path"
35398
35399  windows_path="$new_path"
35400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35401    unix_path=`$CYGPATH -u "$windows_path"`
35402    new_path="$unix_path"
35403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35405    new_path="$unix_path"
35406  fi
35407
35408    fi
35409
35410    if test "x$new_path" = x; then
35411      # It's still not found. Now this is an unrecoverable error.
35412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35413$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35414      has_space=`$ECHO "$complete" | $GREP " "`
35415      if test "x$has_space" != x; then
35416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35418      fi
35419      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35420    fi
35421  fi
35422
35423  # Now new_path has a complete unix path to the binary
35424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35425    # Keep paths in /bin as-is, but remove trailing .exe if any
35426    new_path="${new_path/%.exe/}"
35427    # Do not save /bin paths to all_fixpath_prefixes!
35428  else
35429    # Not in mixed or Windows style, start by that.
35430    new_path=`cmd //c echo $new_path`
35431
35432  input_path="$new_path"
35433  # Check if we need to convert this using DOS-style short mode. If the path
35434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35435  # take no chances and rewrite it.
35436  # Note: m4 eats our [], so we need to use [ and ] instead.
35437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35438  if test "x$has_forbidden_chars" != x; then
35439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35441  fi
35442
35443    # Output is in $new_path
35444
35445  windows_path="$new_path"
35446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35447    unix_path=`$CYGPATH -u "$windows_path"`
35448    new_path="$unix_path"
35449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35451    new_path="$unix_path"
35452  fi
35453
35454    # remove trailing .exe if any
35455    new_path="${new_path/%.exe/}"
35456
35457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35459  fi
35460
35461    else
35462      # We're on a unix platform. Hooray! :)
35463      # First separate the path from the arguments. This will split at the first
35464      # space.
35465      complete="$DUMPBIN"
35466      path="${complete%% *}"
35467      tmp="$complete EOL"
35468      arguments="${tmp#* }"
35469
35470      # Cannot rely on the command "which" here since it doesn't always work.
35471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35472      if test -z "$is_absolute_path"; then
35473        # Path to executable is not absolute. Find it.
35474        IFS_save="$IFS"
35475        IFS=:
35476        for p in $PATH; do
35477          if test -f "$p/$path" && test -x "$p/$path"; then
35478            new_path="$p/$path"
35479            break
35480          fi
35481        done
35482        IFS="$IFS_save"
35483      else
35484        # This is an absolute path, we can use it without further modifications.
35485        new_path="$path"
35486      fi
35487
35488      if test "x$new_path" = x; then
35489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35490$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35491        has_space=`$ECHO "$complete" | $GREP " "`
35492        if test "x$has_space" != x; then
35493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35495        fi
35496        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35497      fi
35498    fi
35499
35500    # Now join together the path and the arguments once again
35501    if test "x$arguments" != xEOL; then
35502      new_complete="$new_path ${arguments% *}"
35503    else
35504      new_complete="$new_path"
35505    fi
35506
35507    if test "x$complete" != "x$new_complete"; then
35508      DUMPBIN="$new_complete"
35509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35510$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35511    fi
35512  fi
35513
35514    # We need to check for 'msbuild.exe' because at the place where we expect to
35515    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35516    # won't find the 'msbuild.exe' executable in that case (and the
35517    # 'ac_executable_extensions' is unusable due to performance reasons).
35518    # Notice that we intentionally don't fix up the path to MSBUILD because we
35519    # will call it in a DOS shell during freetype detection on Windows (see
35520    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35521    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35522set dummy msbuild.exe; ac_word=$2
35523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35524$as_echo_n "checking for $ac_word... " >&6; }
35525if ${ac_cv_prog_MSBUILD+:} false; then :
35526  $as_echo_n "(cached) " >&6
35527else
35528  if test -n "$MSBUILD"; then
35529  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35530else
35531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35532for as_dir in $PATH
35533do
35534  IFS=$as_save_IFS
35535  test -z "$as_dir" && as_dir=.
35536    for ac_exec_ext in '' $ac_executable_extensions; do
35537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35538    ac_cv_prog_MSBUILD="msbuild.exe"
35539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35540    break 2
35541  fi
35542done
35543  done
35544IFS=$as_save_IFS
35545
35546fi
35547fi
35548MSBUILD=$ac_cv_prog_MSBUILD
35549if test -n "$MSBUILD"; then
35550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35551$as_echo "$MSBUILD" >&6; }
35552else
35553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35554$as_echo "no" >&6; }
35555fi
35556
35557
35558  fi
35559
35560  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35561
35562
35563  # Publish this variable in the help.
35564
35565
35566  if test "x$STRIP" = x; then
35567    # The variable is not set by user, try to locate tool using the code snippet
35568    for ac_prog in strip
35569do
35570  # Extract the first word of "$ac_prog", so it can be a program name with args.
35571set dummy $ac_prog; ac_word=$2
35572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35573$as_echo_n "checking for $ac_word... " >&6; }
35574if ${ac_cv_path_STRIP+:} false; then :
35575  $as_echo_n "(cached) " >&6
35576else
35577  case $STRIP in
35578  [\\/]* | ?:[\\/]*)
35579  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35580  ;;
35581  *)
35582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35583for as_dir in $PATH
35584do
35585  IFS=$as_save_IFS
35586  test -z "$as_dir" && as_dir=.
35587    for ac_exec_ext in '' $ac_executable_extensions; do
35588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35589    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35591    break 2
35592  fi
35593done
35594  done
35595IFS=$as_save_IFS
35596
35597  ;;
35598esac
35599fi
35600STRIP=$ac_cv_path_STRIP
35601if test -n "$STRIP"; then
35602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35603$as_echo "$STRIP" >&6; }
35604else
35605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35606$as_echo "no" >&6; }
35607fi
35608
35609
35610  test -n "$STRIP" && break
35611done
35612
35613  else
35614    # The variable is set, but is it from the command line or the environment?
35615
35616    # Try to remove the string !STRIP! from our list.
35617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35619      # If it failed, the variable was not from the command line. Ignore it,
35620      # but warn the user (except for BASH, which is always set by the calling BASH).
35621      if test "xSTRIP" != xBASH; then
35622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35623$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35624      fi
35625      # Try to locate tool using the code snippet
35626      for ac_prog in strip
35627do
35628  # Extract the first word of "$ac_prog", so it can be a program name with args.
35629set dummy $ac_prog; ac_word=$2
35630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35631$as_echo_n "checking for $ac_word... " >&6; }
35632if ${ac_cv_path_STRIP+:} false; then :
35633  $as_echo_n "(cached) " >&6
35634else
35635  case $STRIP in
35636  [\\/]* | ?:[\\/]*)
35637  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35638  ;;
35639  *)
35640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35641for as_dir in $PATH
35642do
35643  IFS=$as_save_IFS
35644  test -z "$as_dir" && as_dir=.
35645    for ac_exec_ext in '' $ac_executable_extensions; do
35646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35647    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35649    break 2
35650  fi
35651done
35652  done
35653IFS=$as_save_IFS
35654
35655  ;;
35656esac
35657fi
35658STRIP=$ac_cv_path_STRIP
35659if test -n "$STRIP"; then
35660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35661$as_echo "$STRIP" >&6; }
35662else
35663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35664$as_echo "no" >&6; }
35665fi
35666
35667
35668  test -n "$STRIP" && break
35669done
35670
35671    else
35672      # If it succeeded, then it was overridden by the user. We will use it
35673      # for the tool.
35674
35675      # First remove it from the list of overridden variables, so we can test
35676      # for unknown variables in the end.
35677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35678
35679      # Check if the provided tool contains a complete path.
35680      tool_specified="$STRIP"
35681      tool_basename="${tool_specified##*/}"
35682      if test "x$tool_basename" = "x$tool_specified"; then
35683        # A command without a complete path is provided, search $PATH.
35684        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35685$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35686        # Extract the first word of "$tool_basename", so it can be a program name with args.
35687set dummy $tool_basename; ac_word=$2
35688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35689$as_echo_n "checking for $ac_word... " >&6; }
35690if ${ac_cv_path_STRIP+:} false; then :
35691  $as_echo_n "(cached) " >&6
35692else
35693  case $STRIP in
35694  [\\/]* | ?:[\\/]*)
35695  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35696  ;;
35697  *)
35698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35699for as_dir in $PATH
35700do
35701  IFS=$as_save_IFS
35702  test -z "$as_dir" && as_dir=.
35703    for ac_exec_ext in '' $ac_executable_extensions; do
35704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35705    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35707    break 2
35708  fi
35709done
35710  done
35711IFS=$as_save_IFS
35712
35713  ;;
35714esac
35715fi
35716STRIP=$ac_cv_path_STRIP
35717if test -n "$STRIP"; then
35718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35719$as_echo "$STRIP" >&6; }
35720else
35721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35722$as_echo "no" >&6; }
35723fi
35724
35725
35726        if test "x$STRIP" = x; then
35727          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35728        fi
35729      else
35730        # Otherwise we believe it is a complete path. Use it as it is.
35731        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35732$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35734$as_echo_n "checking for STRIP... " >&6; }
35735        if test ! -x "$tool_specified"; then
35736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35737$as_echo "not found" >&6; }
35738          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35739        fi
35740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35741$as_echo "$tool_specified" >&6; }
35742      fi
35743    fi
35744  fi
35745
35746
35747
35748  # Only process if variable expands to non-empty
35749
35750  if test "x$STRIP" != x; then
35751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35752
35753  # First separate the path from the arguments. This will split at the first
35754  # space.
35755  complete="$STRIP"
35756  path="${complete%% *}"
35757  tmp="$complete EOL"
35758  arguments="${tmp#* }"
35759
35760  # Input might be given as Windows format, start by converting to
35761  # unix format.
35762  new_path=`$CYGPATH -u "$path"`
35763
35764  # Now try to locate executable using which
35765  new_path=`$WHICH "$new_path" 2> /dev/null`
35766  # bat and cmd files are not always considered executable in cygwin causing which
35767  # to not find them
35768  if test "x$new_path" = x \
35769      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35770      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35771    new_path=`$CYGPATH -u "$path"`
35772  fi
35773  if test "x$new_path" = x; then
35774    # Oops. Which didn't find the executable.
35775    # The splitting of arguments from the executable at a space might have been incorrect,
35776    # since paths with space are more likely in Windows. Give it another try with the whole
35777    # argument.
35778    path="$complete"
35779    arguments="EOL"
35780    new_path=`$CYGPATH -u "$path"`
35781    new_path=`$WHICH "$new_path" 2> /dev/null`
35782    # bat and cmd files are not always considered executable in cygwin causing which
35783    # to not find them
35784    if test "x$new_path" = x \
35785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35787      new_path=`$CYGPATH -u "$path"`
35788    fi
35789    if test "x$new_path" = x; then
35790      # It's still not found. Now this is an unrecoverable error.
35791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35792$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35793      has_space=`$ECHO "$complete" | $GREP " "`
35794      if test "x$has_space" != x; then
35795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35797      fi
35798      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35799    fi
35800  fi
35801
35802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35805  # "foo.exe" is OK but "foo" is an error.
35806  #
35807  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35808  # It is also a way to make sure we got the proper file name for the real test later on.
35809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35810  if test "x$test_shortpath" = x; then
35811    # Short path failed, file does not exist as specified.
35812    # Try adding .exe or .cmd
35813    if test -f "${new_path}.exe"; then
35814      input_to_shortpath="${new_path}.exe"
35815    elif test -f "${new_path}.cmd"; then
35816      input_to_shortpath="${new_path}.cmd"
35817    else
35818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35819$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35820      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35821$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35822      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35823    fi
35824  else
35825    input_to_shortpath="$new_path"
35826  fi
35827
35828  # Call helper function which possibly converts this using DOS-style short mode.
35829  # If so, the updated path is stored in $new_path.
35830  new_path="$input_to_shortpath"
35831
35832  input_path="$input_to_shortpath"
35833  # Check if we need to convert this using DOS-style short mode. If the path
35834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35835  # take no chances and rewrite it.
35836  # Note: m4 eats our [], so we need to use [ and ] instead.
35837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35838  if test "x$has_forbidden_chars" != x; then
35839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35843      # Going to short mode and back again did indeed matter. Since short mode is
35844      # case insensitive, let's make it lowercase to improve readability.
35845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35846      # Now convert it back to Unix-stile (cygpath)
35847      input_path=`$CYGPATH -u "$shortmode_path"`
35848      new_path="$input_path"
35849    fi
35850  fi
35851
35852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35853  if test "x$test_cygdrive_prefix" = x; then
35854    # As a simple fix, exclude /usr/bin since it's not a real path.
35855    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35857      # a path prefixed by /cygdrive for fixpath to work.
35858      new_path="$CYGWIN_ROOT_PATH$input_path"
35859    fi
35860  fi
35861
35862  # remove trailing .exe if any
35863  new_path="${new_path/%.exe/}"
35864
35865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35866
35867  # First separate the path from the arguments. This will split at the first
35868  # space.
35869  complete="$STRIP"
35870  path="${complete%% *}"
35871  tmp="$complete EOL"
35872  arguments="${tmp#* }"
35873
35874  # Input might be given as Windows format, start by converting to
35875  # unix format.
35876  new_path="$path"
35877
35878  windows_path="$new_path"
35879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35880    unix_path=`$CYGPATH -u "$windows_path"`
35881    new_path="$unix_path"
35882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35884    new_path="$unix_path"
35885  fi
35886
35887
35888  # Now try to locate executable using which
35889  new_path=`$WHICH "$new_path" 2> /dev/null`
35890
35891  if test "x$new_path" = x; then
35892    # Oops. Which didn't find the executable.
35893    # The splitting of arguments from the executable at a space might have been incorrect,
35894    # since paths with space are more likely in Windows. Give it another try with the whole
35895    # argument.
35896    path="$complete"
35897    arguments="EOL"
35898    new_path="$path"
35899
35900  windows_path="$new_path"
35901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35902    unix_path=`$CYGPATH -u "$windows_path"`
35903    new_path="$unix_path"
35904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35906    new_path="$unix_path"
35907  fi
35908
35909
35910    new_path=`$WHICH "$new_path" 2> /dev/null`
35911    # bat and cmd files are not always considered executable in MSYS causing which
35912    # to not find them
35913    if test "x$new_path" = x \
35914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35916      new_path="$path"
35917
35918  windows_path="$new_path"
35919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35920    unix_path=`$CYGPATH -u "$windows_path"`
35921    new_path="$unix_path"
35922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35924    new_path="$unix_path"
35925  fi
35926
35927    fi
35928
35929    if test "x$new_path" = x; then
35930      # It's still not found. Now this is an unrecoverable error.
35931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35932$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35933      has_space=`$ECHO "$complete" | $GREP " "`
35934      if test "x$has_space" != x; then
35935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35937      fi
35938      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35939    fi
35940  fi
35941
35942  # Now new_path has a complete unix path to the binary
35943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35944    # Keep paths in /bin as-is, but remove trailing .exe if any
35945    new_path="${new_path/%.exe/}"
35946    # Do not save /bin paths to all_fixpath_prefixes!
35947  else
35948    # Not in mixed or Windows style, start by that.
35949    new_path=`cmd //c echo $new_path`
35950
35951  input_path="$new_path"
35952  # Check if we need to convert this using DOS-style short mode. If the path
35953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35954  # take no chances and rewrite it.
35955  # Note: m4 eats our [], so we need to use [ and ] instead.
35956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35957  if test "x$has_forbidden_chars" != x; then
35958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35960  fi
35961
35962    # Output is in $new_path
35963
35964  windows_path="$new_path"
35965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35966    unix_path=`$CYGPATH -u "$windows_path"`
35967    new_path="$unix_path"
35968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35970    new_path="$unix_path"
35971  fi
35972
35973    # remove trailing .exe if any
35974    new_path="${new_path/%.exe/}"
35975
35976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35978  fi
35979
35980    else
35981      # We're on a unix platform. Hooray! :)
35982      # First separate the path from the arguments. This will split at the first
35983      # space.
35984      complete="$STRIP"
35985      path="${complete%% *}"
35986      tmp="$complete EOL"
35987      arguments="${tmp#* }"
35988
35989      # Cannot rely on the command "which" here since it doesn't always work.
35990      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35991      if test -z "$is_absolute_path"; then
35992        # Path to executable is not absolute. Find it.
35993        IFS_save="$IFS"
35994        IFS=:
35995        for p in $PATH; do
35996          if test -f "$p/$path" && test -x "$p/$path"; then
35997            new_path="$p/$path"
35998            break
35999          fi
36000        done
36001        IFS="$IFS_save"
36002      else
36003        # This is an absolute path, we can use it without further modifications.
36004        new_path="$path"
36005      fi
36006
36007      if test "x$new_path" = x; then
36008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36009$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36010        has_space=`$ECHO "$complete" | $GREP " "`
36011        if test "x$has_space" != x; then
36012          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36014        fi
36015        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36016      fi
36017    fi
36018
36019    # Now join together the path and the arguments once again
36020    if test "x$arguments" != xEOL; then
36021      new_complete="$new_path ${arguments% *}"
36022    else
36023      new_complete="$new_path"
36024    fi
36025
36026    if test "x$complete" != "x$new_complete"; then
36027      STRIP="$new_complete"
36028      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36029$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36030    fi
36031  fi
36032
36033
36034
36035  # Publish this variable in the help.
36036
36037
36038  if test "x$NM" = x; then
36039    # The variable is not set by user, try to locate tool using the code snippet
36040    for ac_prog in nm
36041do
36042  # Extract the first word of "$ac_prog", so it can be a program name with args.
36043set dummy $ac_prog; ac_word=$2
36044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36045$as_echo_n "checking for $ac_word... " >&6; }
36046if ${ac_cv_path_NM+:} false; then :
36047  $as_echo_n "(cached) " >&6
36048else
36049  case $NM in
36050  [\\/]* | ?:[\\/]*)
36051  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36052  ;;
36053  *)
36054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36055for as_dir in $PATH
36056do
36057  IFS=$as_save_IFS
36058  test -z "$as_dir" && as_dir=.
36059    for ac_exec_ext in '' $ac_executable_extensions; do
36060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36061    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36063    break 2
36064  fi
36065done
36066  done
36067IFS=$as_save_IFS
36068
36069  ;;
36070esac
36071fi
36072NM=$ac_cv_path_NM
36073if test -n "$NM"; then
36074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36075$as_echo "$NM" >&6; }
36076else
36077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36078$as_echo "no" >&6; }
36079fi
36080
36081
36082  test -n "$NM" && break
36083done
36084
36085  else
36086    # The variable is set, but is it from the command line or the environment?
36087
36088    # Try to remove the string !NM! from our list.
36089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36091      # If it failed, the variable was not from the command line. Ignore it,
36092      # but warn the user (except for BASH, which is always set by the calling BASH).
36093      if test "xNM" != xBASH; then
36094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36095$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36096      fi
36097      # Try to locate tool using the code snippet
36098      for ac_prog in nm
36099do
36100  # Extract the first word of "$ac_prog", so it can be a program name with args.
36101set dummy $ac_prog; ac_word=$2
36102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36103$as_echo_n "checking for $ac_word... " >&6; }
36104if ${ac_cv_path_NM+:} false; then :
36105  $as_echo_n "(cached) " >&6
36106else
36107  case $NM in
36108  [\\/]* | ?:[\\/]*)
36109  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36110  ;;
36111  *)
36112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36113for as_dir in $PATH
36114do
36115  IFS=$as_save_IFS
36116  test -z "$as_dir" && as_dir=.
36117    for ac_exec_ext in '' $ac_executable_extensions; do
36118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36119    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36121    break 2
36122  fi
36123done
36124  done
36125IFS=$as_save_IFS
36126
36127  ;;
36128esac
36129fi
36130NM=$ac_cv_path_NM
36131if test -n "$NM"; then
36132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36133$as_echo "$NM" >&6; }
36134else
36135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36136$as_echo "no" >&6; }
36137fi
36138
36139
36140  test -n "$NM" && break
36141done
36142
36143    else
36144      # If it succeeded, then it was overridden by the user. We will use it
36145      # for the tool.
36146
36147      # First remove it from the list of overridden variables, so we can test
36148      # for unknown variables in the end.
36149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36150
36151      # Check if the provided tool contains a complete path.
36152      tool_specified="$NM"
36153      tool_basename="${tool_specified##*/}"
36154      if test "x$tool_basename" = "x$tool_specified"; then
36155        # A command without a complete path is provided, search $PATH.
36156        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36157$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36158        # Extract the first word of "$tool_basename", so it can be a program name with args.
36159set dummy $tool_basename; ac_word=$2
36160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36161$as_echo_n "checking for $ac_word... " >&6; }
36162if ${ac_cv_path_NM+:} false; then :
36163  $as_echo_n "(cached) " >&6
36164else
36165  case $NM in
36166  [\\/]* | ?:[\\/]*)
36167  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36168  ;;
36169  *)
36170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36171for as_dir in $PATH
36172do
36173  IFS=$as_save_IFS
36174  test -z "$as_dir" && as_dir=.
36175    for ac_exec_ext in '' $ac_executable_extensions; do
36176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36177    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36179    break 2
36180  fi
36181done
36182  done
36183IFS=$as_save_IFS
36184
36185  ;;
36186esac
36187fi
36188NM=$ac_cv_path_NM
36189if test -n "$NM"; then
36190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36191$as_echo "$NM" >&6; }
36192else
36193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36194$as_echo "no" >&6; }
36195fi
36196
36197
36198        if test "x$NM" = x; then
36199          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36200        fi
36201      else
36202        # Otherwise we believe it is a complete path. Use it as it is.
36203        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36204$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36205        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36206$as_echo_n "checking for NM... " >&6; }
36207        if test ! -x "$tool_specified"; then
36208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36209$as_echo "not found" >&6; }
36210          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36211        fi
36212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36213$as_echo "$tool_specified" >&6; }
36214      fi
36215    fi
36216  fi
36217
36218
36219
36220  # Only process if variable expands to non-empty
36221
36222  if test "x$NM" != x; then
36223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36224
36225  # First separate the path from the arguments. This will split at the first
36226  # space.
36227  complete="$NM"
36228  path="${complete%% *}"
36229  tmp="$complete EOL"
36230  arguments="${tmp#* }"
36231
36232  # Input might be given as Windows format, start by converting to
36233  # unix format.
36234  new_path=`$CYGPATH -u "$path"`
36235
36236  # Now try to locate executable using which
36237  new_path=`$WHICH "$new_path" 2> /dev/null`
36238  # bat and cmd files are not always considered executable in cygwin causing which
36239  # to not find them
36240  if test "x$new_path" = x \
36241      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36242      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36243    new_path=`$CYGPATH -u "$path"`
36244  fi
36245  if test "x$new_path" = x; then
36246    # Oops. Which didn't find the executable.
36247    # The splitting of arguments from the executable at a space might have been incorrect,
36248    # since paths with space are more likely in Windows. Give it another try with the whole
36249    # argument.
36250    path="$complete"
36251    arguments="EOL"
36252    new_path=`$CYGPATH -u "$path"`
36253    new_path=`$WHICH "$new_path" 2> /dev/null`
36254    # bat and cmd files are not always considered executable in cygwin causing which
36255    # to not find them
36256    if test "x$new_path" = x \
36257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36259      new_path=`$CYGPATH -u "$path"`
36260    fi
36261    if test "x$new_path" = x; then
36262      # It's still not found. Now this is an unrecoverable error.
36263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36264$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36265      has_space=`$ECHO "$complete" | $GREP " "`
36266      if test "x$has_space" != x; then
36267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36269      fi
36270      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36271    fi
36272  fi
36273
36274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36277  # "foo.exe" is OK but "foo" is an error.
36278  #
36279  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36280  # It is also a way to make sure we got the proper file name for the real test later on.
36281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36282  if test "x$test_shortpath" = x; then
36283    # Short path failed, file does not exist as specified.
36284    # Try adding .exe or .cmd
36285    if test -f "${new_path}.exe"; then
36286      input_to_shortpath="${new_path}.exe"
36287    elif test -f "${new_path}.cmd"; then
36288      input_to_shortpath="${new_path}.cmd"
36289    else
36290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36291$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36294      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36295    fi
36296  else
36297    input_to_shortpath="$new_path"
36298  fi
36299
36300  # Call helper function which possibly converts this using DOS-style short mode.
36301  # If so, the updated path is stored in $new_path.
36302  new_path="$input_to_shortpath"
36303
36304  input_path="$input_to_shortpath"
36305  # Check if we need to convert this using DOS-style short mode. If the path
36306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36307  # take no chances and rewrite it.
36308  # Note: m4 eats our [], so we need to use [ and ] instead.
36309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36310  if test "x$has_forbidden_chars" != x; then
36311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36315      # Going to short mode and back again did indeed matter. Since short mode is
36316      # case insensitive, let's make it lowercase to improve readability.
36317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36318      # Now convert it back to Unix-stile (cygpath)
36319      input_path=`$CYGPATH -u "$shortmode_path"`
36320      new_path="$input_path"
36321    fi
36322  fi
36323
36324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36325  if test "x$test_cygdrive_prefix" = x; then
36326    # As a simple fix, exclude /usr/bin since it's not a real path.
36327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36329      # a path prefixed by /cygdrive for fixpath to work.
36330      new_path="$CYGWIN_ROOT_PATH$input_path"
36331    fi
36332  fi
36333
36334  # remove trailing .exe if any
36335  new_path="${new_path/%.exe/}"
36336
36337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36338
36339  # First separate the path from the arguments. This will split at the first
36340  # space.
36341  complete="$NM"
36342  path="${complete%% *}"
36343  tmp="$complete EOL"
36344  arguments="${tmp#* }"
36345
36346  # Input might be given as Windows format, start by converting to
36347  # unix format.
36348  new_path="$path"
36349
36350  windows_path="$new_path"
36351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36352    unix_path=`$CYGPATH -u "$windows_path"`
36353    new_path="$unix_path"
36354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36356    new_path="$unix_path"
36357  fi
36358
36359
36360  # Now try to locate executable using which
36361  new_path=`$WHICH "$new_path" 2> /dev/null`
36362
36363  if test "x$new_path" = x; then
36364    # Oops. Which didn't find the executable.
36365    # The splitting of arguments from the executable at a space might have been incorrect,
36366    # since paths with space are more likely in Windows. Give it another try with the whole
36367    # argument.
36368    path="$complete"
36369    arguments="EOL"
36370    new_path="$path"
36371
36372  windows_path="$new_path"
36373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36374    unix_path=`$CYGPATH -u "$windows_path"`
36375    new_path="$unix_path"
36376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36378    new_path="$unix_path"
36379  fi
36380
36381
36382    new_path=`$WHICH "$new_path" 2> /dev/null`
36383    # bat and cmd files are not always considered executable in MSYS causing which
36384    # to not find them
36385    if test "x$new_path" = x \
36386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36388      new_path="$path"
36389
36390  windows_path="$new_path"
36391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36392    unix_path=`$CYGPATH -u "$windows_path"`
36393    new_path="$unix_path"
36394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36396    new_path="$unix_path"
36397  fi
36398
36399    fi
36400
36401    if test "x$new_path" = x; then
36402      # It's still not found. Now this is an unrecoverable error.
36403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36404$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36405      has_space=`$ECHO "$complete" | $GREP " "`
36406      if test "x$has_space" != x; then
36407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36409      fi
36410      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36411    fi
36412  fi
36413
36414  # Now new_path has a complete unix path to the binary
36415  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36416    # Keep paths in /bin as-is, but remove trailing .exe if any
36417    new_path="${new_path/%.exe/}"
36418    # Do not save /bin paths to all_fixpath_prefixes!
36419  else
36420    # Not in mixed or Windows style, start by that.
36421    new_path=`cmd //c echo $new_path`
36422
36423  input_path="$new_path"
36424  # Check if we need to convert this using DOS-style short mode. If the path
36425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36426  # take no chances and rewrite it.
36427  # Note: m4 eats our [], so we need to use [ and ] instead.
36428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36429  if test "x$has_forbidden_chars" != x; then
36430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36432  fi
36433
36434    # Output is in $new_path
36435
36436  windows_path="$new_path"
36437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36438    unix_path=`$CYGPATH -u "$windows_path"`
36439    new_path="$unix_path"
36440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36442    new_path="$unix_path"
36443  fi
36444
36445    # remove trailing .exe if any
36446    new_path="${new_path/%.exe/}"
36447
36448    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36449    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36450  fi
36451
36452    else
36453      # We're on a unix platform. Hooray! :)
36454      # First separate the path from the arguments. This will split at the first
36455      # space.
36456      complete="$NM"
36457      path="${complete%% *}"
36458      tmp="$complete EOL"
36459      arguments="${tmp#* }"
36460
36461      # Cannot rely on the command "which" here since it doesn't always work.
36462      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36463      if test -z "$is_absolute_path"; then
36464        # Path to executable is not absolute. Find it.
36465        IFS_save="$IFS"
36466        IFS=:
36467        for p in $PATH; do
36468          if test -f "$p/$path" && test -x "$p/$path"; then
36469            new_path="$p/$path"
36470            break
36471          fi
36472        done
36473        IFS="$IFS_save"
36474      else
36475        # This is an absolute path, we can use it without further modifications.
36476        new_path="$path"
36477      fi
36478
36479      if test "x$new_path" = x; then
36480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36481$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36482        has_space=`$ECHO "$complete" | $GREP " "`
36483        if test "x$has_space" != x; then
36484          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36486        fi
36487        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36488      fi
36489    fi
36490
36491    # Now join together the path and the arguments once again
36492    if test "x$arguments" != xEOL; then
36493      new_complete="$new_path ${arguments% *}"
36494    else
36495      new_complete="$new_path"
36496    fi
36497
36498    if test "x$complete" != "x$new_complete"; then
36499      NM="$new_complete"
36500      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36501$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36502    fi
36503  fi
36504
36505
36506
36507  # Publish this variable in the help.
36508
36509
36510  if test "x$GNM" = x; then
36511    # The variable is not set by user, try to locate tool using the code snippet
36512    for ac_prog in gnm
36513do
36514  # Extract the first word of "$ac_prog", so it can be a program name with args.
36515set dummy $ac_prog; ac_word=$2
36516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36517$as_echo_n "checking for $ac_word... " >&6; }
36518if ${ac_cv_path_GNM+:} false; then :
36519  $as_echo_n "(cached) " >&6
36520else
36521  case $GNM in
36522  [\\/]* | ?:[\\/]*)
36523  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36524  ;;
36525  *)
36526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36527for as_dir in $PATH
36528do
36529  IFS=$as_save_IFS
36530  test -z "$as_dir" && as_dir=.
36531    for ac_exec_ext in '' $ac_executable_extensions; do
36532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36533    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36535    break 2
36536  fi
36537done
36538  done
36539IFS=$as_save_IFS
36540
36541  ;;
36542esac
36543fi
36544GNM=$ac_cv_path_GNM
36545if test -n "$GNM"; then
36546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36547$as_echo "$GNM" >&6; }
36548else
36549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36550$as_echo "no" >&6; }
36551fi
36552
36553
36554  test -n "$GNM" && break
36555done
36556
36557  else
36558    # The variable is set, but is it from the command line or the environment?
36559
36560    # Try to remove the string !GNM! from our list.
36561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36563      # If it failed, the variable was not from the command line. Ignore it,
36564      # but warn the user (except for BASH, which is always set by the calling BASH).
36565      if test "xGNM" != xBASH; then
36566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36567$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36568      fi
36569      # Try to locate tool using the code snippet
36570      for ac_prog in gnm
36571do
36572  # Extract the first word of "$ac_prog", so it can be a program name with args.
36573set dummy $ac_prog; ac_word=$2
36574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36575$as_echo_n "checking for $ac_word... " >&6; }
36576if ${ac_cv_path_GNM+:} false; then :
36577  $as_echo_n "(cached) " >&6
36578else
36579  case $GNM in
36580  [\\/]* | ?:[\\/]*)
36581  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36582  ;;
36583  *)
36584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36585for as_dir in $PATH
36586do
36587  IFS=$as_save_IFS
36588  test -z "$as_dir" && as_dir=.
36589    for ac_exec_ext in '' $ac_executable_extensions; do
36590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36591    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36593    break 2
36594  fi
36595done
36596  done
36597IFS=$as_save_IFS
36598
36599  ;;
36600esac
36601fi
36602GNM=$ac_cv_path_GNM
36603if test -n "$GNM"; then
36604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36605$as_echo "$GNM" >&6; }
36606else
36607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36608$as_echo "no" >&6; }
36609fi
36610
36611
36612  test -n "$GNM" && break
36613done
36614
36615    else
36616      # If it succeeded, then it was overridden by the user. We will use it
36617      # for the tool.
36618
36619      # First remove it from the list of overridden variables, so we can test
36620      # for unknown variables in the end.
36621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36622
36623      # Check if the provided tool contains a complete path.
36624      tool_specified="$GNM"
36625      tool_basename="${tool_specified##*/}"
36626      if test "x$tool_basename" = "x$tool_specified"; then
36627        # A command without a complete path is provided, search $PATH.
36628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36629$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36630        # Extract the first word of "$tool_basename", so it can be a program name with args.
36631set dummy $tool_basename; ac_word=$2
36632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36633$as_echo_n "checking for $ac_word... " >&6; }
36634if ${ac_cv_path_GNM+:} false; then :
36635  $as_echo_n "(cached) " >&6
36636else
36637  case $GNM in
36638  [\\/]* | ?:[\\/]*)
36639  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36640  ;;
36641  *)
36642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36643for as_dir in $PATH
36644do
36645  IFS=$as_save_IFS
36646  test -z "$as_dir" && as_dir=.
36647    for ac_exec_ext in '' $ac_executable_extensions; do
36648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36649    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36651    break 2
36652  fi
36653done
36654  done
36655IFS=$as_save_IFS
36656
36657  ;;
36658esac
36659fi
36660GNM=$ac_cv_path_GNM
36661if test -n "$GNM"; then
36662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36663$as_echo "$GNM" >&6; }
36664else
36665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36666$as_echo "no" >&6; }
36667fi
36668
36669
36670        if test "x$GNM" = x; then
36671          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36672        fi
36673      else
36674        # Otherwise we believe it is a complete path. Use it as it is.
36675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36676$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36678$as_echo_n "checking for GNM... " >&6; }
36679        if test ! -x "$tool_specified"; then
36680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36681$as_echo "not found" >&6; }
36682          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36683        fi
36684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36685$as_echo "$tool_specified" >&6; }
36686      fi
36687    fi
36688  fi
36689
36690
36691
36692  # Only process if variable expands to non-empty
36693
36694  if test "x$GNM" != x; then
36695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36696
36697  # First separate the path from the arguments. This will split at the first
36698  # space.
36699  complete="$GNM"
36700  path="${complete%% *}"
36701  tmp="$complete EOL"
36702  arguments="${tmp#* }"
36703
36704  # Input might be given as Windows format, start by converting to
36705  # unix format.
36706  new_path=`$CYGPATH -u "$path"`
36707
36708  # Now try to locate executable using which
36709  new_path=`$WHICH "$new_path" 2> /dev/null`
36710  # bat and cmd files are not always considered executable in cygwin causing which
36711  # to not find them
36712  if test "x$new_path" = x \
36713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36715    new_path=`$CYGPATH -u "$path"`
36716  fi
36717  if test "x$new_path" = x; then
36718    # Oops. Which didn't find the executable.
36719    # The splitting of arguments from the executable at a space might have been incorrect,
36720    # since paths with space are more likely in Windows. Give it another try with the whole
36721    # argument.
36722    path="$complete"
36723    arguments="EOL"
36724    new_path=`$CYGPATH -u "$path"`
36725    new_path=`$WHICH "$new_path" 2> /dev/null`
36726    # bat and cmd files are not always considered executable in cygwin causing which
36727    # to not find them
36728    if test "x$new_path" = x \
36729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36731      new_path=`$CYGPATH -u "$path"`
36732    fi
36733    if test "x$new_path" = x; then
36734      # It's still not found. Now this is an unrecoverable error.
36735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36736$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36737      has_space=`$ECHO "$complete" | $GREP " "`
36738      if test "x$has_space" != x; then
36739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36741      fi
36742      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36743    fi
36744  fi
36745
36746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36749  # "foo.exe" is OK but "foo" is an error.
36750  #
36751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36752  # It is also a way to make sure we got the proper file name for the real test later on.
36753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36754  if test "x$test_shortpath" = x; then
36755    # Short path failed, file does not exist as specified.
36756    # Try adding .exe or .cmd
36757    if test -f "${new_path}.exe"; then
36758      input_to_shortpath="${new_path}.exe"
36759    elif test -f "${new_path}.cmd"; then
36760      input_to_shortpath="${new_path}.cmd"
36761    else
36762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36763$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36766      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36767    fi
36768  else
36769    input_to_shortpath="$new_path"
36770  fi
36771
36772  # Call helper function which possibly converts this using DOS-style short mode.
36773  # If so, the updated path is stored in $new_path.
36774  new_path="$input_to_shortpath"
36775
36776  input_path="$input_to_shortpath"
36777  # Check if we need to convert this using DOS-style short mode. If the path
36778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36779  # take no chances and rewrite it.
36780  # Note: m4 eats our [], so we need to use [ and ] instead.
36781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36782  if test "x$has_forbidden_chars" != x; then
36783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36787      # Going to short mode and back again did indeed matter. Since short mode is
36788      # case insensitive, let's make it lowercase to improve readability.
36789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36790      # Now convert it back to Unix-stile (cygpath)
36791      input_path=`$CYGPATH -u "$shortmode_path"`
36792      new_path="$input_path"
36793    fi
36794  fi
36795
36796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36797  if test "x$test_cygdrive_prefix" = x; then
36798    # As a simple fix, exclude /usr/bin since it's not a real path.
36799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36801      # a path prefixed by /cygdrive for fixpath to work.
36802      new_path="$CYGWIN_ROOT_PATH$input_path"
36803    fi
36804  fi
36805
36806  # remove trailing .exe if any
36807  new_path="${new_path/%.exe/}"
36808
36809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36810
36811  # First separate the path from the arguments. This will split at the first
36812  # space.
36813  complete="$GNM"
36814  path="${complete%% *}"
36815  tmp="$complete EOL"
36816  arguments="${tmp#* }"
36817
36818  # Input might be given as Windows format, start by converting to
36819  # unix format.
36820  new_path="$path"
36821
36822  windows_path="$new_path"
36823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36824    unix_path=`$CYGPATH -u "$windows_path"`
36825    new_path="$unix_path"
36826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36828    new_path="$unix_path"
36829  fi
36830
36831
36832  # Now try to locate executable using which
36833  new_path=`$WHICH "$new_path" 2> /dev/null`
36834
36835  if test "x$new_path" = x; then
36836    # Oops. Which didn't find the executable.
36837    # The splitting of arguments from the executable at a space might have been incorrect,
36838    # since paths with space are more likely in Windows. Give it another try with the whole
36839    # argument.
36840    path="$complete"
36841    arguments="EOL"
36842    new_path="$path"
36843
36844  windows_path="$new_path"
36845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36846    unix_path=`$CYGPATH -u "$windows_path"`
36847    new_path="$unix_path"
36848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36850    new_path="$unix_path"
36851  fi
36852
36853
36854    new_path=`$WHICH "$new_path" 2> /dev/null`
36855    # bat and cmd files are not always considered executable in MSYS causing which
36856    # to not find them
36857    if test "x$new_path" = x \
36858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36860      new_path="$path"
36861
36862  windows_path="$new_path"
36863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36864    unix_path=`$CYGPATH -u "$windows_path"`
36865    new_path="$unix_path"
36866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36868    new_path="$unix_path"
36869  fi
36870
36871    fi
36872
36873    if test "x$new_path" = x; then
36874      # It's still not found. Now this is an unrecoverable error.
36875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36876$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36877      has_space=`$ECHO "$complete" | $GREP " "`
36878      if test "x$has_space" != x; then
36879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36881      fi
36882      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36883    fi
36884  fi
36885
36886  # Now new_path has a complete unix path to the binary
36887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36888    # Keep paths in /bin as-is, but remove trailing .exe if any
36889    new_path="${new_path/%.exe/}"
36890    # Do not save /bin paths to all_fixpath_prefixes!
36891  else
36892    # Not in mixed or Windows style, start by that.
36893    new_path=`cmd //c echo $new_path`
36894
36895  input_path="$new_path"
36896  # Check if we need to convert this using DOS-style short mode. If the path
36897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36898  # take no chances and rewrite it.
36899  # Note: m4 eats our [], so we need to use [ and ] instead.
36900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36901  if test "x$has_forbidden_chars" != x; then
36902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36904  fi
36905
36906    # Output is in $new_path
36907
36908  windows_path="$new_path"
36909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36910    unix_path=`$CYGPATH -u "$windows_path"`
36911    new_path="$unix_path"
36912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36914    new_path="$unix_path"
36915  fi
36916
36917    # remove trailing .exe if any
36918    new_path="${new_path/%.exe/}"
36919
36920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36922  fi
36923
36924    else
36925      # We're on a unix platform. Hooray! :)
36926      # First separate the path from the arguments. This will split at the first
36927      # space.
36928      complete="$GNM"
36929      path="${complete%% *}"
36930      tmp="$complete EOL"
36931      arguments="${tmp#* }"
36932
36933      # Cannot rely on the command "which" here since it doesn't always work.
36934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36935      if test -z "$is_absolute_path"; then
36936        # Path to executable is not absolute. Find it.
36937        IFS_save="$IFS"
36938        IFS=:
36939        for p in $PATH; do
36940          if test -f "$p/$path" && test -x "$p/$path"; then
36941            new_path="$p/$path"
36942            break
36943          fi
36944        done
36945        IFS="$IFS_save"
36946      else
36947        # This is an absolute path, we can use it without further modifications.
36948        new_path="$path"
36949      fi
36950
36951      if test "x$new_path" = x; then
36952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36953$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36954        has_space=`$ECHO "$complete" | $GREP " "`
36955        if test "x$has_space" != x; then
36956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36958        fi
36959        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36960      fi
36961    fi
36962
36963    # Now join together the path and the arguments once again
36964    if test "x$arguments" != xEOL; then
36965      new_complete="$new_path ${arguments% *}"
36966    else
36967      new_complete="$new_path"
36968    fi
36969
36970    if test "x$complete" != "x$new_complete"; then
36971      GNM="$new_complete"
36972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36973$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36974    fi
36975  fi
36976
36977
36978
36979
36980  # Publish this variable in the help.
36981
36982
36983  if test "x$MCS" = x; then
36984    # The variable is not set by user, try to locate tool using the code snippet
36985    for ac_prog in mcs
36986do
36987  # Extract the first word of "$ac_prog", so it can be a program name with args.
36988set dummy $ac_prog; ac_word=$2
36989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36990$as_echo_n "checking for $ac_word... " >&6; }
36991if ${ac_cv_path_MCS+:} false; then :
36992  $as_echo_n "(cached) " >&6
36993else
36994  case $MCS in
36995  [\\/]* | ?:[\\/]*)
36996  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36997  ;;
36998  *)
36999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37000for as_dir in $PATH
37001do
37002  IFS=$as_save_IFS
37003  test -z "$as_dir" && as_dir=.
37004    for ac_exec_ext in '' $ac_executable_extensions; do
37005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37006    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37008    break 2
37009  fi
37010done
37011  done
37012IFS=$as_save_IFS
37013
37014  ;;
37015esac
37016fi
37017MCS=$ac_cv_path_MCS
37018if test -n "$MCS"; then
37019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37020$as_echo "$MCS" >&6; }
37021else
37022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37023$as_echo "no" >&6; }
37024fi
37025
37026
37027  test -n "$MCS" && break
37028done
37029
37030  else
37031    # The variable is set, but is it from the command line or the environment?
37032
37033    # Try to remove the string !MCS! from our list.
37034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
37035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37036      # If it failed, the variable was not from the command line. Ignore it,
37037      # but warn the user (except for BASH, which is always set by the calling BASH).
37038      if test "xMCS" != xBASH; then
37039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
37040$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
37041      fi
37042      # Try to locate tool using the code snippet
37043      for ac_prog in mcs
37044do
37045  # Extract the first word of "$ac_prog", so it can be a program name with args.
37046set dummy $ac_prog; ac_word=$2
37047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37048$as_echo_n "checking for $ac_word... " >&6; }
37049if ${ac_cv_path_MCS+:} false; then :
37050  $as_echo_n "(cached) " >&6
37051else
37052  case $MCS in
37053  [\\/]* | ?:[\\/]*)
37054  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37055  ;;
37056  *)
37057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37058for as_dir in $PATH
37059do
37060  IFS=$as_save_IFS
37061  test -z "$as_dir" && as_dir=.
37062    for ac_exec_ext in '' $ac_executable_extensions; do
37063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37064    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37066    break 2
37067  fi
37068done
37069  done
37070IFS=$as_save_IFS
37071
37072  ;;
37073esac
37074fi
37075MCS=$ac_cv_path_MCS
37076if test -n "$MCS"; then
37077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37078$as_echo "$MCS" >&6; }
37079else
37080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37081$as_echo "no" >&6; }
37082fi
37083
37084
37085  test -n "$MCS" && break
37086done
37087
37088    else
37089      # If it succeeded, then it was overridden by the user. We will use it
37090      # for the tool.
37091
37092      # First remove it from the list of overridden variables, so we can test
37093      # for unknown variables in the end.
37094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37095
37096      # Check if the provided tool contains a complete path.
37097      tool_specified="$MCS"
37098      tool_basename="${tool_specified##*/}"
37099      if test "x$tool_basename" = "x$tool_specified"; then
37100        # A command without a complete path is provided, search $PATH.
37101        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
37102$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
37103        # Extract the first word of "$tool_basename", so it can be a program name with args.
37104set dummy $tool_basename; ac_word=$2
37105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37106$as_echo_n "checking for $ac_word... " >&6; }
37107if ${ac_cv_path_MCS+:} false; then :
37108  $as_echo_n "(cached) " >&6
37109else
37110  case $MCS in
37111  [\\/]* | ?:[\\/]*)
37112  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37113  ;;
37114  *)
37115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37116for as_dir in $PATH
37117do
37118  IFS=$as_save_IFS
37119  test -z "$as_dir" && as_dir=.
37120    for ac_exec_ext in '' $ac_executable_extensions; do
37121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37122    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37124    break 2
37125  fi
37126done
37127  done
37128IFS=$as_save_IFS
37129
37130  ;;
37131esac
37132fi
37133MCS=$ac_cv_path_MCS
37134if test -n "$MCS"; then
37135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37136$as_echo "$MCS" >&6; }
37137else
37138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37139$as_echo "no" >&6; }
37140fi
37141
37142
37143        if test "x$MCS" = x; then
37144          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37145        fi
37146      else
37147        # Otherwise we believe it is a complete path. Use it as it is.
37148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
37149$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
37150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
37151$as_echo_n "checking for MCS... " >&6; }
37152        if test ! -x "$tool_specified"; then
37153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37154$as_echo "not found" >&6; }
37155          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
37156        fi
37157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37158$as_echo "$tool_specified" >&6; }
37159      fi
37160    fi
37161  fi
37162
37163
37164
37165  # Only process if variable expands to non-empty
37166
37167  if test "x$MCS" != x; then
37168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37169
37170  # First separate the path from the arguments. This will split at the first
37171  # space.
37172  complete="$MCS"
37173  path="${complete%% *}"
37174  tmp="$complete EOL"
37175  arguments="${tmp#* }"
37176
37177  # Input might be given as Windows format, start by converting to
37178  # unix format.
37179  new_path=`$CYGPATH -u "$path"`
37180
37181  # Now try to locate executable using which
37182  new_path=`$WHICH "$new_path" 2> /dev/null`
37183  # bat and cmd files are not always considered executable in cygwin causing which
37184  # to not find them
37185  if test "x$new_path" = x \
37186      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37187      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37188    new_path=`$CYGPATH -u "$path"`
37189  fi
37190  if test "x$new_path" = x; then
37191    # Oops. Which didn't find the executable.
37192    # The splitting of arguments from the executable at a space might have been incorrect,
37193    # since paths with space are more likely in Windows. Give it another try with the whole
37194    # argument.
37195    path="$complete"
37196    arguments="EOL"
37197    new_path=`$CYGPATH -u "$path"`
37198    new_path=`$WHICH "$new_path" 2> /dev/null`
37199    # bat and cmd files are not always considered executable in cygwin causing which
37200    # to not find them
37201    if test "x$new_path" = x \
37202        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37203        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37204      new_path=`$CYGPATH -u "$path"`
37205    fi
37206    if test "x$new_path" = x; then
37207      # It's still not found. Now this is an unrecoverable error.
37208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37209$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37210      has_space=`$ECHO "$complete" | $GREP " "`
37211      if test "x$has_space" != x; then
37212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37214      fi
37215      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37216    fi
37217  fi
37218
37219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37222  # "foo.exe" is OK but "foo" is an error.
37223  #
37224  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37225  # It is also a way to make sure we got the proper file name for the real test later on.
37226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37227  if test "x$test_shortpath" = x; then
37228    # Short path failed, file does not exist as specified.
37229    # Try adding .exe or .cmd
37230    if test -f "${new_path}.exe"; then
37231      input_to_shortpath="${new_path}.exe"
37232    elif test -f "${new_path}.cmd"; then
37233      input_to_shortpath="${new_path}.cmd"
37234    else
37235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
37236$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
37237      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37238$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37239      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37240    fi
37241  else
37242    input_to_shortpath="$new_path"
37243  fi
37244
37245  # Call helper function which possibly converts this using DOS-style short mode.
37246  # If so, the updated path is stored in $new_path.
37247  new_path="$input_to_shortpath"
37248
37249  input_path="$input_to_shortpath"
37250  # Check if we need to convert this using DOS-style short mode. If the path
37251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37252  # take no chances and rewrite it.
37253  # Note: m4 eats our [], so we need to use [ and ] instead.
37254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37255  if test "x$has_forbidden_chars" != x; then
37256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37260      # Going to short mode and back again did indeed matter. Since short mode is
37261      # case insensitive, let's make it lowercase to improve readability.
37262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37263      # Now convert it back to Unix-stile (cygpath)
37264      input_path=`$CYGPATH -u "$shortmode_path"`
37265      new_path="$input_path"
37266    fi
37267  fi
37268
37269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37270  if test "x$test_cygdrive_prefix" = x; then
37271    # As a simple fix, exclude /usr/bin since it's not a real path.
37272    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37274      # a path prefixed by /cygdrive for fixpath to work.
37275      new_path="$CYGWIN_ROOT_PATH$input_path"
37276    fi
37277  fi
37278
37279  # remove trailing .exe if any
37280  new_path="${new_path/%.exe/}"
37281
37282    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37283
37284  # First separate the path from the arguments. This will split at the first
37285  # space.
37286  complete="$MCS"
37287  path="${complete%% *}"
37288  tmp="$complete EOL"
37289  arguments="${tmp#* }"
37290
37291  # Input might be given as Windows format, start by converting to
37292  # unix format.
37293  new_path="$path"
37294
37295  windows_path="$new_path"
37296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37297    unix_path=`$CYGPATH -u "$windows_path"`
37298    new_path="$unix_path"
37299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37301    new_path="$unix_path"
37302  fi
37303
37304
37305  # Now try to locate executable using which
37306  new_path=`$WHICH "$new_path" 2> /dev/null`
37307
37308  if test "x$new_path" = x; then
37309    # Oops. Which didn't find the executable.
37310    # The splitting of arguments from the executable at a space might have been incorrect,
37311    # since paths with space are more likely in Windows. Give it another try with the whole
37312    # argument.
37313    path="$complete"
37314    arguments="EOL"
37315    new_path="$path"
37316
37317  windows_path="$new_path"
37318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37319    unix_path=`$CYGPATH -u "$windows_path"`
37320    new_path="$unix_path"
37321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37323    new_path="$unix_path"
37324  fi
37325
37326
37327    new_path=`$WHICH "$new_path" 2> /dev/null`
37328    # bat and cmd files are not always considered executable in MSYS causing which
37329    # to not find them
37330    if test "x$new_path" = x \
37331        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37332        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37333      new_path="$path"
37334
37335  windows_path="$new_path"
37336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37337    unix_path=`$CYGPATH -u "$windows_path"`
37338    new_path="$unix_path"
37339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37341    new_path="$unix_path"
37342  fi
37343
37344    fi
37345
37346    if test "x$new_path" = x; then
37347      # It's still not found. Now this is an unrecoverable error.
37348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37349$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37350      has_space=`$ECHO "$complete" | $GREP " "`
37351      if test "x$has_space" != x; then
37352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37354      fi
37355      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37356    fi
37357  fi
37358
37359  # Now new_path has a complete unix path to the binary
37360  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37361    # Keep paths in /bin as-is, but remove trailing .exe if any
37362    new_path="${new_path/%.exe/}"
37363    # Do not save /bin paths to all_fixpath_prefixes!
37364  else
37365    # Not in mixed or Windows style, start by that.
37366    new_path=`cmd //c echo $new_path`
37367
37368  input_path="$new_path"
37369  # Check if we need to convert this using DOS-style short mode. If the path
37370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37371  # take no chances and rewrite it.
37372  # Note: m4 eats our [], so we need to use [ and ] instead.
37373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37374  if test "x$has_forbidden_chars" != x; then
37375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37377  fi
37378
37379    # Output is in $new_path
37380
37381  windows_path="$new_path"
37382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37383    unix_path=`$CYGPATH -u "$windows_path"`
37384    new_path="$unix_path"
37385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37387    new_path="$unix_path"
37388  fi
37389
37390    # remove trailing .exe if any
37391    new_path="${new_path/%.exe/}"
37392
37393    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37394    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37395  fi
37396
37397    else
37398      # We're on a unix platform. Hooray! :)
37399      # First separate the path from the arguments. This will split at the first
37400      # space.
37401      complete="$MCS"
37402      path="${complete%% *}"
37403      tmp="$complete EOL"
37404      arguments="${tmp#* }"
37405
37406      # Cannot rely on the command "which" here since it doesn't always work.
37407      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37408      if test -z "$is_absolute_path"; then
37409        # Path to executable is not absolute. Find it.
37410        IFS_save="$IFS"
37411        IFS=:
37412        for p in $PATH; do
37413          if test -f "$p/$path" && test -x "$p/$path"; then
37414            new_path="$p/$path"
37415            break
37416          fi
37417        done
37418        IFS="$IFS_save"
37419      else
37420        # This is an absolute path, we can use it without further modifications.
37421        new_path="$path"
37422      fi
37423
37424      if test "x$new_path" = x; then
37425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37426$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37427        has_space=`$ECHO "$complete" | $GREP " "`
37428        if test "x$has_space" != x; then
37429          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37430$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37431        fi
37432        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37433      fi
37434    fi
37435
37436    # Now join together the path and the arguments once again
37437    if test "x$arguments" != xEOL; then
37438      new_complete="$new_path ${arguments% *}"
37439    else
37440      new_complete="$new_path"
37441    fi
37442
37443    if test "x$complete" != "x$new_complete"; then
37444      MCS="$new_complete"
37445      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37446$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37447    fi
37448  fi
37449
37450  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37451    # FIXME: we should unify this with the solaris case above.
37452
37453
37454  # Publish this variable in the help.
37455
37456
37457  if test "x$STRIP" = x; then
37458    # The variable is not set by user, try to locate tool using the code snippet
37459    if test -n "$ac_tool_prefix"; then
37460  for ac_prog in strip
37461  do
37462    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37463set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37465$as_echo_n "checking for $ac_word... " >&6; }
37466if ${ac_cv_prog_STRIP+:} false; then :
37467  $as_echo_n "(cached) " >&6
37468else
37469  if test -n "$STRIP"; then
37470  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37471else
37472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37473for as_dir in $PATH
37474do
37475  IFS=$as_save_IFS
37476  test -z "$as_dir" && as_dir=.
37477    for ac_exec_ext in '' $ac_executable_extensions; do
37478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37479    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37481    break 2
37482  fi
37483done
37484  done
37485IFS=$as_save_IFS
37486
37487fi
37488fi
37489STRIP=$ac_cv_prog_STRIP
37490if test -n "$STRIP"; then
37491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37492$as_echo "$STRIP" >&6; }
37493else
37494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37495$as_echo "no" >&6; }
37496fi
37497
37498
37499    test -n "$STRIP" && break
37500  done
37501fi
37502if test -z "$STRIP"; then
37503  ac_ct_STRIP=$STRIP
37504  for ac_prog in strip
37505do
37506  # Extract the first word of "$ac_prog", so it can be a program name with args.
37507set dummy $ac_prog; ac_word=$2
37508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37509$as_echo_n "checking for $ac_word... " >&6; }
37510if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37511  $as_echo_n "(cached) " >&6
37512else
37513  if test -n "$ac_ct_STRIP"; then
37514  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37515else
37516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37517for as_dir in $PATH
37518do
37519  IFS=$as_save_IFS
37520  test -z "$as_dir" && as_dir=.
37521    for ac_exec_ext in '' $ac_executable_extensions; do
37522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37523    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37525    break 2
37526  fi
37527done
37528  done
37529IFS=$as_save_IFS
37530
37531fi
37532fi
37533ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37534if test -n "$ac_ct_STRIP"; then
37535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37536$as_echo "$ac_ct_STRIP" >&6; }
37537else
37538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37539$as_echo "no" >&6; }
37540fi
37541
37542
37543  test -n "$ac_ct_STRIP" && break
37544done
37545
37546  if test "x$ac_ct_STRIP" = x; then
37547    STRIP=""
37548  else
37549    case $cross_compiling:$ac_tool_warned in
37550yes:)
37551{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37552$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37553ac_tool_warned=yes ;;
37554esac
37555    STRIP=$ac_ct_STRIP
37556  fi
37557fi
37558
37559  else
37560    # The variable is set, but is it from the command line or the environment?
37561
37562    # Try to remove the string !STRIP! from our list.
37563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37565      # If it failed, the variable was not from the command line. Ignore it,
37566      # but warn the user (except for BASH, which is always set by the calling BASH).
37567      if test "xSTRIP" != xBASH; then
37568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37569$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37570      fi
37571      # Try to locate tool using the code snippet
37572      if test -n "$ac_tool_prefix"; then
37573  for ac_prog in strip
37574  do
37575    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37576set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37578$as_echo_n "checking for $ac_word... " >&6; }
37579if ${ac_cv_prog_STRIP+:} false; then :
37580  $as_echo_n "(cached) " >&6
37581else
37582  if test -n "$STRIP"; then
37583  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37584else
37585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37586for as_dir in $PATH
37587do
37588  IFS=$as_save_IFS
37589  test -z "$as_dir" && as_dir=.
37590    for ac_exec_ext in '' $ac_executable_extensions; do
37591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37592    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37594    break 2
37595  fi
37596done
37597  done
37598IFS=$as_save_IFS
37599
37600fi
37601fi
37602STRIP=$ac_cv_prog_STRIP
37603if test -n "$STRIP"; then
37604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37605$as_echo "$STRIP" >&6; }
37606else
37607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37608$as_echo "no" >&6; }
37609fi
37610
37611
37612    test -n "$STRIP" && break
37613  done
37614fi
37615if test -z "$STRIP"; then
37616  ac_ct_STRIP=$STRIP
37617  for ac_prog in strip
37618do
37619  # Extract the first word of "$ac_prog", so it can be a program name with args.
37620set dummy $ac_prog; ac_word=$2
37621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37622$as_echo_n "checking for $ac_word... " >&6; }
37623if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37624  $as_echo_n "(cached) " >&6
37625else
37626  if test -n "$ac_ct_STRIP"; then
37627  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37628else
37629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37630for as_dir in $PATH
37631do
37632  IFS=$as_save_IFS
37633  test -z "$as_dir" && as_dir=.
37634    for ac_exec_ext in '' $ac_executable_extensions; do
37635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37636    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37638    break 2
37639  fi
37640done
37641  done
37642IFS=$as_save_IFS
37643
37644fi
37645fi
37646ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37647if test -n "$ac_ct_STRIP"; then
37648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37649$as_echo "$ac_ct_STRIP" >&6; }
37650else
37651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37652$as_echo "no" >&6; }
37653fi
37654
37655
37656  test -n "$ac_ct_STRIP" && break
37657done
37658
37659  if test "x$ac_ct_STRIP" = x; then
37660    STRIP=""
37661  else
37662    case $cross_compiling:$ac_tool_warned in
37663yes:)
37664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37666ac_tool_warned=yes ;;
37667esac
37668    STRIP=$ac_ct_STRIP
37669  fi
37670fi
37671
37672    else
37673      # If it succeeded, then it was overridden by the user. We will use it
37674      # for the tool.
37675
37676      # First remove it from the list of overridden variables, so we can test
37677      # for unknown variables in the end.
37678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37679
37680      # Check if the provided tool contains a complete path.
37681      tool_specified="$STRIP"
37682      tool_basename="${tool_specified##*/}"
37683      if test "x$tool_basename" = "x$tool_specified"; then
37684        # A command without a complete path is provided, search $PATH.
37685        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37686$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37687        # Extract the first word of "$tool_basename", so it can be a program name with args.
37688set dummy $tool_basename; ac_word=$2
37689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37690$as_echo_n "checking for $ac_word... " >&6; }
37691if ${ac_cv_path_STRIP+:} false; then :
37692  $as_echo_n "(cached) " >&6
37693else
37694  case $STRIP in
37695  [\\/]* | ?:[\\/]*)
37696  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37697  ;;
37698  *)
37699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37700for as_dir in $PATH
37701do
37702  IFS=$as_save_IFS
37703  test -z "$as_dir" && as_dir=.
37704    for ac_exec_ext in '' $ac_executable_extensions; do
37705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37706    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37708    break 2
37709  fi
37710done
37711  done
37712IFS=$as_save_IFS
37713
37714  ;;
37715esac
37716fi
37717STRIP=$ac_cv_path_STRIP
37718if test -n "$STRIP"; then
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37720$as_echo "$STRIP" >&6; }
37721else
37722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37723$as_echo "no" >&6; }
37724fi
37725
37726
37727        if test "x$STRIP" = x; then
37728          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37729        fi
37730      else
37731        # Otherwise we believe it is a complete path. Use it as it is.
37732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37733$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37735$as_echo_n "checking for STRIP... " >&6; }
37736        if test ! -x "$tool_specified"; then
37737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37738$as_echo "not found" >&6; }
37739          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37740        fi
37741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37742$as_echo "$tool_specified" >&6; }
37743      fi
37744    fi
37745  fi
37746
37747
37748
37749  # Only process if variable expands to non-empty
37750
37751  if test "x$STRIP" != x; then
37752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37753
37754  # First separate the path from the arguments. This will split at the first
37755  # space.
37756  complete="$STRIP"
37757  path="${complete%% *}"
37758  tmp="$complete EOL"
37759  arguments="${tmp#* }"
37760
37761  # Input might be given as Windows format, start by converting to
37762  # unix format.
37763  new_path=`$CYGPATH -u "$path"`
37764
37765  # Now try to locate executable using which
37766  new_path=`$WHICH "$new_path" 2> /dev/null`
37767  # bat and cmd files are not always considered executable in cygwin causing which
37768  # to not find them
37769  if test "x$new_path" = x \
37770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37772    new_path=`$CYGPATH -u "$path"`
37773  fi
37774  if test "x$new_path" = x; then
37775    # Oops. Which didn't find the executable.
37776    # The splitting of arguments from the executable at a space might have been incorrect,
37777    # since paths with space are more likely in Windows. Give it another try with the whole
37778    # argument.
37779    path="$complete"
37780    arguments="EOL"
37781    new_path=`$CYGPATH -u "$path"`
37782    new_path=`$WHICH "$new_path" 2> /dev/null`
37783    # bat and cmd files are not always considered executable in cygwin causing which
37784    # to not find them
37785    if test "x$new_path" = x \
37786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37788      new_path=`$CYGPATH -u "$path"`
37789    fi
37790    if test "x$new_path" = x; then
37791      # It's still not found. Now this is an unrecoverable error.
37792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37793$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37794      has_space=`$ECHO "$complete" | $GREP " "`
37795      if test "x$has_space" != x; then
37796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37798      fi
37799      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37800    fi
37801  fi
37802
37803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37806  # "foo.exe" is OK but "foo" is an error.
37807  #
37808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37809  # It is also a way to make sure we got the proper file name for the real test later on.
37810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37811  if test "x$test_shortpath" = x; then
37812    # Short path failed, file does not exist as specified.
37813    # Try adding .exe or .cmd
37814    if test -f "${new_path}.exe"; then
37815      input_to_shortpath="${new_path}.exe"
37816    elif test -f "${new_path}.cmd"; then
37817      input_to_shortpath="${new_path}.cmd"
37818    else
37819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37820$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37823      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37824    fi
37825  else
37826    input_to_shortpath="$new_path"
37827  fi
37828
37829  # Call helper function which possibly converts this using DOS-style short mode.
37830  # If so, the updated path is stored in $new_path.
37831  new_path="$input_to_shortpath"
37832
37833  input_path="$input_to_shortpath"
37834  # Check if we need to convert this using DOS-style short mode. If the path
37835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37836  # take no chances and rewrite it.
37837  # Note: m4 eats our [], so we need to use [ and ] instead.
37838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37839  if test "x$has_forbidden_chars" != x; then
37840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37844      # Going to short mode and back again did indeed matter. Since short mode is
37845      # case insensitive, let's make it lowercase to improve readability.
37846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37847      # Now convert it back to Unix-stile (cygpath)
37848      input_path=`$CYGPATH -u "$shortmode_path"`
37849      new_path="$input_path"
37850    fi
37851  fi
37852
37853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37854  if test "x$test_cygdrive_prefix" = x; then
37855    # As a simple fix, exclude /usr/bin since it's not a real path.
37856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37858      # a path prefixed by /cygdrive for fixpath to work.
37859      new_path="$CYGWIN_ROOT_PATH$input_path"
37860    fi
37861  fi
37862
37863  # remove trailing .exe if any
37864  new_path="${new_path/%.exe/}"
37865
37866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37867
37868  # First separate the path from the arguments. This will split at the first
37869  # space.
37870  complete="$STRIP"
37871  path="${complete%% *}"
37872  tmp="$complete EOL"
37873  arguments="${tmp#* }"
37874
37875  # Input might be given as Windows format, start by converting to
37876  # unix format.
37877  new_path="$path"
37878
37879  windows_path="$new_path"
37880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37881    unix_path=`$CYGPATH -u "$windows_path"`
37882    new_path="$unix_path"
37883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37885    new_path="$unix_path"
37886  fi
37887
37888
37889  # Now try to locate executable using which
37890  new_path=`$WHICH "$new_path" 2> /dev/null`
37891
37892  if test "x$new_path" = x; then
37893    # Oops. Which didn't find the executable.
37894    # The splitting of arguments from the executable at a space might have been incorrect,
37895    # since paths with space are more likely in Windows. Give it another try with the whole
37896    # argument.
37897    path="$complete"
37898    arguments="EOL"
37899    new_path="$path"
37900
37901  windows_path="$new_path"
37902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37903    unix_path=`$CYGPATH -u "$windows_path"`
37904    new_path="$unix_path"
37905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37907    new_path="$unix_path"
37908  fi
37909
37910
37911    new_path=`$WHICH "$new_path" 2> /dev/null`
37912    # bat and cmd files are not always considered executable in MSYS causing which
37913    # to not find them
37914    if test "x$new_path" = x \
37915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37917      new_path="$path"
37918
37919  windows_path="$new_path"
37920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37921    unix_path=`$CYGPATH -u "$windows_path"`
37922    new_path="$unix_path"
37923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37925    new_path="$unix_path"
37926  fi
37927
37928    fi
37929
37930    if test "x$new_path" = x; then
37931      # It's still not found. Now this is an unrecoverable error.
37932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37933$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37934      has_space=`$ECHO "$complete" | $GREP " "`
37935      if test "x$has_space" != x; then
37936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37938      fi
37939      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37940    fi
37941  fi
37942
37943  # Now new_path has a complete unix path to the binary
37944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37945    # Keep paths in /bin as-is, but remove trailing .exe if any
37946    new_path="${new_path/%.exe/}"
37947    # Do not save /bin paths to all_fixpath_prefixes!
37948  else
37949    # Not in mixed or Windows style, start by that.
37950    new_path=`cmd //c echo $new_path`
37951
37952  input_path="$new_path"
37953  # Check if we need to convert this using DOS-style short mode. If the path
37954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37955  # take no chances and rewrite it.
37956  # Note: m4 eats our [], so we need to use [ and ] instead.
37957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37958  if test "x$has_forbidden_chars" != x; then
37959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37961  fi
37962
37963    # Output is in $new_path
37964
37965  windows_path="$new_path"
37966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37967    unix_path=`$CYGPATH -u "$windows_path"`
37968    new_path="$unix_path"
37969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37971    new_path="$unix_path"
37972  fi
37973
37974    # remove trailing .exe if any
37975    new_path="${new_path/%.exe/}"
37976
37977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37979  fi
37980
37981    else
37982      # We're on a unix platform. Hooray! :)
37983      # First separate the path from the arguments. This will split at the first
37984      # space.
37985      complete="$STRIP"
37986      path="${complete%% *}"
37987      tmp="$complete EOL"
37988      arguments="${tmp#* }"
37989
37990      # Cannot rely on the command "which" here since it doesn't always work.
37991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37992      if test -z "$is_absolute_path"; then
37993        # Path to executable is not absolute. Find it.
37994        IFS_save="$IFS"
37995        IFS=:
37996        for p in $PATH; do
37997          if test -f "$p/$path" && test -x "$p/$path"; then
37998            new_path="$p/$path"
37999            break
38000          fi
38001        done
38002        IFS="$IFS_save"
38003      else
38004        # This is an absolute path, we can use it without further modifications.
38005        new_path="$path"
38006      fi
38007
38008      if test "x$new_path" = x; then
38009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38010$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38011        has_space=`$ECHO "$complete" | $GREP " "`
38012        if test "x$has_space" != x; then
38013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38015        fi
38016        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38017      fi
38018    fi
38019
38020    # Now join together the path and the arguments once again
38021    if test "x$arguments" != xEOL; then
38022      new_complete="$new_path ${arguments% *}"
38023    else
38024      new_complete="$new_path"
38025    fi
38026
38027    if test "x$complete" != "x$new_complete"; then
38028      STRIP="$new_complete"
38029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38030$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38031    fi
38032  fi
38033
38034
38035
38036  # Publish this variable in the help.
38037
38038
38039  if test "x$NM" = x; then
38040    # The variable is not set by user, try to locate tool using the code snippet
38041    if test -n "$ac_tool_prefix"; then
38042  for ac_prog in nm
38043  do
38044    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38047$as_echo_n "checking for $ac_word... " >&6; }
38048if ${ac_cv_prog_NM+:} false; then :
38049  $as_echo_n "(cached) " >&6
38050else
38051  if test -n "$NM"; then
38052  ac_cv_prog_NM="$NM" # Let the user override the test.
38053else
38054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38055for as_dir in $PATH
38056do
38057  IFS=$as_save_IFS
38058  test -z "$as_dir" && as_dir=.
38059    for ac_exec_ext in '' $ac_executable_extensions; do
38060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38061    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38063    break 2
38064  fi
38065done
38066  done
38067IFS=$as_save_IFS
38068
38069fi
38070fi
38071NM=$ac_cv_prog_NM
38072if test -n "$NM"; then
38073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38074$as_echo "$NM" >&6; }
38075else
38076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38077$as_echo "no" >&6; }
38078fi
38079
38080
38081    test -n "$NM" && break
38082  done
38083fi
38084if test -z "$NM"; then
38085  ac_ct_NM=$NM
38086  for ac_prog in nm
38087do
38088  # Extract the first word of "$ac_prog", so it can be a program name with args.
38089set dummy $ac_prog; ac_word=$2
38090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38091$as_echo_n "checking for $ac_word... " >&6; }
38092if ${ac_cv_prog_ac_ct_NM+:} false; then :
38093  $as_echo_n "(cached) " >&6
38094else
38095  if test -n "$ac_ct_NM"; then
38096  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38097else
38098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38099for as_dir in $PATH
38100do
38101  IFS=$as_save_IFS
38102  test -z "$as_dir" && as_dir=.
38103    for ac_exec_ext in '' $ac_executable_extensions; do
38104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38105    ac_cv_prog_ac_ct_NM="$ac_prog"
38106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38107    break 2
38108  fi
38109done
38110  done
38111IFS=$as_save_IFS
38112
38113fi
38114fi
38115ac_ct_NM=$ac_cv_prog_ac_ct_NM
38116if test -n "$ac_ct_NM"; then
38117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38118$as_echo "$ac_ct_NM" >&6; }
38119else
38120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38121$as_echo "no" >&6; }
38122fi
38123
38124
38125  test -n "$ac_ct_NM" && break
38126done
38127
38128  if test "x$ac_ct_NM" = x; then
38129    NM=""
38130  else
38131    case $cross_compiling:$ac_tool_warned in
38132yes:)
38133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38135ac_tool_warned=yes ;;
38136esac
38137    NM=$ac_ct_NM
38138  fi
38139fi
38140
38141  else
38142    # The variable is set, but is it from the command line or the environment?
38143
38144    # Try to remove the string !NM! from our list.
38145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38147      # If it failed, the variable was not from the command line. Ignore it,
38148      # but warn the user (except for BASH, which is always set by the calling BASH).
38149      if test "xNM" != xBASH; then
38150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38151$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38152      fi
38153      # Try to locate tool using the code snippet
38154      if test -n "$ac_tool_prefix"; then
38155  for ac_prog in nm
38156  do
38157    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38158set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38160$as_echo_n "checking for $ac_word... " >&6; }
38161if ${ac_cv_prog_NM+:} false; then :
38162  $as_echo_n "(cached) " >&6
38163else
38164  if test -n "$NM"; then
38165  ac_cv_prog_NM="$NM" # Let the user override the test.
38166else
38167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38168for as_dir in $PATH
38169do
38170  IFS=$as_save_IFS
38171  test -z "$as_dir" && as_dir=.
38172    for ac_exec_ext in '' $ac_executable_extensions; do
38173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38174    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38176    break 2
38177  fi
38178done
38179  done
38180IFS=$as_save_IFS
38181
38182fi
38183fi
38184NM=$ac_cv_prog_NM
38185if test -n "$NM"; then
38186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38187$as_echo "$NM" >&6; }
38188else
38189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38190$as_echo "no" >&6; }
38191fi
38192
38193
38194    test -n "$NM" && break
38195  done
38196fi
38197if test -z "$NM"; then
38198  ac_ct_NM=$NM
38199  for ac_prog in nm
38200do
38201  # Extract the first word of "$ac_prog", so it can be a program name with args.
38202set dummy $ac_prog; ac_word=$2
38203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38204$as_echo_n "checking for $ac_word... " >&6; }
38205if ${ac_cv_prog_ac_ct_NM+:} false; then :
38206  $as_echo_n "(cached) " >&6
38207else
38208  if test -n "$ac_ct_NM"; then
38209  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38210else
38211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38212for as_dir in $PATH
38213do
38214  IFS=$as_save_IFS
38215  test -z "$as_dir" && as_dir=.
38216    for ac_exec_ext in '' $ac_executable_extensions; do
38217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38218    ac_cv_prog_ac_ct_NM="$ac_prog"
38219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38220    break 2
38221  fi
38222done
38223  done
38224IFS=$as_save_IFS
38225
38226fi
38227fi
38228ac_ct_NM=$ac_cv_prog_ac_ct_NM
38229if test -n "$ac_ct_NM"; then
38230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38231$as_echo "$ac_ct_NM" >&6; }
38232else
38233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38234$as_echo "no" >&6; }
38235fi
38236
38237
38238  test -n "$ac_ct_NM" && break
38239done
38240
38241  if test "x$ac_ct_NM" = x; then
38242    NM=""
38243  else
38244    case $cross_compiling:$ac_tool_warned in
38245yes:)
38246{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38247$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38248ac_tool_warned=yes ;;
38249esac
38250    NM=$ac_ct_NM
38251  fi
38252fi
38253
38254    else
38255      # If it succeeded, then it was overridden by the user. We will use it
38256      # for the tool.
38257
38258      # First remove it from the list of overridden variables, so we can test
38259      # for unknown variables in the end.
38260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38261
38262      # Check if the provided tool contains a complete path.
38263      tool_specified="$NM"
38264      tool_basename="${tool_specified##*/}"
38265      if test "x$tool_basename" = "x$tool_specified"; then
38266        # A command without a complete path is provided, search $PATH.
38267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38268$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38269        # Extract the first word of "$tool_basename", so it can be a program name with args.
38270set dummy $tool_basename; ac_word=$2
38271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38272$as_echo_n "checking for $ac_word... " >&6; }
38273if ${ac_cv_path_NM+:} false; then :
38274  $as_echo_n "(cached) " >&6
38275else
38276  case $NM in
38277  [\\/]* | ?:[\\/]*)
38278  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38279  ;;
38280  *)
38281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38282for as_dir in $PATH
38283do
38284  IFS=$as_save_IFS
38285  test -z "$as_dir" && as_dir=.
38286    for ac_exec_ext in '' $ac_executable_extensions; do
38287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38288    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38290    break 2
38291  fi
38292done
38293  done
38294IFS=$as_save_IFS
38295
38296  ;;
38297esac
38298fi
38299NM=$ac_cv_path_NM
38300if test -n "$NM"; then
38301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38302$as_echo "$NM" >&6; }
38303else
38304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38305$as_echo "no" >&6; }
38306fi
38307
38308
38309        if test "x$NM" = x; then
38310          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38311        fi
38312      else
38313        # Otherwise we believe it is a complete path. Use it as it is.
38314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38315$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38317$as_echo_n "checking for NM... " >&6; }
38318        if test ! -x "$tool_specified"; then
38319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38320$as_echo "not found" >&6; }
38321          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38322        fi
38323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38324$as_echo "$tool_specified" >&6; }
38325      fi
38326    fi
38327  fi
38328
38329
38330
38331  # Only process if variable expands to non-empty
38332
38333  if test "x$NM" != x; then
38334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38335
38336  # First separate the path from the arguments. This will split at the first
38337  # space.
38338  complete="$NM"
38339  path="${complete%% *}"
38340  tmp="$complete EOL"
38341  arguments="${tmp#* }"
38342
38343  # Input might be given as Windows format, start by converting to
38344  # unix format.
38345  new_path=`$CYGPATH -u "$path"`
38346
38347  # Now try to locate executable using which
38348  new_path=`$WHICH "$new_path" 2> /dev/null`
38349  # bat and cmd files are not always considered executable in cygwin causing which
38350  # to not find them
38351  if test "x$new_path" = x \
38352      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38353      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38354    new_path=`$CYGPATH -u "$path"`
38355  fi
38356  if test "x$new_path" = x; then
38357    # Oops. Which didn't find the executable.
38358    # The splitting of arguments from the executable at a space might have been incorrect,
38359    # since paths with space are more likely in Windows. Give it another try with the whole
38360    # argument.
38361    path="$complete"
38362    arguments="EOL"
38363    new_path=`$CYGPATH -u "$path"`
38364    new_path=`$WHICH "$new_path" 2> /dev/null`
38365    # bat and cmd files are not always considered executable in cygwin causing which
38366    # to not find them
38367    if test "x$new_path" = x \
38368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38370      new_path=`$CYGPATH -u "$path"`
38371    fi
38372    if test "x$new_path" = x; then
38373      # It's still not found. Now this is an unrecoverable error.
38374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38375$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38376      has_space=`$ECHO "$complete" | $GREP " "`
38377      if test "x$has_space" != x; then
38378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38380      fi
38381      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38382    fi
38383  fi
38384
38385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38388  # "foo.exe" is OK but "foo" is an error.
38389  #
38390  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38391  # It is also a way to make sure we got the proper file name for the real test later on.
38392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38393  if test "x$test_shortpath" = x; then
38394    # Short path failed, file does not exist as specified.
38395    # Try adding .exe or .cmd
38396    if test -f "${new_path}.exe"; then
38397      input_to_shortpath="${new_path}.exe"
38398    elif test -f "${new_path}.cmd"; then
38399      input_to_shortpath="${new_path}.cmd"
38400    else
38401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38402$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38405      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38406    fi
38407  else
38408    input_to_shortpath="$new_path"
38409  fi
38410
38411  # Call helper function which possibly converts this using DOS-style short mode.
38412  # If so, the updated path is stored in $new_path.
38413  new_path="$input_to_shortpath"
38414
38415  input_path="$input_to_shortpath"
38416  # Check if we need to convert this using DOS-style short mode. If the path
38417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38418  # take no chances and rewrite it.
38419  # Note: m4 eats our [], so we need to use [ and ] instead.
38420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38421  if test "x$has_forbidden_chars" != x; then
38422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38426      # Going to short mode and back again did indeed matter. Since short mode is
38427      # case insensitive, let's make it lowercase to improve readability.
38428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38429      # Now convert it back to Unix-stile (cygpath)
38430      input_path=`$CYGPATH -u "$shortmode_path"`
38431      new_path="$input_path"
38432    fi
38433  fi
38434
38435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38436  if test "x$test_cygdrive_prefix" = x; then
38437    # As a simple fix, exclude /usr/bin since it's not a real path.
38438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38440      # a path prefixed by /cygdrive for fixpath to work.
38441      new_path="$CYGWIN_ROOT_PATH$input_path"
38442    fi
38443  fi
38444
38445  # remove trailing .exe if any
38446  new_path="${new_path/%.exe/}"
38447
38448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38449
38450  # First separate the path from the arguments. This will split at the first
38451  # space.
38452  complete="$NM"
38453  path="${complete%% *}"
38454  tmp="$complete EOL"
38455  arguments="${tmp#* }"
38456
38457  # Input might be given as Windows format, start by converting to
38458  # unix format.
38459  new_path="$path"
38460
38461  windows_path="$new_path"
38462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38463    unix_path=`$CYGPATH -u "$windows_path"`
38464    new_path="$unix_path"
38465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38467    new_path="$unix_path"
38468  fi
38469
38470
38471  # Now try to locate executable using which
38472  new_path=`$WHICH "$new_path" 2> /dev/null`
38473
38474  if test "x$new_path" = x; then
38475    # Oops. Which didn't find the executable.
38476    # The splitting of arguments from the executable at a space might have been incorrect,
38477    # since paths with space are more likely in Windows. Give it another try with the whole
38478    # argument.
38479    path="$complete"
38480    arguments="EOL"
38481    new_path="$path"
38482
38483  windows_path="$new_path"
38484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38485    unix_path=`$CYGPATH -u "$windows_path"`
38486    new_path="$unix_path"
38487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38489    new_path="$unix_path"
38490  fi
38491
38492
38493    new_path=`$WHICH "$new_path" 2> /dev/null`
38494    # bat and cmd files are not always considered executable in MSYS causing which
38495    # to not find them
38496    if test "x$new_path" = x \
38497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38499      new_path="$path"
38500
38501  windows_path="$new_path"
38502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38503    unix_path=`$CYGPATH -u "$windows_path"`
38504    new_path="$unix_path"
38505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38507    new_path="$unix_path"
38508  fi
38509
38510    fi
38511
38512    if test "x$new_path" = x; then
38513      # It's still not found. Now this is an unrecoverable error.
38514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38515$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38516      has_space=`$ECHO "$complete" | $GREP " "`
38517      if test "x$has_space" != x; then
38518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38520      fi
38521      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38522    fi
38523  fi
38524
38525  # Now new_path has a complete unix path to the binary
38526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38527    # Keep paths in /bin as-is, but remove trailing .exe if any
38528    new_path="${new_path/%.exe/}"
38529    # Do not save /bin paths to all_fixpath_prefixes!
38530  else
38531    # Not in mixed or Windows style, start by that.
38532    new_path=`cmd //c echo $new_path`
38533
38534  input_path="$new_path"
38535  # Check if we need to convert this using DOS-style short mode. If the path
38536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38537  # take no chances and rewrite it.
38538  # Note: m4 eats our [], so we need to use [ and ] instead.
38539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38540  if test "x$has_forbidden_chars" != x; then
38541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38543  fi
38544
38545    # Output is in $new_path
38546
38547  windows_path="$new_path"
38548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38549    unix_path=`$CYGPATH -u "$windows_path"`
38550    new_path="$unix_path"
38551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38553    new_path="$unix_path"
38554  fi
38555
38556    # remove trailing .exe if any
38557    new_path="${new_path/%.exe/}"
38558
38559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38561  fi
38562
38563    else
38564      # We're on a unix platform. Hooray! :)
38565      # First separate the path from the arguments. This will split at the first
38566      # space.
38567      complete="$NM"
38568      path="${complete%% *}"
38569      tmp="$complete EOL"
38570      arguments="${tmp#* }"
38571
38572      # Cannot rely on the command "which" here since it doesn't always work.
38573      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38574      if test -z "$is_absolute_path"; then
38575        # Path to executable is not absolute. Find it.
38576        IFS_save="$IFS"
38577        IFS=:
38578        for p in $PATH; do
38579          if test -f "$p/$path" && test -x "$p/$path"; then
38580            new_path="$p/$path"
38581            break
38582          fi
38583        done
38584        IFS="$IFS_save"
38585      else
38586        # This is an absolute path, we can use it without further modifications.
38587        new_path="$path"
38588      fi
38589
38590      if test "x$new_path" = x; then
38591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38592$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38593        has_space=`$ECHO "$complete" | $GREP " "`
38594        if test "x$has_space" != x; then
38595          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38597        fi
38598        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38599      fi
38600    fi
38601
38602    # Now join together the path and the arguments once again
38603    if test "x$arguments" != xEOL; then
38604      new_complete="$new_path ${arguments% *}"
38605    else
38606      new_complete="$new_path"
38607    fi
38608
38609    if test "x$complete" != "x$new_complete"; then
38610      NM="$new_complete"
38611      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38612$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38613    fi
38614  fi
38615
38616    GNM="$NM"
38617
38618  fi
38619
38620  # objcopy is used for moving debug symbols to separate files when
38621  # full debug symbols are enabled.
38622  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38623
38624
38625  # Publish this variable in the help.
38626
38627
38628  if test "x$OBJCOPY" = x; then
38629    # The variable is not set by user, try to locate tool using the code snippet
38630    if test -n "$ac_tool_prefix"; then
38631  for ac_prog in gobjcopy objcopy
38632  do
38633    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38634set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38636$as_echo_n "checking for $ac_word... " >&6; }
38637if ${ac_cv_prog_OBJCOPY+:} false; then :
38638  $as_echo_n "(cached) " >&6
38639else
38640  if test -n "$OBJCOPY"; then
38641  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38642else
38643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38644for as_dir in $PATH
38645do
38646  IFS=$as_save_IFS
38647  test -z "$as_dir" && as_dir=.
38648    for ac_exec_ext in '' $ac_executable_extensions; do
38649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38650    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38652    break 2
38653  fi
38654done
38655  done
38656IFS=$as_save_IFS
38657
38658fi
38659fi
38660OBJCOPY=$ac_cv_prog_OBJCOPY
38661if test -n "$OBJCOPY"; then
38662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38663$as_echo "$OBJCOPY" >&6; }
38664else
38665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38666$as_echo "no" >&6; }
38667fi
38668
38669
38670    test -n "$OBJCOPY" && break
38671  done
38672fi
38673if test -z "$OBJCOPY"; then
38674  ac_ct_OBJCOPY=$OBJCOPY
38675  for ac_prog in gobjcopy objcopy
38676do
38677  # Extract the first word of "$ac_prog", so it can be a program name with args.
38678set dummy $ac_prog; ac_word=$2
38679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38680$as_echo_n "checking for $ac_word... " >&6; }
38681if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38682  $as_echo_n "(cached) " >&6
38683else
38684  if test -n "$ac_ct_OBJCOPY"; then
38685  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38686else
38687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38688for as_dir in $PATH
38689do
38690  IFS=$as_save_IFS
38691  test -z "$as_dir" && as_dir=.
38692    for ac_exec_ext in '' $ac_executable_extensions; do
38693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38694    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38696    break 2
38697  fi
38698done
38699  done
38700IFS=$as_save_IFS
38701
38702fi
38703fi
38704ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38705if test -n "$ac_ct_OBJCOPY"; then
38706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38707$as_echo "$ac_ct_OBJCOPY" >&6; }
38708else
38709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38710$as_echo "no" >&6; }
38711fi
38712
38713
38714  test -n "$ac_ct_OBJCOPY" && break
38715done
38716
38717  if test "x$ac_ct_OBJCOPY" = x; then
38718    OBJCOPY=""
38719  else
38720    case $cross_compiling:$ac_tool_warned in
38721yes:)
38722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38724ac_tool_warned=yes ;;
38725esac
38726    OBJCOPY=$ac_ct_OBJCOPY
38727  fi
38728fi
38729
38730  else
38731    # The variable is set, but is it from the command line or the environment?
38732
38733    # Try to remove the string !OBJCOPY! from our list.
38734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38736      # If it failed, the variable was not from the command line. Ignore it,
38737      # but warn the user (except for BASH, which is always set by the calling BASH).
38738      if test "xOBJCOPY" != xBASH; then
38739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38740$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38741      fi
38742      # Try to locate tool using the code snippet
38743      if test -n "$ac_tool_prefix"; then
38744  for ac_prog in gobjcopy objcopy
38745  do
38746    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38747set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38749$as_echo_n "checking for $ac_word... " >&6; }
38750if ${ac_cv_prog_OBJCOPY+:} false; then :
38751  $as_echo_n "(cached) " >&6
38752else
38753  if test -n "$OBJCOPY"; then
38754  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38755else
38756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38757for as_dir in $PATH
38758do
38759  IFS=$as_save_IFS
38760  test -z "$as_dir" && as_dir=.
38761    for ac_exec_ext in '' $ac_executable_extensions; do
38762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38763    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38765    break 2
38766  fi
38767done
38768  done
38769IFS=$as_save_IFS
38770
38771fi
38772fi
38773OBJCOPY=$ac_cv_prog_OBJCOPY
38774if test -n "$OBJCOPY"; then
38775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38776$as_echo "$OBJCOPY" >&6; }
38777else
38778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38779$as_echo "no" >&6; }
38780fi
38781
38782
38783    test -n "$OBJCOPY" && break
38784  done
38785fi
38786if test -z "$OBJCOPY"; then
38787  ac_ct_OBJCOPY=$OBJCOPY
38788  for ac_prog in gobjcopy objcopy
38789do
38790  # Extract the first word of "$ac_prog", so it can be a program name with args.
38791set dummy $ac_prog; ac_word=$2
38792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38793$as_echo_n "checking for $ac_word... " >&6; }
38794if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38795  $as_echo_n "(cached) " >&6
38796else
38797  if test -n "$ac_ct_OBJCOPY"; then
38798  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38799else
38800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38801for as_dir in $PATH
38802do
38803  IFS=$as_save_IFS
38804  test -z "$as_dir" && as_dir=.
38805    for ac_exec_ext in '' $ac_executable_extensions; do
38806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38807    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38809    break 2
38810  fi
38811done
38812  done
38813IFS=$as_save_IFS
38814
38815fi
38816fi
38817ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38818if test -n "$ac_ct_OBJCOPY"; then
38819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38820$as_echo "$ac_ct_OBJCOPY" >&6; }
38821else
38822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38823$as_echo "no" >&6; }
38824fi
38825
38826
38827  test -n "$ac_ct_OBJCOPY" && break
38828done
38829
38830  if test "x$ac_ct_OBJCOPY" = x; then
38831    OBJCOPY=""
38832  else
38833    case $cross_compiling:$ac_tool_warned in
38834yes:)
38835{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38836$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38837ac_tool_warned=yes ;;
38838esac
38839    OBJCOPY=$ac_ct_OBJCOPY
38840  fi
38841fi
38842
38843    else
38844      # If it succeeded, then it was overridden by the user. We will use it
38845      # for the tool.
38846
38847      # First remove it from the list of overridden variables, so we can test
38848      # for unknown variables in the end.
38849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38850
38851      # Check if the provided tool contains a complete path.
38852      tool_specified="$OBJCOPY"
38853      tool_basename="${tool_specified##*/}"
38854      if test "x$tool_basename" = "x$tool_specified"; then
38855        # A command without a complete path is provided, search $PATH.
38856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38857$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38858        # Extract the first word of "$tool_basename", so it can be a program name with args.
38859set dummy $tool_basename; ac_word=$2
38860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38861$as_echo_n "checking for $ac_word... " >&6; }
38862if ${ac_cv_path_OBJCOPY+:} false; then :
38863  $as_echo_n "(cached) " >&6
38864else
38865  case $OBJCOPY in
38866  [\\/]* | ?:[\\/]*)
38867  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38868  ;;
38869  *)
38870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38871for as_dir in $PATH
38872do
38873  IFS=$as_save_IFS
38874  test -z "$as_dir" && as_dir=.
38875    for ac_exec_ext in '' $ac_executable_extensions; do
38876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38877    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38879    break 2
38880  fi
38881done
38882  done
38883IFS=$as_save_IFS
38884
38885  ;;
38886esac
38887fi
38888OBJCOPY=$ac_cv_path_OBJCOPY
38889if test -n "$OBJCOPY"; then
38890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38891$as_echo "$OBJCOPY" >&6; }
38892else
38893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38894$as_echo "no" >&6; }
38895fi
38896
38897
38898        if test "x$OBJCOPY" = x; then
38899          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38900        fi
38901      else
38902        # Otherwise we believe it is a complete path. Use it as it is.
38903        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38904$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38905        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38906$as_echo_n "checking for OBJCOPY... " >&6; }
38907        if test ! -x "$tool_specified"; then
38908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38909$as_echo "not found" >&6; }
38910          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38911        fi
38912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38913$as_echo "$tool_specified" >&6; }
38914      fi
38915    fi
38916  fi
38917
38918
38919    # Only call fixup if objcopy was found.
38920    if test -n "$OBJCOPY"; then
38921
38922  # Only process if variable expands to non-empty
38923
38924  if test "x$OBJCOPY" != x; then
38925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38926
38927  # First separate the path from the arguments. This will split at the first
38928  # space.
38929  complete="$OBJCOPY"
38930  path="${complete%% *}"
38931  tmp="$complete EOL"
38932  arguments="${tmp#* }"
38933
38934  # Input might be given as Windows format, start by converting to
38935  # unix format.
38936  new_path=`$CYGPATH -u "$path"`
38937
38938  # Now try to locate executable using which
38939  new_path=`$WHICH "$new_path" 2> /dev/null`
38940  # bat and cmd files are not always considered executable in cygwin causing which
38941  # to not find them
38942  if test "x$new_path" = x \
38943      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38944      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38945    new_path=`$CYGPATH -u "$path"`
38946  fi
38947  if test "x$new_path" = x; then
38948    # Oops. Which didn't find the executable.
38949    # The splitting of arguments from the executable at a space might have been incorrect,
38950    # since paths with space are more likely in Windows. Give it another try with the whole
38951    # argument.
38952    path="$complete"
38953    arguments="EOL"
38954    new_path=`$CYGPATH -u "$path"`
38955    new_path=`$WHICH "$new_path" 2> /dev/null`
38956    # bat and cmd files are not always considered executable in cygwin causing which
38957    # to not find them
38958    if test "x$new_path" = x \
38959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38961      new_path=`$CYGPATH -u "$path"`
38962    fi
38963    if test "x$new_path" = x; then
38964      # It's still not found. Now this is an unrecoverable error.
38965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38966$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38967      has_space=`$ECHO "$complete" | $GREP " "`
38968      if test "x$has_space" != x; then
38969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38971      fi
38972      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38973    fi
38974  fi
38975
38976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38979  # "foo.exe" is OK but "foo" is an error.
38980  #
38981  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38982  # It is also a way to make sure we got the proper file name for the real test later on.
38983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38984  if test "x$test_shortpath" = x; then
38985    # Short path failed, file does not exist as specified.
38986    # Try adding .exe or .cmd
38987    if test -f "${new_path}.exe"; then
38988      input_to_shortpath="${new_path}.exe"
38989    elif test -f "${new_path}.cmd"; then
38990      input_to_shortpath="${new_path}.cmd"
38991    else
38992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38993$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38996      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38997    fi
38998  else
38999    input_to_shortpath="$new_path"
39000  fi
39001
39002  # Call helper function which possibly converts this using DOS-style short mode.
39003  # If so, the updated path is stored in $new_path.
39004  new_path="$input_to_shortpath"
39005
39006  input_path="$input_to_shortpath"
39007  # Check if we need to convert this using DOS-style short mode. If the path
39008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39009  # take no chances and rewrite it.
39010  # Note: m4 eats our [], so we need to use [ and ] instead.
39011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39012  if test "x$has_forbidden_chars" != x; then
39013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39017      # Going to short mode and back again did indeed matter. Since short mode is
39018      # case insensitive, let's make it lowercase to improve readability.
39019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39020      # Now convert it back to Unix-stile (cygpath)
39021      input_path=`$CYGPATH -u "$shortmode_path"`
39022      new_path="$input_path"
39023    fi
39024  fi
39025
39026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39027  if test "x$test_cygdrive_prefix" = x; then
39028    # As a simple fix, exclude /usr/bin since it's not a real path.
39029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39031      # a path prefixed by /cygdrive for fixpath to work.
39032      new_path="$CYGWIN_ROOT_PATH$input_path"
39033    fi
39034  fi
39035
39036  # remove trailing .exe if any
39037  new_path="${new_path/%.exe/}"
39038
39039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39040
39041  # First separate the path from the arguments. This will split at the first
39042  # space.
39043  complete="$OBJCOPY"
39044  path="${complete%% *}"
39045  tmp="$complete EOL"
39046  arguments="${tmp#* }"
39047
39048  # Input might be given as Windows format, start by converting to
39049  # unix format.
39050  new_path="$path"
39051
39052  windows_path="$new_path"
39053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39054    unix_path=`$CYGPATH -u "$windows_path"`
39055    new_path="$unix_path"
39056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39058    new_path="$unix_path"
39059  fi
39060
39061
39062  # Now try to locate executable using which
39063  new_path=`$WHICH "$new_path" 2> /dev/null`
39064
39065  if test "x$new_path" = x; then
39066    # Oops. Which didn't find the executable.
39067    # The splitting of arguments from the executable at a space might have been incorrect,
39068    # since paths with space are more likely in Windows. Give it another try with the whole
39069    # argument.
39070    path="$complete"
39071    arguments="EOL"
39072    new_path="$path"
39073
39074  windows_path="$new_path"
39075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39076    unix_path=`$CYGPATH -u "$windows_path"`
39077    new_path="$unix_path"
39078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39080    new_path="$unix_path"
39081  fi
39082
39083
39084    new_path=`$WHICH "$new_path" 2> /dev/null`
39085    # bat and cmd files are not always considered executable in MSYS causing which
39086    # to not find them
39087    if test "x$new_path" = x \
39088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39090      new_path="$path"
39091
39092  windows_path="$new_path"
39093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39094    unix_path=`$CYGPATH -u "$windows_path"`
39095    new_path="$unix_path"
39096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39098    new_path="$unix_path"
39099  fi
39100
39101    fi
39102
39103    if test "x$new_path" = x; then
39104      # It's still not found. Now this is an unrecoverable error.
39105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39106$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39107      has_space=`$ECHO "$complete" | $GREP " "`
39108      if test "x$has_space" != x; then
39109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39111      fi
39112      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39113    fi
39114  fi
39115
39116  # Now new_path has a complete unix path to the binary
39117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39118    # Keep paths in /bin as-is, but remove trailing .exe if any
39119    new_path="${new_path/%.exe/}"
39120    # Do not save /bin paths to all_fixpath_prefixes!
39121  else
39122    # Not in mixed or Windows style, start by that.
39123    new_path=`cmd //c echo $new_path`
39124
39125  input_path="$new_path"
39126  # Check if we need to convert this using DOS-style short mode. If the path
39127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39128  # take no chances and rewrite it.
39129  # Note: m4 eats our [], so we need to use [ and ] instead.
39130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39131  if test "x$has_forbidden_chars" != x; then
39132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39134  fi
39135
39136    # Output is in $new_path
39137
39138  windows_path="$new_path"
39139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39140    unix_path=`$CYGPATH -u "$windows_path"`
39141    new_path="$unix_path"
39142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39144    new_path="$unix_path"
39145  fi
39146
39147    # remove trailing .exe if any
39148    new_path="${new_path/%.exe/}"
39149
39150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39152  fi
39153
39154    else
39155      # We're on a unix platform. Hooray! :)
39156      # First separate the path from the arguments. This will split at the first
39157      # space.
39158      complete="$OBJCOPY"
39159      path="${complete%% *}"
39160      tmp="$complete EOL"
39161      arguments="${tmp#* }"
39162
39163      # Cannot rely on the command "which" here since it doesn't always work.
39164      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39165      if test -z "$is_absolute_path"; then
39166        # Path to executable is not absolute. Find it.
39167        IFS_save="$IFS"
39168        IFS=:
39169        for p in $PATH; do
39170          if test -f "$p/$path" && test -x "$p/$path"; then
39171            new_path="$p/$path"
39172            break
39173          fi
39174        done
39175        IFS="$IFS_save"
39176      else
39177        # This is an absolute path, we can use it without further modifications.
39178        new_path="$path"
39179      fi
39180
39181      if test "x$new_path" = x; then
39182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39183$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39184        has_space=`$ECHO "$complete" | $GREP " "`
39185        if test "x$has_space" != x; then
39186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39188        fi
39189        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39190      fi
39191    fi
39192
39193    # Now join together the path and the arguments once again
39194    if test "x$arguments" != xEOL; then
39195      new_complete="$new_path ${arguments% *}"
39196    else
39197      new_complete="$new_path"
39198    fi
39199
39200    if test "x$complete" != "x$new_complete"; then
39201      OBJCOPY="$new_complete"
39202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39203$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39204    fi
39205  fi
39206
39207    fi
39208  fi
39209
39210
39211
39212  # Publish this variable in the help.
39213
39214
39215  if test "x$OBJDUMP" = x; then
39216    # The variable is not set by user, try to locate tool using the code snippet
39217    if test -n "$ac_tool_prefix"; then
39218  for ac_prog in gobjdump objdump
39219  do
39220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39223$as_echo_n "checking for $ac_word... " >&6; }
39224if ${ac_cv_prog_OBJDUMP+:} false; then :
39225  $as_echo_n "(cached) " >&6
39226else
39227  if test -n "$OBJDUMP"; then
39228  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39229else
39230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39231for as_dir in $PATH
39232do
39233  IFS=$as_save_IFS
39234  test -z "$as_dir" && as_dir=.
39235    for ac_exec_ext in '' $ac_executable_extensions; do
39236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39237    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39239    break 2
39240  fi
39241done
39242  done
39243IFS=$as_save_IFS
39244
39245fi
39246fi
39247OBJDUMP=$ac_cv_prog_OBJDUMP
39248if test -n "$OBJDUMP"; then
39249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39250$as_echo "$OBJDUMP" >&6; }
39251else
39252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39253$as_echo "no" >&6; }
39254fi
39255
39256
39257    test -n "$OBJDUMP" && break
39258  done
39259fi
39260if test -z "$OBJDUMP"; then
39261  ac_ct_OBJDUMP=$OBJDUMP
39262  for ac_prog in gobjdump objdump
39263do
39264  # Extract the first word of "$ac_prog", so it can be a program name with args.
39265set dummy $ac_prog; ac_word=$2
39266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39267$as_echo_n "checking for $ac_word... " >&6; }
39268if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39269  $as_echo_n "(cached) " >&6
39270else
39271  if test -n "$ac_ct_OBJDUMP"; then
39272  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39273else
39274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39275for as_dir in $PATH
39276do
39277  IFS=$as_save_IFS
39278  test -z "$as_dir" && as_dir=.
39279    for ac_exec_ext in '' $ac_executable_extensions; do
39280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39281    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39283    break 2
39284  fi
39285done
39286  done
39287IFS=$as_save_IFS
39288
39289fi
39290fi
39291ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39292if test -n "$ac_ct_OBJDUMP"; then
39293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39294$as_echo "$ac_ct_OBJDUMP" >&6; }
39295else
39296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39297$as_echo "no" >&6; }
39298fi
39299
39300
39301  test -n "$ac_ct_OBJDUMP" && break
39302done
39303
39304  if test "x$ac_ct_OBJDUMP" = x; then
39305    OBJDUMP=""
39306  else
39307    case $cross_compiling:$ac_tool_warned in
39308yes:)
39309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39311ac_tool_warned=yes ;;
39312esac
39313    OBJDUMP=$ac_ct_OBJDUMP
39314  fi
39315fi
39316
39317  else
39318    # The variable is set, but is it from the command line or the environment?
39319
39320    # Try to remove the string !OBJDUMP! from our list.
39321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39323      # If it failed, the variable was not from the command line. Ignore it,
39324      # but warn the user (except for BASH, which is always set by the calling BASH).
39325      if test "xOBJDUMP" != xBASH; then
39326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39327$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39328      fi
39329      # Try to locate tool using the code snippet
39330      if test -n "$ac_tool_prefix"; then
39331  for ac_prog in gobjdump objdump
39332  do
39333    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39334set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39336$as_echo_n "checking for $ac_word... " >&6; }
39337if ${ac_cv_prog_OBJDUMP+:} false; then :
39338  $as_echo_n "(cached) " >&6
39339else
39340  if test -n "$OBJDUMP"; then
39341  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39342else
39343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39344for as_dir in $PATH
39345do
39346  IFS=$as_save_IFS
39347  test -z "$as_dir" && as_dir=.
39348    for ac_exec_ext in '' $ac_executable_extensions; do
39349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39350    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39352    break 2
39353  fi
39354done
39355  done
39356IFS=$as_save_IFS
39357
39358fi
39359fi
39360OBJDUMP=$ac_cv_prog_OBJDUMP
39361if test -n "$OBJDUMP"; then
39362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39363$as_echo "$OBJDUMP" >&6; }
39364else
39365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39366$as_echo "no" >&6; }
39367fi
39368
39369
39370    test -n "$OBJDUMP" && break
39371  done
39372fi
39373if test -z "$OBJDUMP"; then
39374  ac_ct_OBJDUMP=$OBJDUMP
39375  for ac_prog in gobjdump objdump
39376do
39377  # Extract the first word of "$ac_prog", so it can be a program name with args.
39378set dummy $ac_prog; ac_word=$2
39379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39380$as_echo_n "checking for $ac_word... " >&6; }
39381if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39382  $as_echo_n "(cached) " >&6
39383else
39384  if test -n "$ac_ct_OBJDUMP"; then
39385  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39386else
39387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39388for as_dir in $PATH
39389do
39390  IFS=$as_save_IFS
39391  test -z "$as_dir" && as_dir=.
39392    for ac_exec_ext in '' $ac_executable_extensions; do
39393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39394    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39396    break 2
39397  fi
39398done
39399  done
39400IFS=$as_save_IFS
39401
39402fi
39403fi
39404ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39405if test -n "$ac_ct_OBJDUMP"; then
39406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39407$as_echo "$ac_ct_OBJDUMP" >&6; }
39408else
39409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39410$as_echo "no" >&6; }
39411fi
39412
39413
39414  test -n "$ac_ct_OBJDUMP" && break
39415done
39416
39417  if test "x$ac_ct_OBJDUMP" = x; then
39418    OBJDUMP=""
39419  else
39420    case $cross_compiling:$ac_tool_warned in
39421yes:)
39422{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39423$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39424ac_tool_warned=yes ;;
39425esac
39426    OBJDUMP=$ac_ct_OBJDUMP
39427  fi
39428fi
39429
39430    else
39431      # If it succeeded, then it was overridden by the user. We will use it
39432      # for the tool.
39433
39434      # First remove it from the list of overridden variables, so we can test
39435      # for unknown variables in the end.
39436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39437
39438      # Check if the provided tool contains a complete path.
39439      tool_specified="$OBJDUMP"
39440      tool_basename="${tool_specified##*/}"
39441      if test "x$tool_basename" = "x$tool_specified"; then
39442        # A command without a complete path is provided, search $PATH.
39443        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39444$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39445        # Extract the first word of "$tool_basename", so it can be a program name with args.
39446set dummy $tool_basename; ac_word=$2
39447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39448$as_echo_n "checking for $ac_word... " >&6; }
39449if ${ac_cv_path_OBJDUMP+:} false; then :
39450  $as_echo_n "(cached) " >&6
39451else
39452  case $OBJDUMP in
39453  [\\/]* | ?:[\\/]*)
39454  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39455  ;;
39456  *)
39457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39458for as_dir in $PATH
39459do
39460  IFS=$as_save_IFS
39461  test -z "$as_dir" && as_dir=.
39462    for ac_exec_ext in '' $ac_executable_extensions; do
39463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39464    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39466    break 2
39467  fi
39468done
39469  done
39470IFS=$as_save_IFS
39471
39472  ;;
39473esac
39474fi
39475OBJDUMP=$ac_cv_path_OBJDUMP
39476if test -n "$OBJDUMP"; then
39477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39478$as_echo "$OBJDUMP" >&6; }
39479else
39480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39481$as_echo "no" >&6; }
39482fi
39483
39484
39485        if test "x$OBJDUMP" = x; then
39486          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39487        fi
39488      else
39489        # Otherwise we believe it is a complete path. Use it as it is.
39490        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39491$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39492        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39493$as_echo_n "checking for OBJDUMP... " >&6; }
39494        if test ! -x "$tool_specified"; then
39495          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39496$as_echo "not found" >&6; }
39497          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39498        fi
39499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39500$as_echo "$tool_specified" >&6; }
39501      fi
39502    fi
39503  fi
39504
39505
39506  if test "x$OBJDUMP" != x; then
39507    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39508    # bails if argument is missing.
39509
39510  # Only process if variable expands to non-empty
39511
39512  if test "x$OBJDUMP" != x; then
39513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39514
39515  # First separate the path from the arguments. This will split at the first
39516  # space.
39517  complete="$OBJDUMP"
39518  path="${complete%% *}"
39519  tmp="$complete EOL"
39520  arguments="${tmp#* }"
39521
39522  # Input might be given as Windows format, start by converting to
39523  # unix format.
39524  new_path=`$CYGPATH -u "$path"`
39525
39526  # Now try to locate executable using which
39527  new_path=`$WHICH "$new_path" 2> /dev/null`
39528  # bat and cmd files are not always considered executable in cygwin causing which
39529  # to not find them
39530  if test "x$new_path" = x \
39531      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39532      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39533    new_path=`$CYGPATH -u "$path"`
39534  fi
39535  if test "x$new_path" = x; then
39536    # Oops. Which didn't find the executable.
39537    # The splitting of arguments from the executable at a space might have been incorrect,
39538    # since paths with space are more likely in Windows. Give it another try with the whole
39539    # argument.
39540    path="$complete"
39541    arguments="EOL"
39542    new_path=`$CYGPATH -u "$path"`
39543    new_path=`$WHICH "$new_path" 2> /dev/null`
39544    # bat and cmd files are not always considered executable in cygwin causing which
39545    # to not find them
39546    if test "x$new_path" = x \
39547        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39548        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39549      new_path=`$CYGPATH -u "$path"`
39550    fi
39551    if test "x$new_path" = x; then
39552      # It's still not found. Now this is an unrecoverable error.
39553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39554$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39555      has_space=`$ECHO "$complete" | $GREP " "`
39556      if test "x$has_space" != x; then
39557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39559      fi
39560      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39561    fi
39562  fi
39563
39564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39567  # "foo.exe" is OK but "foo" is an error.
39568  #
39569  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39570  # It is also a way to make sure we got the proper file name for the real test later on.
39571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39572  if test "x$test_shortpath" = x; then
39573    # Short path failed, file does not exist as specified.
39574    # Try adding .exe or .cmd
39575    if test -f "${new_path}.exe"; then
39576      input_to_shortpath="${new_path}.exe"
39577    elif test -f "${new_path}.cmd"; then
39578      input_to_shortpath="${new_path}.cmd"
39579    else
39580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39581$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39582      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39583$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39584      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39585    fi
39586  else
39587    input_to_shortpath="$new_path"
39588  fi
39589
39590  # Call helper function which possibly converts this using DOS-style short mode.
39591  # If so, the updated path is stored in $new_path.
39592  new_path="$input_to_shortpath"
39593
39594  input_path="$input_to_shortpath"
39595  # Check if we need to convert this using DOS-style short mode. If the path
39596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39597  # take no chances and rewrite it.
39598  # Note: m4 eats our [], so we need to use [ and ] instead.
39599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39600  if test "x$has_forbidden_chars" != x; then
39601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39605      # Going to short mode and back again did indeed matter. Since short mode is
39606      # case insensitive, let's make it lowercase to improve readability.
39607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39608      # Now convert it back to Unix-stile (cygpath)
39609      input_path=`$CYGPATH -u "$shortmode_path"`
39610      new_path="$input_path"
39611    fi
39612  fi
39613
39614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39615  if test "x$test_cygdrive_prefix" = x; then
39616    # As a simple fix, exclude /usr/bin since it's not a real path.
39617    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39619      # a path prefixed by /cygdrive for fixpath to work.
39620      new_path="$CYGWIN_ROOT_PATH$input_path"
39621    fi
39622  fi
39623
39624  # remove trailing .exe if any
39625  new_path="${new_path/%.exe/}"
39626
39627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39628
39629  # First separate the path from the arguments. This will split at the first
39630  # space.
39631  complete="$OBJDUMP"
39632  path="${complete%% *}"
39633  tmp="$complete EOL"
39634  arguments="${tmp#* }"
39635
39636  # Input might be given as Windows format, start by converting to
39637  # unix format.
39638  new_path="$path"
39639
39640  windows_path="$new_path"
39641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39642    unix_path=`$CYGPATH -u "$windows_path"`
39643    new_path="$unix_path"
39644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39646    new_path="$unix_path"
39647  fi
39648
39649
39650  # Now try to locate executable using which
39651  new_path=`$WHICH "$new_path" 2> /dev/null`
39652
39653  if test "x$new_path" = x; then
39654    # Oops. Which didn't find the executable.
39655    # The splitting of arguments from the executable at a space might have been incorrect,
39656    # since paths with space are more likely in Windows. Give it another try with the whole
39657    # argument.
39658    path="$complete"
39659    arguments="EOL"
39660    new_path="$path"
39661
39662  windows_path="$new_path"
39663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39664    unix_path=`$CYGPATH -u "$windows_path"`
39665    new_path="$unix_path"
39666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39668    new_path="$unix_path"
39669  fi
39670
39671
39672    new_path=`$WHICH "$new_path" 2> /dev/null`
39673    # bat and cmd files are not always considered executable in MSYS causing which
39674    # to not find them
39675    if test "x$new_path" = x \
39676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39678      new_path="$path"
39679
39680  windows_path="$new_path"
39681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39682    unix_path=`$CYGPATH -u "$windows_path"`
39683    new_path="$unix_path"
39684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39686    new_path="$unix_path"
39687  fi
39688
39689    fi
39690
39691    if test "x$new_path" = x; then
39692      # It's still not found. Now this is an unrecoverable error.
39693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39694$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39695      has_space=`$ECHO "$complete" | $GREP " "`
39696      if test "x$has_space" != x; then
39697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39699      fi
39700      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39701    fi
39702  fi
39703
39704  # Now new_path has a complete unix path to the binary
39705  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39706    # Keep paths in /bin as-is, but remove trailing .exe if any
39707    new_path="${new_path/%.exe/}"
39708    # Do not save /bin paths to all_fixpath_prefixes!
39709  else
39710    # Not in mixed or Windows style, start by that.
39711    new_path=`cmd //c echo $new_path`
39712
39713  input_path="$new_path"
39714  # Check if we need to convert this using DOS-style short mode. If the path
39715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39716  # take no chances and rewrite it.
39717  # Note: m4 eats our [], so we need to use [ and ] instead.
39718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39719  if test "x$has_forbidden_chars" != x; then
39720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39722  fi
39723
39724    # Output is in $new_path
39725
39726  windows_path="$new_path"
39727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39728    unix_path=`$CYGPATH -u "$windows_path"`
39729    new_path="$unix_path"
39730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39732    new_path="$unix_path"
39733  fi
39734
39735    # remove trailing .exe if any
39736    new_path="${new_path/%.exe/}"
39737
39738    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39739    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39740  fi
39741
39742    else
39743      # We're on a unix platform. Hooray! :)
39744      # First separate the path from the arguments. This will split at the first
39745      # space.
39746      complete="$OBJDUMP"
39747      path="${complete%% *}"
39748      tmp="$complete EOL"
39749      arguments="${tmp#* }"
39750
39751      # Cannot rely on the command "which" here since it doesn't always work.
39752      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39753      if test -z "$is_absolute_path"; then
39754        # Path to executable is not absolute. Find it.
39755        IFS_save="$IFS"
39756        IFS=:
39757        for p in $PATH; do
39758          if test -f "$p/$path" && test -x "$p/$path"; then
39759            new_path="$p/$path"
39760            break
39761          fi
39762        done
39763        IFS="$IFS_save"
39764      else
39765        # This is an absolute path, we can use it without further modifications.
39766        new_path="$path"
39767      fi
39768
39769      if test "x$new_path" = x; then
39770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39771$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39772        has_space=`$ECHO "$complete" | $GREP " "`
39773        if test "x$has_space" != x; then
39774          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39775$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39776        fi
39777        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39778      fi
39779    fi
39780
39781    # Now join together the path and the arguments once again
39782    if test "x$arguments" != xEOL; then
39783      new_complete="$new_path ${arguments% *}"
39784    else
39785      new_complete="$new_path"
39786    fi
39787
39788    if test "x$complete" != "x$new_complete"; then
39789      OBJDUMP="$new_complete"
39790      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39791$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39792    fi
39793  fi
39794
39795  fi
39796
39797
39798  # Restore old path.
39799  PATH="$OLD_PATH"
39800
39801  # Restore the flags to the user specified values.
39802  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39803  CFLAGS="$ORG_CFLAGS"
39804  CXXFLAGS="$ORG_CXXFLAGS"
39805  OBJCFLAGS="$ORG_OBJCFLAGS"
39806
39807
39808# Finally do some processing after the detection phase
39809
39810  if test "x$COMPILE_TYPE" = "xcross"; then
39811    # Now we need to find a C/C++ compiler that can build executables for the
39812    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39813    # used once. Also, we need to do this without adding a tools dir to the
39814    # path, otherwise we might pick up cross-compilers which don't use standard
39815    # naming.
39816
39817    # FIXME: we should list the discovered compilers as an exclude pattern!
39818    # If we do that, we can do this detection before POST_DETECTION, and still
39819    # find the build compilers in the tools dir, if needed.
39820
39821
39822  # Publish this variable in the help.
39823
39824
39825  if test "x$BUILD_CC" = x; then
39826    # The variable is not set by user, try to locate tool using the code snippet
39827    for ac_prog in cl cc gcc
39828do
39829  # Extract the first word of "$ac_prog", so it can be a program name with args.
39830set dummy $ac_prog; ac_word=$2
39831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39832$as_echo_n "checking for $ac_word... " >&6; }
39833if ${ac_cv_path_BUILD_CC+:} false; then :
39834  $as_echo_n "(cached) " >&6
39835else
39836  case $BUILD_CC in
39837  [\\/]* | ?:[\\/]*)
39838  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39839  ;;
39840  *)
39841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39842for as_dir in $PATH
39843do
39844  IFS=$as_save_IFS
39845  test -z "$as_dir" && as_dir=.
39846    for ac_exec_ext in '' $ac_executable_extensions; do
39847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39848    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39850    break 2
39851  fi
39852done
39853  done
39854IFS=$as_save_IFS
39855
39856  ;;
39857esac
39858fi
39859BUILD_CC=$ac_cv_path_BUILD_CC
39860if test -n "$BUILD_CC"; then
39861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39862$as_echo "$BUILD_CC" >&6; }
39863else
39864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39865$as_echo "no" >&6; }
39866fi
39867
39868
39869  test -n "$BUILD_CC" && break
39870done
39871
39872  else
39873    # The variable is set, but is it from the command line or the environment?
39874
39875    # Try to remove the string !BUILD_CC! from our list.
39876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39878      # If it failed, the variable was not from the command line. Ignore it,
39879      # but warn the user (except for BASH, which is always set by the calling BASH).
39880      if test "xBUILD_CC" != xBASH; then
39881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39882$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39883      fi
39884      # Try to locate tool using the code snippet
39885      for ac_prog in cl cc gcc
39886do
39887  # Extract the first word of "$ac_prog", so it can be a program name with args.
39888set dummy $ac_prog; ac_word=$2
39889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39890$as_echo_n "checking for $ac_word... " >&6; }
39891if ${ac_cv_path_BUILD_CC+:} false; then :
39892  $as_echo_n "(cached) " >&6
39893else
39894  case $BUILD_CC in
39895  [\\/]* | ?:[\\/]*)
39896  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39897  ;;
39898  *)
39899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39900for as_dir in $PATH
39901do
39902  IFS=$as_save_IFS
39903  test -z "$as_dir" && as_dir=.
39904    for ac_exec_ext in '' $ac_executable_extensions; do
39905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39906    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39908    break 2
39909  fi
39910done
39911  done
39912IFS=$as_save_IFS
39913
39914  ;;
39915esac
39916fi
39917BUILD_CC=$ac_cv_path_BUILD_CC
39918if test -n "$BUILD_CC"; then
39919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39920$as_echo "$BUILD_CC" >&6; }
39921else
39922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39923$as_echo "no" >&6; }
39924fi
39925
39926
39927  test -n "$BUILD_CC" && break
39928done
39929
39930    else
39931      # If it succeeded, then it was overridden by the user. We will use it
39932      # for the tool.
39933
39934      # First remove it from the list of overridden variables, so we can test
39935      # for unknown variables in the end.
39936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39937
39938      # Check if the provided tool contains a complete path.
39939      tool_specified="$BUILD_CC"
39940      tool_basename="${tool_specified##*/}"
39941      if test "x$tool_basename" = "x$tool_specified"; then
39942        # A command without a complete path is provided, search $PATH.
39943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39944$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39945        # Extract the first word of "$tool_basename", so it can be a program name with args.
39946set dummy $tool_basename; ac_word=$2
39947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39948$as_echo_n "checking for $ac_word... " >&6; }
39949if ${ac_cv_path_BUILD_CC+:} false; then :
39950  $as_echo_n "(cached) " >&6
39951else
39952  case $BUILD_CC in
39953  [\\/]* | ?:[\\/]*)
39954  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39955  ;;
39956  *)
39957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39958for as_dir in $PATH
39959do
39960  IFS=$as_save_IFS
39961  test -z "$as_dir" && as_dir=.
39962    for ac_exec_ext in '' $ac_executable_extensions; do
39963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39964    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39966    break 2
39967  fi
39968done
39969  done
39970IFS=$as_save_IFS
39971
39972  ;;
39973esac
39974fi
39975BUILD_CC=$ac_cv_path_BUILD_CC
39976if test -n "$BUILD_CC"; then
39977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39978$as_echo "$BUILD_CC" >&6; }
39979else
39980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39981$as_echo "no" >&6; }
39982fi
39983
39984
39985        if test "x$BUILD_CC" = x; then
39986          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39987        fi
39988      else
39989        # Otherwise we believe it is a complete path. Use it as it is.
39990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39991$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39993$as_echo_n "checking for BUILD_CC... " >&6; }
39994        if test ! -x "$tool_specified"; then
39995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39996$as_echo "not found" >&6; }
39997          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39998        fi
39999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40000$as_echo "$tool_specified" >&6; }
40001      fi
40002    fi
40003  fi
40004
40005
40006
40007  # Only process if variable expands to non-empty
40008
40009  if test "x$BUILD_CC" != x; then
40010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40011
40012  # First separate the path from the arguments. This will split at the first
40013  # space.
40014  complete="$BUILD_CC"
40015  path="${complete%% *}"
40016  tmp="$complete EOL"
40017  arguments="${tmp#* }"
40018
40019  # Input might be given as Windows format, start by converting to
40020  # unix format.
40021  new_path=`$CYGPATH -u "$path"`
40022
40023  # Now try to locate executable using which
40024  new_path=`$WHICH "$new_path" 2> /dev/null`
40025  # bat and cmd files are not always considered executable in cygwin causing which
40026  # to not find them
40027  if test "x$new_path" = x \
40028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40030    new_path=`$CYGPATH -u "$path"`
40031  fi
40032  if test "x$new_path" = x; then
40033    # Oops. Which didn't find the executable.
40034    # The splitting of arguments from the executable at a space might have been incorrect,
40035    # since paths with space are more likely in Windows. Give it another try with the whole
40036    # argument.
40037    path="$complete"
40038    arguments="EOL"
40039    new_path=`$CYGPATH -u "$path"`
40040    new_path=`$WHICH "$new_path" 2> /dev/null`
40041    # bat and cmd files are not always considered executable in cygwin causing which
40042    # to not find them
40043    if test "x$new_path" = x \
40044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40046      new_path=`$CYGPATH -u "$path"`
40047    fi
40048    if test "x$new_path" = x; then
40049      # It's still not found. Now this is an unrecoverable error.
40050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40051$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40052      has_space=`$ECHO "$complete" | $GREP " "`
40053      if test "x$has_space" != x; then
40054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40056      fi
40057      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40058    fi
40059  fi
40060
40061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40064  # "foo.exe" is OK but "foo" is an error.
40065  #
40066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40067  # It is also a way to make sure we got the proper file name for the real test later on.
40068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40069  if test "x$test_shortpath" = x; then
40070    # Short path failed, file does not exist as specified.
40071    # Try adding .exe or .cmd
40072    if test -f "${new_path}.exe"; then
40073      input_to_shortpath="${new_path}.exe"
40074    elif test -f "${new_path}.cmd"; then
40075      input_to_shortpath="${new_path}.cmd"
40076    else
40077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
40078$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
40079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40081      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40082    fi
40083  else
40084    input_to_shortpath="$new_path"
40085  fi
40086
40087  # Call helper function which possibly converts this using DOS-style short mode.
40088  # If so, the updated path is stored in $new_path.
40089  new_path="$input_to_shortpath"
40090
40091  input_path="$input_to_shortpath"
40092  # Check if we need to convert this using DOS-style short mode. If the path
40093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40094  # take no chances and rewrite it.
40095  # Note: m4 eats our [], so we need to use [ and ] instead.
40096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40097  if test "x$has_forbidden_chars" != x; then
40098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40102      # Going to short mode and back again did indeed matter. Since short mode is
40103      # case insensitive, let's make it lowercase to improve readability.
40104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40105      # Now convert it back to Unix-stile (cygpath)
40106      input_path=`$CYGPATH -u "$shortmode_path"`
40107      new_path="$input_path"
40108    fi
40109  fi
40110
40111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40112  if test "x$test_cygdrive_prefix" = x; then
40113    # As a simple fix, exclude /usr/bin since it's not a real path.
40114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40116      # a path prefixed by /cygdrive for fixpath to work.
40117      new_path="$CYGWIN_ROOT_PATH$input_path"
40118    fi
40119  fi
40120
40121  # remove trailing .exe if any
40122  new_path="${new_path/%.exe/}"
40123
40124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40125
40126  # First separate the path from the arguments. This will split at the first
40127  # space.
40128  complete="$BUILD_CC"
40129  path="${complete%% *}"
40130  tmp="$complete EOL"
40131  arguments="${tmp#* }"
40132
40133  # Input might be given as Windows format, start by converting to
40134  # unix format.
40135  new_path="$path"
40136
40137  windows_path="$new_path"
40138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40139    unix_path=`$CYGPATH -u "$windows_path"`
40140    new_path="$unix_path"
40141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40143    new_path="$unix_path"
40144  fi
40145
40146
40147  # Now try to locate executable using which
40148  new_path=`$WHICH "$new_path" 2> /dev/null`
40149
40150  if test "x$new_path" = x; then
40151    # Oops. Which didn't find the executable.
40152    # The splitting of arguments from the executable at a space might have been incorrect,
40153    # since paths with space are more likely in Windows. Give it another try with the whole
40154    # argument.
40155    path="$complete"
40156    arguments="EOL"
40157    new_path="$path"
40158
40159  windows_path="$new_path"
40160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40161    unix_path=`$CYGPATH -u "$windows_path"`
40162    new_path="$unix_path"
40163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40165    new_path="$unix_path"
40166  fi
40167
40168
40169    new_path=`$WHICH "$new_path" 2> /dev/null`
40170    # bat and cmd files are not always considered executable in MSYS causing which
40171    # to not find them
40172    if test "x$new_path" = x \
40173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40175      new_path="$path"
40176
40177  windows_path="$new_path"
40178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40179    unix_path=`$CYGPATH -u "$windows_path"`
40180    new_path="$unix_path"
40181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40183    new_path="$unix_path"
40184  fi
40185
40186    fi
40187
40188    if test "x$new_path" = x; then
40189      # It's still not found. Now this is an unrecoverable error.
40190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40191$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40192      has_space=`$ECHO "$complete" | $GREP " "`
40193      if test "x$has_space" != x; then
40194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40196      fi
40197      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40198    fi
40199  fi
40200
40201  # Now new_path has a complete unix path to the binary
40202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40203    # Keep paths in /bin as-is, but remove trailing .exe if any
40204    new_path="${new_path/%.exe/}"
40205    # Do not save /bin paths to all_fixpath_prefixes!
40206  else
40207    # Not in mixed or Windows style, start by that.
40208    new_path=`cmd //c echo $new_path`
40209
40210  input_path="$new_path"
40211  # Check if we need to convert this using DOS-style short mode. If the path
40212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40213  # take no chances and rewrite it.
40214  # Note: m4 eats our [], so we need to use [ and ] instead.
40215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40216  if test "x$has_forbidden_chars" != x; then
40217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40219  fi
40220
40221    # Output is in $new_path
40222
40223  windows_path="$new_path"
40224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40225    unix_path=`$CYGPATH -u "$windows_path"`
40226    new_path="$unix_path"
40227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40229    new_path="$unix_path"
40230  fi
40231
40232    # remove trailing .exe if any
40233    new_path="${new_path/%.exe/}"
40234
40235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40237  fi
40238
40239    else
40240      # We're on a unix platform. Hooray! :)
40241      # First separate the path from the arguments. This will split at the first
40242      # space.
40243      complete="$BUILD_CC"
40244      path="${complete%% *}"
40245      tmp="$complete EOL"
40246      arguments="${tmp#* }"
40247
40248      # Cannot rely on the command "which" here since it doesn't always work.
40249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40250      if test -z "$is_absolute_path"; then
40251        # Path to executable is not absolute. Find it.
40252        IFS_save="$IFS"
40253        IFS=:
40254        for p in $PATH; do
40255          if test -f "$p/$path" && test -x "$p/$path"; then
40256            new_path="$p/$path"
40257            break
40258          fi
40259        done
40260        IFS="$IFS_save"
40261      else
40262        # This is an absolute path, we can use it without further modifications.
40263        new_path="$path"
40264      fi
40265
40266      if test "x$new_path" = x; then
40267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40268$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40269        has_space=`$ECHO "$complete" | $GREP " "`
40270        if test "x$has_space" != x; then
40271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40273        fi
40274        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40275      fi
40276    fi
40277
40278    # Now join together the path and the arguments once again
40279    if test "x$arguments" != xEOL; then
40280      new_complete="$new_path ${arguments% *}"
40281    else
40282      new_complete="$new_path"
40283    fi
40284
40285    if test "x$complete" != "x$new_complete"; then
40286      BUILD_CC="$new_complete"
40287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40288$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40289    fi
40290  fi
40291
40292
40293
40294  # Publish this variable in the help.
40295
40296
40297  if test "x$BUILD_CXX" = x; then
40298    # The variable is not set by user, try to locate tool using the code snippet
40299    for ac_prog in cl CC g++
40300do
40301  # Extract the first word of "$ac_prog", so it can be a program name with args.
40302set dummy $ac_prog; ac_word=$2
40303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40304$as_echo_n "checking for $ac_word... " >&6; }
40305if ${ac_cv_path_BUILD_CXX+:} false; then :
40306  $as_echo_n "(cached) " >&6
40307else
40308  case $BUILD_CXX in
40309  [\\/]* | ?:[\\/]*)
40310  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40311  ;;
40312  *)
40313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40314for as_dir in $PATH
40315do
40316  IFS=$as_save_IFS
40317  test -z "$as_dir" && as_dir=.
40318    for ac_exec_ext in '' $ac_executable_extensions; do
40319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40320    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40322    break 2
40323  fi
40324done
40325  done
40326IFS=$as_save_IFS
40327
40328  ;;
40329esac
40330fi
40331BUILD_CXX=$ac_cv_path_BUILD_CXX
40332if test -n "$BUILD_CXX"; then
40333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40334$as_echo "$BUILD_CXX" >&6; }
40335else
40336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40337$as_echo "no" >&6; }
40338fi
40339
40340
40341  test -n "$BUILD_CXX" && break
40342done
40343
40344  else
40345    # The variable is set, but is it from the command line or the environment?
40346
40347    # Try to remove the string !BUILD_CXX! from our list.
40348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40350      # If it failed, the variable was not from the command line. Ignore it,
40351      # but warn the user (except for BASH, which is always set by the calling BASH).
40352      if test "xBUILD_CXX" != xBASH; then
40353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40354$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40355      fi
40356      # Try to locate tool using the code snippet
40357      for ac_prog in cl CC g++
40358do
40359  # Extract the first word of "$ac_prog", so it can be a program name with args.
40360set dummy $ac_prog; ac_word=$2
40361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40362$as_echo_n "checking for $ac_word... " >&6; }
40363if ${ac_cv_path_BUILD_CXX+:} false; then :
40364  $as_echo_n "(cached) " >&6
40365else
40366  case $BUILD_CXX in
40367  [\\/]* | ?:[\\/]*)
40368  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40369  ;;
40370  *)
40371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40372for as_dir in $PATH
40373do
40374  IFS=$as_save_IFS
40375  test -z "$as_dir" && as_dir=.
40376    for ac_exec_ext in '' $ac_executable_extensions; do
40377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40378    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40380    break 2
40381  fi
40382done
40383  done
40384IFS=$as_save_IFS
40385
40386  ;;
40387esac
40388fi
40389BUILD_CXX=$ac_cv_path_BUILD_CXX
40390if test -n "$BUILD_CXX"; then
40391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40392$as_echo "$BUILD_CXX" >&6; }
40393else
40394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40395$as_echo "no" >&6; }
40396fi
40397
40398
40399  test -n "$BUILD_CXX" && break
40400done
40401
40402    else
40403      # If it succeeded, then it was overridden by the user. We will use it
40404      # for the tool.
40405
40406      # First remove it from the list of overridden variables, so we can test
40407      # for unknown variables in the end.
40408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40409
40410      # Check if the provided tool contains a complete path.
40411      tool_specified="$BUILD_CXX"
40412      tool_basename="${tool_specified##*/}"
40413      if test "x$tool_basename" = "x$tool_specified"; then
40414        # A command without a complete path is provided, search $PATH.
40415        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40416$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40417        # Extract the first word of "$tool_basename", so it can be a program name with args.
40418set dummy $tool_basename; ac_word=$2
40419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40420$as_echo_n "checking for $ac_word... " >&6; }
40421if ${ac_cv_path_BUILD_CXX+:} false; then :
40422  $as_echo_n "(cached) " >&6
40423else
40424  case $BUILD_CXX in
40425  [\\/]* | ?:[\\/]*)
40426  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40427  ;;
40428  *)
40429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40430for as_dir in $PATH
40431do
40432  IFS=$as_save_IFS
40433  test -z "$as_dir" && as_dir=.
40434    for ac_exec_ext in '' $ac_executable_extensions; do
40435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40436    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40438    break 2
40439  fi
40440done
40441  done
40442IFS=$as_save_IFS
40443
40444  ;;
40445esac
40446fi
40447BUILD_CXX=$ac_cv_path_BUILD_CXX
40448if test -n "$BUILD_CXX"; then
40449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40450$as_echo "$BUILD_CXX" >&6; }
40451else
40452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40453$as_echo "no" >&6; }
40454fi
40455
40456
40457        if test "x$BUILD_CXX" = x; then
40458          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40459        fi
40460      else
40461        # Otherwise we believe it is a complete path. Use it as it is.
40462        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40463$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40465$as_echo_n "checking for BUILD_CXX... " >&6; }
40466        if test ! -x "$tool_specified"; then
40467          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40468$as_echo "not found" >&6; }
40469          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40470        fi
40471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40472$as_echo "$tool_specified" >&6; }
40473      fi
40474    fi
40475  fi
40476
40477
40478
40479  # Only process if variable expands to non-empty
40480
40481  if test "x$BUILD_CXX" != x; then
40482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40483
40484  # First separate the path from the arguments. This will split at the first
40485  # space.
40486  complete="$BUILD_CXX"
40487  path="${complete%% *}"
40488  tmp="$complete EOL"
40489  arguments="${tmp#* }"
40490
40491  # Input might be given as Windows format, start by converting to
40492  # unix format.
40493  new_path=`$CYGPATH -u "$path"`
40494
40495  # Now try to locate executable using which
40496  new_path=`$WHICH "$new_path" 2> /dev/null`
40497  # bat and cmd files are not always considered executable in cygwin causing which
40498  # to not find them
40499  if test "x$new_path" = x \
40500      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40501      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40502    new_path=`$CYGPATH -u "$path"`
40503  fi
40504  if test "x$new_path" = x; then
40505    # Oops. Which didn't find the executable.
40506    # The splitting of arguments from the executable at a space might have been incorrect,
40507    # since paths with space are more likely in Windows. Give it another try with the whole
40508    # argument.
40509    path="$complete"
40510    arguments="EOL"
40511    new_path=`$CYGPATH -u "$path"`
40512    new_path=`$WHICH "$new_path" 2> /dev/null`
40513    # bat and cmd files are not always considered executable in cygwin causing which
40514    # to not find them
40515    if test "x$new_path" = x \
40516        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40517        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40518      new_path=`$CYGPATH -u "$path"`
40519    fi
40520    if test "x$new_path" = x; then
40521      # It's still not found. Now this is an unrecoverable error.
40522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40523$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40524      has_space=`$ECHO "$complete" | $GREP " "`
40525      if test "x$has_space" != x; then
40526        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40527$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40528      fi
40529      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40530    fi
40531  fi
40532
40533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40536  # "foo.exe" is OK but "foo" is an error.
40537  #
40538  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40539  # It is also a way to make sure we got the proper file name for the real test later on.
40540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40541  if test "x$test_shortpath" = x; then
40542    # Short path failed, file does not exist as specified.
40543    # Try adding .exe or .cmd
40544    if test -f "${new_path}.exe"; then
40545      input_to_shortpath="${new_path}.exe"
40546    elif test -f "${new_path}.cmd"; then
40547      input_to_shortpath="${new_path}.cmd"
40548    else
40549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40550$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40551      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40552$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40553      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40554    fi
40555  else
40556    input_to_shortpath="$new_path"
40557  fi
40558
40559  # Call helper function which possibly converts this using DOS-style short mode.
40560  # If so, the updated path is stored in $new_path.
40561  new_path="$input_to_shortpath"
40562
40563  input_path="$input_to_shortpath"
40564  # Check if we need to convert this using DOS-style short mode. If the path
40565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40566  # take no chances and rewrite it.
40567  # Note: m4 eats our [], so we need to use [ and ] instead.
40568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40569  if test "x$has_forbidden_chars" != x; then
40570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40574      # Going to short mode and back again did indeed matter. Since short mode is
40575      # case insensitive, let's make it lowercase to improve readability.
40576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40577      # Now convert it back to Unix-stile (cygpath)
40578      input_path=`$CYGPATH -u "$shortmode_path"`
40579      new_path="$input_path"
40580    fi
40581  fi
40582
40583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40584  if test "x$test_cygdrive_prefix" = x; then
40585    # As a simple fix, exclude /usr/bin since it's not a real path.
40586    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40588      # a path prefixed by /cygdrive for fixpath to work.
40589      new_path="$CYGWIN_ROOT_PATH$input_path"
40590    fi
40591  fi
40592
40593  # remove trailing .exe if any
40594  new_path="${new_path/%.exe/}"
40595
40596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40597
40598  # First separate the path from the arguments. This will split at the first
40599  # space.
40600  complete="$BUILD_CXX"
40601  path="${complete%% *}"
40602  tmp="$complete EOL"
40603  arguments="${tmp#* }"
40604
40605  # Input might be given as Windows format, start by converting to
40606  # unix format.
40607  new_path="$path"
40608
40609  windows_path="$new_path"
40610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40611    unix_path=`$CYGPATH -u "$windows_path"`
40612    new_path="$unix_path"
40613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40615    new_path="$unix_path"
40616  fi
40617
40618
40619  # Now try to locate executable using which
40620  new_path=`$WHICH "$new_path" 2> /dev/null`
40621
40622  if test "x$new_path" = x; then
40623    # Oops. Which didn't find the executable.
40624    # The splitting of arguments from the executable at a space might have been incorrect,
40625    # since paths with space are more likely in Windows. Give it another try with the whole
40626    # argument.
40627    path="$complete"
40628    arguments="EOL"
40629    new_path="$path"
40630
40631  windows_path="$new_path"
40632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40633    unix_path=`$CYGPATH -u "$windows_path"`
40634    new_path="$unix_path"
40635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40637    new_path="$unix_path"
40638  fi
40639
40640
40641    new_path=`$WHICH "$new_path" 2> /dev/null`
40642    # bat and cmd files are not always considered executable in MSYS causing which
40643    # to not find them
40644    if test "x$new_path" = x \
40645        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40646        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40647      new_path="$path"
40648
40649  windows_path="$new_path"
40650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40651    unix_path=`$CYGPATH -u "$windows_path"`
40652    new_path="$unix_path"
40653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40655    new_path="$unix_path"
40656  fi
40657
40658    fi
40659
40660    if test "x$new_path" = x; then
40661      # It's still not found. Now this is an unrecoverable error.
40662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40663$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40664      has_space=`$ECHO "$complete" | $GREP " "`
40665      if test "x$has_space" != x; then
40666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40668      fi
40669      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40670    fi
40671  fi
40672
40673  # Now new_path has a complete unix path to the binary
40674  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40675    # Keep paths in /bin as-is, but remove trailing .exe if any
40676    new_path="${new_path/%.exe/}"
40677    # Do not save /bin paths to all_fixpath_prefixes!
40678  else
40679    # Not in mixed or Windows style, start by that.
40680    new_path=`cmd //c echo $new_path`
40681
40682  input_path="$new_path"
40683  # Check if we need to convert this using DOS-style short mode. If the path
40684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40685  # take no chances and rewrite it.
40686  # Note: m4 eats our [], so we need to use [ and ] instead.
40687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40688  if test "x$has_forbidden_chars" != x; then
40689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40691  fi
40692
40693    # Output is in $new_path
40694
40695  windows_path="$new_path"
40696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40697    unix_path=`$CYGPATH -u "$windows_path"`
40698    new_path="$unix_path"
40699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40701    new_path="$unix_path"
40702  fi
40703
40704    # remove trailing .exe if any
40705    new_path="${new_path/%.exe/}"
40706
40707    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40708    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40709  fi
40710
40711    else
40712      # We're on a unix platform. Hooray! :)
40713      # First separate the path from the arguments. This will split at the first
40714      # space.
40715      complete="$BUILD_CXX"
40716      path="${complete%% *}"
40717      tmp="$complete EOL"
40718      arguments="${tmp#* }"
40719
40720      # Cannot rely on the command "which" here since it doesn't always work.
40721      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40722      if test -z "$is_absolute_path"; then
40723        # Path to executable is not absolute. Find it.
40724        IFS_save="$IFS"
40725        IFS=:
40726        for p in $PATH; do
40727          if test -f "$p/$path" && test -x "$p/$path"; then
40728            new_path="$p/$path"
40729            break
40730          fi
40731        done
40732        IFS="$IFS_save"
40733      else
40734        # This is an absolute path, we can use it without further modifications.
40735        new_path="$path"
40736      fi
40737
40738      if test "x$new_path" = x; then
40739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40740$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40741        has_space=`$ECHO "$complete" | $GREP " "`
40742        if test "x$has_space" != x; then
40743          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40744$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40745        fi
40746        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40747      fi
40748    fi
40749
40750    # Now join together the path and the arguments once again
40751    if test "x$arguments" != xEOL; then
40752      new_complete="$new_path ${arguments% *}"
40753    else
40754      new_complete="$new_path"
40755    fi
40756
40757    if test "x$complete" != "x$new_complete"; then
40758      BUILD_CXX="$new_complete"
40759      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40760$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40761    fi
40762  fi
40763
40764
40765
40766  # Publish this variable in the help.
40767
40768
40769  if test "x$BUILD_LD" = x; then
40770    # The variable is not set by user, try to locate tool using the code snippet
40771    for ac_prog in ld
40772do
40773  # Extract the first word of "$ac_prog", so it can be a program name with args.
40774set dummy $ac_prog; ac_word=$2
40775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40776$as_echo_n "checking for $ac_word... " >&6; }
40777if ${ac_cv_path_BUILD_LD+:} false; then :
40778  $as_echo_n "(cached) " >&6
40779else
40780  case $BUILD_LD in
40781  [\\/]* | ?:[\\/]*)
40782  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40783  ;;
40784  *)
40785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40786for as_dir in $PATH
40787do
40788  IFS=$as_save_IFS
40789  test -z "$as_dir" && as_dir=.
40790    for ac_exec_ext in '' $ac_executable_extensions; do
40791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40792    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40794    break 2
40795  fi
40796done
40797  done
40798IFS=$as_save_IFS
40799
40800  ;;
40801esac
40802fi
40803BUILD_LD=$ac_cv_path_BUILD_LD
40804if test -n "$BUILD_LD"; then
40805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40806$as_echo "$BUILD_LD" >&6; }
40807else
40808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40809$as_echo "no" >&6; }
40810fi
40811
40812
40813  test -n "$BUILD_LD" && break
40814done
40815
40816  else
40817    # The variable is set, but is it from the command line or the environment?
40818
40819    # Try to remove the string !BUILD_LD! from our list.
40820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40822      # If it failed, the variable was not from the command line. Ignore it,
40823      # but warn the user (except for BASH, which is always set by the calling BASH).
40824      if test "xBUILD_LD" != xBASH; then
40825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40826$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40827      fi
40828      # Try to locate tool using the code snippet
40829      for ac_prog in ld
40830do
40831  # Extract the first word of "$ac_prog", so it can be a program name with args.
40832set dummy $ac_prog; ac_word=$2
40833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40834$as_echo_n "checking for $ac_word... " >&6; }
40835if ${ac_cv_path_BUILD_LD+:} false; then :
40836  $as_echo_n "(cached) " >&6
40837else
40838  case $BUILD_LD in
40839  [\\/]* | ?:[\\/]*)
40840  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40841  ;;
40842  *)
40843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40844for as_dir in $PATH
40845do
40846  IFS=$as_save_IFS
40847  test -z "$as_dir" && as_dir=.
40848    for ac_exec_ext in '' $ac_executable_extensions; do
40849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40850    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40852    break 2
40853  fi
40854done
40855  done
40856IFS=$as_save_IFS
40857
40858  ;;
40859esac
40860fi
40861BUILD_LD=$ac_cv_path_BUILD_LD
40862if test -n "$BUILD_LD"; then
40863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40864$as_echo "$BUILD_LD" >&6; }
40865else
40866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40867$as_echo "no" >&6; }
40868fi
40869
40870
40871  test -n "$BUILD_LD" && break
40872done
40873
40874    else
40875      # If it succeeded, then it was overridden by the user. We will use it
40876      # for the tool.
40877
40878      # First remove it from the list of overridden variables, so we can test
40879      # for unknown variables in the end.
40880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40881
40882      # Check if the provided tool contains a complete path.
40883      tool_specified="$BUILD_LD"
40884      tool_basename="${tool_specified##*/}"
40885      if test "x$tool_basename" = "x$tool_specified"; then
40886        # A command without a complete path is provided, search $PATH.
40887        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40888$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40889        # Extract the first word of "$tool_basename", so it can be a program name with args.
40890set dummy $tool_basename; ac_word=$2
40891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40892$as_echo_n "checking for $ac_word... " >&6; }
40893if ${ac_cv_path_BUILD_LD+:} false; then :
40894  $as_echo_n "(cached) " >&6
40895else
40896  case $BUILD_LD in
40897  [\\/]* | ?:[\\/]*)
40898  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40899  ;;
40900  *)
40901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40902for as_dir in $PATH
40903do
40904  IFS=$as_save_IFS
40905  test -z "$as_dir" && as_dir=.
40906    for ac_exec_ext in '' $ac_executable_extensions; do
40907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40908    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40910    break 2
40911  fi
40912done
40913  done
40914IFS=$as_save_IFS
40915
40916  ;;
40917esac
40918fi
40919BUILD_LD=$ac_cv_path_BUILD_LD
40920if test -n "$BUILD_LD"; then
40921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40922$as_echo "$BUILD_LD" >&6; }
40923else
40924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40925$as_echo "no" >&6; }
40926fi
40927
40928
40929        if test "x$BUILD_LD" = x; then
40930          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40931        fi
40932      else
40933        # Otherwise we believe it is a complete path. Use it as it is.
40934        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40935$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40937$as_echo_n "checking for BUILD_LD... " >&6; }
40938        if test ! -x "$tool_specified"; then
40939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40940$as_echo "not found" >&6; }
40941          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40942        fi
40943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40944$as_echo "$tool_specified" >&6; }
40945      fi
40946    fi
40947  fi
40948
40949
40950
40951  # Only process if variable expands to non-empty
40952
40953  if test "x$BUILD_LD" != x; then
40954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40955
40956  # First separate the path from the arguments. This will split at the first
40957  # space.
40958  complete="$BUILD_LD"
40959  path="${complete%% *}"
40960  tmp="$complete EOL"
40961  arguments="${tmp#* }"
40962
40963  # Input might be given as Windows format, start by converting to
40964  # unix format.
40965  new_path=`$CYGPATH -u "$path"`
40966
40967  # Now try to locate executable using which
40968  new_path=`$WHICH "$new_path" 2> /dev/null`
40969  # bat and cmd files are not always considered executable in cygwin causing which
40970  # to not find them
40971  if test "x$new_path" = x \
40972      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40973      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40974    new_path=`$CYGPATH -u "$path"`
40975  fi
40976  if test "x$new_path" = x; then
40977    # Oops. Which didn't find the executable.
40978    # The splitting of arguments from the executable at a space might have been incorrect,
40979    # since paths with space are more likely in Windows. Give it another try with the whole
40980    # argument.
40981    path="$complete"
40982    arguments="EOL"
40983    new_path=`$CYGPATH -u "$path"`
40984    new_path=`$WHICH "$new_path" 2> /dev/null`
40985    # bat and cmd files are not always considered executable in cygwin causing which
40986    # to not find them
40987    if test "x$new_path" = x \
40988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40990      new_path=`$CYGPATH -u "$path"`
40991    fi
40992    if test "x$new_path" = x; then
40993      # It's still not found. Now this is an unrecoverable error.
40994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40995$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40996      has_space=`$ECHO "$complete" | $GREP " "`
40997      if test "x$has_space" != x; then
40998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41000      fi
41001      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41002    fi
41003  fi
41004
41005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41008  # "foo.exe" is OK but "foo" is an error.
41009  #
41010  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41011  # It is also a way to make sure we got the proper file name for the real test later on.
41012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41013  if test "x$test_shortpath" = x; then
41014    # Short path failed, file does not exist as specified.
41015    # Try adding .exe or .cmd
41016    if test -f "${new_path}.exe"; then
41017      input_to_shortpath="${new_path}.exe"
41018    elif test -f "${new_path}.cmd"; then
41019      input_to_shortpath="${new_path}.cmd"
41020    else
41021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
41022$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
41023      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41024$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41025      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41026    fi
41027  else
41028    input_to_shortpath="$new_path"
41029  fi
41030
41031  # Call helper function which possibly converts this using DOS-style short mode.
41032  # If so, the updated path is stored in $new_path.
41033  new_path="$input_to_shortpath"
41034
41035  input_path="$input_to_shortpath"
41036  # Check if we need to convert this using DOS-style short mode. If the path
41037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41038  # take no chances and rewrite it.
41039  # Note: m4 eats our [], so we need to use [ and ] instead.
41040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41041  if test "x$has_forbidden_chars" != x; then
41042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41046      # Going to short mode and back again did indeed matter. Since short mode is
41047      # case insensitive, let's make it lowercase to improve readability.
41048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41049      # Now convert it back to Unix-stile (cygpath)
41050      input_path=`$CYGPATH -u "$shortmode_path"`
41051      new_path="$input_path"
41052    fi
41053  fi
41054
41055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41056  if test "x$test_cygdrive_prefix" = x; then
41057    # As a simple fix, exclude /usr/bin since it's not a real path.
41058    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41060      # a path prefixed by /cygdrive for fixpath to work.
41061      new_path="$CYGWIN_ROOT_PATH$input_path"
41062    fi
41063  fi
41064
41065  # remove trailing .exe if any
41066  new_path="${new_path/%.exe/}"
41067
41068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41069
41070  # First separate the path from the arguments. This will split at the first
41071  # space.
41072  complete="$BUILD_LD"
41073  path="${complete%% *}"
41074  tmp="$complete EOL"
41075  arguments="${tmp#* }"
41076
41077  # Input might be given as Windows format, start by converting to
41078  # unix format.
41079  new_path="$path"
41080
41081  windows_path="$new_path"
41082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41083    unix_path=`$CYGPATH -u "$windows_path"`
41084    new_path="$unix_path"
41085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41087    new_path="$unix_path"
41088  fi
41089
41090
41091  # Now try to locate executable using which
41092  new_path=`$WHICH "$new_path" 2> /dev/null`
41093
41094  if test "x$new_path" = x; then
41095    # Oops. Which didn't find the executable.
41096    # The splitting of arguments from the executable at a space might have been incorrect,
41097    # since paths with space are more likely in Windows. Give it another try with the whole
41098    # argument.
41099    path="$complete"
41100    arguments="EOL"
41101    new_path="$path"
41102
41103  windows_path="$new_path"
41104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41105    unix_path=`$CYGPATH -u "$windows_path"`
41106    new_path="$unix_path"
41107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41109    new_path="$unix_path"
41110  fi
41111
41112
41113    new_path=`$WHICH "$new_path" 2> /dev/null`
41114    # bat and cmd files are not always considered executable in MSYS causing which
41115    # to not find them
41116    if test "x$new_path" = x \
41117        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41118        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41119      new_path="$path"
41120
41121  windows_path="$new_path"
41122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41123    unix_path=`$CYGPATH -u "$windows_path"`
41124    new_path="$unix_path"
41125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41127    new_path="$unix_path"
41128  fi
41129
41130    fi
41131
41132    if test "x$new_path" = x; then
41133      # It's still not found. Now this is an unrecoverable error.
41134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41135$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41136      has_space=`$ECHO "$complete" | $GREP " "`
41137      if test "x$has_space" != x; then
41138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41140      fi
41141      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41142    fi
41143  fi
41144
41145  # Now new_path has a complete unix path to the binary
41146  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41147    # Keep paths in /bin as-is, but remove trailing .exe if any
41148    new_path="${new_path/%.exe/}"
41149    # Do not save /bin paths to all_fixpath_prefixes!
41150  else
41151    # Not in mixed or Windows style, start by that.
41152    new_path=`cmd //c echo $new_path`
41153
41154  input_path="$new_path"
41155  # Check if we need to convert this using DOS-style short mode. If the path
41156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41157  # take no chances and rewrite it.
41158  # Note: m4 eats our [], so we need to use [ and ] instead.
41159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41160  if test "x$has_forbidden_chars" != x; then
41161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41163  fi
41164
41165    # Output is in $new_path
41166
41167  windows_path="$new_path"
41168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41169    unix_path=`$CYGPATH -u "$windows_path"`
41170    new_path="$unix_path"
41171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41173    new_path="$unix_path"
41174  fi
41175
41176    # remove trailing .exe if any
41177    new_path="${new_path/%.exe/}"
41178
41179    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41180    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41181  fi
41182
41183    else
41184      # We're on a unix platform. Hooray! :)
41185      # First separate the path from the arguments. This will split at the first
41186      # space.
41187      complete="$BUILD_LD"
41188      path="${complete%% *}"
41189      tmp="$complete EOL"
41190      arguments="${tmp#* }"
41191
41192      # Cannot rely on the command "which" here since it doesn't always work.
41193      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41194      if test -z "$is_absolute_path"; then
41195        # Path to executable is not absolute. Find it.
41196        IFS_save="$IFS"
41197        IFS=:
41198        for p in $PATH; do
41199          if test -f "$p/$path" && test -x "$p/$path"; then
41200            new_path="$p/$path"
41201            break
41202          fi
41203        done
41204        IFS="$IFS_save"
41205      else
41206        # This is an absolute path, we can use it without further modifications.
41207        new_path="$path"
41208      fi
41209
41210      if test "x$new_path" = x; then
41211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
41212$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
41213        has_space=`$ECHO "$complete" | $GREP " "`
41214        if test "x$has_space" != x; then
41215          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41216$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41217        fi
41218        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
41219      fi
41220    fi
41221
41222    # Now join together the path and the arguments once again
41223    if test "x$arguments" != xEOL; then
41224      new_complete="$new_path ${arguments% *}"
41225    else
41226      new_complete="$new_path"
41227    fi
41228
41229    if test "x$complete" != "x$new_complete"; then
41230      BUILD_LD="$new_complete"
41231      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
41232$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
41233    fi
41234  fi
41235
41236  else
41237    # If we are not cross compiling, use the normal target compilers for
41238    # building the build platform executables.
41239    BUILD_CC="$CC"
41240    BUILD_CXX="$CXX"
41241    BUILD_LD="$LD"
41242  fi
41243
41244
41245
41246
41247
41248
41249  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41250    # For hotspot, we need these in Windows mixed path,
41251    # so rewrite them all. Need added .exe suffix.
41252    HOTSPOT_CXX="$CXX.exe"
41253    HOTSPOT_LD="$LD.exe"
41254    HOTSPOT_MT="$MT.exe"
41255    HOTSPOT_RC="$RC.exe"
41256
41257  unix_path="$HOTSPOT_CXX"
41258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41259    windows_path=`$CYGPATH -m "$unix_path"`
41260    HOTSPOT_CXX="$windows_path"
41261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41262    windows_path=`cmd //c echo $unix_path`
41263    HOTSPOT_CXX="$windows_path"
41264  fi
41265
41266
41267  unix_path="$HOTSPOT_LD"
41268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41269    windows_path=`$CYGPATH -m "$unix_path"`
41270    HOTSPOT_LD="$windows_path"
41271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41272    windows_path=`cmd //c echo $unix_path`
41273    HOTSPOT_LD="$windows_path"
41274  fi
41275
41276
41277  unix_path="$HOTSPOT_MT"
41278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41279    windows_path=`$CYGPATH -m "$unix_path"`
41280    HOTSPOT_MT="$windows_path"
41281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41282    windows_path=`cmd //c echo $unix_path`
41283    HOTSPOT_MT="$windows_path"
41284  fi
41285
41286
41287  unix_path="$HOTSPOT_RC"
41288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41289    windows_path=`$CYGPATH -m "$unix_path"`
41290    HOTSPOT_RC="$windows_path"
41291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41292    windows_path=`cmd //c echo $unix_path`
41293    HOTSPOT_RC="$windows_path"
41294  fi
41295
41296
41297
41298  else
41299    HOTSPOT_CXX="$CXX"
41300    HOTSPOT_LD="$LD"
41301  fi
41302
41303
41304
41305  if test  "x$TOOLCHAIN_TYPE" = xclang; then
41306    USE_CLANG=true
41307  fi
41308
41309
41310  # LDEXE is the linker to use, when creating executables. Not really used.
41311  # FIXME: These should just be removed!
41312  LDEXE="$LD"
41313  LDEXECXX="$LDCXX"
41314
41315
41316
41317
41318
41319
41320  # The package path is used only on macosx?
41321  # FIXME: clean this up, and/or move it elsewhere.
41322  PACKAGE_PATH=/opt/local
41323
41324
41325  # Check for extra potential brokenness.
41326  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41327    # On Windows, double-check that we got the right compiler.
41328    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41329    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41330    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41331      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41332        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
41333      fi
41334    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41335      if test "x$COMPILER_CPU_TEST" != "xx64"; then
41336        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41337      fi
41338    fi
41339  fi
41340
41341  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41342    # If this is a --hash-style=gnu system, use --hash-style=both, why?
41343    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41344    # This is later checked when setting flags.
41345
41346    # "-Og" suppported for GCC 4.8 and later
41347    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41348
41349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41350$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41351  supports=yes
41352
41353  saved_cflags="$CFLAGS"
41354  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41355  ac_ext=c
41356ac_cpp='$CPP $CPPFLAGS'
41357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41359ac_compiler_gnu=$ac_cv_c_compiler_gnu
41360
41361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41362/* end confdefs.h.  */
41363int i;
41364_ACEOF
41365if ac_fn_c_try_compile "$LINENO"; then :
41366
41367else
41368  supports=no
41369fi
41370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41371  ac_ext=cpp
41372ac_cpp='$CXXCPP $CPPFLAGS'
41373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41376
41377  CFLAGS="$saved_cflags"
41378
41379  saved_cxxflags="$CXXFLAGS"
41380  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41381  ac_ext=cpp
41382ac_cpp='$CXXCPP $CPPFLAGS'
41383ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41384ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41385ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41386
41387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41388/* end confdefs.h.  */
41389int i;
41390_ACEOF
41391if ac_fn_cxx_try_compile "$LINENO"; then :
41392
41393else
41394  supports=no
41395fi
41396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41397  ac_ext=cpp
41398ac_cpp='$CXXCPP $CPPFLAGS'
41399ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41400ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41401ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41402
41403  CXXFLAGS="$saved_cxxflags"
41404
41405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41406$as_echo "$supports" >&6; }
41407  if test "x$supports" = "xyes" ; then
41408    HAS_CFLAG_OPTIMIZE_DEBUG=true
41409  else
41410    HAS_CFLAG_OPTIMIZE_DEBUG=false
41411  fi
41412
41413
41414    # "-z relro" supported in GNU binutils 2.17 and later
41415    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41416
41417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41418$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41419  supports=yes
41420
41421  saved_ldflags="$LDFLAGS"
41422  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41423  ac_ext=c
41424ac_cpp='$CPP $CPPFLAGS'
41425ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41426ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41427ac_compiler_gnu=$ac_cv_c_compiler_gnu
41428
41429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41430/* end confdefs.h.  */
41431
41432int
41433main ()
41434{
41435
41436  ;
41437  return 0;
41438}
41439_ACEOF
41440if ac_fn_c_try_link "$LINENO"; then :
41441
41442else
41443  supports=no
41444fi
41445rm -f core conftest.err conftest.$ac_objext \
41446    conftest$ac_exeext 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  LDFLAGS="$saved_ldflags"
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_LINKER_RELRO=true
41459  else
41460    HAS_LINKER_RELRO=false
41461  fi
41462
41463
41464    # "-z now" supported in GNU binutils 2.11 and later
41465    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41466
41467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41468$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41469  supports=yes
41470
41471  saved_ldflags="$LDFLAGS"
41472  LDFLAGS="$LDFLAGS $LINKER_NOW_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_NOW=true
41509  else
41510    HAS_LINKER_NOW=false
41511  fi
41512
41513  fi
41514
41515  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41516  # in executable.'
41517  USING_BROKEN_SUSE_LD=no
41518  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41520$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41521    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41522    $ECHO "int main() { }" > main.c
41523    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41525$as_echo "no" >&6; }
41526      USING_BROKEN_SUSE_LD=no
41527    else
41528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41529$as_echo "yes" >&6; }
41530      USING_BROKEN_SUSE_LD=yes
41531    fi
41532    rm -rf version-script.map main.c a.out
41533  fi
41534
41535
41536
41537# Setup the JTReg Regression Test Harness.
41538
41539
41540# Check whether --with-jtreg was given.
41541if test "${with_jtreg+set}" = set; then :
41542  withval=$with_jtreg;
41543else
41544  with_jtreg=no
41545fi
41546
41547
41548  if test "x$with_jtreg" = xno; then
41549    # jtreg disabled
41550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41551$as_echo_n "checking for jtreg... " >&6; }
41552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41553$as_echo "no" >&6; }
41554  else
41555    if test "x$with_jtreg" != xyes; then
41556      # with path specified.
41557      JT_HOME="$with_jtreg"
41558    fi
41559
41560    if test "x$JT_HOME" != x; then
41561      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41562$as_echo_n "checking for jtreg... " >&6; }
41563
41564      # use JT_HOME enviroment var.
41565
41566  # Only process if variable expands to non-empty
41567
41568  if test "x$JT_HOME" != x; then
41569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41570
41571  # Input might be given as Windows format, start by converting to
41572  # unix format.
41573  path="$JT_HOME"
41574  new_path=`$CYGPATH -u "$path"`
41575
41576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41579  # "foo.exe" is OK but "foo" is an error.
41580  #
41581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41582  # It is also a way to make sure we got the proper file name for the real test later on.
41583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41584  if test "x$test_shortpath" = x; then
41585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41586$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41587    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41588  fi
41589
41590  # Call helper function which possibly converts this using DOS-style short mode.
41591  # If so, the updated path is stored in $new_path.
41592
41593  input_path="$new_path"
41594  # Check if we need to convert this using DOS-style short mode. If the path
41595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41596  # take no chances and rewrite it.
41597  # Note: m4 eats our [], so we need to use [ and ] instead.
41598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41599  if test "x$has_forbidden_chars" != x; then
41600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41604      # Going to short mode and back again did indeed matter. Since short mode is
41605      # case insensitive, let's make it lowercase to improve readability.
41606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41607      # Now convert it back to Unix-stile (cygpath)
41608      input_path=`$CYGPATH -u "$shortmode_path"`
41609      new_path="$input_path"
41610    fi
41611  fi
41612
41613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41614  if test "x$test_cygdrive_prefix" = x; then
41615    # As a simple fix, exclude /usr/bin since it's not a real path.
41616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41618      # a path prefixed by /cygdrive for fixpath to work.
41619      new_path="$CYGWIN_ROOT_PATH$input_path"
41620    fi
41621  fi
41622
41623
41624  if test "x$path" != "x$new_path"; then
41625    JT_HOME="$new_path"
41626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41627$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41628  fi
41629
41630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41631
41632  path="$JT_HOME"
41633  has_colon=`$ECHO $path | $GREP ^.:`
41634  new_path="$path"
41635  if test "x$has_colon" = x; then
41636    # Not in mixed or Windows style, start by that.
41637    new_path=`cmd //c echo $path`
41638  fi
41639
41640
41641  input_path="$new_path"
41642  # Check if we need to convert this using DOS-style short mode. If the path
41643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41644  # take no chances and rewrite it.
41645  # Note: m4 eats our [], so we need to use [ and ] instead.
41646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41647  if test "x$has_forbidden_chars" != x; then
41648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41650  fi
41651
41652
41653  windows_path="$new_path"
41654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41655    unix_path=`$CYGPATH -u "$windows_path"`
41656    new_path="$unix_path"
41657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41659    new_path="$unix_path"
41660  fi
41661
41662  if test "x$path" != "x$new_path"; then
41663    JT_HOME="$new_path"
41664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41665$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41666  fi
41667
41668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41670
41671    else
41672      # We're on a unix platform. Hooray! :)
41673      path="$JT_HOME"
41674      has_space=`$ECHO "$path" | $GREP " "`
41675      if test "x$has_space" != x; then
41676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41677$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41679      fi
41680
41681      # Use eval to expand a potential ~
41682      eval path="$path"
41683      if test ! -f "$path" && test ! -d "$path"; then
41684        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41685      fi
41686
41687      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41688    fi
41689  fi
41690
41691
41692      # jtreg win32 script works for everybody
41693      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41694
41695      if test ! -f "$JTREGEXE"; then
41696        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41697      fi
41698
41699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41700$as_echo "$JTREGEXE" >&6; }
41701    else
41702      # try to find jtreg on path
41703
41704
41705
41706  # Publish this variable in the help.
41707
41708
41709  if test "x$JTREGEXE" = x; then
41710    # The variable is not set by user, try to locate tool using the code snippet
41711    for ac_prog in jtreg
41712do
41713  # Extract the first word of "$ac_prog", so it can be a program name with args.
41714set dummy $ac_prog; ac_word=$2
41715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41716$as_echo_n "checking for $ac_word... " >&6; }
41717if ${ac_cv_path_JTREGEXE+:} false; then :
41718  $as_echo_n "(cached) " >&6
41719else
41720  case $JTREGEXE in
41721  [\\/]* | ?:[\\/]*)
41722  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41723  ;;
41724  *)
41725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41726for as_dir in $PATH
41727do
41728  IFS=$as_save_IFS
41729  test -z "$as_dir" && as_dir=.
41730    for ac_exec_ext in '' $ac_executable_extensions; do
41731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41732    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41734    break 2
41735  fi
41736done
41737  done
41738IFS=$as_save_IFS
41739
41740  ;;
41741esac
41742fi
41743JTREGEXE=$ac_cv_path_JTREGEXE
41744if test -n "$JTREGEXE"; then
41745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41746$as_echo "$JTREGEXE" >&6; }
41747else
41748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41749$as_echo "no" >&6; }
41750fi
41751
41752
41753  test -n "$JTREGEXE" && break
41754done
41755
41756  else
41757    # The variable is set, but is it from the command line or the environment?
41758
41759    # Try to remove the string !JTREGEXE! from our list.
41760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41762      # If it failed, the variable was not from the command line. Ignore it,
41763      # but warn the user (except for BASH, which is always set by the calling BASH).
41764      if test "xJTREGEXE" != xBASH; then
41765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41766$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41767      fi
41768      # Try to locate tool using the code snippet
41769      for ac_prog in jtreg
41770do
41771  # Extract the first word of "$ac_prog", so it can be a program name with args.
41772set dummy $ac_prog; ac_word=$2
41773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41774$as_echo_n "checking for $ac_word... " >&6; }
41775if ${ac_cv_path_JTREGEXE+:} false; then :
41776  $as_echo_n "(cached) " >&6
41777else
41778  case $JTREGEXE in
41779  [\\/]* | ?:[\\/]*)
41780  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41781  ;;
41782  *)
41783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41784for as_dir in $PATH
41785do
41786  IFS=$as_save_IFS
41787  test -z "$as_dir" && as_dir=.
41788    for ac_exec_ext in '' $ac_executable_extensions; do
41789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41790    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41792    break 2
41793  fi
41794done
41795  done
41796IFS=$as_save_IFS
41797
41798  ;;
41799esac
41800fi
41801JTREGEXE=$ac_cv_path_JTREGEXE
41802if test -n "$JTREGEXE"; then
41803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41804$as_echo "$JTREGEXE" >&6; }
41805else
41806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41807$as_echo "no" >&6; }
41808fi
41809
41810
41811  test -n "$JTREGEXE" && break
41812done
41813
41814    else
41815      # If it succeeded, then it was overridden by the user. We will use it
41816      # for the tool.
41817
41818      # First remove it from the list of overridden variables, so we can test
41819      # for unknown variables in the end.
41820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41821
41822      # Check if the provided tool contains a complete path.
41823      tool_specified="$JTREGEXE"
41824      tool_basename="${tool_specified##*/}"
41825      if test "x$tool_basename" = "x$tool_specified"; then
41826        # A command without a complete path is provided, search $PATH.
41827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41828$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41829        # Extract the first word of "$tool_basename", so it can be a program name with args.
41830set dummy $tool_basename; ac_word=$2
41831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41832$as_echo_n "checking for $ac_word... " >&6; }
41833if ${ac_cv_path_JTREGEXE+:} false; then :
41834  $as_echo_n "(cached) " >&6
41835else
41836  case $JTREGEXE in
41837  [\\/]* | ?:[\\/]*)
41838  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41839  ;;
41840  *)
41841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41842for as_dir in $PATH
41843do
41844  IFS=$as_save_IFS
41845  test -z "$as_dir" && as_dir=.
41846    for ac_exec_ext in '' $ac_executable_extensions; do
41847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41848    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41850    break 2
41851  fi
41852done
41853  done
41854IFS=$as_save_IFS
41855
41856  ;;
41857esac
41858fi
41859JTREGEXE=$ac_cv_path_JTREGEXE
41860if test -n "$JTREGEXE"; then
41861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41862$as_echo "$JTREGEXE" >&6; }
41863else
41864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41865$as_echo "no" >&6; }
41866fi
41867
41868
41869        if test "x$JTREGEXE" = x; then
41870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41871        fi
41872      else
41873        # Otherwise we believe it is a complete path. Use it as it is.
41874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41875$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41877$as_echo_n "checking for JTREGEXE... " >&6; }
41878        if test ! -x "$tool_specified"; then
41879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41880$as_echo "not found" >&6; }
41881          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41882        fi
41883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41884$as_echo "$tool_specified" >&6; }
41885      fi
41886    fi
41887  fi
41888
41889
41890
41891  if test "x$JTREGEXE" = x; then
41892    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41893  fi
41894
41895
41896      JT_HOME="`$DIRNAME $JTREGEXE`"
41897    fi
41898  fi
41899
41900
41901
41902
41903
41904
41905  # Option used to tell the compiler whether to create 32- or 64-bit executables
41906  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41907    COMPILER_TARGET_BITS_FLAG="-q"
41908  else
41909    COMPILER_TARGET_BITS_FLAG="-m"
41910  fi
41911
41912
41913  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41914  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41915    ARFLAGS="-r"
41916  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41917    ARFLAGS="-X64"
41918  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41919    # lib.exe is used as AR to create static libraries.
41920    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41921  else
41922    ARFLAGS=""
41923  fi
41924
41925
41926  ## Setup strip.
41927  # FIXME: should this really be per platform, or should it be per toolchain type?
41928  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41929  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41930  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41931    STRIPFLAGS="-g"
41932  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41933    STRIPFLAGS="-x"
41934  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41935    STRIPFLAGS="-S"
41936  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41937    STRIPFLAGS="-X32_64"
41938  fi
41939
41940  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41941    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41942  fi
41943
41944
41945  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41946    # FIXME: break out into MCSFLAGS
41947    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41948  fi
41949
41950
41951  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41952    CC_OUT_OPTION=-Fo
41953    EXE_OUT_OPTION=-out:
41954    LD_OUT_OPTION=-out:
41955    AR_OUT_OPTION=-out:
41956  else
41957    # The option used to specify the target .o,.a or .so file.
41958    # When compiling, how to specify the to be created object file.
41959    CC_OUT_OPTION='-o$(SPACE)'
41960    # When linking, how to specify the to be created executable.
41961    EXE_OUT_OPTION='-o$(SPACE)'
41962    # When linking, how to specify the to be created dynamically linkable library.
41963    LD_OUT_OPTION='-o$(SPACE)'
41964    # When archiving, how to specify the to be create static archive for object files.
41965    AR_OUT_OPTION='rcs$(SPACE)'
41966  fi
41967
41968
41969
41970
41971
41972  # On Windows, we need to set RC flags.
41973  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41974    RC_FLAGS="-nologo -l0x409"
41975    if test "x$VARIANT" = xOPT; then
41976      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41977    fi
41978
41979    # The version variables used to create RC_FLAGS may be overridden
41980    # in a custom configure script, or possibly the command line.
41981    # Let those variables be expanded at make time in spec.gmk.
41982    # The \$ are escaped to the shell, and the $(...) variables
41983    # are evaluated by make.
41984    RC_FLAGS="$RC_FLAGS \
41985        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41986        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41987        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41988        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41989        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41990        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41991        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41992  fi
41993
41994
41995  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41996    # silence copyright notice and other headers.
41997    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41998  fi
41999
42000  if test "x$SYSROOT" != "x"; then
42001    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42002      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42003        # Solaris Studio does not have a concept of sysroot. Instead we must
42004        # make sure the default include and lib dirs are appended to each
42005        # compile and link command line.
42006        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
42007        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42008            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42009            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42010      fi
42011    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
42012      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
42013      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
42014      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
42015    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42016      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
42017      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
42018    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42019      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
42020      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
42021    fi
42022    # Propagate the sysroot args to hotspot
42023    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
42024    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
42025    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
42026  fi
42027
42028  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42029  # set this here so it doesn't have to be peppered throughout the forest
42030  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42031    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
42032    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
42033  fi
42034
42035
42036
42037
42038
42039# FIXME: Currently we must test this after toolchain but before flags. Fix!
42040
42041# Now we can test some aspects on the target using configure macros.
42042
42043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
42044$as_echo_n "checking for ANSI C header files... " >&6; }
42045if ${ac_cv_header_stdc+:} false; then :
42046  $as_echo_n "(cached) " >&6
42047else
42048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42049/* end confdefs.h.  */
42050#include <stdlib.h>
42051#include <stdarg.h>
42052#include <string.h>
42053#include <float.h>
42054
42055int
42056main ()
42057{
42058
42059  ;
42060  return 0;
42061}
42062_ACEOF
42063if ac_fn_cxx_try_compile "$LINENO"; then :
42064  ac_cv_header_stdc=yes
42065else
42066  ac_cv_header_stdc=no
42067fi
42068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42069
42070if test $ac_cv_header_stdc = yes; then
42071  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
42072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42073/* end confdefs.h.  */
42074#include <string.h>
42075
42076_ACEOF
42077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42078  $EGREP "memchr" >/dev/null 2>&1; then :
42079
42080else
42081  ac_cv_header_stdc=no
42082fi
42083rm -f conftest*
42084
42085fi
42086
42087if test $ac_cv_header_stdc = yes; then
42088  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
42089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42090/* end confdefs.h.  */
42091#include <stdlib.h>
42092
42093_ACEOF
42094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42095  $EGREP "free" >/dev/null 2>&1; then :
42096
42097else
42098  ac_cv_header_stdc=no
42099fi
42100rm -f conftest*
42101
42102fi
42103
42104if test $ac_cv_header_stdc = yes; then
42105  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
42106  if test "$cross_compiling" = yes; then :
42107  :
42108else
42109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42110/* end confdefs.h.  */
42111#include <ctype.h>
42112#include <stdlib.h>
42113#if ((' ' & 0x0FF) == 0x020)
42114# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
42115# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
42116#else
42117# define ISLOWER(c) \
42118		   (('a' <= (c) && (c) <= 'i') \
42119		     || ('j' <= (c) && (c) <= 'r') \
42120		     || ('s' <= (c) && (c) <= 'z'))
42121# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
42122#endif
42123
42124#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
42125int
42126main ()
42127{
42128  int i;
42129  for (i = 0; i < 256; i++)
42130    if (XOR (islower (i), ISLOWER (i))
42131	|| toupper (i) != TOUPPER (i))
42132      return 2;
42133  return 0;
42134}
42135_ACEOF
42136if ac_fn_cxx_try_run "$LINENO"; then :
42137
42138else
42139  ac_cv_header_stdc=no
42140fi
42141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42142  conftest.$ac_objext conftest.beam conftest.$ac_ext
42143fi
42144
42145fi
42146fi
42147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
42148$as_echo "$ac_cv_header_stdc" >&6; }
42149if test $ac_cv_header_stdc = yes; then
42150
42151$as_echo "#define STDC_HEADERS 1" >>confdefs.h
42152
42153fi
42154
42155# On IRIX 5.3, sys/types and inttypes.h are conflicting.
42156for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
42157		  inttypes.h stdint.h unistd.h
42158do :
42159  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42160ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
42161"
42162if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42163  cat >>confdefs.h <<_ACEOF
42164#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42165_ACEOF
42166
42167fi
42168
42169done
42170
42171
42172
42173  ###############################################################################
42174  #
42175  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
42176  # (The JVM can use 32 or 64 bit Java pointers but that decision
42177  # is made at runtime.)
42178  #
42179
42180  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
42181    # Always specify -m flag on Solaris
42182    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
42183
42184  # When we add flags to the "official" CFLAGS etc, we need to
42185  # keep track of these additions in ADDED_CFLAGS etc. These
42186  # will later be checked to make sure only controlled additions
42187  # have been made to CFLAGS etc.
42188  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42189  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42190  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42191
42192  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42193  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42194  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42195
42196  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42197  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42198  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42199
42200  elif test "x$COMPILE_TYPE" = xreduced; then
42201    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
42202      # Specify -m if running reduced on unix platforms
42203
42204  # When we add flags to the "official" CFLAGS etc, we need to
42205  # keep track of these additions in ADDED_CFLAGS etc. These
42206  # will later be checked to make sure only controlled additions
42207  # have been made to CFLAGS etc.
42208  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42209  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42210  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42211
42212  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42213  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42214  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42215
42216  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42217  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42218  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42219
42220    fi
42221  fi
42222
42223  # Make compilation sanity check
42224  for ac_header in stdio.h
42225do :
42226  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
42227if test "x$ac_cv_header_stdio_h" = xyes; then :
42228  cat >>confdefs.h <<_ACEOF
42229#define HAVE_STDIO_H 1
42230_ACEOF
42231
42232else
42233
42234    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
42235$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
42236    if test "x$COMPILE_TYPE" = xreduced; then
42237      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
42238$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
42239    elif test "x$COMPILE_TYPE" = xcross; then
42240      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
42241$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
42242    fi
42243    as_fn_error $? "Cannot continue." "$LINENO" 5
42244
42245fi
42246
42247done
42248
42249
42250  # The cast to long int works around a bug in the HP C Compiler
42251# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42252# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42253# This bug is HP SR number 8606223364.
42254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42255$as_echo_n "checking size of int *... " >&6; }
42256if ${ac_cv_sizeof_int_p+:} false; then :
42257  $as_echo_n "(cached) " >&6
42258else
42259  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42260
42261else
42262  if test "$ac_cv_type_int_p" = yes; then
42263     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42265as_fn_error 77 "cannot compute sizeof (int *)
42266See \`config.log' for more details" "$LINENO" 5; }
42267   else
42268     ac_cv_sizeof_int_p=0
42269   fi
42270fi
42271
42272fi
42273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42274$as_echo "$ac_cv_sizeof_int_p" >&6; }
42275
42276
42277
42278cat >>confdefs.h <<_ACEOF
42279#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42280_ACEOF
42281
42282
42283
42284  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42285  if test "x$ac_cv_sizeof_int_p" = x; then
42286    # The test failed, lets stick to the assumed value.
42287    { $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
42288$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42289  else
42290    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42291
42292    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42293      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42294      # Let's try to implicitely set the compilers target architecture and retry the test
42295      { $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
42296$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;}
42297      { $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
42298$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;}
42299
42300  # When we add flags to the "official" CFLAGS etc, we need to
42301  # keep track of these additions in ADDED_CFLAGS etc. These
42302  # will later be checked to make sure only controlled additions
42303  # have been made to CFLAGS etc.
42304  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42305  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42306  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42307
42308  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42309  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42310  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42311
42312  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42313  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42314  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42315
42316
42317      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42318      unset ac_cv_sizeof_int_p
42319      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42320      cat >>confdefs.h <<_ACEOF
42321#undef SIZEOF_INT_P
42322_ACEOF
42323
42324      # The cast to long int works around a bug in the HP C Compiler
42325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42327# This bug is HP SR number 8606223364.
42328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42329$as_echo_n "checking size of int *... " >&6; }
42330if ${ac_cv_sizeof_int_p+:} false; then :
42331  $as_echo_n "(cached) " >&6
42332else
42333  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42334
42335else
42336  if test "$ac_cv_type_int_p" = yes; then
42337     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42339as_fn_error 77 "cannot compute sizeof (int *)
42340See \`config.log' for more details" "$LINENO" 5; }
42341   else
42342     ac_cv_sizeof_int_p=0
42343   fi
42344fi
42345
42346fi
42347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42348$as_echo "$ac_cv_sizeof_int_p" >&6; }
42349
42350
42351
42352cat >>confdefs.h <<_ACEOF
42353#define SIZEOF_INT_P $ac_cv_sizeof_int_p
42354_ACEOF
42355
42356
42357
42358      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42359
42360      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42361        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
42362      fi
42363    fi
42364  fi
42365
42366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42367$as_echo_n "checking for target address size... " >&6; }
42368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42369$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42370
42371
42372  ###############################################################################
42373  #
42374  # Is the target little of big endian?
42375  #
42376   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42377$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42378if ${ac_cv_c_bigendian+:} false; then :
42379  $as_echo_n "(cached) " >&6
42380else
42381  ac_cv_c_bigendian=unknown
42382    # See if we're dealing with a universal compiler.
42383    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42384/* end confdefs.h.  */
42385#ifndef __APPLE_CC__
42386	       not a universal capable compiler
42387	     #endif
42388	     typedef int dummy;
42389
42390_ACEOF
42391if ac_fn_cxx_try_compile "$LINENO"; then :
42392
42393	# Check for potential -arch flags.  It is not universal unless
42394	# there are at least two -arch flags with different values.
42395	ac_arch=
42396	ac_prev=
42397	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42398	 if test -n "$ac_prev"; then
42399	   case $ac_word in
42400	     i?86 | x86_64 | ppc | ppc64)
42401	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42402		 ac_arch=$ac_word
42403	       else
42404		 ac_cv_c_bigendian=universal
42405		 break
42406	       fi
42407	       ;;
42408	   esac
42409	   ac_prev=
42410	 elif test "x$ac_word" = "x-arch"; then
42411	   ac_prev=arch
42412	 fi
42413       done
42414fi
42415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42416    if test $ac_cv_c_bigendian = unknown; then
42417      # See if sys/param.h defines the BYTE_ORDER macro.
42418      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42419/* end confdefs.h.  */
42420#include <sys/types.h>
42421	     #include <sys/param.h>
42422
42423int
42424main ()
42425{
42426#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42427		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42428		     && LITTLE_ENDIAN)
42429	      bogus endian macros
42430	     #endif
42431
42432  ;
42433  return 0;
42434}
42435_ACEOF
42436if ac_fn_cxx_try_compile "$LINENO"; then :
42437  # It does; now see whether it defined to BIG_ENDIAN or not.
42438	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42439/* end confdefs.h.  */
42440#include <sys/types.h>
42441		#include <sys/param.h>
42442
42443int
42444main ()
42445{
42446#if BYTE_ORDER != BIG_ENDIAN
42447		 not big endian
42448		#endif
42449
42450  ;
42451  return 0;
42452}
42453_ACEOF
42454if ac_fn_cxx_try_compile "$LINENO"; then :
42455  ac_cv_c_bigendian=yes
42456else
42457  ac_cv_c_bigendian=no
42458fi
42459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42460fi
42461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42462    fi
42463    if test $ac_cv_c_bigendian = unknown; then
42464      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42465      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42466/* end confdefs.h.  */
42467#include <limits.h>
42468
42469int
42470main ()
42471{
42472#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42473	      bogus endian macros
42474	     #endif
42475
42476  ;
42477  return 0;
42478}
42479_ACEOF
42480if ac_fn_cxx_try_compile "$LINENO"; then :
42481  # It does; now see whether it defined to _BIG_ENDIAN or not.
42482	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42483/* end confdefs.h.  */
42484#include <limits.h>
42485
42486int
42487main ()
42488{
42489#ifndef _BIG_ENDIAN
42490		 not big endian
42491		#endif
42492
42493  ;
42494  return 0;
42495}
42496_ACEOF
42497if ac_fn_cxx_try_compile "$LINENO"; then :
42498  ac_cv_c_bigendian=yes
42499else
42500  ac_cv_c_bigendian=no
42501fi
42502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42503fi
42504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42505    fi
42506    if test $ac_cv_c_bigendian = unknown; then
42507      # Compile a test program.
42508      if test "$cross_compiling" = yes; then :
42509  # Try to guess by grepping values from an object file.
42510	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42511/* end confdefs.h.  */
42512short int ascii_mm[] =
42513		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42514		short int ascii_ii[] =
42515		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42516		int use_ascii (int i) {
42517		  return ascii_mm[i] + ascii_ii[i];
42518		}
42519		short int ebcdic_ii[] =
42520		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42521		short int ebcdic_mm[] =
42522		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42523		int use_ebcdic (int i) {
42524		  return ebcdic_mm[i] + ebcdic_ii[i];
42525		}
42526		extern int foo;
42527
42528int
42529main ()
42530{
42531return use_ascii (foo) == use_ebcdic (foo);
42532  ;
42533  return 0;
42534}
42535_ACEOF
42536if ac_fn_cxx_try_compile "$LINENO"; then :
42537  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42538	      ac_cv_c_bigendian=yes
42539	    fi
42540	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42541	      if test "$ac_cv_c_bigendian" = unknown; then
42542		ac_cv_c_bigendian=no
42543	      else
42544		# finding both strings is unlikely to happen, but who knows?
42545		ac_cv_c_bigendian=unknown
42546	      fi
42547	    fi
42548fi
42549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42550else
42551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42552/* end confdefs.h.  */
42553$ac_includes_default
42554int
42555main ()
42556{
42557
42558	     /* Are we little or big endian?  From Harbison&Steele.  */
42559	     union
42560	     {
42561	       long int l;
42562	       char c[sizeof (long int)];
42563	     } u;
42564	     u.l = 1;
42565	     return u.c[sizeof (long int) - 1] == 1;
42566
42567  ;
42568  return 0;
42569}
42570_ACEOF
42571if ac_fn_cxx_try_run "$LINENO"; then :
42572  ac_cv_c_bigendian=no
42573else
42574  ac_cv_c_bigendian=yes
42575fi
42576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42577  conftest.$ac_objext conftest.beam conftest.$ac_ext
42578fi
42579
42580    fi
42581fi
42582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42583$as_echo "$ac_cv_c_bigendian" >&6; }
42584 case $ac_cv_c_bigendian in #(
42585   yes)
42586     ENDIAN="big";; #(
42587   no)
42588     ENDIAN="little" ;; #(
42589   universal)
42590     ENDIAN="universal_endianness"
42591     ;; #(
42592   *)
42593     ENDIAN="unknown" ;;
42594 esac
42595
42596
42597  if test "x$ENDIAN" = xuniversal_endianness; then
42598    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42599  fi
42600  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42601    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
42602  fi
42603
42604
42605# Configure flags for the tools
42606
42607  ###############################################################################
42608  #
42609  # How to compile shared libraries.
42610  #
42611
42612  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42613    PICFLAG="-fPIC"
42614    C_FLAG_REORDER=''
42615    CXX_FLAG_REORDER=''
42616
42617    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42618      # Linking is different on MacOSX
42619      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42620      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42621      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42622      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42623      SET_SHARED_LIBRARY_MAPFILE=''
42624    else
42625      # Default works for linux, might work on other platforms as well.
42626      SHARED_LIBRARY_FLAGS='-shared'
42627      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42628      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42629      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42630      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42631    fi
42632  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42633    PICFLAG=''
42634    C_FLAG_REORDER=''
42635    CXX_FLAG_REORDER=''
42636
42637    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42638      # Linking is different on MacOSX
42639      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42640      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42641      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42642      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42643      SET_SHARED_LIBRARY_MAPFILE=''
42644    else
42645      # Default works for linux, might work on other platforms as well.
42646      SHARED_LIBRARY_FLAGS='-shared'
42647      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42648      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42649      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42650      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42651    fi
42652  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42653    PICFLAG="-KPIC"
42654    C_FLAG_REORDER='-xF'
42655    CXX_FLAG_REORDER='-xF'
42656    SHARED_LIBRARY_FLAGS="-G"
42657    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42658    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42659    SET_SHARED_LIBRARY_NAME=''
42660    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42661  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42662    PICFLAG="-qpic=large"
42663    C_FLAG_REORDER=''
42664    CXX_FLAG_REORDER=''
42665    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42666    SET_EXECUTABLE_ORIGIN=""
42667    SET_SHARED_LIBRARY_ORIGIN=''
42668    SET_SHARED_LIBRARY_NAME=''
42669    SET_SHARED_LIBRARY_MAPFILE=''
42670  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42671    PICFLAG=""
42672    C_FLAG_REORDER=''
42673    CXX_FLAG_REORDER=''
42674    SHARED_LIBRARY_FLAGS="-LD"
42675    SET_EXECUTABLE_ORIGIN=''
42676    SET_SHARED_LIBRARY_ORIGIN=''
42677    SET_SHARED_LIBRARY_NAME=''
42678    SET_SHARED_LIBRARY_MAPFILE=''
42679  fi
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42690    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42691    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42692    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42693  fi
42694  # The (cross) compiler is now configured, we can now test capabilities
42695  # of the target platform.
42696
42697
42698
42699  ###############################################################################
42700  #
42701  # Setup the opt flags for different compilers
42702  # and different operating systems.
42703  #
42704
42705  # FIXME: this was indirectly the old default, but just inherited.
42706  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42707  #   C_FLAG_DEPS="-MMD -MF"
42708  # fi
42709
42710  # Generate make dependency files
42711  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42712    C_FLAG_DEPS="-MMD -MF"
42713  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42714    C_FLAG_DEPS="-MMD -MF"
42715  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42716    C_FLAG_DEPS="-xMMD -xMF"
42717  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42718    C_FLAG_DEPS="-qmakedep=gcc -MF"
42719  fi
42720  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42721
42722
42723
42724  # Debug symbols
42725  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42726    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42727      # reduce from default "-g2" option to save space
42728      CFLAGS_DEBUG_SYMBOLS="-g1"
42729      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42730    else
42731      CFLAGS_DEBUG_SYMBOLS="-g"
42732      CXXFLAGS_DEBUG_SYMBOLS="-g"
42733    fi
42734  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42735    CFLAGS_DEBUG_SYMBOLS="-g"
42736    CXXFLAGS_DEBUG_SYMBOLS="-g"
42737  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42738    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42739    # FIXME: likely a bug, this disables debug symbols rather than enables them
42740    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42741  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42742    CFLAGS_DEBUG_SYMBOLS="-g"
42743    CXXFLAGS_DEBUG_SYMBOLS="-g"
42744  fi
42745
42746
42747
42748  # bounds, memory and behavior checking options
42749  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42750    case $DEBUG_LEVEL in
42751    release )
42752      # no adjustment
42753      ;;
42754    fastdebug )
42755      # no adjustment
42756      ;;
42757    slowdebug )
42758      # Add runtime stack smashing and undefined behavior checks
42759      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42760      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42761      ;;
42762    esac
42763  fi
42764
42765
42766
42767  # Optimization levels
42768  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42769    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42770
42771    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42772      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42773      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42774      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42775      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42776      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42777      C_O_FLAG_NONE="-xregs=no%frameptr"
42778      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42779      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42780      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42781      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42782      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42783      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42784        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42785        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42786      fi
42787    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42788      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42789      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42790      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42791      C_O_FLAG_DEBUG=""
42792      C_O_FLAG_NONE=""
42793      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42794      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42795      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42796      C_O_FLAG_DEBUG=""
42797      CXX_O_FLAG_NONE=""
42798    fi
42799  else
42800    # The remaining toolchains share opt flags between CC and CXX;
42801    # setup for C and duplicate afterwards.
42802    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42803      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42804        # On MacOSX we optimize for size, something
42805        # we should do for all platforms?
42806        C_O_FLAG_HIGHEST="-Os"
42807        C_O_FLAG_HI="-Os"
42808        C_O_FLAG_NORM="-Os"
42809      else
42810        C_O_FLAG_HIGHEST="-O3"
42811        C_O_FLAG_HI="-O3"
42812        C_O_FLAG_NORM="-O2"
42813      fi
42814      C_O_FLAG_DEBUG="-O0"
42815      C_O_FLAG_NONE="-O0"
42816    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42817      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42818        # On MacOSX we optimize for size, something
42819        # we should do for all platforms?
42820        C_O_FLAG_HIGHEST="-Os"
42821        C_O_FLAG_HI="-Os"
42822        C_O_FLAG_NORM="-Os"
42823      else
42824        C_O_FLAG_HIGHEST="-O3"
42825        C_O_FLAG_HI="-O3"
42826        C_O_FLAG_NORM="-O2"
42827      fi
42828      C_O_FLAG_DEBUG="-O0"
42829      C_O_FLAG_NONE="-O0"
42830    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42831      C_O_FLAG_HIGHEST="-O3"
42832      C_O_FLAG_HI="-O3 -qstrict"
42833      C_O_FLAG_NORM="-O2"
42834      C_O_FLAG_DEBUG="-qnoopt"
42835      C_O_FLAG_NONE="-qnoop"
42836    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42837      C_O_FLAG_HIGHEST="-O2"
42838      C_O_FLAG_HI="-O1"
42839      C_O_FLAG_NORM="-O1"
42840      C_O_FLAG_DEBUG="-Od"
42841      C_O_FLAG_NONE="-Od"
42842    fi
42843    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42844    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42845    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42846    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42847    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42848  fi
42849
42850  # Adjust optimization flags according to debug level.
42851  case $DEBUG_LEVEL in
42852    release )
42853      # no adjustment
42854      ;;
42855    fastdebug )
42856      # Not quite so much optimization
42857      C_O_FLAG_HI="$C_O_FLAG_NORM"
42858      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42859      ;;
42860    slowdebug )
42861      # Disable optimization
42862      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42863      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42864      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42865      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42866      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42867      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42868      ;;
42869  esac
42870
42871
42872
42873
42874
42875
42876
42877
42878
42879
42880
42881
42882
42883  # Special extras...
42884  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42885    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42886      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42887      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42888    fi
42889  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42890    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42891    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42892    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42893  fi
42894
42895  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42896    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42897$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42898  fi
42899
42900  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42901    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42902$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42903  fi
42904
42905  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42906    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42907$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42908  fi
42909
42910
42911# Check whether --with-extra-cflags was given.
42912if test "${with_extra_cflags+set}" = set; then :
42913  withval=$with_extra_cflags;
42914fi
42915
42916
42917
42918# Check whether --with-extra-cxxflags was given.
42919if test "${with_extra_cxxflags+set}" = set; then :
42920  withval=$with_extra_cxxflags;
42921fi
42922
42923
42924
42925# Check whether --with-extra-ldflags was given.
42926if test "${with_extra_ldflags+set}" = set; then :
42927  withval=$with_extra_ldflags;
42928fi
42929
42930
42931  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42932  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42933  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42934
42935  # Hotspot needs these set in their legacy form
42936  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42937  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42938  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42939
42940
42941
42942
42943
42944  ###############################################################################
42945  #
42946  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42947  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42948  #
42949
42950  # Setup compiler/platform specific flags into
42951  #    CFLAGS_JDK    - C Compiler flags
42952  #    CXXFLAGS_JDK  - C++ Compiler flags
42953  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42954  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42955    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42956        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42957    case $OPENJDK_TARGET_CPU_ARCH in
42958      arm )
42959        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42960        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42961        ;;
42962      ppc )
42963        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42964        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42965        ;;
42966      * )
42967        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42968        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42969        ;;
42970    esac
42971  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42972    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42973    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42974      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42975      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42976    fi
42977
42978    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42979    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42980  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42981    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42982    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42983  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42984    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42985        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42986        -DWIN32_LEAN_AND_MEAN \
42987        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42988        -DWIN32 -DIAL"
42989    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42990      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42991    else
42992      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42993    fi
42994    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42995    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42996    # studio.
42997    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42998      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42999          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
43000    fi
43001  fi
43002
43003  ###############################################################################
43004
43005  # Adjust flags according to debug level.
43006  case $DEBUG_LEVEL in
43007    fastdebug | slowdebug )
43008      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
43009      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
43010      JAVAC_FLAGS="$JAVAC_FLAGS -g"
43011      ;;
43012    release )
43013      ;;
43014    * )
43015      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43016      ;;
43017  esac
43018
43019  # Setup LP64
43020  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
43021
43022  # Set some common defines. These works for all compilers, but assume
43023  # -D is universally accepted.
43024
43025  # Setup endianness
43026  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
43027    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
43028    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
43029    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
43030    #   Note: -Dmacro         is the same as    #define macro 1
43031    #         -Dmacro=        is the same as    #define macro
43032    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43033      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
43034    else
43035      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
43036    fi
43037  else
43038    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
43039    # are defined in the system?
43040    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43041      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
43042    else
43043      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
43044    fi
43045  fi
43046
43047  # Setup target OS define. Use OS target name but in upper case.
43048  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
43049  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
43050
43051  # Setup target CPU
43052  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
43053
43054  # Setup debug/release defines
43055  if test "x$DEBUG_LEVEL" = xrelease; then
43056    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
43057    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43058      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
43059    fi
43060  else
43061    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
43062  fi
43063
43064  # Setup release name
43065  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
43066
43067
43068  # Set some additional per-OS defines.
43069  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43070    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
43071  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43072    # FIXME: PPC64 should not be here.
43073    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
43074  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
43075    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
43076  fi
43077
43078  # Additional macosx handling
43079  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43080    # Setting these parameters makes it an error to link to macosx APIs that are
43081    # newer than the given OS version and makes the linked binaries compatible
43082    # even if built on a newer version of the OS.
43083    # The expected format is X.Y.Z
43084    MACOSX_VERSION_MIN=10.7.0
43085
43086
43087    # The macro takes the version with no dots, ex: 1070
43088    # Let the flags variables get resolved in make for easier override on make
43089    # command line.
43090    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43091    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43092  fi
43093
43094  # Setup some hard coded includes
43095  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43096      -I${JDK_TOPDIR}/src/java.base/share/native/include \
43097      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
43098      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
43099
43100  # The shared libraries are compiled using the picflag.
43101  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43102  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
43103
43104  # Executable flags
43105  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43106  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43107
43108
43109
43110
43111
43112
43113  # Setup LDFLAGS et al.
43114  #
43115
43116  # Now this is odd. The JDK native libraries have to link against libjvm.so
43117  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
43118  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
43119  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
43120  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
43121  # libraries will link to whatever is in memory. Yuck.
43122  #
43123  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
43124  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43125    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
43126    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
43127      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
43128    fi
43129    # TODO: make -debug optional "--disable-full-debug-symbols"
43130    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
43131  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43132    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43133    # We have previously set HAS_GNU_HASH if this is the case
43134    if test -n "$HAS_GNU_HASH"; then
43135      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
43136    fi
43137    if test "x$OPENJDK_TARGET_OS" = xlinux; then
43138      # And since we now know that the linker is gnu, then add -z defs, to forbid
43139      # undefined symbols in object files.
43140      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
43141      case $DEBUG_LEVEL in
43142        release )
43143          # tell linker to optimize libraries.
43144          # Should this be supplied to the OSS linker as well?
43145          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
43146          ;;
43147        slowdebug )
43148          if test "x$HAS_LINKER_NOW" = "xtrue"; then
43149            # do relocations at load
43150            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
43151            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
43152          fi
43153          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43154            # mark relocations read only
43155            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43156            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43157          fi
43158          ;;
43159        fastdebug )
43160          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
43161            # mark relocations read only
43162            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
43163            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
43164          fi
43165          ;;
43166        * )
43167          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
43168          ;;
43169        esac
43170    fi
43171  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43172    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
43173    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
43174  fi
43175
43176  # Customize LDFLAGS for executables
43177
43178  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
43179
43180  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43181    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
43182      LDFLAGS_STACK_SIZE=1048576
43183    else
43184      LDFLAGS_STACK_SIZE=327680
43185    fi
43186    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
43187  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
43188    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
43189  fi
43190
43191  # Customize LDFLAGS for libs
43192  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
43193
43194  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43195    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
43196    LDFLAGS_JDKLIB_SUFFIX=""
43197  else
43198    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
43199        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
43200
43201    # On some platforms (mac) the linker warns about non existing -L dirs.
43202    # Add server first if available. Linking aginst client does not always produce the same results.
43203    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
43204    # Default to server for other variants.
43205    if test "x$JVM_VARIANT_SERVER" = xtrue; then
43206      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43207    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
43208      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
43209    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
43210      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
43211    else
43212      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
43213    fi
43214
43215    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
43216    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43217      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
43218    fi
43219  fi
43220
43221
43222
43223
43224
43225
43226
43227
43228  # Some Zero and Shark settings.
43229  # ZERO_ARCHFLAG tells the compiler which mode to build for
43230  case "${OPENJDK_TARGET_CPU}" in
43231    s390)
43232      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
43233      ;;
43234    *)
43235      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43236  esac
43237
43238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
43239$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
43240  supports=yes
43241
43242  saved_cflags="$CFLAGS"
43243  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
43244  ac_ext=c
43245ac_cpp='$CPP $CPPFLAGS'
43246ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43247ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43248ac_compiler_gnu=$ac_cv_c_compiler_gnu
43249
43250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43251/* end confdefs.h.  */
43252int i;
43253_ACEOF
43254if ac_fn_c_try_compile "$LINENO"; then :
43255
43256else
43257  supports=no
43258fi
43259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43260  ac_ext=cpp
43261ac_cpp='$CXXCPP $CPPFLAGS'
43262ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43263ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43264ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43265
43266  CFLAGS="$saved_cflags"
43267
43268  saved_cxxflags="$CXXFLAGS"
43269  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43270  ac_ext=cpp
43271ac_cpp='$CXXCPP $CPPFLAGS'
43272ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43273ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43274ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43275
43276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43277/* end confdefs.h.  */
43278int i;
43279_ACEOF
43280if ac_fn_cxx_try_compile "$LINENO"; then :
43281
43282else
43283  supports=no
43284fi
43285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43286  ac_ext=cpp
43287ac_cpp='$CXXCPP $CPPFLAGS'
43288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43291
43292  CXXFLAGS="$saved_cxxflags"
43293
43294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43295$as_echo "$supports" >&6; }
43296  if test "x$supports" = "xyes" ; then
43297    :
43298  else
43299    ZERO_ARCHFLAG=""
43300  fi
43301
43302
43303
43304  # Check that the compiler supports -mX (or -qX on AIX) flags
43305  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43306
43307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43308$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43309  supports=yes
43310
43311  saved_cflags="$CFLAGS"
43312  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43313  ac_ext=c
43314ac_cpp='$CPP $CPPFLAGS'
43315ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43316ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43317ac_compiler_gnu=$ac_cv_c_compiler_gnu
43318
43319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43320/* end confdefs.h.  */
43321int i;
43322_ACEOF
43323if ac_fn_c_try_compile "$LINENO"; then :
43324
43325else
43326  supports=no
43327fi
43328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43329  ac_ext=cpp
43330ac_cpp='$CXXCPP $CPPFLAGS'
43331ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43332ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43333ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43334
43335  CFLAGS="$saved_cflags"
43336
43337  saved_cxxflags="$CXXFLAGS"
43338  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43339  ac_ext=cpp
43340ac_cpp='$CXXCPP $CPPFLAGS'
43341ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43342ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43343ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43344
43345  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43346/* end confdefs.h.  */
43347int i;
43348_ACEOF
43349if ac_fn_cxx_try_compile "$LINENO"; then :
43350
43351else
43352  supports=no
43353fi
43354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43355  ac_ext=cpp
43356ac_cpp='$CXXCPP $CPPFLAGS'
43357ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43358ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43359ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43360
43361  CXXFLAGS="$saved_cxxflags"
43362
43363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43364$as_echo "$supports" >&6; }
43365  if test "x$supports" = "xyes" ; then
43366    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43367  else
43368    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43369  fi
43370
43371
43372
43373  case "${TOOLCHAIN_TYPE}" in
43374    microsoft)
43375      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43376      ;;
43377    solstudio)
43378      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43379      ;;
43380    gcc)
43381      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43382      ;;
43383    clang)
43384      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43385      ;;
43386  esac
43387
43388
43389
43390# Setup debug symbols (need objcopy from the toolchain for that)
43391
43392  #
43393  # ENABLE_DEBUG_SYMBOLS
43394  # This must be done after the toolchain is setup, since we're looking at objcopy.
43395  #
43396  # Check whether --enable-debug-symbols was given.
43397if test "${enable_debug_symbols+set}" = set; then :
43398  enableval=$enable_debug_symbols;
43399fi
43400
43401
43402  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43403$as_echo_n "checking if we should generate debug symbols... " >&6; }
43404
43405  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43406    # explicit enabling of enable-debug-symbols and can't find objcopy
43407    #   this is an error
43408    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43409  fi
43410
43411  if test "x$enable_debug_symbols" = "xyes"; then
43412    ENABLE_DEBUG_SYMBOLS=true
43413  elif test "x$enable_debug_symbols" = "xno"; then
43414    ENABLE_DEBUG_SYMBOLS=false
43415  else
43416    # Default is on if objcopy is found
43417    if test "x$OBJCOPY" != x; then
43418      ENABLE_DEBUG_SYMBOLS=true
43419    # MacOS X and Windows don't use objcopy but default is on for those OSes
43420    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43421      ENABLE_DEBUG_SYMBOLS=true
43422    else
43423      ENABLE_DEBUG_SYMBOLS=false
43424    fi
43425  fi
43426
43427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43428$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43429
43430  #
43431  # ZIP_DEBUGINFO_FILES
43432  #
43433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43434$as_echo_n "checking if we should zip debug-info files... " >&6; }
43435  # Check whether --enable-zip-debug-info was given.
43436if test "${enable_zip_debug_info+set}" = set; then :
43437  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43438else
43439  enable_zip_debug_info="yes"
43440fi
43441
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43443$as_echo "${enable_zip_debug_info}" >&6; }
43444
43445  if test "x${enable_zip_debug_info}" = "xno"; then
43446    ZIP_DEBUGINFO_FILES=false
43447  else
43448    ZIP_DEBUGINFO_FILES=true
43449  fi
43450
43451
43452
43453
43454
43455###############################################################################
43456#
43457# Check dependencies for external and internal libraries.
43458#
43459###############################################################################
43460
43461# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43462
43463  # When using cygwin or msys, we need a wrapper binary that renames
43464  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43465  # @files and rewrites these too! This wrapper binary is
43466  # called fixpath.
43467  FIXPATH=
43468  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43470$as_echo_n "checking if fixpath can be created... " >&6; }
43471    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43472    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43473    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43474      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43475      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43476      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43477      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43478    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43479      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43480      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43481
43482      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43483      # @ was chosen as separator to minimize risk of other tools messing around with it
43484      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43485      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43486
43487      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43488    fi
43489    rm -f $OUTPUT_ROOT/fixpath*
43490    cd $OUTPUT_ROOT
43491    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43492    cd $CURDIR
43493
43494    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43496$as_echo "no" >&6; }
43497      cat $OUTPUT_ROOT/fixpath1.log
43498      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43499    fi
43500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43501$as_echo "yes" >&6; }
43502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43503$as_echo_n "checking if fixpath.exe works... " >&6; }
43504    cd $OUTPUT_ROOT
43505    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43506    cd $CURDIR
43507    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43509$as_echo "no" >&6; }
43510      cat $OUTPUT_ROOT/fixpath2.log
43511      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43512    fi
43513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43514$as_echo "yes" >&6; }
43515    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43516  fi
43517
43518
43519
43520
43521
43522
43523  ###############################################################################
43524  #
43525  # OS specific settings that we never will need to probe.
43526  #
43527  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43529$as_echo_n "checking what is not needed on Linux?... " >&6; }
43530    PULSE_NOT_NEEDED=yes
43531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43532$as_echo "pulse" >&6; }
43533  fi
43534
43535  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43537$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43538    ALSA_NOT_NEEDED=yes
43539    PULSE_NOT_NEEDED=yes
43540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43541$as_echo "alsa pulse" >&6; }
43542  fi
43543
43544  if test "x$OPENJDK_TARGET_OS" = xaix; then
43545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43546$as_echo_n "checking what is not needed on AIX?... " >&6; }
43547    ALSA_NOT_NEEDED=yes
43548    PULSE_NOT_NEEDED=yes
43549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43550$as_echo "alsa pulse" >&6; }
43551  fi
43552
43553
43554  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43556$as_echo_n "checking what is not needed on Windows?... " >&6; }
43557    CUPS_NOT_NEEDED=yes
43558    ALSA_NOT_NEEDED=yes
43559    PULSE_NOT_NEEDED=yes
43560    X11_NOT_NEEDED=yes
43561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43562$as_echo "alsa cups pulse x11" >&6; }
43563  fi
43564
43565  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43567$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43568    ALSA_NOT_NEEDED=yes
43569    PULSE_NOT_NEEDED=yes
43570    X11_NOT_NEEDED=yes
43571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43572$as_echo "alsa pulse x11" >&6; }
43573  fi
43574
43575  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43577$as_echo_n "checking what is not needed on bsd?... " >&6; }
43578    ALSA_NOT_NEEDED=yes
43579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43580$as_echo "alsa" >&6; }
43581  fi
43582
43583  if test "x$OPENJDK" = "xfalse"; then
43584    FREETYPE_NOT_NEEDED=yes
43585  fi
43586
43587  if test "x$SUPPORT_HEADFUL" = xno; then
43588    X11_NOT_NEEDED=yes
43589  fi
43590
43591
43592
43593  ###############################################################################
43594  #
43595  # Check for X Windows
43596  #
43597
43598  if test "x$X11_NOT_NEEDED" = xyes; then
43599    if test "x${with_x}" != x; then
43600      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43601$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43602    fi
43603    X_CFLAGS=
43604    X_LIBS=
43605  else
43606    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43607    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43608    # --x-libraries for the sysroot, if that seems to be correct.
43609    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43610      if test "x$SYSROOT" != "x"; then
43611        if test "x$x_includes" = xNONE; then
43612          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43613            x_includes="$SYSROOT/usr/X11R6/include"
43614          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43615            x_includes="$SYSROOT/usr/include"
43616          fi
43617        fi
43618        if test "x$x_libraries" = xNONE; then
43619          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43620            x_libraries="$SYSROOT/usr/X11R6/lib"
43621          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43622            x_libraries="$SYSROOT/usr/lib64"
43623          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43624            x_libraries="$SYSROOT/usr/lib"
43625          fi
43626        fi
43627      fi
43628    fi
43629
43630    # Now let autoconf do it's magic
43631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43632$as_echo_n "checking for X... " >&6; }
43633
43634
43635# Check whether --with-x was given.
43636if test "${with_x+set}" = set; then :
43637  withval=$with_x;
43638fi
43639
43640# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43641if test "x$with_x" = xno; then
43642  # The user explicitly disabled X.
43643  have_x=disabled
43644else
43645  case $x_includes,$x_libraries in #(
43646    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43647    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43648  $as_echo_n "(cached) " >&6
43649else
43650  # One or both of the vars are not set, and there is no cached value.
43651ac_x_includes=no ac_x_libraries=no
43652rm -f -r conftest.dir
43653if mkdir conftest.dir; then
43654  cd conftest.dir
43655  cat >Imakefile <<'_ACEOF'
43656incroot:
43657	@echo incroot='${INCROOT}'
43658usrlibdir:
43659	@echo usrlibdir='${USRLIBDIR}'
43660libdir:
43661	@echo libdir='${LIBDIR}'
43662_ACEOF
43663  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43664    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43665    for ac_var in incroot usrlibdir libdir; do
43666      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43667    done
43668    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43669    for ac_extension in a so sl dylib la dll; do
43670      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43671	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43672	ac_im_usrlibdir=$ac_im_libdir; break
43673      fi
43674    done
43675    # Screen out bogus values from the imake configuration.  They are
43676    # bogus both because they are the default anyway, and because
43677    # using them would break gcc on systems where it needs fixed includes.
43678    case $ac_im_incroot in
43679	/usr/include) ac_x_includes= ;;
43680	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43681    esac
43682    case $ac_im_usrlibdir in
43683	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43684	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43685    esac
43686  fi
43687  cd ..
43688  rm -f -r conftest.dir
43689fi
43690
43691# Standard set of common directories for X headers.
43692# Check X11 before X11Rn because it is often a symlink to the current release.
43693ac_x_header_dirs='
43694/usr/X11/include
43695/usr/X11R7/include
43696/usr/X11R6/include
43697/usr/X11R5/include
43698/usr/X11R4/include
43699
43700/usr/include/X11
43701/usr/include/X11R7
43702/usr/include/X11R6
43703/usr/include/X11R5
43704/usr/include/X11R4
43705
43706/usr/local/X11/include
43707/usr/local/X11R7/include
43708/usr/local/X11R6/include
43709/usr/local/X11R5/include
43710/usr/local/X11R4/include
43711
43712/usr/local/include/X11
43713/usr/local/include/X11R7
43714/usr/local/include/X11R6
43715/usr/local/include/X11R5
43716/usr/local/include/X11R4
43717
43718/usr/X386/include
43719/usr/x386/include
43720/usr/XFree86/include/X11
43721
43722/usr/include
43723/usr/local/include
43724/usr/unsupported/include
43725/usr/athena/include
43726/usr/local/x11r5/include
43727/usr/lpp/Xamples/include
43728
43729/usr/openwin/include
43730/usr/openwin/share/include'
43731
43732if test "$ac_x_includes" = no; then
43733  # Guess where to find include files, by looking for Xlib.h.
43734  # First, try using that file with no special directory specified.
43735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43736/* end confdefs.h.  */
43737#include <X11/Xlib.h>
43738_ACEOF
43739if ac_fn_cxx_try_cpp "$LINENO"; then :
43740  # We can compile using X headers with no special include directory.
43741ac_x_includes=
43742else
43743  for ac_dir in $ac_x_header_dirs; do
43744  if test -r "$ac_dir/X11/Xlib.h"; then
43745    ac_x_includes=$ac_dir
43746    break
43747  fi
43748done
43749fi
43750rm -f conftest.err conftest.i conftest.$ac_ext
43751fi # $ac_x_includes = no
43752
43753if test "$ac_x_libraries" = no; then
43754  # Check for the libraries.
43755  # See if we find them without any special options.
43756  # Don't add to $LIBS permanently.
43757  ac_save_LIBS=$LIBS
43758  LIBS="-lX11 $LIBS"
43759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43760/* end confdefs.h.  */
43761#include <X11/Xlib.h>
43762int
43763main ()
43764{
43765XrmInitialize ()
43766  ;
43767  return 0;
43768}
43769_ACEOF
43770if ac_fn_cxx_try_link "$LINENO"; then :
43771  LIBS=$ac_save_LIBS
43772# We can link X programs with no special library path.
43773ac_x_libraries=
43774else
43775  LIBS=$ac_save_LIBS
43776for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43777do
43778  # Don't even attempt the hair of trying to link an X program!
43779  for ac_extension in a so sl dylib la dll; do
43780    if test -r "$ac_dir/libX11.$ac_extension"; then
43781      ac_x_libraries=$ac_dir
43782      break 2
43783    fi
43784  done
43785done
43786fi
43787rm -f core conftest.err conftest.$ac_objext \
43788    conftest$ac_exeext conftest.$ac_ext
43789fi # $ac_x_libraries = no
43790
43791case $ac_x_includes,$ac_x_libraries in #(
43792  no,* | *,no | *\'*)
43793    # Didn't find X, or a directory has "'" in its name.
43794    ac_cv_have_x="have_x=no";; #(
43795  *)
43796    # Record where we found X for the cache.
43797    ac_cv_have_x="have_x=yes\
43798	ac_x_includes='$ac_x_includes'\
43799	ac_x_libraries='$ac_x_libraries'"
43800esac
43801fi
43802;; #(
43803    *) have_x=yes;;
43804  esac
43805  eval "$ac_cv_have_x"
43806fi # $with_x != no
43807
43808if test "$have_x" != yes; then
43809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43810$as_echo "$have_x" >&6; }
43811  no_x=yes
43812else
43813  # If each of the values was on the command line, it overrides each guess.
43814  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43815  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43816  # Update the cache value to reflect the command line values.
43817  ac_cv_have_x="have_x=yes\
43818	ac_x_includes='$x_includes'\
43819	ac_x_libraries='$x_libraries'"
43820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43821$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43822fi
43823
43824    if test "$no_x" = yes; then
43825  # Not all programs may use this symbol, but it does not hurt to define it.
43826
43827$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43828
43829  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43830else
43831  if test -n "$x_includes"; then
43832    X_CFLAGS="$X_CFLAGS -I$x_includes"
43833  fi
43834
43835  # It would also be nice to do this for all -L options, not just this one.
43836  if test -n "$x_libraries"; then
43837    X_LIBS="$X_LIBS -L$x_libraries"
43838    # For Solaris; some versions of Sun CC require a space after -R and
43839    # others require no space.  Words are not sufficient . . . .
43840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43841$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43842    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43843    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43844    ac_cxx_werror_flag=yes
43845    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43846/* end confdefs.h.  */
43847
43848int
43849main ()
43850{
43851
43852  ;
43853  return 0;
43854}
43855_ACEOF
43856if ac_fn_cxx_try_link "$LINENO"; then :
43857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43858$as_echo "no" >&6; }
43859       X_LIBS="$X_LIBS -R$x_libraries"
43860else
43861  LIBS="$ac_xsave_LIBS -R $x_libraries"
43862       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43863/* end confdefs.h.  */
43864
43865int
43866main ()
43867{
43868
43869  ;
43870  return 0;
43871}
43872_ACEOF
43873if ac_fn_cxx_try_link "$LINENO"; then :
43874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43875$as_echo "yes" >&6; }
43876	  X_LIBS="$X_LIBS -R $x_libraries"
43877else
43878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43879$as_echo "neither works" >&6; }
43880fi
43881rm -f core conftest.err conftest.$ac_objext \
43882    conftest$ac_exeext conftest.$ac_ext
43883fi
43884rm -f core conftest.err conftest.$ac_objext \
43885    conftest$ac_exeext conftest.$ac_ext
43886    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43887    LIBS=$ac_xsave_LIBS
43888  fi
43889
43890  # Check for system-dependent libraries X programs must link with.
43891  # Do this before checking for the system-independent R6 libraries
43892  # (-lICE), since we may need -lsocket or whatever for X linking.
43893
43894  if test "$ISC" = yes; then
43895    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43896  else
43897    # Martyn Johnson says this is needed for Ultrix, if the X
43898    # libraries were built with DECnet support.  And Karl Berry says
43899    # the Alpha needs dnet_stub (dnet does not exist).
43900    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43901    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43902/* end confdefs.h.  */
43903
43904/* Override any GCC internal prototype to avoid an error.
43905   Use char because int might match the return type of a GCC
43906   builtin and then its argument prototype would still apply.  */
43907#ifdef __cplusplus
43908extern "C"
43909#endif
43910char XOpenDisplay ();
43911int
43912main ()
43913{
43914return XOpenDisplay ();
43915  ;
43916  return 0;
43917}
43918_ACEOF
43919if ac_fn_cxx_try_link "$LINENO"; then :
43920
43921else
43922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43923$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43924if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43925  $as_echo_n "(cached) " >&6
43926else
43927  ac_check_lib_save_LIBS=$LIBS
43928LIBS="-ldnet  $LIBS"
43929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43930/* end confdefs.h.  */
43931
43932/* Override any GCC internal prototype to avoid an error.
43933   Use char because int might match the return type of a GCC
43934   builtin and then its argument prototype would still apply.  */
43935#ifdef __cplusplus
43936extern "C"
43937#endif
43938char dnet_ntoa ();
43939int
43940main ()
43941{
43942return dnet_ntoa ();
43943  ;
43944  return 0;
43945}
43946_ACEOF
43947if ac_fn_cxx_try_link "$LINENO"; then :
43948  ac_cv_lib_dnet_dnet_ntoa=yes
43949else
43950  ac_cv_lib_dnet_dnet_ntoa=no
43951fi
43952rm -f core conftest.err conftest.$ac_objext \
43953    conftest$ac_exeext conftest.$ac_ext
43954LIBS=$ac_check_lib_save_LIBS
43955fi
43956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43957$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43958if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43959  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43960fi
43961
43962    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43964$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43965if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43966  $as_echo_n "(cached) " >&6
43967else
43968  ac_check_lib_save_LIBS=$LIBS
43969LIBS="-ldnet_stub  $LIBS"
43970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43971/* end confdefs.h.  */
43972
43973/* Override any GCC internal prototype to avoid an error.
43974   Use char because int might match the return type of a GCC
43975   builtin and then its argument prototype would still apply.  */
43976#ifdef __cplusplus
43977extern "C"
43978#endif
43979char dnet_ntoa ();
43980int
43981main ()
43982{
43983return dnet_ntoa ();
43984  ;
43985  return 0;
43986}
43987_ACEOF
43988if ac_fn_cxx_try_link "$LINENO"; then :
43989  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43990else
43991  ac_cv_lib_dnet_stub_dnet_ntoa=no
43992fi
43993rm -f core conftest.err conftest.$ac_objext \
43994    conftest$ac_exeext conftest.$ac_ext
43995LIBS=$ac_check_lib_save_LIBS
43996fi
43997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43998$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43999if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
44000  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
44001fi
44002
44003    fi
44004fi
44005rm -f core conftest.err conftest.$ac_objext \
44006    conftest$ac_exeext conftest.$ac_ext
44007    LIBS="$ac_xsave_LIBS"
44008
44009    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
44010    # to get the SysV transport functions.
44011    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
44012    # needs -lnsl.
44013    # The nsl library prevents programs from opening the X display
44014    # on Irix 5.2, according to T.E. Dickey.
44015    # The functions gethostbyname, getservbyname, and inet_addr are
44016    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
44017    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
44018if test "x$ac_cv_func_gethostbyname" = xyes; then :
44019
44020fi
44021
44022    if test $ac_cv_func_gethostbyname = no; then
44023      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
44024$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
44025if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
44026  $as_echo_n "(cached) " >&6
44027else
44028  ac_check_lib_save_LIBS=$LIBS
44029LIBS="-lnsl  $LIBS"
44030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44031/* end confdefs.h.  */
44032
44033/* Override any GCC internal prototype to avoid an error.
44034   Use char because int might match the return type of a GCC
44035   builtin and then its argument prototype would still apply.  */
44036#ifdef __cplusplus
44037extern "C"
44038#endif
44039char gethostbyname ();
44040int
44041main ()
44042{
44043return gethostbyname ();
44044  ;
44045  return 0;
44046}
44047_ACEOF
44048if ac_fn_cxx_try_link "$LINENO"; then :
44049  ac_cv_lib_nsl_gethostbyname=yes
44050else
44051  ac_cv_lib_nsl_gethostbyname=no
44052fi
44053rm -f core conftest.err conftest.$ac_objext \
44054    conftest$ac_exeext conftest.$ac_ext
44055LIBS=$ac_check_lib_save_LIBS
44056fi
44057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
44058$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
44059if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
44060  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
44061fi
44062
44063      if test $ac_cv_lib_nsl_gethostbyname = no; then
44064	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
44065$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
44066if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
44067  $as_echo_n "(cached) " >&6
44068else
44069  ac_check_lib_save_LIBS=$LIBS
44070LIBS="-lbsd  $LIBS"
44071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44072/* end confdefs.h.  */
44073
44074/* Override any GCC internal prototype to avoid an error.
44075   Use char because int might match the return type of a GCC
44076   builtin and then its argument prototype would still apply.  */
44077#ifdef __cplusplus
44078extern "C"
44079#endif
44080char gethostbyname ();
44081int
44082main ()
44083{
44084return gethostbyname ();
44085  ;
44086  return 0;
44087}
44088_ACEOF
44089if ac_fn_cxx_try_link "$LINENO"; then :
44090  ac_cv_lib_bsd_gethostbyname=yes
44091else
44092  ac_cv_lib_bsd_gethostbyname=no
44093fi
44094rm -f core conftest.err conftest.$ac_objext \
44095    conftest$ac_exeext conftest.$ac_ext
44096LIBS=$ac_check_lib_save_LIBS
44097fi
44098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
44099$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
44100if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
44101  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
44102fi
44103
44104      fi
44105    fi
44106
44107    # lieder@skyler.mavd.honeywell.com says without -lsocket,
44108    # socket/setsockopt and other routines are undefined under SCO ODT
44109    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
44110    # on later versions), says Simon Leinen: it contains gethostby*
44111    # variants that don't use the name server (or something).  -lsocket
44112    # must be given before -lnsl if both are needed.  We assume that
44113    # if connect needs -lnsl, so does gethostbyname.
44114    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
44115if test "x$ac_cv_func_connect" = xyes; then :
44116
44117fi
44118
44119    if test $ac_cv_func_connect = no; then
44120      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
44121$as_echo_n "checking for connect in -lsocket... " >&6; }
44122if ${ac_cv_lib_socket_connect+:} false; then :
44123  $as_echo_n "(cached) " >&6
44124else
44125  ac_check_lib_save_LIBS=$LIBS
44126LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
44127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44128/* end confdefs.h.  */
44129
44130/* Override any GCC internal prototype to avoid an error.
44131   Use char because int might match the return type of a GCC
44132   builtin and then its argument prototype would still apply.  */
44133#ifdef __cplusplus
44134extern "C"
44135#endif
44136char connect ();
44137int
44138main ()
44139{
44140return connect ();
44141  ;
44142  return 0;
44143}
44144_ACEOF
44145if ac_fn_cxx_try_link "$LINENO"; then :
44146  ac_cv_lib_socket_connect=yes
44147else
44148  ac_cv_lib_socket_connect=no
44149fi
44150rm -f core conftest.err conftest.$ac_objext \
44151    conftest$ac_exeext conftest.$ac_ext
44152LIBS=$ac_check_lib_save_LIBS
44153fi
44154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
44155$as_echo "$ac_cv_lib_socket_connect" >&6; }
44156if test "x$ac_cv_lib_socket_connect" = xyes; then :
44157  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
44158fi
44159
44160    fi
44161
44162    # Guillermo Gomez says -lposix is necessary on A/UX.
44163    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
44164if test "x$ac_cv_func_remove" = xyes; then :
44165
44166fi
44167
44168    if test $ac_cv_func_remove = no; then
44169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
44170$as_echo_n "checking for remove in -lposix... " >&6; }
44171if ${ac_cv_lib_posix_remove+:} false; then :
44172  $as_echo_n "(cached) " >&6
44173else
44174  ac_check_lib_save_LIBS=$LIBS
44175LIBS="-lposix  $LIBS"
44176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44177/* end confdefs.h.  */
44178
44179/* Override any GCC internal prototype to avoid an error.
44180   Use char because int might match the return type of a GCC
44181   builtin and then its argument prototype would still apply.  */
44182#ifdef __cplusplus
44183extern "C"
44184#endif
44185char remove ();
44186int
44187main ()
44188{
44189return remove ();
44190  ;
44191  return 0;
44192}
44193_ACEOF
44194if ac_fn_cxx_try_link "$LINENO"; then :
44195  ac_cv_lib_posix_remove=yes
44196else
44197  ac_cv_lib_posix_remove=no
44198fi
44199rm -f core conftest.err conftest.$ac_objext \
44200    conftest$ac_exeext conftest.$ac_ext
44201LIBS=$ac_check_lib_save_LIBS
44202fi
44203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
44204$as_echo "$ac_cv_lib_posix_remove" >&6; }
44205if test "x$ac_cv_lib_posix_remove" = xyes; then :
44206  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
44207fi
44208
44209    fi
44210
44211    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
44212    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
44213if test "x$ac_cv_func_shmat" = xyes; then :
44214
44215fi
44216
44217    if test $ac_cv_func_shmat = no; then
44218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
44219$as_echo_n "checking for shmat in -lipc... " >&6; }
44220if ${ac_cv_lib_ipc_shmat+:} false; then :
44221  $as_echo_n "(cached) " >&6
44222else
44223  ac_check_lib_save_LIBS=$LIBS
44224LIBS="-lipc  $LIBS"
44225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44226/* end confdefs.h.  */
44227
44228/* Override any GCC internal prototype to avoid an error.
44229   Use char because int might match the return type of a GCC
44230   builtin and then its argument prototype would still apply.  */
44231#ifdef __cplusplus
44232extern "C"
44233#endif
44234char shmat ();
44235int
44236main ()
44237{
44238return shmat ();
44239  ;
44240  return 0;
44241}
44242_ACEOF
44243if ac_fn_cxx_try_link "$LINENO"; then :
44244  ac_cv_lib_ipc_shmat=yes
44245else
44246  ac_cv_lib_ipc_shmat=no
44247fi
44248rm -f core conftest.err conftest.$ac_objext \
44249    conftest$ac_exeext conftest.$ac_ext
44250LIBS=$ac_check_lib_save_LIBS
44251fi
44252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
44253$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
44254if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
44255  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
44256fi
44257
44258    fi
44259  fi
44260
44261  # Check for libraries that X11R6 Xt/Xaw programs need.
44262  ac_save_LDFLAGS=$LDFLAGS
44263  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44264  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44265  # check for ICE first), but we must link in the order -lSM -lICE or
44266  # we get undefined symbols.  So assume we have SM if we have ICE.
44267  # These have to be linked with before -lX11, unlike the other
44268  # libraries we check for below, so use a different variable.
44269  # John Interrante, Karl Berry
44270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44271$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44272if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44273  $as_echo_n "(cached) " >&6
44274else
44275  ac_check_lib_save_LIBS=$LIBS
44276LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44278/* end confdefs.h.  */
44279
44280/* Override any GCC internal prototype to avoid an error.
44281   Use char because int might match the return type of a GCC
44282   builtin and then its argument prototype would still apply.  */
44283#ifdef __cplusplus
44284extern "C"
44285#endif
44286char IceConnectionNumber ();
44287int
44288main ()
44289{
44290return IceConnectionNumber ();
44291  ;
44292  return 0;
44293}
44294_ACEOF
44295if ac_fn_cxx_try_link "$LINENO"; then :
44296  ac_cv_lib_ICE_IceConnectionNumber=yes
44297else
44298  ac_cv_lib_ICE_IceConnectionNumber=no
44299fi
44300rm -f core conftest.err conftest.$ac_objext \
44301    conftest$ac_exeext conftest.$ac_ext
44302LIBS=$ac_check_lib_save_LIBS
44303fi
44304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44305$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44306if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44307  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44308fi
44309
44310  LDFLAGS=$ac_save_LDFLAGS
44311
44312fi
44313
44314
44315    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44316    # this doesn't make sense so we remove it.
44317    if test "x$COMPILE_TYPE" = xcross; then
44318      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44319    fi
44320
44321    if test "x$no_x" = xyes; then
44322
44323  # Print a helpful message on how to acquire the necessary build dependency.
44324  # x11 is the help tag: freetype, cups, pulse, alsa etc
44325  MISSING_DEPENDENCY=x11
44326
44327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44328    cygwin_help $MISSING_DEPENDENCY
44329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44330    msys_help $MISSING_DEPENDENCY
44331  else
44332    PKGHANDLER_COMMAND=
44333
44334    case $PKGHANDLER in
44335      apt-get)
44336        apt_help     $MISSING_DEPENDENCY ;;
44337      yum)
44338        yum_help     $MISSING_DEPENDENCY ;;
44339      port)
44340        port_help    $MISSING_DEPENDENCY ;;
44341      pkgutil)
44342        pkgutil_help $MISSING_DEPENDENCY ;;
44343      pkgadd)
44344        pkgadd_help  $MISSING_DEPENDENCY ;;
44345    esac
44346
44347    if test "x$PKGHANDLER_COMMAND" != x; then
44348      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44349    fi
44350  fi
44351
44352      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44353    fi
44354
44355    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44356      OPENWIN_HOME="/usr/openwin"
44357      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44358      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44359          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44360          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44361          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44362    fi
44363
44364    ac_ext=c
44365ac_cpp='$CPP $CPPFLAGS'
44366ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44367ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44368ac_compiler_gnu=$ac_cv_c_compiler_gnu
44369
44370    OLD_CFLAGS="$CFLAGS"
44371    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44372
44373    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44374    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44375do :
44376  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44377ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44378          # include <X11/Xlib.h>
44379          # include <X11/Xutil.h>
44380
44381
44382"
44383if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44384  cat >>confdefs.h <<_ACEOF
44385#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44386_ACEOF
44387 X11_HEADERS_OK=yes
44388else
44389  X11_HEADERS_OK=no; break
44390fi
44391
44392done
44393
44394
44395    if test "x$X11_HEADERS_OK" = xno; then
44396
44397  # Print a helpful message on how to acquire the necessary build dependency.
44398  # x11 is the help tag: freetype, cups, pulse, alsa etc
44399  MISSING_DEPENDENCY=x11
44400
44401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44402    cygwin_help $MISSING_DEPENDENCY
44403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44404    msys_help $MISSING_DEPENDENCY
44405  else
44406    PKGHANDLER_COMMAND=
44407
44408    case $PKGHANDLER in
44409      apt-get)
44410        apt_help     $MISSING_DEPENDENCY ;;
44411      yum)
44412        yum_help     $MISSING_DEPENDENCY ;;
44413      port)
44414        port_help    $MISSING_DEPENDENCY ;;
44415      pkgutil)
44416        pkgutil_help $MISSING_DEPENDENCY ;;
44417      pkgadd)
44418        pkgadd_help  $MISSING_DEPENDENCY ;;
44419    esac
44420
44421    if test "x$PKGHANDLER_COMMAND" != x; then
44422      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44423    fi
44424  fi
44425
44426      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44427    fi
44428
44429    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44430    # defined in libawt_xawt.
44431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44432$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44433    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44434/* end confdefs.h.  */
44435#include <X11/extensions/Xrender.h>
44436int
44437main ()
44438{
44439XLinearGradient x;
44440  ;
44441  return 0;
44442}
44443_ACEOF
44444if ac_fn_c_try_compile "$LINENO"; then :
44445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44446$as_echo "yes" >&6; }
44447else
44448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44449$as_echo "no" >&6; }
44450         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44451fi
44452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44453
44454    CFLAGS="$OLD_CFLAGS"
44455    ac_ext=cpp
44456ac_cpp='$CXXCPP $CPPFLAGS'
44457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44460
44461  fi # X11_NOT_NEEDED
44462
44463
44464
44465
44466
44467
44468  ###############################################################################
44469  #
44470  # The common unix printing system cups is used to print from java.
44471  #
44472
44473# Check whether --with-cups was given.
44474if test "${with_cups+set}" = set; then :
44475  withval=$with_cups;
44476fi
44477
44478
44479# Check whether --with-cups-include was given.
44480if test "${with_cups_include+set}" = set; then :
44481  withval=$with_cups_include;
44482fi
44483
44484
44485  if test "x$CUPS_NOT_NEEDED" = xyes; then
44486    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44487      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44488$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44489    fi
44490    CUPS_CFLAGS=
44491  else
44492    CUPS_FOUND=no
44493
44494    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44495      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44496    fi
44497
44498    if test "x${with_cups}" != x; then
44499      CUPS_CFLAGS="-I${with_cups}/include"
44500      CUPS_FOUND=yes
44501    fi
44502    if test "x${with_cups_include}" != x; then
44503      CUPS_CFLAGS="-I${with_cups_include}"
44504      CUPS_FOUND=yes
44505    fi
44506    if test "x$CUPS_FOUND" = xno; then
44507
44508
44509  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44510    # Source the builddeps file again, to make sure it uses the latest variables!
44511    . $builddepsfile
44512    # Look for a target and build machine specific resource!
44513    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44514    if test "x$resource" = x; then
44515      # Ok, lets instead look for a target specific resource
44516      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44517    fi
44518    if test "x$resource" = x; then
44519      # Ok, lets instead look for a build specific resource
44520      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44521    fi
44522    if test "x$resource" = x; then
44523      # Ok, lets instead look for a generic resource
44524      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44525      resource=${builddep_cups}
44526    fi
44527    if test "x$resource" != x; then
44528      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44529$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44530      # If the resource in the builddeps.conf file is an existing directory,
44531      # for example /java/linux/cups
44532      if test -d ${resource}; then
44533        depdir=${resource}
44534      else
44535
44536  # cups is for example mymodule
44537  # $resource is for example libs/general/libmymod_1_2_3.zip
44538  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44539  # $with_builddeps_dir is for example /localhome/builddeps
44540  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44541  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44542  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44543  filename=`basename $resource`
44544  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44545  filebase=${filename%%.*}
44546  extension=${filename#*.}
44547  installdir=$with_builddeps_dir/$filebase
44548  if test ! -f $installdir/$filename.unpacked; then
44549    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44550$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44551    if test ! -d $installdir; then
44552      mkdir -p $installdir
44553    fi
44554    if test ! -d $installdir; then
44555      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44556    fi
44557    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44558    touch $tmpfile
44559    if test ! -f $tmpfile; then
44560      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44561    fi
44562
44563  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44564  # $tmpfile is the local file name for the downloaded file.
44565  VALID_TOOL=no
44566  if test "x$BDEPS_FTP" = xwget; then
44567    VALID_TOOL=yes
44568    wget -O $tmpfile $with_builddeps_server/$resource
44569  fi
44570  if test "x$BDEPS_FTP" = xlftp; then
44571    VALID_TOOL=yes
44572    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44573  fi
44574  if test "x$BDEPS_FTP" = xftp; then
44575    VALID_TOOL=yes
44576    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44577    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44578    FTPUSERPWD=${FTPSERVER%%@*}
44579    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44580      FTPUSER=${userpwd%%:*}
44581      FTPPWD=${userpwd#*@}
44582      FTPSERVER=${FTPSERVER#*@}
44583    else
44584      FTPUSER=ftp
44585      FTPPWD=ftp
44586    fi
44587    # the "pass" command does not work on some
44588    # ftp clients (read ftp.exe) but if it works,
44589    # passive mode is better!
44590    ( \
44591        echo "user $FTPUSER $FTPPWD"        ; \
44592        echo "pass"                         ; \
44593        echo "bin"                          ; \
44594        echo "get $FTPPATH $tmpfile"              ; \
44595    ) | ftp -in $FTPSERVER
44596  fi
44597  if test "x$VALID_TOOL" != xyes; then
44598    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44599  fi
44600
44601    mv $tmpfile $installdir/$filename
44602    if test ! -s $installdir/$filename; then
44603      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44604    fi
44605    case "$extension" in
44606      zip)  echo "Unzipping $installdir/$filename..."
44607        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44608        ;;
44609      tar.gz) echo "Untaring $installdir/$filename..."
44610        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44611        ;;
44612      tgz) echo "Untaring $installdir/$filename..."
44613        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44614        ;;
44615      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44616        ;;
44617    esac
44618  fi
44619  if test -f $installdir/$filename.unpacked; then
44620    depdir=$installdir
44621  fi
44622
44623      fi
44624      # Source the builddeps file again, because in the previous command, the depdir
44625      # was updated to point at the current build dependency install directory.
44626      . $builddepsfile
44627      # Now extract variables from the builddeps.conf files.
44628      theroot=${builddep_cups_ROOT}
44629      thecflags=${builddep_cups_CFLAGS}
44630      thelibs=${builddep_cups_LIBS}
44631      if test "x$depdir" = x; then
44632        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44633      fi
44634      CUPS=$depdir
44635      if test "x$theroot" != x; then
44636        CUPS="$theroot"
44637      fi
44638      if test "x$thecflags" != x; then
44639        CUPS_CFLAGS="$thecflags"
44640      fi
44641      if test "x$thelibs" != x; then
44642        CUPS_LIBS="$thelibs"
44643      fi
44644      CUPS_FOUND=yes
44645
44646    fi
44647
44648  fi
44649
44650    fi
44651    if test "x$CUPS_FOUND" = xno; then
44652      # Are the cups headers installed in the default /usr/include location?
44653      for ac_header in cups/cups.h cups/ppd.h
44654do :
44655  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44656ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44657if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44658  cat >>confdefs.h <<_ACEOF
44659#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44660_ACEOF
44661
44662            CUPS_FOUND=yes
44663            CUPS_CFLAGS=
44664            DEFAULT_CUPS=yes
44665
44666
44667fi
44668
44669done
44670
44671    fi
44672    if test "x$CUPS_FOUND" = xno; then
44673      # Getting nervous now? Lets poke around for standard Solaris third-party
44674      # package installation locations.
44675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44676$as_echo_n "checking for cups headers... " >&6; }
44677      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44678        # An SFW package seems to be installed!
44679        CUPS_FOUND=yes
44680        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44681      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44682        # A CSW package seems to be installed!
44683        CUPS_FOUND=yes
44684        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44685      fi
44686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44687$as_echo "$CUPS_FOUND" >&6; }
44688    fi
44689    if test "x$CUPS_FOUND" = xno; then
44690
44691  # Print a helpful message on how to acquire the necessary build dependency.
44692  # cups is the help tag: freetype, cups, pulse, alsa etc
44693  MISSING_DEPENDENCY=cups
44694
44695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44696    cygwin_help $MISSING_DEPENDENCY
44697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44698    msys_help $MISSING_DEPENDENCY
44699  else
44700    PKGHANDLER_COMMAND=
44701
44702    case $PKGHANDLER in
44703      apt-get)
44704        apt_help     $MISSING_DEPENDENCY ;;
44705      yum)
44706        yum_help     $MISSING_DEPENDENCY ;;
44707      port)
44708        port_help    $MISSING_DEPENDENCY ;;
44709      pkgutil)
44710        pkgutil_help $MISSING_DEPENDENCY ;;
44711      pkgadd)
44712        pkgadd_help  $MISSING_DEPENDENCY ;;
44713    esac
44714
44715    if test "x$PKGHANDLER_COMMAND" != x; then
44716      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44717    fi
44718  fi
44719
44720      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44721    fi
44722  fi
44723
44724
44725
44726
44727
44728
44729  ###############################################################################
44730  #
44731  # The ubiquitous freetype library is used to render fonts.
44732  #
44733
44734# Check whether --with-freetype was given.
44735if test "${with_freetype+set}" = set; then :
44736  withval=$with_freetype;
44737fi
44738
44739
44740# Check whether --with-freetype-include was given.
44741if test "${with_freetype_include+set}" = set; then :
44742  withval=$with_freetype_include;
44743fi
44744
44745
44746# Check whether --with-freetype-lib was given.
44747if test "${with_freetype_lib+set}" = set; then :
44748  withval=$with_freetype_lib;
44749fi
44750
44751
44752# Check whether --with-freetype-src was given.
44753if test "${with_freetype_src+set}" = set; then :
44754  withval=$with_freetype_src;
44755fi
44756
44757  # Check whether --enable-freetype-bundling was given.
44758if test "${enable_freetype_bundling+set}" = set; then :
44759  enableval=$enable_freetype_bundling;
44760fi
44761
44762
44763  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44764  FREETYPE_BASE_NAME=freetype
44765  FREETYPE_CFLAGS=
44766  FREETYPE_LIBS=
44767  FREETYPE_BUNDLE_LIB_PATH=
44768
44769  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44770    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
44771      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44772$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44773    fi
44774    if test "x$enable_freetype_bundling" != x; then
44775      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44776$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44777    fi
44778  else
44779    # freetype is needed to build; go get it!
44780
44781    BUNDLE_FREETYPE="$enable_freetype_bundling"
44782
44783    if  test "x$with_freetype_src" != x; then
44784      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44785        # Try to build freetype if --with-freetype-src was given on Windows
44786
44787  FREETYPE_SRC_PATH="$with_freetype_src"
44788  BUILD_FREETYPE=yes
44789
44790  # Check if the freetype sources are acessible..
44791  if ! test -d $FREETYPE_SRC_PATH; then
44792    { $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
44793$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44794    BUILD_FREETYPE=no
44795  fi
44796  # ..and contain a vc2010 project file
44797  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44798  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44799    { $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
44800$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44801    BUILD_FREETYPE=no
44802  fi
44803  # Now check if configure found a version of 'msbuild.exe'
44804  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44805    { $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
44806$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;}
44807    BUILD_FREETYPE=no
44808  fi
44809
44810  # Ready to go..
44811  if test "x$BUILD_FREETYPE" = xyes; then
44812
44813    # msbuild requires trailing slashes for output directories
44814    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44815    freetype_lib_path_unix="$freetype_lib_path"
44816    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44817
44818  unix_path="$vcxproj_path"
44819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44820    windows_path=`$CYGPATH -m "$unix_path"`
44821    vcxproj_path="$windows_path"
44822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44823    windows_path=`cmd //c echo $unix_path`
44824    vcxproj_path="$windows_path"
44825  fi
44826
44827
44828  unix_path="$freetype_lib_path"
44829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44830    windows_path=`$CYGPATH -m "$unix_path"`
44831    freetype_lib_path="$windows_path"
44832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44833    windows_path=`cmd //c echo $unix_path`
44834    freetype_lib_path="$windows_path"
44835  fi
44836
44837
44838  unix_path="$freetype_obj_path"
44839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44840    windows_path=`$CYGPATH -m "$unix_path"`
44841    freetype_obj_path="$windows_path"
44842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44843    windows_path=`cmd //c echo $unix_path`
44844    freetype_obj_path="$windows_path"
44845  fi
44846
44847    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44848      freetype_platform=x64
44849    else
44850      freetype_platform=win32
44851    fi
44852
44853    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44854    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44855    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44856    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44857    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44858$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44859
44860    # First we try to build the freetype.dll
44861    $ECHO -e "@echo off\n"\
44862	     "$MSBUILD $vcxproj_path "\
44863		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44864		       "/p:Configuration=\"Release Multithreaded\" "\
44865		       "/p:Platform=$freetype_platform "\
44866		       "/p:ConfigurationType=DynamicLibrary "\
44867		       "/p:TargetName=freetype "\
44868		       "/p:OutDir=\"$freetype_lib_path\" "\
44869		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44870    cmd /c freetype.bat
44871
44872    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44873      # If that succeeds we also build freetype.lib
44874      $ECHO -e "@echo off\n"\
44875	       "$MSBUILD $vcxproj_path "\
44876			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44877			 "/p:Configuration=\"Release Multithreaded\" "\
44878			 "/p:Platform=$freetype_platform "\
44879			 "/p:ConfigurationType=StaticLibrary "\
44880			 "/p:TargetName=freetype "\
44881			 "/p:OutDir=\"$freetype_lib_path\" "\
44882			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44883      cmd /c freetype.bat
44884
44885      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44886	# Once we build both, lib and dll, set freetype lib and include path appropriately
44887	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44888	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44889	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44890$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44891      else
44892	BUILD_FREETYPE=no
44893      fi
44894    else
44895      BUILD_FREETYPE=no
44896    fi
44897  fi
44898
44899        if test "x$BUILD_FREETYPE" = xyes; then
44900          # Okay, we built it. Check that it works.
44901
44902  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44903  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44904  METHOD="--with-freetype-src"
44905
44906  # Let's start with an optimistic view of the world :-)
44907  FOUND_FREETYPE=yes
44908
44909  # First look for the canonical freetype main include file ft2build.h.
44910  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44911    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44912    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44913    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44914      # Fail.
44915      FOUND_FREETYPE=no
44916    fi
44917  fi
44918
44919  if test "x$FOUND_FREETYPE" = xyes; then
44920    # Include file found, let's continue the sanity check.
44921    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44922$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44923
44924    # Reset to default value
44925    FREETYPE_BASE_NAME=freetype
44926    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44927    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44928      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44929          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44930        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44931        # for the .6 version explicitly.
44932        FREETYPE_BASE_NAME=freetype.6
44933        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44934        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44935$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44936      else
44937        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44938$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44939        FOUND_FREETYPE=no
44940      fi
44941    else
44942      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44943        # On Windows, we will need both .lib and .dll file.
44944        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44945          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44946$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44947          FOUND_FREETYPE=no
44948        fi
44949      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44950          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44951        # Found lib in isa dir, use that instead.
44952        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44953        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44954$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44955      fi
44956    fi
44957  fi
44958
44959  if test "x$FOUND_FREETYPE" = xyes; then
44960
44961  # Only process if variable expands to non-empty
44962
44963  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44965
44966  # Input might be given as Windows format, start by converting to
44967  # unix format.
44968  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44969  new_path=`$CYGPATH -u "$path"`
44970
44971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44974  # "foo.exe" is OK but "foo" is an error.
44975  #
44976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44977  # It is also a way to make sure we got the proper file name for the real test later on.
44978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44979  if test "x$test_shortpath" = x; then
44980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44982    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44983  fi
44984
44985  # Call helper function which possibly converts this using DOS-style short mode.
44986  # If so, the updated path is stored in $new_path.
44987
44988  input_path="$new_path"
44989  # Check if we need to convert this using DOS-style short mode. If the path
44990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44991  # take no chances and rewrite it.
44992  # Note: m4 eats our [], so we need to use [ and ] instead.
44993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44994  if test "x$has_forbidden_chars" != x; then
44995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44999      # Going to short mode and back again did indeed matter. Since short mode is
45000      # case insensitive, let's make it lowercase to improve readability.
45001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45002      # Now convert it back to Unix-stile (cygpath)
45003      input_path=`$CYGPATH -u "$shortmode_path"`
45004      new_path="$input_path"
45005    fi
45006  fi
45007
45008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45009  if test "x$test_cygdrive_prefix" = x; then
45010    # As a simple fix, exclude /usr/bin since it's not a real path.
45011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45013      # a path prefixed by /cygdrive for fixpath to work.
45014      new_path="$CYGWIN_ROOT_PATH$input_path"
45015    fi
45016  fi
45017
45018
45019  if test "x$path" != "x$new_path"; then
45020    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45022$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45023  fi
45024
45025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45026
45027  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45028  has_colon=`$ECHO $path | $GREP ^.:`
45029  new_path="$path"
45030  if test "x$has_colon" = x; then
45031    # Not in mixed or Windows style, start by that.
45032    new_path=`cmd //c echo $path`
45033  fi
45034
45035
45036  input_path="$new_path"
45037  # Check if we need to convert this using DOS-style short mode. If the path
45038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45039  # take no chances and rewrite it.
45040  # Note: m4 eats our [], so we need to use [ and ] instead.
45041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45042  if test "x$has_forbidden_chars" != x; then
45043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45045  fi
45046
45047
45048  windows_path="$new_path"
45049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45050    unix_path=`$CYGPATH -u "$windows_path"`
45051    new_path="$unix_path"
45052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45054    new_path="$unix_path"
45055  fi
45056
45057  if test "x$path" != "x$new_path"; then
45058    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45061  fi
45062
45063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45065
45066    else
45067      # We're on a unix platform. Hooray! :)
45068      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45069      has_space=`$ECHO "$path" | $GREP " "`
45070      if test "x$has_space" != x; then
45071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45074      fi
45075
45076      # Use eval to expand a potential ~
45077      eval path="$path"
45078      if test ! -f "$path" && test ! -d "$path"; then
45079        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45080      fi
45081
45082      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45083    fi
45084  fi
45085
45086
45087  # Only process if variable expands to non-empty
45088
45089  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45091
45092  # Input might be given as Windows format, start by converting to
45093  # unix format.
45094  path="$POTENTIAL_FREETYPE_LIB_PATH"
45095  new_path=`$CYGPATH -u "$path"`
45096
45097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45100  # "foo.exe" is OK but "foo" is an error.
45101  #
45102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45103  # It is also a way to make sure we got the proper file name for the real test later on.
45104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45105  if test "x$test_shortpath" = x; then
45106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45107$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45108    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45109  fi
45110
45111  # Call helper function which possibly converts this using DOS-style short mode.
45112  # If so, the updated path is stored in $new_path.
45113
45114  input_path="$new_path"
45115  # Check if we need to convert this using DOS-style short mode. If the path
45116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45117  # take no chances and rewrite it.
45118  # Note: m4 eats our [], so we need to use [ and ] instead.
45119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45120  if test "x$has_forbidden_chars" != x; then
45121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45125      # Going to short mode and back again did indeed matter. Since short mode is
45126      # case insensitive, let's make it lowercase to improve readability.
45127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45128      # Now convert it back to Unix-stile (cygpath)
45129      input_path=`$CYGPATH -u "$shortmode_path"`
45130      new_path="$input_path"
45131    fi
45132  fi
45133
45134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45135  if test "x$test_cygdrive_prefix" = x; then
45136    # As a simple fix, exclude /usr/bin since it's not a real path.
45137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45139      # a path prefixed by /cygdrive for fixpath to work.
45140      new_path="$CYGWIN_ROOT_PATH$input_path"
45141    fi
45142  fi
45143
45144
45145  if test "x$path" != "x$new_path"; then
45146    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45148$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45149  fi
45150
45151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45152
45153  path="$POTENTIAL_FREETYPE_LIB_PATH"
45154  has_colon=`$ECHO $path | $GREP ^.:`
45155  new_path="$path"
45156  if test "x$has_colon" = x; then
45157    # Not in mixed or Windows style, start by that.
45158    new_path=`cmd //c echo $path`
45159  fi
45160
45161
45162  input_path="$new_path"
45163  # Check if we need to convert this using DOS-style short mode. If the path
45164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45165  # take no chances and rewrite it.
45166  # Note: m4 eats our [], so we need to use [ and ] instead.
45167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45168  if test "x$has_forbidden_chars" != x; then
45169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45171  fi
45172
45173
45174  windows_path="$new_path"
45175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45176    unix_path=`$CYGPATH -u "$windows_path"`
45177    new_path="$unix_path"
45178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45180    new_path="$unix_path"
45181  fi
45182
45183  if test "x$path" != "x$new_path"; then
45184    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45186$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45187  fi
45188
45189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45191
45192    else
45193      # We're on a unix platform. Hooray! :)
45194      path="$POTENTIAL_FREETYPE_LIB_PATH"
45195      has_space=`$ECHO "$path" | $GREP " "`
45196      if test "x$has_space" != x; then
45197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45198$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45200      fi
45201
45202      # Use eval to expand a potential ~
45203      eval path="$path"
45204      if test ! -f "$path" && test ! -d "$path"; then
45205        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45206      fi
45207
45208      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45209    fi
45210  fi
45211
45212
45213    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45215$as_echo_n "checking for freetype includes... " >&6; }
45216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45217$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45218    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45220$as_echo_n "checking for freetype libraries... " >&6; }
45221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45222$as_echo "$FREETYPE_LIB_PATH" >&6; }
45223  fi
45224
45225          if test "x$FOUND_FREETYPE" != xyes; then
45226            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
45227          fi
45228        else
45229          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
45230$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
45231          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
45232        fi
45233      else
45234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
45235$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
45236      fi
45237    fi
45238
45239    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
45240      # User has specified settings
45241
45242      if test "x$BUNDLE_FREETYPE" = x; then
45243        # If not specified, default is to bundle freetype
45244        BUNDLE_FREETYPE=yes
45245      fi
45246
45247      if test "x$with_freetype" != x; then
45248        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
45249        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
45250      fi
45251
45252      # Allow --with-freetype-lib and --with-freetype-include to override
45253      if test "x$with_freetype_include" != x; then
45254        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
45255      fi
45256      if test "x$with_freetype_lib" != x; then
45257        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
45258      fi
45259
45260      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45261        # Okay, we got it. Check that it works.
45262
45263  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45264  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45265  METHOD="--with-freetype"
45266
45267  # Let's start with an optimistic view of the world :-)
45268  FOUND_FREETYPE=yes
45269
45270  # First look for the canonical freetype main include file ft2build.h.
45271  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45272    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45273    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45274    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45275      # Fail.
45276      FOUND_FREETYPE=no
45277    fi
45278  fi
45279
45280  if test "x$FOUND_FREETYPE" = xyes; then
45281    # Include file found, let's continue the sanity check.
45282    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45283$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45284
45285    # Reset to default value
45286    FREETYPE_BASE_NAME=freetype
45287    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45288    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45289      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45290          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45291        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45292        # for the .6 version explicitly.
45293        FREETYPE_BASE_NAME=freetype.6
45294        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45295        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45296$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45297      else
45298        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45299$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45300        FOUND_FREETYPE=no
45301      fi
45302    else
45303      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45304        # On Windows, we will need both .lib and .dll file.
45305        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45306          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45307$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45308          FOUND_FREETYPE=no
45309        fi
45310      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45311          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45312        # Found lib in isa dir, use that instead.
45313        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45314        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45315$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45316      fi
45317    fi
45318  fi
45319
45320  if test "x$FOUND_FREETYPE" = xyes; then
45321
45322  # Only process if variable expands to non-empty
45323
45324  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45326
45327  # Input might be given as Windows format, start by converting to
45328  # unix format.
45329  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45330  new_path=`$CYGPATH -u "$path"`
45331
45332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45335  # "foo.exe" is OK but "foo" is an error.
45336  #
45337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45338  # It is also a way to make sure we got the proper file name for the real test later on.
45339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45340  if test "x$test_shortpath" = x; then
45341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45342$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45343    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45344  fi
45345
45346  # Call helper function which possibly converts this using DOS-style short mode.
45347  # If so, the updated path is stored in $new_path.
45348
45349  input_path="$new_path"
45350  # Check if we need to convert this using DOS-style short mode. If the path
45351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45352  # take no chances and rewrite it.
45353  # Note: m4 eats our [], so we need to use [ and ] instead.
45354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45355  if test "x$has_forbidden_chars" != x; then
45356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45360      # Going to short mode and back again did indeed matter. Since short mode is
45361      # case insensitive, let's make it lowercase to improve readability.
45362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45363      # Now convert it back to Unix-stile (cygpath)
45364      input_path=`$CYGPATH -u "$shortmode_path"`
45365      new_path="$input_path"
45366    fi
45367  fi
45368
45369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45370  if test "x$test_cygdrive_prefix" = x; then
45371    # As a simple fix, exclude /usr/bin since it's not a real path.
45372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45374      # a path prefixed by /cygdrive for fixpath to work.
45375      new_path="$CYGWIN_ROOT_PATH$input_path"
45376    fi
45377  fi
45378
45379
45380  if test "x$path" != "x$new_path"; then
45381    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45383$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45384  fi
45385
45386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45387
45388  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45389  has_colon=`$ECHO $path | $GREP ^.:`
45390  new_path="$path"
45391  if test "x$has_colon" = x; then
45392    # Not in mixed or Windows style, start by that.
45393    new_path=`cmd //c echo $path`
45394  fi
45395
45396
45397  input_path="$new_path"
45398  # Check if we need to convert this using DOS-style short mode. If the path
45399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45400  # take no chances and rewrite it.
45401  # Note: m4 eats our [], so we need to use [ and ] instead.
45402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45403  if test "x$has_forbidden_chars" != x; then
45404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45406  fi
45407
45408
45409  windows_path="$new_path"
45410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45411    unix_path=`$CYGPATH -u "$windows_path"`
45412    new_path="$unix_path"
45413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45415    new_path="$unix_path"
45416  fi
45417
45418  if test "x$path" != "x$new_path"; then
45419    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45421$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45422  fi
45423
45424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45426
45427    else
45428      # We're on a unix platform. Hooray! :)
45429      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45430      has_space=`$ECHO "$path" | $GREP " "`
45431      if test "x$has_space" != x; then
45432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45434        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45435      fi
45436
45437      # Use eval to expand a potential ~
45438      eval path="$path"
45439      if test ! -f "$path" && test ! -d "$path"; then
45440        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45441      fi
45442
45443      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45444    fi
45445  fi
45446
45447
45448  # Only process if variable expands to non-empty
45449
45450  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45452
45453  # Input might be given as Windows format, start by converting to
45454  # unix format.
45455  path="$POTENTIAL_FREETYPE_LIB_PATH"
45456  new_path=`$CYGPATH -u "$path"`
45457
45458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45461  # "foo.exe" is OK but "foo" is an error.
45462  #
45463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45464  # It is also a way to make sure we got the proper file name for the real test later on.
45465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45466  if test "x$test_shortpath" = x; then
45467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45468$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45469    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45470  fi
45471
45472  # Call helper function which possibly converts this using DOS-style short mode.
45473  # If so, the updated path is stored in $new_path.
45474
45475  input_path="$new_path"
45476  # Check if we need to convert this using DOS-style short mode. If the path
45477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45478  # take no chances and rewrite it.
45479  # Note: m4 eats our [], so we need to use [ and ] instead.
45480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45481  if test "x$has_forbidden_chars" != x; then
45482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45486      # Going to short mode and back again did indeed matter. Since short mode is
45487      # case insensitive, let's make it lowercase to improve readability.
45488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45489      # Now convert it back to Unix-stile (cygpath)
45490      input_path=`$CYGPATH -u "$shortmode_path"`
45491      new_path="$input_path"
45492    fi
45493  fi
45494
45495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45496  if test "x$test_cygdrive_prefix" = x; then
45497    # As a simple fix, exclude /usr/bin since it's not a real path.
45498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45500      # a path prefixed by /cygdrive for fixpath to work.
45501      new_path="$CYGWIN_ROOT_PATH$input_path"
45502    fi
45503  fi
45504
45505
45506  if test "x$path" != "x$new_path"; then
45507    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45509$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45510  fi
45511
45512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45513
45514  path="$POTENTIAL_FREETYPE_LIB_PATH"
45515  has_colon=`$ECHO $path | $GREP ^.:`
45516  new_path="$path"
45517  if test "x$has_colon" = x; then
45518    # Not in mixed or Windows style, start by that.
45519    new_path=`cmd //c echo $path`
45520  fi
45521
45522
45523  input_path="$new_path"
45524  # Check if we need to convert this using DOS-style short mode. If the path
45525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45526  # take no chances and rewrite it.
45527  # Note: m4 eats our [], so we need to use [ and ] instead.
45528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45529  if test "x$has_forbidden_chars" != x; then
45530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45532  fi
45533
45534
45535  windows_path="$new_path"
45536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45537    unix_path=`$CYGPATH -u "$windows_path"`
45538    new_path="$unix_path"
45539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45541    new_path="$unix_path"
45542  fi
45543
45544  if test "x$path" != "x$new_path"; then
45545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45548  fi
45549
45550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45552
45553    else
45554      # We're on a unix platform. Hooray! :)
45555      path="$POTENTIAL_FREETYPE_LIB_PATH"
45556      has_space=`$ECHO "$path" | $GREP " "`
45557      if test "x$has_space" != x; then
45558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45561      fi
45562
45563      # Use eval to expand a potential ~
45564      eval path="$path"
45565      if test ! -f "$path" && test ! -d "$path"; then
45566        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45567      fi
45568
45569      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45570    fi
45571  fi
45572
45573
45574    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45576$as_echo_n "checking for freetype includes... " >&6; }
45577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45578$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45579    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45581$as_echo_n "checking for freetype libraries... " >&6; }
45582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45583$as_echo "$FREETYPE_LIB_PATH" >&6; }
45584  fi
45585
45586        if test "x$FOUND_FREETYPE" != xyes; then
45587          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45588        fi
45589      else
45590        # User specified only one of lib or include. This is an error.
45591        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45592          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45593$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45594          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45595        else
45596          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45597$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45598          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45599        fi
45600      fi
45601    else
45602      # User did not specify settings, but we need freetype. Try to locate it.
45603
45604      if test "x$BUNDLE_FREETYPE" = x; then
45605        # If not specified, default is to bundle freetype only on windows
45606        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45607          BUNDLE_FREETYPE=yes
45608        else
45609          BUNDLE_FREETYPE=no
45610        fi
45611      fi
45612
45613      if test "x$FOUND_FREETYPE" != xyes; then
45614        # Check builddeps
45615
45616
45617  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45618    # Source the builddeps file again, to make sure it uses the latest variables!
45619    . $builddepsfile
45620    # Look for a target and build machine specific resource!
45621    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45622    if test "x$resource" = x; then
45623      # Ok, lets instead look for a target specific resource
45624      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45625    fi
45626    if test "x$resource" = x; then
45627      # Ok, lets instead look for a build specific resource
45628      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45629    fi
45630    if test "x$resource" = x; then
45631      # Ok, lets instead look for a generic resource
45632      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45633      resource=${builddep_freetype2}
45634    fi
45635    if test "x$resource" != x; then
45636      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45637$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45638      # If the resource in the builddeps.conf file is an existing directory,
45639      # for example /java/linux/cups
45640      if test -d ${resource}; then
45641        depdir=${resource}
45642      else
45643
45644  # freetype2 is for example mymodule
45645  # $resource is for example libs/general/libmymod_1_2_3.zip
45646  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45647  # $with_builddeps_dir is for example /localhome/builddeps
45648  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45649  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45650  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45651  filename=`basename $resource`
45652  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45653  filebase=${filename%%.*}
45654  extension=${filename#*.}
45655  installdir=$with_builddeps_dir/$filebase
45656  if test ! -f $installdir/$filename.unpacked; then
45657    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45658$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45659    if test ! -d $installdir; then
45660      mkdir -p $installdir
45661    fi
45662    if test ! -d $installdir; then
45663      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45664    fi
45665    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45666    touch $tmpfile
45667    if test ! -f $tmpfile; then
45668      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45669    fi
45670
45671  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45672  # $tmpfile is the local file name for the downloaded file.
45673  VALID_TOOL=no
45674  if test "x$BDEPS_FTP" = xwget; then
45675    VALID_TOOL=yes
45676    wget -O $tmpfile $with_builddeps_server/$resource
45677  fi
45678  if test "x$BDEPS_FTP" = xlftp; then
45679    VALID_TOOL=yes
45680    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45681  fi
45682  if test "x$BDEPS_FTP" = xftp; then
45683    VALID_TOOL=yes
45684    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45685    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45686    FTPUSERPWD=${FTPSERVER%%@*}
45687    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45688      FTPUSER=${userpwd%%:*}
45689      FTPPWD=${userpwd#*@}
45690      FTPSERVER=${FTPSERVER#*@}
45691    else
45692      FTPUSER=ftp
45693      FTPPWD=ftp
45694    fi
45695    # the "pass" command does not work on some
45696    # ftp clients (read ftp.exe) but if it works,
45697    # passive mode is better!
45698    ( \
45699        echo "user $FTPUSER $FTPPWD"        ; \
45700        echo "pass"                         ; \
45701        echo "bin"                          ; \
45702        echo "get $FTPPATH $tmpfile"              ; \
45703    ) | ftp -in $FTPSERVER
45704  fi
45705  if test "x$VALID_TOOL" != xyes; then
45706    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45707  fi
45708
45709    mv $tmpfile $installdir/$filename
45710    if test ! -s $installdir/$filename; then
45711      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45712    fi
45713    case "$extension" in
45714      zip)  echo "Unzipping $installdir/$filename..."
45715        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45716        ;;
45717      tar.gz) echo "Untaring $installdir/$filename..."
45718        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45719        ;;
45720      tgz) echo "Untaring $installdir/$filename..."
45721        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45722        ;;
45723      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45724        ;;
45725    esac
45726  fi
45727  if test -f $installdir/$filename.unpacked; then
45728    depdir=$installdir
45729  fi
45730
45731      fi
45732      # Source the builddeps file again, because in the previous command, the depdir
45733      # was updated to point at the current build dependency install directory.
45734      . $builddepsfile
45735      # Now extract variables from the builddeps.conf files.
45736      theroot=${builddep_freetype2_ROOT}
45737      thecflags=${builddep_freetype2_CFLAGS}
45738      thelibs=${builddep_freetype2_LIBS}
45739      if test "x$depdir" = x; then
45740        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45741      fi
45742      FREETYPE=$depdir
45743      if test "x$theroot" != x; then
45744        FREETYPE="$theroot"
45745      fi
45746      if test "x$thecflags" != x; then
45747        FREETYPE_CFLAGS="$thecflags"
45748      fi
45749      if test "x$thelibs" != x; then
45750        FREETYPE_LIBS="$thelibs"
45751      fi
45752      FOUND_FREETYPE=yes
45753      else FOUND_FREETYPE=no
45754
45755    fi
45756    else FOUND_FREETYPE=no
45757
45758  fi
45759
45760        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45761        if test "x$FOUND_FREETYPE" = xyes; then
45762          if test "x$BUNDLE_FREETYPE" = xyes; then
45763            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45764$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45765            FOUND_FREETYPE=no
45766          else
45767            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45768$as_echo_n "checking for freetype... " >&6; }
45769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45770$as_echo "yes (using builddeps)" >&6; }
45771          fi
45772        fi
45773      fi
45774
45775      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45776      if test "x$SYSROOT" = x; then
45777        if test "x$FOUND_FREETYPE" != xyes; then
45778          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45779          if test "x$PKG_CONFIG" != x; then
45780
45781pkg_failed=no
45782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45783$as_echo_n "checking for FREETYPE... " >&6; }
45784
45785if test -n "$FREETYPE_CFLAGS"; then
45786    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45787 elif test -n "$PKG_CONFIG"; then
45788    if test -n "$PKG_CONFIG" && \
45789    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45790  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45791  ac_status=$?
45792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45793  test $ac_status = 0; }; then
45794  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45795else
45796  pkg_failed=yes
45797fi
45798 else
45799    pkg_failed=untried
45800fi
45801if test -n "$FREETYPE_LIBS"; then
45802    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45803 elif test -n "$PKG_CONFIG"; then
45804    if test -n "$PKG_CONFIG" && \
45805    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45806  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45807  ac_status=$?
45808  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45809  test $ac_status = 0; }; then
45810  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45811else
45812  pkg_failed=yes
45813fi
45814 else
45815    pkg_failed=untried
45816fi
45817
45818
45819
45820if test $pkg_failed = yes; then
45821
45822if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45823        _pkg_short_errors_supported=yes
45824else
45825        _pkg_short_errors_supported=no
45826fi
45827        if test $_pkg_short_errors_supported = yes; then
45828	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45829        else
45830	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45831        fi
45832	# Put the nasty error message in config.log where it belongs
45833	echo "$FREETYPE_PKG_ERRORS" >&5
45834
45835	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45836$as_echo "no" >&6; }
45837                FOUND_FREETYPE=no
45838elif test $pkg_failed = untried; then
45839	FOUND_FREETYPE=no
45840else
45841	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45842	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45844$as_echo "yes" >&6; }
45845	FOUND_FREETYPE=yes
45846fi
45847            if test "x$FOUND_FREETYPE" = xyes; then
45848              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45849              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45850              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45851              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45852                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45853              fi
45854              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45855              if test "x$BUNDLE_FREETYPE" = xyes; then
45856                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45857$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45858                FOUND_FREETYPE=no
45859              else
45860                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45861$as_echo_n "checking for freetype... " >&6; }
45862                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45863$as_echo "yes (using pkg-config)" >&6; }
45864              fi
45865            fi
45866          fi
45867        fi
45868      fi
45869
45870      if test "x$FOUND_FREETYPE" != xyes; then
45871        # Check in well-known locations
45872        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45873          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45874
45875  windows_path="$FREETYPE_BASE_DIR"
45876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45877    unix_path=`$CYGPATH -u "$windows_path"`
45878    FREETYPE_BASE_DIR="$unix_path"
45879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45881    FREETYPE_BASE_DIR="$unix_path"
45882  fi
45883
45884
45885  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45886  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45887  METHOD="well-known location"
45888
45889  # Let's start with an optimistic view of the world :-)
45890  FOUND_FREETYPE=yes
45891
45892  # First look for the canonical freetype main include file ft2build.h.
45893  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45894    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45895    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45896    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45897      # Fail.
45898      FOUND_FREETYPE=no
45899    fi
45900  fi
45901
45902  if test "x$FOUND_FREETYPE" = xyes; then
45903    # Include file found, let's continue the sanity check.
45904    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45905$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45906
45907    # Reset to default value
45908    FREETYPE_BASE_NAME=freetype
45909    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45910    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45911      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45912          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45913        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45914        # for the .6 version explicitly.
45915        FREETYPE_BASE_NAME=freetype.6
45916        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45917        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45918$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45919      else
45920        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45921$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45922        FOUND_FREETYPE=no
45923      fi
45924    else
45925      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45926        # On Windows, we will need both .lib and .dll file.
45927        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45928          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45929$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45930          FOUND_FREETYPE=no
45931        fi
45932      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45933          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45934        # Found lib in isa dir, use that instead.
45935        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45936        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45937$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45938      fi
45939    fi
45940  fi
45941
45942  if test "x$FOUND_FREETYPE" = xyes; then
45943
45944  # Only process if variable expands to non-empty
45945
45946  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45947    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45948
45949  # Input might be given as Windows format, start by converting to
45950  # unix format.
45951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45952  new_path=`$CYGPATH -u "$path"`
45953
45954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45957  # "foo.exe" is OK but "foo" is an error.
45958  #
45959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45960  # It is also a way to make sure we got the proper file name for the real test later on.
45961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45962  if test "x$test_shortpath" = x; then
45963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45965    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45966  fi
45967
45968  # Call helper function which possibly converts this using DOS-style short mode.
45969  # If so, the updated path is stored in $new_path.
45970
45971  input_path="$new_path"
45972  # Check if we need to convert this using DOS-style short mode. If the path
45973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45974  # take no chances and rewrite it.
45975  # Note: m4 eats our [], so we need to use [ and ] instead.
45976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45977  if test "x$has_forbidden_chars" != x; then
45978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45982      # Going to short mode and back again did indeed matter. Since short mode is
45983      # case insensitive, let's make it lowercase to improve readability.
45984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45985      # Now convert it back to Unix-stile (cygpath)
45986      input_path=`$CYGPATH -u "$shortmode_path"`
45987      new_path="$input_path"
45988    fi
45989  fi
45990
45991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45992  if test "x$test_cygdrive_prefix" = x; then
45993    # As a simple fix, exclude /usr/bin since it's not a real path.
45994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45996      # a path prefixed by /cygdrive for fixpath to work.
45997      new_path="$CYGWIN_ROOT_PATH$input_path"
45998    fi
45999  fi
46000
46001
46002  if test "x$path" != "x$new_path"; then
46003    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46006  fi
46007
46008    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46009
46010  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46011  has_colon=`$ECHO $path | $GREP ^.:`
46012  new_path="$path"
46013  if test "x$has_colon" = x; then
46014    # Not in mixed or Windows style, start by that.
46015    new_path=`cmd //c echo $path`
46016  fi
46017
46018
46019  input_path="$new_path"
46020  # Check if we need to convert this using DOS-style short mode. If the path
46021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46022  # take no chances and rewrite it.
46023  # Note: m4 eats our [], so we need to use [ and ] instead.
46024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46025  if test "x$has_forbidden_chars" != x; then
46026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46028  fi
46029
46030
46031  windows_path="$new_path"
46032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46033    unix_path=`$CYGPATH -u "$windows_path"`
46034    new_path="$unix_path"
46035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46037    new_path="$unix_path"
46038  fi
46039
46040  if test "x$path" != "x$new_path"; then
46041    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46043$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46044  fi
46045
46046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46048
46049    else
46050      # We're on a unix platform. Hooray! :)
46051      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46052      has_space=`$ECHO "$path" | $GREP " "`
46053      if test "x$has_space" != x; then
46054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46055$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46056        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46057      fi
46058
46059      # Use eval to expand a potential ~
46060      eval path="$path"
46061      if test ! -f "$path" && test ! -d "$path"; then
46062        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46063      fi
46064
46065      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46066    fi
46067  fi
46068
46069
46070  # Only process if variable expands to non-empty
46071
46072  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46074
46075  # Input might be given as Windows format, start by converting to
46076  # unix format.
46077  path="$POTENTIAL_FREETYPE_LIB_PATH"
46078  new_path=`$CYGPATH -u "$path"`
46079
46080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46083  # "foo.exe" is OK but "foo" is an error.
46084  #
46085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46086  # It is also a way to make sure we got the proper file name for the real test later on.
46087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46088  if test "x$test_shortpath" = x; then
46089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46090$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46091    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46092  fi
46093
46094  # Call helper function which possibly converts this using DOS-style short mode.
46095  # If so, the updated path is stored in $new_path.
46096
46097  input_path="$new_path"
46098  # Check if we need to convert this using DOS-style short mode. If the path
46099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46100  # take no chances and rewrite it.
46101  # Note: m4 eats our [], so we need to use [ and ] instead.
46102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46103  if test "x$has_forbidden_chars" != x; then
46104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46108      # Going to short mode and back again did indeed matter. Since short mode is
46109      # case insensitive, let's make it lowercase to improve readability.
46110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46111      # Now convert it back to Unix-stile (cygpath)
46112      input_path=`$CYGPATH -u "$shortmode_path"`
46113      new_path="$input_path"
46114    fi
46115  fi
46116
46117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46118  if test "x$test_cygdrive_prefix" = x; then
46119    # As a simple fix, exclude /usr/bin since it's not a real path.
46120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46122      # a path prefixed by /cygdrive for fixpath to work.
46123      new_path="$CYGWIN_ROOT_PATH$input_path"
46124    fi
46125  fi
46126
46127
46128  if test "x$path" != "x$new_path"; then
46129    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46131$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46132  fi
46133
46134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46135
46136  path="$POTENTIAL_FREETYPE_LIB_PATH"
46137  has_colon=`$ECHO $path | $GREP ^.:`
46138  new_path="$path"
46139  if test "x$has_colon" = x; then
46140    # Not in mixed or Windows style, start by that.
46141    new_path=`cmd //c echo $path`
46142  fi
46143
46144
46145  input_path="$new_path"
46146  # Check if we need to convert this using DOS-style short mode. If the path
46147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46148  # take no chances and rewrite it.
46149  # Note: m4 eats our [], so we need to use [ and ] instead.
46150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46151  if test "x$has_forbidden_chars" != x; then
46152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46154  fi
46155
46156
46157  windows_path="$new_path"
46158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46159    unix_path=`$CYGPATH -u "$windows_path"`
46160    new_path="$unix_path"
46161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46163    new_path="$unix_path"
46164  fi
46165
46166  if test "x$path" != "x$new_path"; then
46167    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46170  fi
46171
46172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46174
46175    else
46176      # We're on a unix platform. Hooray! :)
46177      path="$POTENTIAL_FREETYPE_LIB_PATH"
46178      has_space=`$ECHO "$path" | $GREP " "`
46179      if test "x$has_space" != x; then
46180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46182        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46183      fi
46184
46185      # Use eval to expand a potential ~
46186      eval path="$path"
46187      if test ! -f "$path" && test ! -d "$path"; then
46188        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46189      fi
46190
46191      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46192    fi
46193  fi
46194
46195
46196    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46198$as_echo_n "checking for freetype includes... " >&6; }
46199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46200$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46201    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46203$as_echo_n "checking for freetype libraries... " >&6; }
46204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46205$as_echo "$FREETYPE_LIB_PATH" >&6; }
46206  fi
46207
46208          if test "x$FOUND_FREETYPE" != xyes; then
46209            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
46210
46211  windows_path="$FREETYPE_BASE_DIR"
46212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46213    unix_path=`$CYGPATH -u "$windows_path"`
46214    FREETYPE_BASE_DIR="$unix_path"
46215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46217    FREETYPE_BASE_DIR="$unix_path"
46218  fi
46219
46220
46221  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46222  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46223  METHOD="well-known location"
46224
46225  # Let's start with an optimistic view of the world :-)
46226  FOUND_FREETYPE=yes
46227
46228  # First look for the canonical freetype main include file ft2build.h.
46229  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46230    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46231    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46232    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46233      # Fail.
46234      FOUND_FREETYPE=no
46235    fi
46236  fi
46237
46238  if test "x$FOUND_FREETYPE" = xyes; then
46239    # Include file found, let's continue the sanity check.
46240    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46241$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46242
46243    # Reset to default value
46244    FREETYPE_BASE_NAME=freetype
46245    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46246    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46247      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46248          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46249        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46250        # for the .6 version explicitly.
46251        FREETYPE_BASE_NAME=freetype.6
46252        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46253        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46254$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46255      else
46256        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46257$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46258        FOUND_FREETYPE=no
46259      fi
46260    else
46261      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46262        # On Windows, we will need both .lib and .dll file.
46263        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46264          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46265$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46266          FOUND_FREETYPE=no
46267        fi
46268      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46269          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46270        # Found lib in isa dir, use that instead.
46271        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46272        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46273$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46274      fi
46275    fi
46276  fi
46277
46278  if test "x$FOUND_FREETYPE" = xyes; then
46279
46280  # Only process if variable expands to non-empty
46281
46282  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46284
46285  # Input might be given as Windows format, start by converting to
46286  # unix format.
46287  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46288  new_path=`$CYGPATH -u "$path"`
46289
46290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46293  # "foo.exe" is OK but "foo" is an error.
46294  #
46295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46296  # It is also a way to make sure we got the proper file name for the real test later on.
46297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46298  if test "x$test_shortpath" = x; then
46299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46301    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46302  fi
46303
46304  # Call helper function which possibly converts this using DOS-style short mode.
46305  # If so, the updated path is stored in $new_path.
46306
46307  input_path="$new_path"
46308  # Check if we need to convert this using DOS-style short mode. If the path
46309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46310  # take no chances and rewrite it.
46311  # Note: m4 eats our [], so we need to use [ and ] instead.
46312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46313  if test "x$has_forbidden_chars" != x; then
46314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46318      # Going to short mode and back again did indeed matter. Since short mode is
46319      # case insensitive, let's make it lowercase to improve readability.
46320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46321      # Now convert it back to Unix-stile (cygpath)
46322      input_path=`$CYGPATH -u "$shortmode_path"`
46323      new_path="$input_path"
46324    fi
46325  fi
46326
46327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46328  if test "x$test_cygdrive_prefix" = x; then
46329    # As a simple fix, exclude /usr/bin since it's not a real path.
46330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46332      # a path prefixed by /cygdrive for fixpath to work.
46333      new_path="$CYGWIN_ROOT_PATH$input_path"
46334    fi
46335  fi
46336
46337
46338  if test "x$path" != "x$new_path"; then
46339    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46341$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46342  fi
46343
46344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46345
46346  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46347  has_colon=`$ECHO $path | $GREP ^.:`
46348  new_path="$path"
46349  if test "x$has_colon" = x; then
46350    # Not in mixed or Windows style, start by that.
46351    new_path=`cmd //c echo $path`
46352  fi
46353
46354
46355  input_path="$new_path"
46356  # Check if we need to convert this using DOS-style short mode. If the path
46357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46358  # take no chances and rewrite it.
46359  # Note: m4 eats our [], so we need to use [ and ] instead.
46360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46361  if test "x$has_forbidden_chars" != x; then
46362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46364  fi
46365
46366
46367  windows_path="$new_path"
46368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46369    unix_path=`$CYGPATH -u "$windows_path"`
46370    new_path="$unix_path"
46371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46373    new_path="$unix_path"
46374  fi
46375
46376  if test "x$path" != "x$new_path"; then
46377    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46380  fi
46381
46382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46384
46385    else
46386      # We're on a unix platform. Hooray! :)
46387      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46388      has_space=`$ECHO "$path" | $GREP " "`
46389      if test "x$has_space" != x; then
46390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46391$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46393      fi
46394
46395      # Use eval to expand a potential ~
46396      eval path="$path"
46397      if test ! -f "$path" && test ! -d "$path"; then
46398        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46399      fi
46400
46401      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46402    fi
46403  fi
46404
46405
46406  # Only process if variable expands to non-empty
46407
46408  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46410
46411  # Input might be given as Windows format, start by converting to
46412  # unix format.
46413  path="$POTENTIAL_FREETYPE_LIB_PATH"
46414  new_path=`$CYGPATH -u "$path"`
46415
46416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46419  # "foo.exe" is OK but "foo" is an error.
46420  #
46421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46422  # It is also a way to make sure we got the proper file name for the real test later on.
46423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46424  if test "x$test_shortpath" = x; then
46425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46426$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46427    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46428  fi
46429
46430  # Call helper function which possibly converts this using DOS-style short mode.
46431  # If so, the updated path is stored in $new_path.
46432
46433  input_path="$new_path"
46434  # Check if we need to convert this using DOS-style short mode. If the path
46435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46436  # take no chances and rewrite it.
46437  # Note: m4 eats our [], so we need to use [ and ] instead.
46438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46439  if test "x$has_forbidden_chars" != x; then
46440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46444      # Going to short mode and back again did indeed matter. Since short mode is
46445      # case insensitive, let's make it lowercase to improve readability.
46446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46447      # Now convert it back to Unix-stile (cygpath)
46448      input_path=`$CYGPATH -u "$shortmode_path"`
46449      new_path="$input_path"
46450    fi
46451  fi
46452
46453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46454  if test "x$test_cygdrive_prefix" = x; then
46455    # As a simple fix, exclude /usr/bin since it's not a real path.
46456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46458      # a path prefixed by /cygdrive for fixpath to work.
46459      new_path="$CYGWIN_ROOT_PATH$input_path"
46460    fi
46461  fi
46462
46463
46464  if test "x$path" != "x$new_path"; then
46465    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46467$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46468  fi
46469
46470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46471
46472  path="$POTENTIAL_FREETYPE_LIB_PATH"
46473  has_colon=`$ECHO $path | $GREP ^.:`
46474  new_path="$path"
46475  if test "x$has_colon" = x; then
46476    # Not in mixed or Windows style, start by that.
46477    new_path=`cmd //c echo $path`
46478  fi
46479
46480
46481  input_path="$new_path"
46482  # Check if we need to convert this using DOS-style short mode. If the path
46483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46484  # take no chances and rewrite it.
46485  # Note: m4 eats our [], so we need to use [ and ] instead.
46486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46487  if test "x$has_forbidden_chars" != x; then
46488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46490  fi
46491
46492
46493  windows_path="$new_path"
46494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46495    unix_path=`$CYGPATH -u "$windows_path"`
46496    new_path="$unix_path"
46497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46499    new_path="$unix_path"
46500  fi
46501
46502  if test "x$path" != "x$new_path"; then
46503    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46505$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46506  fi
46507
46508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46510
46511    else
46512      # We're on a unix platform. Hooray! :)
46513      path="$POTENTIAL_FREETYPE_LIB_PATH"
46514      has_space=`$ECHO "$path" | $GREP " "`
46515      if test "x$has_space" != x; then
46516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46517$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46518        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46519      fi
46520
46521      # Use eval to expand a potential ~
46522      eval path="$path"
46523      if test ! -f "$path" && test ! -d "$path"; then
46524        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46525      fi
46526
46527      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46528    fi
46529  fi
46530
46531
46532    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46534$as_echo_n "checking for freetype includes... " >&6; }
46535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46536$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46537    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46539$as_echo_n "checking for freetype libraries... " >&6; }
46540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46541$as_echo "$FREETYPE_LIB_PATH" >&6; }
46542  fi
46543
46544          fi
46545        else
46546          FREETYPE_BASE_DIR="$SYSROOT/usr"
46547
46548  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46549  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46550  METHOD="well-known location"
46551
46552  # Let's start with an optimistic view of the world :-)
46553  FOUND_FREETYPE=yes
46554
46555  # First look for the canonical freetype main include file ft2build.h.
46556  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46557    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46558    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46559    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46560      # Fail.
46561      FOUND_FREETYPE=no
46562    fi
46563  fi
46564
46565  if test "x$FOUND_FREETYPE" = xyes; then
46566    # Include file found, let's continue the sanity check.
46567    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46568$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46569
46570    # Reset to default value
46571    FREETYPE_BASE_NAME=freetype
46572    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46573    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46574      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46575          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46576        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46577        # for the .6 version explicitly.
46578        FREETYPE_BASE_NAME=freetype.6
46579        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46580        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46581$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46582      else
46583        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46584$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46585        FOUND_FREETYPE=no
46586      fi
46587    else
46588      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46589        # On Windows, we will need both .lib and .dll file.
46590        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46591          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46592$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46593          FOUND_FREETYPE=no
46594        fi
46595      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46596          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46597        # Found lib in isa dir, use that instead.
46598        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46599        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46600$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46601      fi
46602    fi
46603  fi
46604
46605  if test "x$FOUND_FREETYPE" = xyes; then
46606
46607  # Only process if variable expands to non-empty
46608
46609  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46611
46612  # Input might be given as Windows format, start by converting to
46613  # unix format.
46614  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46615  new_path=`$CYGPATH -u "$path"`
46616
46617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46620  # "foo.exe" is OK but "foo" is an error.
46621  #
46622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46623  # It is also a way to make sure we got the proper file name for the real test later on.
46624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46625  if test "x$test_shortpath" = x; then
46626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46627$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46628    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46629  fi
46630
46631  # Call helper function which possibly converts this using DOS-style short mode.
46632  # If so, the updated path is stored in $new_path.
46633
46634  input_path="$new_path"
46635  # Check if we need to convert this using DOS-style short mode. If the path
46636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46637  # take no chances and rewrite it.
46638  # Note: m4 eats our [], so we need to use [ and ] instead.
46639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46640  if test "x$has_forbidden_chars" != x; then
46641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46645      # Going to short mode and back again did indeed matter. Since short mode is
46646      # case insensitive, let's make it lowercase to improve readability.
46647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46648      # Now convert it back to Unix-stile (cygpath)
46649      input_path=`$CYGPATH -u "$shortmode_path"`
46650      new_path="$input_path"
46651    fi
46652  fi
46653
46654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46655  if test "x$test_cygdrive_prefix" = x; then
46656    # As a simple fix, exclude /usr/bin since it's not a real path.
46657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46659      # a path prefixed by /cygdrive for fixpath to work.
46660      new_path="$CYGWIN_ROOT_PATH$input_path"
46661    fi
46662  fi
46663
46664
46665  if test "x$path" != "x$new_path"; then
46666    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46669  fi
46670
46671    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46672
46673  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46674  has_colon=`$ECHO $path | $GREP ^.:`
46675  new_path="$path"
46676  if test "x$has_colon" = x; then
46677    # Not in mixed or Windows style, start by that.
46678    new_path=`cmd //c echo $path`
46679  fi
46680
46681
46682  input_path="$new_path"
46683  # Check if we need to convert this using DOS-style short mode. If the path
46684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46685  # take no chances and rewrite it.
46686  # Note: m4 eats our [], so we need to use [ and ] instead.
46687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46688  if test "x$has_forbidden_chars" != x; then
46689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46691  fi
46692
46693
46694  windows_path="$new_path"
46695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46696    unix_path=`$CYGPATH -u "$windows_path"`
46697    new_path="$unix_path"
46698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46700    new_path="$unix_path"
46701  fi
46702
46703  if test "x$path" != "x$new_path"; then
46704    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46707  fi
46708
46709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46711
46712    else
46713      # We're on a unix platform. Hooray! :)
46714      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46715      has_space=`$ECHO "$path" | $GREP " "`
46716      if test "x$has_space" != x; then
46717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46719        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46720      fi
46721
46722      # Use eval to expand a potential ~
46723      eval path="$path"
46724      if test ! -f "$path" && test ! -d "$path"; then
46725        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46726      fi
46727
46728      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46729    fi
46730  fi
46731
46732
46733  # Only process if variable expands to non-empty
46734
46735  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46737
46738  # Input might be given as Windows format, start by converting to
46739  # unix format.
46740  path="$POTENTIAL_FREETYPE_LIB_PATH"
46741  new_path=`$CYGPATH -u "$path"`
46742
46743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46746  # "foo.exe" is OK but "foo" is an error.
46747  #
46748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46749  # It is also a way to make sure we got the proper file name for the real test later on.
46750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46751  if test "x$test_shortpath" = x; then
46752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46753$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46754    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46755  fi
46756
46757  # Call helper function which possibly converts this using DOS-style short mode.
46758  # If so, the updated path is stored in $new_path.
46759
46760  input_path="$new_path"
46761  # Check if we need to convert this using DOS-style short mode. If the path
46762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46763  # take no chances and rewrite it.
46764  # Note: m4 eats our [], so we need to use [ and ] instead.
46765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46766  if test "x$has_forbidden_chars" != x; then
46767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46771      # Going to short mode and back again did indeed matter. Since short mode is
46772      # case insensitive, let's make it lowercase to improve readability.
46773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46774      # Now convert it back to Unix-stile (cygpath)
46775      input_path=`$CYGPATH -u "$shortmode_path"`
46776      new_path="$input_path"
46777    fi
46778  fi
46779
46780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46781  if test "x$test_cygdrive_prefix" = x; then
46782    # As a simple fix, exclude /usr/bin since it's not a real path.
46783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46785      # a path prefixed by /cygdrive for fixpath to work.
46786      new_path="$CYGWIN_ROOT_PATH$input_path"
46787    fi
46788  fi
46789
46790
46791  if test "x$path" != "x$new_path"; then
46792    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46794$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46795  fi
46796
46797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46798
46799  path="$POTENTIAL_FREETYPE_LIB_PATH"
46800  has_colon=`$ECHO $path | $GREP ^.:`
46801  new_path="$path"
46802  if test "x$has_colon" = x; then
46803    # Not in mixed or Windows style, start by that.
46804    new_path=`cmd //c echo $path`
46805  fi
46806
46807
46808  input_path="$new_path"
46809  # Check if we need to convert this using DOS-style short mode. If the path
46810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46811  # take no chances and rewrite it.
46812  # Note: m4 eats our [], so we need to use [ and ] instead.
46813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46814  if test "x$has_forbidden_chars" != x; then
46815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46817  fi
46818
46819
46820  windows_path="$new_path"
46821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46822    unix_path=`$CYGPATH -u "$windows_path"`
46823    new_path="$unix_path"
46824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46826    new_path="$unix_path"
46827  fi
46828
46829  if test "x$path" != "x$new_path"; then
46830    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46832$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46833  fi
46834
46835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46837
46838    else
46839      # We're on a unix platform. Hooray! :)
46840      path="$POTENTIAL_FREETYPE_LIB_PATH"
46841      has_space=`$ECHO "$path" | $GREP " "`
46842      if test "x$has_space" != x; then
46843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46846      fi
46847
46848      # Use eval to expand a potential ~
46849      eval path="$path"
46850      if test ! -f "$path" && test ! -d "$path"; then
46851        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46852      fi
46853
46854      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46855    fi
46856  fi
46857
46858
46859    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46861$as_echo_n "checking for freetype includes... " >&6; }
46862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46863$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46864    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46866$as_echo_n "checking for freetype libraries... " >&6; }
46867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46868$as_echo "$FREETYPE_LIB_PATH" >&6; }
46869  fi
46870
46871
46872          if test "x$FOUND_FREETYPE" != xyes; then
46873            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46874
46875  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46876  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46877  METHOD="well-known location"
46878
46879  # Let's start with an optimistic view of the world :-)
46880  FOUND_FREETYPE=yes
46881
46882  # First look for the canonical freetype main include file ft2build.h.
46883  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46884    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46885    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46886    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46887      # Fail.
46888      FOUND_FREETYPE=no
46889    fi
46890  fi
46891
46892  if test "x$FOUND_FREETYPE" = xyes; then
46893    # Include file found, let's continue the sanity check.
46894    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46895$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46896
46897    # Reset to default value
46898    FREETYPE_BASE_NAME=freetype
46899    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46900    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46901      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46902          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46903        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46904        # for the .6 version explicitly.
46905        FREETYPE_BASE_NAME=freetype.6
46906        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46907        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46908$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46909      else
46910        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46911$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46912        FOUND_FREETYPE=no
46913      fi
46914    else
46915      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46916        # On Windows, we will need both .lib and .dll file.
46917        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46918          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46919$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46920          FOUND_FREETYPE=no
46921        fi
46922      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46923          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46924        # Found lib in isa dir, use that instead.
46925        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46926        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46927$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46928      fi
46929    fi
46930  fi
46931
46932  if test "x$FOUND_FREETYPE" = xyes; then
46933
46934  # Only process if variable expands to non-empty
46935
46936  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46938
46939  # Input might be given as Windows format, start by converting to
46940  # unix format.
46941  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46942  new_path=`$CYGPATH -u "$path"`
46943
46944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46947  # "foo.exe" is OK but "foo" is an error.
46948  #
46949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46950  # It is also a way to make sure we got the proper file name for the real test later on.
46951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46952  if test "x$test_shortpath" = x; then
46953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46954$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46955    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46956  fi
46957
46958  # Call helper function which possibly converts this using DOS-style short mode.
46959  # If so, the updated path is stored in $new_path.
46960
46961  input_path="$new_path"
46962  # Check if we need to convert this using DOS-style short mode. If the path
46963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46964  # take no chances and rewrite it.
46965  # Note: m4 eats our [], so we need to use [ and ] instead.
46966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46967  if test "x$has_forbidden_chars" != x; then
46968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46972      # Going to short mode and back again did indeed matter. Since short mode is
46973      # case insensitive, let's make it lowercase to improve readability.
46974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46975      # Now convert it back to Unix-stile (cygpath)
46976      input_path=`$CYGPATH -u "$shortmode_path"`
46977      new_path="$input_path"
46978    fi
46979  fi
46980
46981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46982  if test "x$test_cygdrive_prefix" = x; then
46983    # As a simple fix, exclude /usr/bin since it's not a real path.
46984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46986      # a path prefixed by /cygdrive for fixpath to work.
46987      new_path="$CYGWIN_ROOT_PATH$input_path"
46988    fi
46989  fi
46990
46991
46992  if test "x$path" != "x$new_path"; then
46993    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46995$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46996  fi
46997
46998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46999
47000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47001  has_colon=`$ECHO $path | $GREP ^.:`
47002  new_path="$path"
47003  if test "x$has_colon" = x; then
47004    # Not in mixed or Windows style, start by that.
47005    new_path=`cmd //c echo $path`
47006  fi
47007
47008
47009  input_path="$new_path"
47010  # Check if we need to convert this using DOS-style short mode. If the path
47011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47012  # take no chances and rewrite it.
47013  # Note: m4 eats our [], so we need to use [ and ] instead.
47014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47015  if test "x$has_forbidden_chars" != x; then
47016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47018  fi
47019
47020
47021  windows_path="$new_path"
47022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47023    unix_path=`$CYGPATH -u "$windows_path"`
47024    new_path="$unix_path"
47025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47027    new_path="$unix_path"
47028  fi
47029
47030  if test "x$path" != "x$new_path"; then
47031    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47033$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47034  fi
47035
47036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47038
47039    else
47040      # We're on a unix platform. Hooray! :)
47041      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47042      has_space=`$ECHO "$path" | $GREP " "`
47043      if test "x$has_space" != x; then
47044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47045$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47047      fi
47048
47049      # Use eval to expand a potential ~
47050      eval path="$path"
47051      if test ! -f "$path" && test ! -d "$path"; then
47052        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47053      fi
47054
47055      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47056    fi
47057  fi
47058
47059
47060  # Only process if variable expands to non-empty
47061
47062  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47064
47065  # Input might be given as Windows format, start by converting to
47066  # unix format.
47067  path="$POTENTIAL_FREETYPE_LIB_PATH"
47068  new_path=`$CYGPATH -u "$path"`
47069
47070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47073  # "foo.exe" is OK but "foo" is an error.
47074  #
47075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47076  # It is also a way to make sure we got the proper file name for the real test later on.
47077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47078  if test "x$test_shortpath" = x; then
47079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47081    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47082  fi
47083
47084  # Call helper function which possibly converts this using DOS-style short mode.
47085  # If so, the updated path is stored in $new_path.
47086
47087  input_path="$new_path"
47088  # Check if we need to convert this using DOS-style short mode. If the path
47089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47090  # take no chances and rewrite it.
47091  # Note: m4 eats our [], so we need to use [ and ] instead.
47092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47093  if test "x$has_forbidden_chars" != x; then
47094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47098      # Going to short mode and back again did indeed matter. Since short mode is
47099      # case insensitive, let's make it lowercase to improve readability.
47100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47101      # Now convert it back to Unix-stile (cygpath)
47102      input_path=`$CYGPATH -u "$shortmode_path"`
47103      new_path="$input_path"
47104    fi
47105  fi
47106
47107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47108  if test "x$test_cygdrive_prefix" = x; then
47109    # As a simple fix, exclude /usr/bin since it's not a real path.
47110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47112      # a path prefixed by /cygdrive for fixpath to work.
47113      new_path="$CYGWIN_ROOT_PATH$input_path"
47114    fi
47115  fi
47116
47117
47118  if test "x$path" != "x$new_path"; then
47119    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47122  fi
47123
47124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47125
47126  path="$POTENTIAL_FREETYPE_LIB_PATH"
47127  has_colon=`$ECHO $path | $GREP ^.:`
47128  new_path="$path"
47129  if test "x$has_colon" = x; then
47130    # Not in mixed or Windows style, start by that.
47131    new_path=`cmd //c echo $path`
47132  fi
47133
47134
47135  input_path="$new_path"
47136  # Check if we need to convert this using DOS-style short mode. If the path
47137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47138  # take no chances and rewrite it.
47139  # Note: m4 eats our [], so we need to use [ and ] instead.
47140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47141  if test "x$has_forbidden_chars" != x; then
47142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47144  fi
47145
47146
47147  windows_path="$new_path"
47148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47149    unix_path=`$CYGPATH -u "$windows_path"`
47150    new_path="$unix_path"
47151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47153    new_path="$unix_path"
47154  fi
47155
47156  if test "x$path" != "x$new_path"; then
47157    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47159$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47160  fi
47161
47162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47164
47165    else
47166      # We're on a unix platform. Hooray! :)
47167      path="$POTENTIAL_FREETYPE_LIB_PATH"
47168      has_space=`$ECHO "$path" | $GREP " "`
47169      if test "x$has_space" != x; then
47170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47172        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47173      fi
47174
47175      # Use eval to expand a potential ~
47176      eval path="$path"
47177      if test ! -f "$path" && test ! -d "$path"; then
47178        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47179      fi
47180
47181      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47182    fi
47183  fi
47184
47185
47186    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47188$as_echo_n "checking for freetype includes... " >&6; }
47189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47190$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47191    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47193$as_echo_n "checking for freetype libraries... " >&6; }
47194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47195$as_echo "$FREETYPE_LIB_PATH" >&6; }
47196  fi
47197
47198          fi
47199
47200          if test "x$FOUND_FREETYPE" != xyes; then
47201            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
47202
47203  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47204  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
47205  METHOD="well-known location"
47206
47207  # Let's start with an optimistic view of the world :-)
47208  FOUND_FREETYPE=yes
47209
47210  # First look for the canonical freetype main include file ft2build.h.
47211  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47212    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47213    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47214    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47215      # Fail.
47216      FOUND_FREETYPE=no
47217    fi
47218  fi
47219
47220  if test "x$FOUND_FREETYPE" = xyes; then
47221    # Include file found, let's continue the sanity check.
47222    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47223$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47224
47225    # Reset to default value
47226    FREETYPE_BASE_NAME=freetype
47227    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47228    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47229      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47230          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47231        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47232        # for the .6 version explicitly.
47233        FREETYPE_BASE_NAME=freetype.6
47234        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47235        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47236$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47237      else
47238        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47239$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47240        FOUND_FREETYPE=no
47241      fi
47242    else
47243      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47244        # On Windows, we will need both .lib and .dll file.
47245        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47246          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47247$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47248          FOUND_FREETYPE=no
47249        fi
47250      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47251          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47252        # Found lib in isa dir, use that instead.
47253        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47254        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47255$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47256      fi
47257    fi
47258  fi
47259
47260  if test "x$FOUND_FREETYPE" = xyes; then
47261
47262  # Only process if variable expands to non-empty
47263
47264  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47266
47267  # Input might be given as Windows format, start by converting to
47268  # unix format.
47269  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47270  new_path=`$CYGPATH -u "$path"`
47271
47272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47275  # "foo.exe" is OK but "foo" is an error.
47276  #
47277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47278  # It is also a way to make sure we got the proper file name for the real test later on.
47279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47280  if test "x$test_shortpath" = x; then
47281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47282$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47283    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47284  fi
47285
47286  # Call helper function which possibly converts this using DOS-style short mode.
47287  # If so, the updated path is stored in $new_path.
47288
47289  input_path="$new_path"
47290  # Check if we need to convert this using DOS-style short mode. If the path
47291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47292  # take no chances and rewrite it.
47293  # Note: m4 eats our [], so we need to use [ and ] instead.
47294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47295  if test "x$has_forbidden_chars" != x; then
47296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47300      # Going to short mode and back again did indeed matter. Since short mode is
47301      # case insensitive, let's make it lowercase to improve readability.
47302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47303      # Now convert it back to Unix-stile (cygpath)
47304      input_path=`$CYGPATH -u "$shortmode_path"`
47305      new_path="$input_path"
47306    fi
47307  fi
47308
47309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47310  if test "x$test_cygdrive_prefix" = x; then
47311    # As a simple fix, exclude /usr/bin since it's not a real path.
47312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47314      # a path prefixed by /cygdrive for fixpath to work.
47315      new_path="$CYGWIN_ROOT_PATH$input_path"
47316    fi
47317  fi
47318
47319
47320  if test "x$path" != "x$new_path"; then
47321    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47324  fi
47325
47326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47327
47328  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47329  has_colon=`$ECHO $path | $GREP ^.:`
47330  new_path="$path"
47331  if test "x$has_colon" = x; then
47332    # Not in mixed or Windows style, start by that.
47333    new_path=`cmd //c echo $path`
47334  fi
47335
47336
47337  input_path="$new_path"
47338  # Check if we need to convert this using DOS-style short mode. If the path
47339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47340  # take no chances and rewrite it.
47341  # Note: m4 eats our [], so we need to use [ and ] instead.
47342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47343  if test "x$has_forbidden_chars" != x; then
47344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47346  fi
47347
47348
47349  windows_path="$new_path"
47350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47351    unix_path=`$CYGPATH -u "$windows_path"`
47352    new_path="$unix_path"
47353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47355    new_path="$unix_path"
47356  fi
47357
47358  if test "x$path" != "x$new_path"; then
47359    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47362  fi
47363
47364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47366
47367    else
47368      # We're on a unix platform. Hooray! :)
47369      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47370      has_space=`$ECHO "$path" | $GREP " "`
47371      if test "x$has_space" != x; then
47372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47373$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47375      fi
47376
47377      # Use eval to expand a potential ~
47378      eval path="$path"
47379      if test ! -f "$path" && test ! -d "$path"; then
47380        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47381      fi
47382
47383      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47384    fi
47385  fi
47386
47387
47388  # Only process if variable expands to non-empty
47389
47390  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47392
47393  # Input might be given as Windows format, start by converting to
47394  # unix format.
47395  path="$POTENTIAL_FREETYPE_LIB_PATH"
47396  new_path=`$CYGPATH -u "$path"`
47397
47398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47401  # "foo.exe" is OK but "foo" is an error.
47402  #
47403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47404  # It is also a way to make sure we got the proper file name for the real test later on.
47405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47406  if test "x$test_shortpath" = x; then
47407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47408$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47409    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47410  fi
47411
47412  # Call helper function which possibly converts this using DOS-style short mode.
47413  # If so, the updated path is stored in $new_path.
47414
47415  input_path="$new_path"
47416  # Check if we need to convert this using DOS-style short mode. If the path
47417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47418  # take no chances and rewrite it.
47419  # Note: m4 eats our [], so we need to use [ and ] instead.
47420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47421  if test "x$has_forbidden_chars" != x; then
47422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47426      # Going to short mode and back again did indeed matter. Since short mode is
47427      # case insensitive, let's make it lowercase to improve readability.
47428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47429      # Now convert it back to Unix-stile (cygpath)
47430      input_path=`$CYGPATH -u "$shortmode_path"`
47431      new_path="$input_path"
47432    fi
47433  fi
47434
47435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47436  if test "x$test_cygdrive_prefix" = x; then
47437    # As a simple fix, exclude /usr/bin since it's not a real path.
47438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47440      # a path prefixed by /cygdrive for fixpath to work.
47441      new_path="$CYGWIN_ROOT_PATH$input_path"
47442    fi
47443  fi
47444
47445
47446  if test "x$path" != "x$new_path"; then
47447    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47450  fi
47451
47452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47453
47454  path="$POTENTIAL_FREETYPE_LIB_PATH"
47455  has_colon=`$ECHO $path | $GREP ^.:`
47456  new_path="$path"
47457  if test "x$has_colon" = x; then
47458    # Not in mixed or Windows style, start by that.
47459    new_path=`cmd //c echo $path`
47460  fi
47461
47462
47463  input_path="$new_path"
47464  # Check if we need to convert this using DOS-style short mode. If the path
47465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47466  # take no chances and rewrite it.
47467  # Note: m4 eats our [], so we need to use [ and ] instead.
47468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47469  if test "x$has_forbidden_chars" != x; then
47470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47472  fi
47473
47474
47475  windows_path="$new_path"
47476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47477    unix_path=`$CYGPATH -u "$windows_path"`
47478    new_path="$unix_path"
47479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47481    new_path="$unix_path"
47482  fi
47483
47484  if test "x$path" != "x$new_path"; then
47485    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47487$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47488  fi
47489
47490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47492
47493    else
47494      # We're on a unix platform. Hooray! :)
47495      path="$POTENTIAL_FREETYPE_LIB_PATH"
47496      has_space=`$ECHO "$path" | $GREP " "`
47497      if test "x$has_space" != x; then
47498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47501      fi
47502
47503      # Use eval to expand a potential ~
47504      eval path="$path"
47505      if test ! -f "$path" && test ! -d "$path"; then
47506        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47507      fi
47508
47509      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47510    fi
47511  fi
47512
47513
47514    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47516$as_echo_n "checking for freetype includes... " >&6; }
47517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47518$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47519    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47521$as_echo_n "checking for freetype libraries... " >&6; }
47522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47523$as_echo "$FREETYPE_LIB_PATH" >&6; }
47524  fi
47525
47526          fi
47527
47528          if test "x$FOUND_FREETYPE" != xyes; then
47529            FREETYPE_BASE_DIR="$SYSROOT/usr"
47530            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47531
47532  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47533  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47534  METHOD="well-known location"
47535
47536  # Let's start with an optimistic view of the world :-)
47537  FOUND_FREETYPE=yes
47538
47539  # First look for the canonical freetype main include file ft2build.h.
47540  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47541    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47542    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47543    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47544      # Fail.
47545      FOUND_FREETYPE=no
47546    fi
47547  fi
47548
47549  if test "x$FOUND_FREETYPE" = xyes; then
47550    # Include file found, let's continue the sanity check.
47551    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47552$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47553
47554    # Reset to default value
47555    FREETYPE_BASE_NAME=freetype
47556    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47557    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47558      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47559          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47560        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47561        # for the .6 version explicitly.
47562        FREETYPE_BASE_NAME=freetype.6
47563        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47564        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47565$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47566      else
47567        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47568$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47569        FOUND_FREETYPE=no
47570      fi
47571    else
47572      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47573        # On Windows, we will need both .lib and .dll file.
47574        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47575          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47576$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47577          FOUND_FREETYPE=no
47578        fi
47579      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47580          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47581        # Found lib in isa dir, use that instead.
47582        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47583        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47584$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47585      fi
47586    fi
47587  fi
47588
47589  if test "x$FOUND_FREETYPE" = xyes; then
47590
47591  # Only process if variable expands to non-empty
47592
47593  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47595
47596  # Input might be given as Windows format, start by converting to
47597  # unix format.
47598  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47599  new_path=`$CYGPATH -u "$path"`
47600
47601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47604  # "foo.exe" is OK but "foo" is an error.
47605  #
47606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47607  # It is also a way to make sure we got the proper file name for the real test later on.
47608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47609  if test "x$test_shortpath" = x; then
47610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47611$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47612    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47613  fi
47614
47615  # Call helper function which possibly converts this using DOS-style short mode.
47616  # If so, the updated path is stored in $new_path.
47617
47618  input_path="$new_path"
47619  # Check if we need to convert this using DOS-style short mode. If the path
47620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47621  # take no chances and rewrite it.
47622  # Note: m4 eats our [], so we need to use [ and ] instead.
47623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47624  if test "x$has_forbidden_chars" != x; then
47625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47629      # Going to short mode and back again did indeed matter. Since short mode is
47630      # case insensitive, let's make it lowercase to improve readability.
47631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47632      # Now convert it back to Unix-stile (cygpath)
47633      input_path=`$CYGPATH -u "$shortmode_path"`
47634      new_path="$input_path"
47635    fi
47636  fi
47637
47638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47639  if test "x$test_cygdrive_prefix" = x; then
47640    # As a simple fix, exclude /usr/bin since it's not a real path.
47641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47643      # a path prefixed by /cygdrive for fixpath to work.
47644      new_path="$CYGWIN_ROOT_PATH$input_path"
47645    fi
47646  fi
47647
47648
47649  if test "x$path" != "x$new_path"; then
47650    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47652$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47653  fi
47654
47655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47656
47657  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47658  has_colon=`$ECHO $path | $GREP ^.:`
47659  new_path="$path"
47660  if test "x$has_colon" = x; then
47661    # Not in mixed or Windows style, start by that.
47662    new_path=`cmd //c echo $path`
47663  fi
47664
47665
47666  input_path="$new_path"
47667  # Check if we need to convert this using DOS-style short mode. If the path
47668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47669  # take no chances and rewrite it.
47670  # Note: m4 eats our [], so we need to use [ and ] instead.
47671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47672  if test "x$has_forbidden_chars" != x; then
47673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47675  fi
47676
47677
47678  windows_path="$new_path"
47679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47680    unix_path=`$CYGPATH -u "$windows_path"`
47681    new_path="$unix_path"
47682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47684    new_path="$unix_path"
47685  fi
47686
47687  if test "x$path" != "x$new_path"; then
47688    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47690$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47691  fi
47692
47693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47695
47696    else
47697      # We're on a unix platform. Hooray! :)
47698      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47699      has_space=`$ECHO "$path" | $GREP " "`
47700      if test "x$has_space" != x; then
47701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47702$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47703        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47704      fi
47705
47706      # Use eval to expand a potential ~
47707      eval path="$path"
47708      if test ! -f "$path" && test ! -d "$path"; then
47709        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47710      fi
47711
47712      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47713    fi
47714  fi
47715
47716
47717  # Only process if variable expands to non-empty
47718
47719  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47721
47722  # Input might be given as Windows format, start by converting to
47723  # unix format.
47724  path="$POTENTIAL_FREETYPE_LIB_PATH"
47725  new_path=`$CYGPATH -u "$path"`
47726
47727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47730  # "foo.exe" is OK but "foo" is an error.
47731  #
47732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47733  # It is also a way to make sure we got the proper file name for the real test later on.
47734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47735  if test "x$test_shortpath" = x; then
47736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47738    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47739  fi
47740
47741  # Call helper function which possibly converts this using DOS-style short mode.
47742  # If so, the updated path is stored in $new_path.
47743
47744  input_path="$new_path"
47745  # Check if we need to convert this using DOS-style short mode. If the path
47746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47747  # take no chances and rewrite it.
47748  # Note: m4 eats our [], so we need to use [ and ] instead.
47749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47750  if test "x$has_forbidden_chars" != x; then
47751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47755      # Going to short mode and back again did indeed matter. Since short mode is
47756      # case insensitive, let's make it lowercase to improve readability.
47757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47758      # Now convert it back to Unix-stile (cygpath)
47759      input_path=`$CYGPATH -u "$shortmode_path"`
47760      new_path="$input_path"
47761    fi
47762  fi
47763
47764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47765  if test "x$test_cygdrive_prefix" = x; then
47766    # As a simple fix, exclude /usr/bin since it's not a real path.
47767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47769      # a path prefixed by /cygdrive for fixpath to work.
47770      new_path="$CYGWIN_ROOT_PATH$input_path"
47771    fi
47772  fi
47773
47774
47775  if test "x$path" != "x$new_path"; then
47776    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47778$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47779  fi
47780
47781    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47782
47783  path="$POTENTIAL_FREETYPE_LIB_PATH"
47784  has_colon=`$ECHO $path | $GREP ^.:`
47785  new_path="$path"
47786  if test "x$has_colon" = x; then
47787    # Not in mixed or Windows style, start by that.
47788    new_path=`cmd //c echo $path`
47789  fi
47790
47791
47792  input_path="$new_path"
47793  # Check if we need to convert this using DOS-style short mode. If the path
47794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47795  # take no chances and rewrite it.
47796  # Note: m4 eats our [], so we need to use [ and ] instead.
47797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47798  if test "x$has_forbidden_chars" != x; then
47799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47801  fi
47802
47803
47804  windows_path="$new_path"
47805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47806    unix_path=`$CYGPATH -u "$windows_path"`
47807    new_path="$unix_path"
47808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47810    new_path="$unix_path"
47811  fi
47812
47813  if test "x$path" != "x$new_path"; then
47814    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47816$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47817  fi
47818
47819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47821
47822    else
47823      # We're on a unix platform. Hooray! :)
47824      path="$POTENTIAL_FREETYPE_LIB_PATH"
47825      has_space=`$ECHO "$path" | $GREP " "`
47826      if test "x$has_space" != x; then
47827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47828$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47829        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47830      fi
47831
47832      # Use eval to expand a potential ~
47833      eval path="$path"
47834      if test ! -f "$path" && test ! -d "$path"; then
47835        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47836      fi
47837
47838      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47839    fi
47840  fi
47841
47842
47843    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47845$as_echo_n "checking for freetype includes... " >&6; }
47846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47847$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47848    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47850$as_echo_n "checking for freetype libraries... " >&6; }
47851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47852$as_echo "$FREETYPE_LIB_PATH" >&6; }
47853  fi
47854
47855            else
47856
47857  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47858  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47859  METHOD="well-known location"
47860
47861  # Let's start with an optimistic view of the world :-)
47862  FOUND_FREETYPE=yes
47863
47864  # First look for the canonical freetype main include file ft2build.h.
47865  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47866    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47867    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47868    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47869      # Fail.
47870      FOUND_FREETYPE=no
47871    fi
47872  fi
47873
47874  if test "x$FOUND_FREETYPE" = xyes; then
47875    # Include file found, let's continue the sanity check.
47876    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47877$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47878
47879    # Reset to default value
47880    FREETYPE_BASE_NAME=freetype
47881    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47882    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47883      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47884          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47885        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47886        # for the .6 version explicitly.
47887        FREETYPE_BASE_NAME=freetype.6
47888        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47889        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47890$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47891      else
47892        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47893$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47894        FOUND_FREETYPE=no
47895      fi
47896    else
47897      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47898        # On Windows, we will need both .lib and .dll file.
47899        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47900          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47901$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47902          FOUND_FREETYPE=no
47903        fi
47904      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47905          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47906        # Found lib in isa dir, use that instead.
47907        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47908        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47909$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47910      fi
47911    fi
47912  fi
47913
47914  if test "x$FOUND_FREETYPE" = xyes; then
47915
47916  # Only process if variable expands to non-empty
47917
47918  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47920
47921  # Input might be given as Windows format, start by converting to
47922  # unix format.
47923  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47924  new_path=`$CYGPATH -u "$path"`
47925
47926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47929  # "foo.exe" is OK but "foo" is an error.
47930  #
47931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47932  # It is also a way to make sure we got the proper file name for the real test later on.
47933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47934  if test "x$test_shortpath" = x; then
47935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47936$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47937    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47938  fi
47939
47940  # Call helper function which possibly converts this using DOS-style short mode.
47941  # If so, the updated path is stored in $new_path.
47942
47943  input_path="$new_path"
47944  # Check if we need to convert this using DOS-style short mode. If the path
47945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47946  # take no chances and rewrite it.
47947  # Note: m4 eats our [], so we need to use [ and ] instead.
47948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47949  if test "x$has_forbidden_chars" != x; then
47950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47954      # Going to short mode and back again did indeed matter. Since short mode is
47955      # case insensitive, let's make it lowercase to improve readability.
47956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47957      # Now convert it back to Unix-stile (cygpath)
47958      input_path=`$CYGPATH -u "$shortmode_path"`
47959      new_path="$input_path"
47960    fi
47961  fi
47962
47963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47964  if test "x$test_cygdrive_prefix" = x; then
47965    # As a simple fix, exclude /usr/bin since it's not a real path.
47966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47968      # a path prefixed by /cygdrive for fixpath to work.
47969      new_path="$CYGWIN_ROOT_PATH$input_path"
47970    fi
47971  fi
47972
47973
47974  if test "x$path" != "x$new_path"; then
47975    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47977$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47978  fi
47979
47980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47981
47982  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47983  has_colon=`$ECHO $path | $GREP ^.:`
47984  new_path="$path"
47985  if test "x$has_colon" = x; then
47986    # Not in mixed or Windows style, start by that.
47987    new_path=`cmd //c echo $path`
47988  fi
47989
47990
47991  input_path="$new_path"
47992  # Check if we need to convert this using DOS-style short mode. If the path
47993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47994  # take no chances and rewrite it.
47995  # Note: m4 eats our [], so we need to use [ and ] instead.
47996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47997  if test "x$has_forbidden_chars" != x; then
47998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48000  fi
48001
48002
48003  windows_path="$new_path"
48004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48005    unix_path=`$CYGPATH -u "$windows_path"`
48006    new_path="$unix_path"
48007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48009    new_path="$unix_path"
48010  fi
48011
48012  if test "x$path" != "x$new_path"; then
48013    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48016  fi
48017
48018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48020
48021    else
48022      # We're on a unix platform. Hooray! :)
48023      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48024      has_space=`$ECHO "$path" | $GREP " "`
48025      if test "x$has_space" != x; then
48026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48027$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48028        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48029      fi
48030
48031      # Use eval to expand a potential ~
48032      eval path="$path"
48033      if test ! -f "$path" && test ! -d "$path"; then
48034        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48035      fi
48036
48037      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48038    fi
48039  fi
48040
48041
48042  # Only process if variable expands to non-empty
48043
48044  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48046
48047  # Input might be given as Windows format, start by converting to
48048  # unix format.
48049  path="$POTENTIAL_FREETYPE_LIB_PATH"
48050  new_path=`$CYGPATH -u "$path"`
48051
48052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48055  # "foo.exe" is OK but "foo" is an error.
48056  #
48057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48058  # It is also a way to make sure we got the proper file name for the real test later on.
48059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48060  if test "x$test_shortpath" = x; then
48061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48063    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48064  fi
48065
48066  # Call helper function which possibly converts this using DOS-style short mode.
48067  # If so, the updated path is stored in $new_path.
48068
48069  input_path="$new_path"
48070  # Check if we need to convert this using DOS-style short mode. If the path
48071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48072  # take no chances and rewrite it.
48073  # Note: m4 eats our [], so we need to use [ and ] instead.
48074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48075  if test "x$has_forbidden_chars" != x; then
48076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48080      # Going to short mode and back again did indeed matter. Since short mode is
48081      # case insensitive, let's make it lowercase to improve readability.
48082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48083      # Now convert it back to Unix-stile (cygpath)
48084      input_path=`$CYGPATH -u "$shortmode_path"`
48085      new_path="$input_path"
48086    fi
48087  fi
48088
48089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48090  if test "x$test_cygdrive_prefix" = x; then
48091    # As a simple fix, exclude /usr/bin since it's not a real path.
48092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48094      # a path prefixed by /cygdrive for fixpath to work.
48095      new_path="$CYGWIN_ROOT_PATH$input_path"
48096    fi
48097  fi
48098
48099
48100  if test "x$path" != "x$new_path"; then
48101    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48103$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48104  fi
48105
48106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48107
48108  path="$POTENTIAL_FREETYPE_LIB_PATH"
48109  has_colon=`$ECHO $path | $GREP ^.:`
48110  new_path="$path"
48111  if test "x$has_colon" = x; then
48112    # Not in mixed or Windows style, start by that.
48113    new_path=`cmd //c echo $path`
48114  fi
48115
48116
48117  input_path="$new_path"
48118  # Check if we need to convert this using DOS-style short mode. If the path
48119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48120  # take no chances and rewrite it.
48121  # Note: m4 eats our [], so we need to use [ and ] instead.
48122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48123  if test "x$has_forbidden_chars" != x; then
48124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48126  fi
48127
48128
48129  windows_path="$new_path"
48130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48131    unix_path=`$CYGPATH -u "$windows_path"`
48132    new_path="$unix_path"
48133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48135    new_path="$unix_path"
48136  fi
48137
48138  if test "x$path" != "x$new_path"; then
48139    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48141$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48142  fi
48143
48144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48146
48147    else
48148      # We're on a unix platform. Hooray! :)
48149      path="$POTENTIAL_FREETYPE_LIB_PATH"
48150      has_space=`$ECHO "$path" | $GREP " "`
48151      if test "x$has_space" != x; then
48152        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48153$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48154        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48155      fi
48156
48157      # Use eval to expand a potential ~
48158      eval path="$path"
48159      if test ! -f "$path" && test ! -d "$path"; then
48160        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48161      fi
48162
48163      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48164    fi
48165  fi
48166
48167
48168    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48170$as_echo_n "checking for freetype includes... " >&6; }
48171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48172$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48173    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48175$as_echo_n "checking for freetype libraries... " >&6; }
48176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48177$as_echo "$FREETYPE_LIB_PATH" >&6; }
48178  fi
48179
48180              if test "x$FOUND_FREETYPE" != xyes; then
48181
48182  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
48183  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
48184  METHOD="well-known location"
48185
48186  # Let's start with an optimistic view of the world :-)
48187  FOUND_FREETYPE=yes
48188
48189  # First look for the canonical freetype main include file ft2build.h.
48190  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48191    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
48192    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
48193    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
48194      # Fail.
48195      FOUND_FREETYPE=no
48196    fi
48197  fi
48198
48199  if test "x$FOUND_FREETYPE" = xyes; then
48200    # Include file found, let's continue the sanity check.
48201    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
48202$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
48203
48204    # Reset to default value
48205    FREETYPE_BASE_NAME=freetype
48206    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48207    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
48208      if test "x$OPENJDK_TARGET_OS" = xmacosx \
48209          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
48210        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
48211        # for the .6 version explicitly.
48212        FREETYPE_BASE_NAME=freetype.6
48213        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
48214        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
48215$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
48216      else
48217        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
48218$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
48219        FOUND_FREETYPE=no
48220      fi
48221    else
48222      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48223        # On Windows, we will need both .lib and .dll file.
48224        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
48225          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
48226$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
48227          FOUND_FREETYPE=no
48228        fi
48229      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
48230          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
48231        # Found lib in isa dir, use that instead.
48232        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
48233        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
48234$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
48235      fi
48236    fi
48237  fi
48238
48239  if test "x$FOUND_FREETYPE" = xyes; then
48240
48241  # Only process if variable expands to non-empty
48242
48243  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
48244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48245
48246  # Input might be given as Windows format, start by converting to
48247  # unix format.
48248  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48249  new_path=`$CYGPATH -u "$path"`
48250
48251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48254  # "foo.exe" is OK but "foo" is an error.
48255  #
48256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48257  # It is also a way to make sure we got the proper file name for the real test later on.
48258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48259  if test "x$test_shortpath" = x; then
48260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48261$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48262    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
48263  fi
48264
48265  # Call helper function which possibly converts this using DOS-style short mode.
48266  # If so, the updated path is stored in $new_path.
48267
48268  input_path="$new_path"
48269  # Check if we need to convert this using DOS-style short mode. If the path
48270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48271  # take no chances and rewrite it.
48272  # Note: m4 eats our [], so we need to use [ and ] instead.
48273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48274  if test "x$has_forbidden_chars" != x; then
48275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48279      # Going to short mode and back again did indeed matter. Since short mode is
48280      # case insensitive, let's make it lowercase to improve readability.
48281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48282      # Now convert it back to Unix-stile (cygpath)
48283      input_path=`$CYGPATH -u "$shortmode_path"`
48284      new_path="$input_path"
48285    fi
48286  fi
48287
48288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48289  if test "x$test_cygdrive_prefix" = x; then
48290    # As a simple fix, exclude /usr/bin since it's not a real path.
48291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48293      # a path prefixed by /cygdrive for fixpath to work.
48294      new_path="$CYGWIN_ROOT_PATH$input_path"
48295    fi
48296  fi
48297
48298
48299  if test "x$path" != "x$new_path"; then
48300    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48303  fi
48304
48305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48306
48307  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48308  has_colon=`$ECHO $path | $GREP ^.:`
48309  new_path="$path"
48310  if test "x$has_colon" = x; then
48311    # Not in mixed or Windows style, start by that.
48312    new_path=`cmd //c echo $path`
48313  fi
48314
48315
48316  input_path="$new_path"
48317  # Check if we need to convert this using DOS-style short mode. If the path
48318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48319  # take no chances and rewrite it.
48320  # Note: m4 eats our [], so we need to use [ and ] instead.
48321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48322  if test "x$has_forbidden_chars" != x; then
48323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48325  fi
48326
48327
48328  windows_path="$new_path"
48329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48330    unix_path=`$CYGPATH -u "$windows_path"`
48331    new_path="$unix_path"
48332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48334    new_path="$unix_path"
48335  fi
48336
48337  if test "x$path" != "x$new_path"; then
48338    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48340$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48341  fi
48342
48343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48345
48346    else
48347      # We're on a unix platform. Hooray! :)
48348      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48349      has_space=`$ECHO "$path" | $GREP " "`
48350      if test "x$has_space" != x; then
48351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48352$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48353        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48354      fi
48355
48356      # Use eval to expand a potential ~
48357      eval path="$path"
48358      if test ! -f "$path" && test ! -d "$path"; then
48359        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48360      fi
48361
48362      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48363    fi
48364  fi
48365
48366
48367  # Only process if variable expands to non-empty
48368
48369  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48371
48372  # Input might be given as Windows format, start by converting to
48373  # unix format.
48374  path="$POTENTIAL_FREETYPE_LIB_PATH"
48375  new_path=`$CYGPATH -u "$path"`
48376
48377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48380  # "foo.exe" is OK but "foo" is an error.
48381  #
48382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48383  # It is also a way to make sure we got the proper file name for the real test later on.
48384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48385  if test "x$test_shortpath" = x; then
48386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48388    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48389  fi
48390
48391  # Call helper function which possibly converts this using DOS-style short mode.
48392  # If so, the updated path is stored in $new_path.
48393
48394  input_path="$new_path"
48395  # Check if we need to convert this using DOS-style short mode. If the path
48396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48397  # take no chances and rewrite it.
48398  # Note: m4 eats our [], so we need to use [ and ] instead.
48399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48400  if test "x$has_forbidden_chars" != x; then
48401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48405      # Going to short mode and back again did indeed matter. Since short mode is
48406      # case insensitive, let's make it lowercase to improve readability.
48407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48408      # Now convert it back to Unix-stile (cygpath)
48409      input_path=`$CYGPATH -u "$shortmode_path"`
48410      new_path="$input_path"
48411    fi
48412  fi
48413
48414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48415  if test "x$test_cygdrive_prefix" = x; then
48416    # As a simple fix, exclude /usr/bin since it's not a real path.
48417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48419      # a path prefixed by /cygdrive for fixpath to work.
48420      new_path="$CYGWIN_ROOT_PATH$input_path"
48421    fi
48422  fi
48423
48424
48425  if test "x$path" != "x$new_path"; then
48426    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48428$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48429  fi
48430
48431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48432
48433  path="$POTENTIAL_FREETYPE_LIB_PATH"
48434  has_colon=`$ECHO $path | $GREP ^.:`
48435  new_path="$path"
48436  if test "x$has_colon" = x; then
48437    # Not in mixed or Windows style, start by that.
48438    new_path=`cmd //c echo $path`
48439  fi
48440
48441
48442  input_path="$new_path"
48443  # Check if we need to convert this using DOS-style short mode. If the path
48444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48445  # take no chances and rewrite it.
48446  # Note: m4 eats our [], so we need to use [ and ] instead.
48447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48448  if test "x$has_forbidden_chars" != x; then
48449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48451  fi
48452
48453
48454  windows_path="$new_path"
48455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48456    unix_path=`$CYGPATH -u "$windows_path"`
48457    new_path="$unix_path"
48458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48460    new_path="$unix_path"
48461  fi
48462
48463  if test "x$path" != "x$new_path"; then
48464    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48466$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48467  fi
48468
48469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48471
48472    else
48473      # We're on a unix platform. Hooray! :)
48474      path="$POTENTIAL_FREETYPE_LIB_PATH"
48475      has_space=`$ECHO "$path" | $GREP " "`
48476      if test "x$has_space" != x; then
48477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48478$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48480      fi
48481
48482      # Use eval to expand a potential ~
48483      eval path="$path"
48484      if test ! -f "$path" && test ! -d "$path"; then
48485        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48486      fi
48487
48488      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48489    fi
48490  fi
48491
48492
48493    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48495$as_echo_n "checking for freetype includes... " >&6; }
48496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48497$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48498    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48500$as_echo_n "checking for freetype libraries... " >&6; }
48501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48502$as_echo "$FREETYPE_LIB_PATH" >&6; }
48503  fi
48504
48505              fi
48506            fi
48507          fi
48508        fi
48509      fi # end check in well-known locations
48510
48511      if test "x$FOUND_FREETYPE" != xyes; then
48512
48513  # Print a helpful message on how to acquire the necessary build dependency.
48514  # freetype is the help tag: freetype, cups, pulse, alsa etc
48515  MISSING_DEPENDENCY=freetype
48516
48517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48518    cygwin_help $MISSING_DEPENDENCY
48519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48520    msys_help $MISSING_DEPENDENCY
48521  else
48522    PKGHANDLER_COMMAND=
48523
48524    case $PKGHANDLER in
48525      apt-get)
48526        apt_help     $MISSING_DEPENDENCY ;;
48527      yum)
48528        yum_help     $MISSING_DEPENDENCY ;;
48529      port)
48530        port_help    $MISSING_DEPENDENCY ;;
48531      pkgutil)
48532        pkgutil_help $MISSING_DEPENDENCY ;;
48533      pkgadd)
48534        pkgadd_help  $MISSING_DEPENDENCY ;;
48535    esac
48536
48537    if test "x$PKGHANDLER_COMMAND" != x; then
48538      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48539    fi
48540  fi
48541
48542        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48543      fi
48544    fi # end user specified settings
48545
48546    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48547    if test "x$FREETYPE_CFLAGS" = x; then
48548
48549  # Only process if variable expands to non-empty
48550
48551  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48553
48554  # Input might be given as Windows format, start by converting to
48555  # unix format.
48556  path="$FREETYPE_INCLUDE_PATH"
48557  new_path=`$CYGPATH -u "$path"`
48558
48559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48562  # "foo.exe" is OK but "foo" is an error.
48563  #
48564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48565  # It is also a way to make sure we got the proper file name for the real test later on.
48566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48567  if test "x$test_shortpath" = x; then
48568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48569$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48570    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48571  fi
48572
48573  # Call helper function which possibly converts this using DOS-style short mode.
48574  # If so, the updated path is stored in $new_path.
48575
48576  input_path="$new_path"
48577  # Check if we need to convert this using DOS-style short mode. If the path
48578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48579  # take no chances and rewrite it.
48580  # Note: m4 eats our [], so we need to use [ and ] instead.
48581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48582  if test "x$has_forbidden_chars" != x; then
48583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48587      # Going to short mode and back again did indeed matter. Since short mode is
48588      # case insensitive, let's make it lowercase to improve readability.
48589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48590      # Now convert it back to Unix-stile (cygpath)
48591      input_path=`$CYGPATH -u "$shortmode_path"`
48592      new_path="$input_path"
48593    fi
48594  fi
48595
48596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48597  if test "x$test_cygdrive_prefix" = x; then
48598    # As a simple fix, exclude /usr/bin since it's not a real path.
48599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48601      # a path prefixed by /cygdrive for fixpath to work.
48602      new_path="$CYGWIN_ROOT_PATH$input_path"
48603    fi
48604  fi
48605
48606
48607  if test "x$path" != "x$new_path"; then
48608    FREETYPE_INCLUDE_PATH="$new_path"
48609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48610$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48611  fi
48612
48613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48614
48615  path="$FREETYPE_INCLUDE_PATH"
48616  has_colon=`$ECHO $path | $GREP ^.:`
48617  new_path="$path"
48618  if test "x$has_colon" = x; then
48619    # Not in mixed or Windows style, start by that.
48620    new_path=`cmd //c echo $path`
48621  fi
48622
48623
48624  input_path="$new_path"
48625  # Check if we need to convert this using DOS-style short mode. If the path
48626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48627  # take no chances and rewrite it.
48628  # Note: m4 eats our [], so we need to use [ and ] instead.
48629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48630  if test "x$has_forbidden_chars" != x; then
48631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48633  fi
48634
48635
48636  windows_path="$new_path"
48637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48638    unix_path=`$CYGPATH -u "$windows_path"`
48639    new_path="$unix_path"
48640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48642    new_path="$unix_path"
48643  fi
48644
48645  if test "x$path" != "x$new_path"; then
48646    FREETYPE_INCLUDE_PATH="$new_path"
48647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48648$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48649  fi
48650
48651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48653
48654    else
48655      # We're on a unix platform. Hooray! :)
48656      path="$FREETYPE_INCLUDE_PATH"
48657      has_space=`$ECHO "$path" | $GREP " "`
48658      if test "x$has_space" != x; then
48659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48660$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48662      fi
48663
48664      # Use eval to expand a potential ~
48665      eval path="$path"
48666      if test ! -f "$path" && test ! -d "$path"; then
48667        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48668      fi
48669
48670      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48671    fi
48672  fi
48673
48674      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48675        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48676      else
48677        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48678      fi
48679    fi
48680
48681    if test "x$FREETYPE_LIBS" = x; then
48682
48683  # Only process if variable expands to non-empty
48684
48685  if test "x$FREETYPE_LIB_PATH" != x; then
48686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48687
48688  # Input might be given as Windows format, start by converting to
48689  # unix format.
48690  path="$FREETYPE_LIB_PATH"
48691  new_path=`$CYGPATH -u "$path"`
48692
48693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48696  # "foo.exe" is OK but "foo" is an error.
48697  #
48698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48699  # It is also a way to make sure we got the proper file name for the real test later on.
48700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48701  if test "x$test_shortpath" = x; then
48702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48703$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48704    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48705  fi
48706
48707  # Call helper function which possibly converts this using DOS-style short mode.
48708  # If so, the updated path is stored in $new_path.
48709
48710  input_path="$new_path"
48711  # Check if we need to convert this using DOS-style short mode. If the path
48712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48713  # take no chances and rewrite it.
48714  # Note: m4 eats our [], so we need to use [ and ] instead.
48715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48716  if test "x$has_forbidden_chars" != x; then
48717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48721      # Going to short mode and back again did indeed matter. Since short mode is
48722      # case insensitive, let's make it lowercase to improve readability.
48723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48724      # Now convert it back to Unix-stile (cygpath)
48725      input_path=`$CYGPATH -u "$shortmode_path"`
48726      new_path="$input_path"
48727    fi
48728  fi
48729
48730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48731  if test "x$test_cygdrive_prefix" = x; then
48732    # As a simple fix, exclude /usr/bin since it's not a real path.
48733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48735      # a path prefixed by /cygdrive for fixpath to work.
48736      new_path="$CYGWIN_ROOT_PATH$input_path"
48737    fi
48738  fi
48739
48740
48741  if test "x$path" != "x$new_path"; then
48742    FREETYPE_LIB_PATH="$new_path"
48743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48744$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48745  fi
48746
48747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48748
48749  path="$FREETYPE_LIB_PATH"
48750  has_colon=`$ECHO $path | $GREP ^.:`
48751  new_path="$path"
48752  if test "x$has_colon" = x; then
48753    # Not in mixed or Windows style, start by that.
48754    new_path=`cmd //c echo $path`
48755  fi
48756
48757
48758  input_path="$new_path"
48759  # Check if we need to convert this using DOS-style short mode. If the path
48760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48761  # take no chances and rewrite it.
48762  # Note: m4 eats our [], so we need to use [ and ] instead.
48763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48764  if test "x$has_forbidden_chars" != x; then
48765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48767  fi
48768
48769
48770  windows_path="$new_path"
48771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48772    unix_path=`$CYGPATH -u "$windows_path"`
48773    new_path="$unix_path"
48774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48776    new_path="$unix_path"
48777  fi
48778
48779  if test "x$path" != "x$new_path"; then
48780    FREETYPE_LIB_PATH="$new_path"
48781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48782$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48783  fi
48784
48785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48787
48788    else
48789      # We're on a unix platform. Hooray! :)
48790      path="$FREETYPE_LIB_PATH"
48791      has_space=`$ECHO "$path" | $GREP " "`
48792      if test "x$has_space" != x; then
48793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48794$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48796      fi
48797
48798      # Use eval to expand a potential ~
48799      eval path="$path"
48800      if test ! -f "$path" && test ! -d "$path"; then
48801        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48802      fi
48803
48804      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48805    fi
48806  fi
48807
48808      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48809        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48810      else
48811        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48812      fi
48813    fi
48814
48815    # Try to compile it
48816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48817$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48818    ac_ext=cpp
48819ac_cpp='$CXXCPP $CPPFLAGS'
48820ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48821ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48822ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48823
48824    PREV_CXXCFLAGS="$CXXFLAGS"
48825    PREV_LIBS="$LIBS"
48826    PREV_CXX="$CXX"
48827    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48828    LIBS="$LIBS $FREETYPE_LIBS"
48829    CXX="$FIXPATH $CXX"
48830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48831/* end confdefs.h.  */
48832
48833          #include<ft2build.h>
48834          #include FT_FREETYPE_H
48835          int main () {
48836            FT_Init_FreeType(NULL);
48837            return 0;
48838          }
48839
48840_ACEOF
48841if ac_fn_cxx_try_link "$LINENO"; then :
48842
48843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48844$as_echo "yes" >&6; }
48845
48846else
48847
48848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48849$as_echo "no" >&6; }
48850          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48851$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48852          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48853$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48854
48855
48856  # Print a helpful message on how to acquire the necessary build dependency.
48857  # freetype is the help tag: freetype, cups, pulse, alsa etc
48858  MISSING_DEPENDENCY=freetype
48859
48860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48861    cygwin_help $MISSING_DEPENDENCY
48862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48863    msys_help $MISSING_DEPENDENCY
48864  else
48865    PKGHANDLER_COMMAND=
48866
48867    case $PKGHANDLER in
48868      apt-get)
48869        apt_help     $MISSING_DEPENDENCY ;;
48870      yum)
48871        yum_help     $MISSING_DEPENDENCY ;;
48872      port)
48873        port_help    $MISSING_DEPENDENCY ;;
48874      pkgutil)
48875        pkgutil_help $MISSING_DEPENDENCY ;;
48876      pkgadd)
48877        pkgadd_help  $MISSING_DEPENDENCY ;;
48878    esac
48879
48880    if test "x$PKGHANDLER_COMMAND" != x; then
48881      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48882    fi
48883  fi
48884
48885
48886          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48887
48888
48889fi
48890rm -f core conftest.err conftest.$ac_objext \
48891    conftest$ac_exeext conftest.$ac_ext
48892    CXXCFLAGS="$PREV_CXXFLAGS"
48893    LIBS="$PREV_LIBS"
48894    CXX="$PREV_CXX"
48895    ac_ext=cpp
48896ac_cpp='$CXXCPP $CPPFLAGS'
48897ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48898ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48899ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48900
48901
48902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48903$as_echo_n "checking if we should bundle freetype... " >&6; }
48904    if test "x$BUNDLE_FREETYPE" = xyes; then
48905      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48906    fi
48907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48908$as_echo "$BUNDLE_FREETYPE" >&6; }
48909
48910  fi # end freetype needed
48911
48912
48913
48914
48915
48916
48917
48918  ###############################################################################
48919  #
48920  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48921  #
48922
48923# Check whether --with-alsa was given.
48924if test "${with_alsa+set}" = set; then :
48925  withval=$with_alsa;
48926fi
48927
48928
48929# Check whether --with-alsa-include was given.
48930if test "${with_alsa_include+set}" = set; then :
48931  withval=$with_alsa_include;
48932fi
48933
48934
48935# Check whether --with-alsa-lib was given.
48936if test "${with_alsa_lib+set}" = set; then :
48937  withval=$with_alsa_lib;
48938fi
48939
48940
48941  if test "x$ALSA_NOT_NEEDED" = xyes; then
48942    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48943      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48944$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48945    fi
48946    ALSA_CFLAGS=
48947    ALSA_LIBS=
48948  else
48949    ALSA_FOUND=no
48950
48951    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48952      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48953    fi
48954
48955    if test "x${with_alsa}" != x; then
48956      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48957      ALSA_CFLAGS="-I${with_alsa}/include"
48958      ALSA_FOUND=yes
48959    fi
48960    if test "x${with_alsa_include}" != x; then
48961      ALSA_CFLAGS="-I${with_alsa_include}"
48962      ALSA_FOUND=yes
48963    fi
48964    if test "x${with_alsa_lib}" != x; then
48965      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48966      ALSA_FOUND=yes
48967    fi
48968    if test "x$ALSA_FOUND" = xno; then
48969
48970
48971  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48972    # Source the builddeps file again, to make sure it uses the latest variables!
48973    . $builddepsfile
48974    # Look for a target and build machine specific resource!
48975    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48976    if test "x$resource" = x; then
48977      # Ok, lets instead look for a target specific resource
48978      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48979    fi
48980    if test "x$resource" = x; then
48981      # Ok, lets instead look for a build specific resource
48982      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48983    fi
48984    if test "x$resource" = x; then
48985      # Ok, lets instead look for a generic resource
48986      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48987      resource=${builddep_alsa}
48988    fi
48989    if test "x$resource" != x; then
48990      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48991$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48992      # If the resource in the builddeps.conf file is an existing directory,
48993      # for example /java/linux/cups
48994      if test -d ${resource}; then
48995        depdir=${resource}
48996      else
48997
48998  # alsa is for example mymodule
48999  # $resource is for example libs/general/libmymod_1_2_3.zip
49000  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
49001  # $with_builddeps_dir is for example /localhome/builddeps
49002  # depdir is the name of the variable into which we store the depdir, eg MYMOD
49003  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
49004  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
49005  filename=`basename $resource`
49006  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
49007  filebase=${filename%%.*}
49008  extension=${filename#*.}
49009  installdir=$with_builddeps_dir/$filebase
49010  if test ! -f $installdir/$filename.unpacked; then
49011    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
49012$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
49013    if test ! -d $installdir; then
49014      mkdir -p $installdir
49015    fi
49016    if test ! -d $installdir; then
49017      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
49018    fi
49019    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
49020    touch $tmpfile
49021    if test ! -f $tmpfile; then
49022      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
49023    fi
49024
49025  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
49026  # $tmpfile is the local file name for the downloaded file.
49027  VALID_TOOL=no
49028  if test "x$BDEPS_FTP" = xwget; then
49029    VALID_TOOL=yes
49030    wget -O $tmpfile $with_builddeps_server/$resource
49031  fi
49032  if test "x$BDEPS_FTP" = xlftp; then
49033    VALID_TOOL=yes
49034    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
49035  fi
49036  if test "x$BDEPS_FTP" = xftp; then
49037    VALID_TOOL=yes
49038    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
49039    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
49040    FTPUSERPWD=${FTPSERVER%%@*}
49041    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
49042      FTPUSER=${userpwd%%:*}
49043      FTPPWD=${userpwd#*@}
49044      FTPSERVER=${FTPSERVER#*@}
49045    else
49046      FTPUSER=ftp
49047      FTPPWD=ftp
49048    fi
49049    # the "pass" command does not work on some
49050    # ftp clients (read ftp.exe) but if it works,
49051    # passive mode is better!
49052    ( \
49053        echo "user $FTPUSER $FTPPWD"        ; \
49054        echo "pass"                         ; \
49055        echo "bin"                          ; \
49056        echo "get $FTPPATH $tmpfile"              ; \
49057    ) | ftp -in $FTPSERVER
49058  fi
49059  if test "x$VALID_TOOL" != xyes; then
49060    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
49061  fi
49062
49063    mv $tmpfile $installdir/$filename
49064    if test ! -s $installdir/$filename; then
49065      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
49066    fi
49067    case "$extension" in
49068      zip)  echo "Unzipping $installdir/$filename..."
49069        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
49070        ;;
49071      tar.gz) echo "Untaring $installdir/$filename..."
49072        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
49073        ;;
49074      tgz) echo "Untaring $installdir/$filename..."
49075        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
49076        ;;
49077      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
49078        ;;
49079    esac
49080  fi
49081  if test -f $installdir/$filename.unpacked; then
49082    depdir=$installdir
49083  fi
49084
49085      fi
49086      # Source the builddeps file again, because in the previous command, the depdir
49087      # was updated to point at the current build dependency install directory.
49088      . $builddepsfile
49089      # Now extract variables from the builddeps.conf files.
49090      theroot=${builddep_alsa_ROOT}
49091      thecflags=${builddep_alsa_CFLAGS}
49092      thelibs=${builddep_alsa_LIBS}
49093      if test "x$depdir" = x; then
49094        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
49095      fi
49096      ALSA=$depdir
49097      if test "x$theroot" != x; then
49098        ALSA="$theroot"
49099      fi
49100      if test "x$thecflags" != x; then
49101        ALSA_CFLAGS="$thecflags"
49102      fi
49103      if test "x$thelibs" != x; then
49104        ALSA_LIBS="$thelibs"
49105      fi
49106      ALSA_FOUND=yes
49107      else ALSA_FOUND=no
49108
49109    fi
49110    else ALSA_FOUND=no
49111
49112  fi
49113
49114    fi
49115    # Do not try pkg-config if we have a sysroot set.
49116    if test "x$SYSROOT" = x; then
49117      if test "x$ALSA_FOUND" = xno; then
49118
49119pkg_failed=no
49120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
49121$as_echo_n "checking for ALSA... " >&6; }
49122
49123if test -n "$ALSA_CFLAGS"; then
49124    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
49125 elif test -n "$PKG_CONFIG"; then
49126    if test -n "$PKG_CONFIG" && \
49127    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
49128  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
49129  ac_status=$?
49130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49131  test $ac_status = 0; }; then
49132  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
49133else
49134  pkg_failed=yes
49135fi
49136 else
49137    pkg_failed=untried
49138fi
49139if test -n "$ALSA_LIBS"; then
49140    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
49141 elif test -n "$PKG_CONFIG"; then
49142    if test -n "$PKG_CONFIG" && \
49143    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
49144  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
49145  ac_status=$?
49146  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49147  test $ac_status = 0; }; then
49148  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
49149else
49150  pkg_failed=yes
49151fi
49152 else
49153    pkg_failed=untried
49154fi
49155
49156
49157
49158if test $pkg_failed = yes; then
49159
49160if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49161        _pkg_short_errors_supported=yes
49162else
49163        _pkg_short_errors_supported=no
49164fi
49165        if test $_pkg_short_errors_supported = yes; then
49166	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
49167        else
49168	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
49169        fi
49170	# Put the nasty error message in config.log where it belongs
49171	echo "$ALSA_PKG_ERRORS" >&5
49172
49173	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49174$as_echo "no" >&6; }
49175                ALSA_FOUND=no
49176elif test $pkg_failed = untried; then
49177	ALSA_FOUND=no
49178else
49179	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
49180	ALSA_LIBS=$pkg_cv_ALSA_LIBS
49181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49182$as_echo "yes" >&6; }
49183	ALSA_FOUND=yes
49184fi
49185      fi
49186    fi
49187    if test "x$ALSA_FOUND" = xno; then
49188      for ac_header in alsa/asoundlib.h
49189do :
49190  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
49191if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
49192  cat >>confdefs.h <<_ACEOF
49193#define HAVE_ALSA_ASOUNDLIB_H 1
49194_ACEOF
49195
49196            ALSA_FOUND=yes
49197            ALSA_CFLAGS=-Iignoreme
49198            ALSA_LIBS=-lasound
49199            DEFAULT_ALSA=yes
49200
49201else
49202  ALSA_FOUND=no
49203fi
49204
49205done
49206
49207    fi
49208    if test "x$ALSA_FOUND" = xno; then
49209
49210  # Print a helpful message on how to acquire the necessary build dependency.
49211  # alsa is the help tag: freetype, cups, pulse, alsa etc
49212  MISSING_DEPENDENCY=alsa
49213
49214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49215    cygwin_help $MISSING_DEPENDENCY
49216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49217    msys_help $MISSING_DEPENDENCY
49218  else
49219    PKGHANDLER_COMMAND=
49220
49221    case $PKGHANDLER in
49222      apt-get)
49223        apt_help     $MISSING_DEPENDENCY ;;
49224      yum)
49225        yum_help     $MISSING_DEPENDENCY ;;
49226      port)
49227        port_help    $MISSING_DEPENDENCY ;;
49228      pkgutil)
49229        pkgutil_help $MISSING_DEPENDENCY ;;
49230      pkgadd)
49231        pkgadd_help  $MISSING_DEPENDENCY ;;
49232    esac
49233
49234    if test "x$PKGHANDLER_COMMAND" != x; then
49235      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49236    fi
49237  fi
49238
49239      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
49240    fi
49241  fi
49242
49243
49244
49245
49246
49247
49248  ###############################################################################
49249  #
49250  # Check for the jpeg library
49251  #
49252
49253
49254# Check whether --with-libjpeg was given.
49255if test "${with_libjpeg+set}" = set; then :
49256  withval=$with_libjpeg;
49257fi
49258
49259
49260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
49261$as_echo_n "checking for which libjpeg to use... " >&6; }
49262
49263  # default is bundled
49264  DEFAULT_LIBJPEG=bundled
49265
49266  #
49267  # if user didn't specify, use DEFAULT_LIBJPEG
49268  #
49269  if test "x${with_libjpeg}" = "x"; then
49270    with_libjpeg=${DEFAULT_LIBJPEG}
49271  fi
49272
49273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
49274$as_echo "${with_libjpeg}" >&6; }
49275
49276  if test "x${with_libjpeg}" = "xbundled"; then
49277    USE_EXTERNAL_LIBJPEG=false
49278  elif test "x${with_libjpeg}" = "xsystem"; then
49279    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
49280if test "x$ac_cv_header_jpeglib_h" = xyes; then :
49281
49282else
49283   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
49284fi
49285
49286
49287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
49288$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
49289if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
49290  $as_echo_n "(cached) " >&6
49291else
49292  ac_check_lib_save_LIBS=$LIBS
49293LIBS="-ljpeg  $LIBS"
49294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49295/* end confdefs.h.  */
49296
49297/* Override any GCC internal prototype to avoid an error.
49298   Use char because int might match the return type of a GCC
49299   builtin and then its argument prototype would still apply.  */
49300#ifdef __cplusplus
49301extern "C"
49302#endif
49303char jpeg_CreateDecompress ();
49304int
49305main ()
49306{
49307return jpeg_CreateDecompress ();
49308  ;
49309  return 0;
49310}
49311_ACEOF
49312if ac_fn_cxx_try_link "$LINENO"; then :
49313  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49314else
49315  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49316fi
49317rm -f core conftest.err conftest.$ac_objext \
49318    conftest$ac_exeext conftest.$ac_ext
49319LIBS=$ac_check_lib_save_LIBS
49320fi
49321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49322$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49323if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49324  cat >>confdefs.h <<_ACEOF
49325#define HAVE_LIBJPEG 1
49326_ACEOF
49327
49328  LIBS="-ljpeg $LIBS"
49329
49330else
49331   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49332fi
49333
49334
49335    USE_EXTERNAL_LIBJPEG=true
49336  else
49337    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49338  fi
49339
49340
49341
49342  ###############################################################################
49343  #
49344  # Check for the gif library
49345  #
49346
49347
49348# Check whether --with-giflib was given.
49349if test "${with_giflib+set}" = set; then :
49350  withval=$with_giflib;
49351fi
49352
49353
49354
49355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49356$as_echo_n "checking for which giflib to use... " >&6; }
49357
49358  # default is bundled
49359  DEFAULT_GIFLIB=bundled
49360
49361  #
49362  # if user didn't specify, use DEFAULT_GIFLIB
49363  #
49364  if test "x${with_giflib}" = "x"; then
49365    with_giflib=${DEFAULT_GIFLIB}
49366  fi
49367
49368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49369$as_echo "${with_giflib}" >&6; }
49370
49371  if test "x${with_giflib}" = "xbundled"; then
49372    USE_EXTERNAL_LIBGIF=false
49373  elif test "x${with_giflib}" = "xsystem"; then
49374    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49375if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49376
49377else
49378   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49379fi
49380
49381
49382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49383$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49384if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49385  $as_echo_n "(cached) " >&6
49386else
49387  ac_check_lib_save_LIBS=$LIBS
49388LIBS="-lgif  $LIBS"
49389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49390/* end confdefs.h.  */
49391
49392/* Override any GCC internal prototype to avoid an error.
49393   Use char because int might match the return type of a GCC
49394   builtin and then its argument prototype would still apply.  */
49395#ifdef __cplusplus
49396extern "C"
49397#endif
49398char DGifGetCode ();
49399int
49400main ()
49401{
49402return DGifGetCode ();
49403  ;
49404  return 0;
49405}
49406_ACEOF
49407if ac_fn_cxx_try_link "$LINENO"; then :
49408  ac_cv_lib_gif_DGifGetCode=yes
49409else
49410  ac_cv_lib_gif_DGifGetCode=no
49411fi
49412rm -f core conftest.err conftest.$ac_objext \
49413    conftest$ac_exeext conftest.$ac_ext
49414LIBS=$ac_check_lib_save_LIBS
49415fi
49416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49417$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49418if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49419  cat >>confdefs.h <<_ACEOF
49420#define HAVE_LIBGIF 1
49421_ACEOF
49422
49423  LIBS="-lgif $LIBS"
49424
49425else
49426   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49427fi
49428
49429
49430    USE_EXTERNAL_LIBGIF=true
49431  else
49432    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49433  fi
49434
49435
49436  ###############################################################################
49437  #
49438  # Check for the lcms2 library
49439  #
49440
49441
49442# Check whether --with-lcms was given.
49443if test "${with_lcms+set}" = set; then :
49444  withval=$with_lcms;
49445fi
49446
49447
49448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49449$as_echo_n "checking for which lcms to use... " >&6; }
49450
49451  DEFAULT_LCMS=bundled
49452
49453  #
49454  # If user didn't specify, use DEFAULT_LCMS
49455  #
49456  if test "x${with_lcms}" = "x"; then
49457      with_lcms=${DEFAULT_LCMS}
49458  fi
49459
49460  if test "x${with_lcms}" = "xbundled"; then
49461    USE_EXTERNAL_LCMS=false
49462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49463$as_echo "bundled" >&6; }
49464  elif test "x${with_lcms}" = "xsystem"; then
49465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49466$as_echo "system" >&6; }
49467
49468pkg_failed=no
49469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49470$as_echo_n "checking for LCMS... " >&6; }
49471
49472if test -n "$LCMS_CFLAGS"; then
49473    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49474 elif test -n "$PKG_CONFIG"; then
49475    if test -n "$PKG_CONFIG" && \
49476    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49477  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49478  ac_status=$?
49479  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49480  test $ac_status = 0; }; then
49481  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49482else
49483  pkg_failed=yes
49484fi
49485 else
49486    pkg_failed=untried
49487fi
49488if test -n "$LCMS_LIBS"; then
49489    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49490 elif test -n "$PKG_CONFIG"; then
49491    if test -n "$PKG_CONFIG" && \
49492    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49493  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49494  ac_status=$?
49495  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49496  test $ac_status = 0; }; then
49497  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49498else
49499  pkg_failed=yes
49500fi
49501 else
49502    pkg_failed=untried
49503fi
49504
49505
49506
49507if test $pkg_failed = yes; then
49508
49509if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49510        _pkg_short_errors_supported=yes
49511else
49512        _pkg_short_errors_supported=no
49513fi
49514        if test $_pkg_short_errors_supported = yes; then
49515	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49516        else
49517	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49518        fi
49519	# Put the nasty error message in config.log where it belongs
49520	echo "$LCMS_PKG_ERRORS" >&5
49521
49522	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49523$as_echo "no" >&6; }
49524                LCMS_FOUND=no
49525elif test $pkg_failed = untried; then
49526	LCMS_FOUND=no
49527else
49528	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49529	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49531$as_echo "yes" >&6; }
49532	LCMS_FOUND=yes
49533fi
49534    if test "x${LCMS_FOUND}" = "xyes"; then
49535      USE_EXTERNAL_LCMS=true
49536    else
49537      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49538    fi
49539  else
49540    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49541  fi
49542
49543
49544
49545  ###############################################################################
49546  #
49547  # Check for the png library
49548  #
49549
49550
49551# Check whether --with-libpng was given.
49552if test "${with_libpng+set}" = set; then :
49553  withval=$with_libpng;
49554fi
49555
49556
49557
49558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49559$as_echo_n "checking for which libpng to use... " >&6; }
49560
49561  # default is bundled
49562  DEFAULT_LIBPNG=bundled
49563
49564  #
49565  # if user didn't specify, use DEFAULT_LIBPNG
49566  #
49567  if test "x${with_libpng}" = "x"; then
49568      with_libpng=${DEFAULT_LIBPNG}
49569  fi
49570
49571  if test "x${with_libpng}" = "xbundled"; then
49572      USE_EXTERNAL_LIBPNG=false
49573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49574$as_echo "bundled" >&6; }
49575  elif test "x${with_libpng}" = "xsystem"; then
49576
49577pkg_failed=no
49578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49579$as_echo_n "checking for PNG... " >&6; }
49580
49581if test -n "$PNG_CFLAGS"; then
49582    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49583 elif test -n "$PKG_CONFIG"; then
49584    if test -n "$PKG_CONFIG" && \
49585    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49586  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49587  ac_status=$?
49588  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49589  test $ac_status = 0; }; then
49590  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49591else
49592  pkg_failed=yes
49593fi
49594 else
49595    pkg_failed=untried
49596fi
49597if test -n "$PNG_LIBS"; then
49598    pkg_cv_PNG_LIBS="$PNG_LIBS"
49599 elif test -n "$PKG_CONFIG"; then
49600    if test -n "$PKG_CONFIG" && \
49601    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49602  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49603  ac_status=$?
49604  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49605  test $ac_status = 0; }; then
49606  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49607else
49608  pkg_failed=yes
49609fi
49610 else
49611    pkg_failed=untried
49612fi
49613
49614
49615
49616if test $pkg_failed = yes; then
49617
49618if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49619        _pkg_short_errors_supported=yes
49620else
49621        _pkg_short_errors_supported=no
49622fi
49623        if test $_pkg_short_errors_supported = yes; then
49624	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49625        else
49626	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49627        fi
49628	# Put the nasty error message in config.log where it belongs
49629	echo "$PNG_PKG_ERRORS" >&5
49630
49631	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49632$as_echo "no" >&6; }
49633                 LIBPNG_FOUND=no
49634elif test $pkg_failed = untried; then
49635	 LIBPNG_FOUND=no
49636else
49637	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49638	PNG_LIBS=$pkg_cv_PNG_LIBS
49639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49640$as_echo "yes" >&6; }
49641	 LIBPNG_FOUND=yes
49642fi
49643      if test "x${LIBPNG_FOUND}" = "xyes"; then
49644          USE_EXTERNAL_LIBPNG=true
49645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49646$as_echo "system" >&6; }
49647      else
49648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49649$as_echo "system not found" >&6; }
49650          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49651      fi
49652  else
49653      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49654  fi
49655
49656
49657  ###############################################################################
49658  #
49659  # Check for the zlib library
49660  #
49661
49662
49663# Check whether --with-zlib was given.
49664if test "${with_zlib+set}" = set; then :
49665  withval=$with_zlib;
49666fi
49667
49668
49669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49670$as_echo_n "checking for compress in -lz... " >&6; }
49671if ${ac_cv_lib_z_compress+:} false; then :
49672  $as_echo_n "(cached) " >&6
49673else
49674  ac_check_lib_save_LIBS=$LIBS
49675LIBS="-lz  $LIBS"
49676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49677/* end confdefs.h.  */
49678
49679/* Override any GCC internal prototype to avoid an error.
49680   Use char because int might match the return type of a GCC
49681   builtin and then its argument prototype would still apply.  */
49682#ifdef __cplusplus
49683extern "C"
49684#endif
49685char compress ();
49686int
49687main ()
49688{
49689return compress ();
49690  ;
49691  return 0;
49692}
49693_ACEOF
49694if ac_fn_cxx_try_link "$LINENO"; then :
49695  ac_cv_lib_z_compress=yes
49696else
49697  ac_cv_lib_z_compress=no
49698fi
49699rm -f core conftest.err conftest.$ac_objext \
49700    conftest$ac_exeext conftest.$ac_ext
49701LIBS=$ac_check_lib_save_LIBS
49702fi
49703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49704$as_echo "$ac_cv_lib_z_compress" >&6; }
49705if test "x$ac_cv_lib_z_compress" = xyes; then :
49706   ZLIB_FOUND=yes
49707else
49708   ZLIB_FOUND=no
49709fi
49710
49711
49712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49713$as_echo_n "checking for which zlib to use... " >&6; }
49714
49715  DEFAULT_ZLIB=bundled
49716  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49717    #
49718    # On macosx default is system...on others default is
49719    #
49720    DEFAULT_ZLIB=system
49721  fi
49722
49723  if test "x${ZLIB_FOUND}" != "xyes"; then
49724    #
49725    # If we don't find any system...set default to bundled
49726    #
49727    DEFAULT_ZLIB=bundled
49728  fi
49729
49730  #
49731  # If user didn't specify, use DEFAULT_ZLIB
49732  #
49733  if test "x${with_zlib}" = "x"; then
49734    with_zlib=${DEFAULT_ZLIB}
49735  fi
49736
49737  if test "x${with_zlib}" = "xbundled"; then
49738    USE_EXTERNAL_LIBZ=false
49739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49740$as_echo "bundled" >&6; }
49741  elif test "x${with_zlib}" = "xsystem"; then
49742    if test "x${ZLIB_FOUND}" = "xyes"; then
49743      USE_EXTERNAL_LIBZ=true
49744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49745$as_echo "system" >&6; }
49746    else
49747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49748$as_echo "system not found" >&6; }
49749      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49750    fi
49751  else
49752    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49753  fi
49754
49755
49756
49757  ###############################################################################
49758  LIBZIP_CAN_USE_MMAP=true
49759
49760
49761
49762  ###############################################################################
49763  #
49764  # Check if altzone exists in time.h
49765  #
49766
49767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49768/* end confdefs.h.  */
49769#include <time.h>
49770int
49771main ()
49772{
49773return (int)altzone;
49774  ;
49775  return 0;
49776}
49777_ACEOF
49778if ac_fn_cxx_try_link "$LINENO"; then :
49779  has_altzone=yes
49780else
49781  has_altzone=no
49782fi
49783rm -f core conftest.err conftest.$ac_objext \
49784    conftest$ac_exeext conftest.$ac_ext
49785  if test "x$has_altzone" = xyes; then
49786
49787$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49788
49789  fi
49790
49791  ###############################################################################
49792  #
49793  # Check the maths library
49794  #
49795
49796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49797$as_echo_n "checking for cos in -lm... " >&6; }
49798if ${ac_cv_lib_m_cos+:} false; then :
49799  $as_echo_n "(cached) " >&6
49800else
49801  ac_check_lib_save_LIBS=$LIBS
49802LIBS="-lm  $LIBS"
49803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49804/* end confdefs.h.  */
49805
49806/* Override any GCC internal prototype to avoid an error.
49807   Use char because int might match the return type of a GCC
49808   builtin and then its argument prototype would still apply.  */
49809#ifdef __cplusplus
49810extern "C"
49811#endif
49812char cos ();
49813int
49814main ()
49815{
49816return cos ();
49817  ;
49818  return 0;
49819}
49820_ACEOF
49821if ac_fn_cxx_try_link "$LINENO"; then :
49822  ac_cv_lib_m_cos=yes
49823else
49824  ac_cv_lib_m_cos=no
49825fi
49826rm -f core conftest.err conftest.$ac_objext \
49827    conftest$ac_exeext conftest.$ac_ext
49828LIBS=$ac_check_lib_save_LIBS
49829fi
49830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49831$as_echo "$ac_cv_lib_m_cos" >&6; }
49832if test "x$ac_cv_lib_m_cos" = xyes; then :
49833  cat >>confdefs.h <<_ACEOF
49834#define HAVE_LIBM 1
49835_ACEOF
49836
49837  LIBS="-lm $LIBS"
49838
49839else
49840
49841        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49842$as_echo "$as_me: Maths library was not found" >&6;}
49843
49844
49845fi
49846
49847
49848
49849  ###############################################################################
49850  #
49851  # Check for libdl.so
49852
49853  save_LIBS="$LIBS"
49854  LIBS=""
49855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49856$as_echo_n "checking for dlopen in -ldl... " >&6; }
49857if ${ac_cv_lib_dl_dlopen+:} false; then :
49858  $as_echo_n "(cached) " >&6
49859else
49860  ac_check_lib_save_LIBS=$LIBS
49861LIBS="-ldl  $LIBS"
49862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49863/* end confdefs.h.  */
49864
49865/* Override any GCC internal prototype to avoid an error.
49866   Use char because int might match the return type of a GCC
49867   builtin and then its argument prototype would still apply.  */
49868#ifdef __cplusplus
49869extern "C"
49870#endif
49871char dlopen ();
49872int
49873main ()
49874{
49875return dlopen ();
49876  ;
49877  return 0;
49878}
49879_ACEOF
49880if ac_fn_cxx_try_link "$LINENO"; then :
49881  ac_cv_lib_dl_dlopen=yes
49882else
49883  ac_cv_lib_dl_dlopen=no
49884fi
49885rm -f core conftest.err conftest.$ac_objext \
49886    conftest$ac_exeext conftest.$ac_ext
49887LIBS=$ac_check_lib_save_LIBS
49888fi
49889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49890$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49891if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49892  cat >>confdefs.h <<_ACEOF
49893#define HAVE_LIBDL 1
49894_ACEOF
49895
49896  LIBS="-ldl $LIBS"
49897
49898fi
49899
49900  LIBDL="$LIBS"
49901
49902  LIBS="$save_LIBS"
49903
49904
49905  ###############################################################################
49906  #
49907  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49908  # dynamic build is configured on command line.
49909  #
49910
49911# Check whether --with-stdc++lib was given.
49912if test "${with_stdc__lib+set}" = set; then :
49913  withval=$with_stdc__lib;
49914        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49915                && test "x$with_stdc__lib" != xdefault; then
49916          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49917        fi
49918
49919else
49920  with_stdc__lib=default
49921
49922fi
49923
49924
49925  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49926    # Test if -lstdc++ works.
49927    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49928$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49929    ac_ext=cpp
49930ac_cpp='$CXXCPP $CPPFLAGS'
49931ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49932ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49933ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49934
49935    OLD_CXXFLAGS="$CXXFLAGS"
49936    CXXFLAGS="$CXXFLAGS -lstdc++"
49937    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49938/* end confdefs.h.  */
49939
49940int
49941main ()
49942{
49943return 0;
49944  ;
49945  return 0;
49946}
49947_ACEOF
49948if ac_fn_cxx_try_link "$LINENO"; then :
49949  has_dynamic_libstdcxx=yes
49950else
49951  has_dynamic_libstdcxx=no
49952fi
49953rm -f core conftest.err conftest.$ac_objext \
49954    conftest$ac_exeext conftest.$ac_ext
49955    CXXFLAGS="$OLD_CXXFLAGS"
49956    ac_ext=cpp
49957ac_cpp='$CXXCPP $CPPFLAGS'
49958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49961
49962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49963$as_echo "$has_dynamic_libstdcxx" >&6; }
49964
49965    # Test if stdc++ can be linked statically.
49966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49967$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49968    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49969    ac_ext=cpp
49970ac_cpp='$CXXCPP $CPPFLAGS'
49971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49974
49975    OLD_LIBS="$LIBS"
49976    OLD_CXX="$CXX"
49977    LIBS="$STATIC_STDCXX_FLAGS"
49978    CXX="$CC"
49979    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49980/* end confdefs.h.  */
49981
49982int
49983main ()
49984{
49985return 0;
49986  ;
49987  return 0;
49988}
49989_ACEOF
49990if ac_fn_cxx_try_link "$LINENO"; then :
49991  has_static_libstdcxx=yes
49992else
49993  has_static_libstdcxx=no
49994fi
49995rm -f core conftest.err conftest.$ac_objext \
49996    conftest$ac_exeext conftest.$ac_ext
49997    LIBS="$OLD_LIBS"
49998    CXX="$OLD_CXX"
49999    ac_ext=cpp
50000ac_cpp='$CXXCPP $CPPFLAGS'
50001ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50002ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50003ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50004
50005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
50006$as_echo "$has_static_libstdcxx" >&6; }
50007
50008    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
50009      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
50010    fi
50011
50012    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
50013      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
50014    fi
50015
50016    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
50017      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
50018    fi
50019
50020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
50021$as_echo_n "checking how to link with libstdc++... " >&6; }
50022    # If dynamic was requested, it's available since it would fail above otherwise.
50023    # If dynamic wasn't requested, go with static unless it isn't available.
50024    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50025      LIBCXX="$LIBCXX -lstdc++"
50026      LDCXX="$CXX"
50027      STATIC_CXX_SETTING="STATIC_CXX=false"
50028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
50029$as_echo "dynamic" >&6; }
50030    else
50031      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
50032      LDCXX="$CC"
50033      STATIC_CXX_SETTING="STATIC_CXX=true"
50034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
50035$as_echo "static" >&6; }
50036    fi
50037  fi
50038
50039
50040  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50041    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
50042
50043pkg_failed=no
50044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
50045$as_echo_n "checking for LIBFFI... " >&6; }
50046
50047if test -n "$LIBFFI_CFLAGS"; then
50048    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
50049 elif test -n "$PKG_CONFIG"; then
50050    if test -n "$PKG_CONFIG" && \
50051    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
50052  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
50053  ac_status=$?
50054  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50055  test $ac_status = 0; }; then
50056  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
50057else
50058  pkg_failed=yes
50059fi
50060 else
50061    pkg_failed=untried
50062fi
50063if test -n "$LIBFFI_LIBS"; then
50064    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
50065 elif test -n "$PKG_CONFIG"; then
50066    if test -n "$PKG_CONFIG" && \
50067    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
50068  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
50069  ac_status=$?
50070  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50071  test $ac_status = 0; }; then
50072  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
50073else
50074  pkg_failed=yes
50075fi
50076 else
50077    pkg_failed=untried
50078fi
50079
50080
50081
50082if test $pkg_failed = yes; then
50083
50084if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50085        _pkg_short_errors_supported=yes
50086else
50087        _pkg_short_errors_supported=no
50088fi
50089        if test $_pkg_short_errors_supported = yes; then
50090	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
50091        else
50092	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
50093        fi
50094	# Put the nasty error message in config.log where it belongs
50095	echo "$LIBFFI_PKG_ERRORS" >&5
50096
50097	as_fn_error $? "Package requirements (libffi) were not met:
50098
50099$LIBFFI_PKG_ERRORS
50100
50101Consider adjusting the PKG_CONFIG_PATH environment variable if you
50102installed software in a non-standard prefix.
50103
50104Alternatively, you may set the environment variables LIBFFI_CFLAGS
50105and LIBFFI_LIBS to avoid the need to call pkg-config.
50106See the pkg-config man page for more details.
50107" "$LINENO" 5
50108elif test $pkg_failed = untried; then
50109	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50111as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
50112is in your PATH or set the PKG_CONFIG environment variable to the full
50113path to pkg-config.
50114
50115Alternatively, you may set the environment variables LIBFFI_CFLAGS
50116and LIBFFI_LIBS to avoid the need to call pkg-config.
50117See the pkg-config man page for more details.
50118
50119To get pkg-config, see <http://pkg-config.freedesktop.org/>.
50120See \`config.log' for more details" "$LINENO" 5; }
50121else
50122	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
50123	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
50124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50125$as_echo "yes" >&6; }
50126	:
50127fi
50128
50129  fi
50130
50131  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
50132    # Extract the first word of "llvm-config", so it can be a program name with args.
50133set dummy llvm-config; ac_word=$2
50134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50135$as_echo_n "checking for $ac_word... " >&6; }
50136if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
50137  $as_echo_n "(cached) " >&6
50138else
50139  if test -n "$LLVM_CONFIG"; then
50140  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
50141else
50142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50143for as_dir in $PATH
50144do
50145  IFS=$as_save_IFS
50146  test -z "$as_dir" && as_dir=.
50147    for ac_exec_ext in '' $ac_executable_extensions; do
50148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50149    ac_cv_prog_LLVM_CONFIG="llvm-config"
50150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50151    break 2
50152  fi
50153done
50154  done
50155IFS=$as_save_IFS
50156
50157fi
50158fi
50159LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
50160if test -n "$LLVM_CONFIG"; then
50161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
50162$as_echo "$LLVM_CONFIG" >&6; }
50163else
50164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50165$as_echo "no" >&6; }
50166fi
50167
50168
50169
50170    if test "x$LLVM_CONFIG" != xllvm-config; then
50171      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
50172    fi
50173
50174    llvm_components="jit mcjit engine nativecodegen native"
50175    unset LLVM_CFLAGS
50176    for flag in $("$LLVM_CONFIG" --cxxflags); do
50177      if echo "${flag}" | grep -q '^-[ID]'; then
50178        if test "${flag}" != "-D_DEBUG" ; then
50179          if test "${LLVM_CFLAGS}" != "" ; then
50180            LLVM_CFLAGS="${LLVM_CFLAGS} "
50181          fi
50182          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
50183        fi
50184      fi
50185    done
50186    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
50187    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
50188
50189    unset LLVM_LDFLAGS
50190    for flag in $("${LLVM_CONFIG}" --ldflags); do
50191      if echo "${flag}" | grep -q '^-L'; then
50192        if test "${LLVM_LDFLAGS}" != ""; then
50193          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
50194        fi
50195        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
50196      fi
50197    done
50198
50199    unset LLVM_LIBS
50200    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
50201      if echo "${flag}" | grep -q '^-l'; then
50202        if test "${LLVM_LIBS}" != ""; then
50203          LLVM_LIBS="${LLVM_LIBS} "
50204        fi
50205        LLVM_LIBS="${LLVM_LIBS}${flag}"
50206      fi
50207    done
50208
50209
50210
50211
50212  fi
50213
50214  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
50215  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
50216    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
50217  fi
50218
50219  # TODO better (platform agnostic) test
50220  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
50221    LIBCXX="-lstdc++"
50222  fi
50223
50224
50225
50226
50227  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50228
50229
50230# Check whether --with-msvcr-dll was given.
50231if test "${with_msvcr_dll+set}" = set; then :
50232  withval=$with_msvcr_dll;
50233fi
50234
50235
50236  if test "x$with_msvcr_dll" != x; then
50237    # If given explicitely by user, do not probe. If not present, fail directly.
50238
50239  DLL_NAME="$DLL_NAME"
50240  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
50241  METHOD="--with-msvcr-dll"
50242  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50243    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50244$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50245
50246    # Need to check if the found msvcr is correct architecture
50247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50248$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50249    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50251      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50252      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50253      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50254        CORRECT_MSVCR_ARCH="PE32 executable"
50255      else
50256        CORRECT_MSVCR_ARCH="PE32+ executable"
50257      fi
50258    else
50259      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50260        CORRECT_MSVCR_ARCH=386
50261      else
50262        CORRECT_MSVCR_ARCH=x86-64
50263      fi
50264    fi
50265    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50267$as_echo "ok" >&6; }
50268      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50269      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50270$as_echo_n "checking for $DLL_NAME... " >&6; }
50271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50272$as_echo "$MSVC_DLL" >&6; }
50273    else
50274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50275$as_echo "incorrect, ignoring" >&6; }
50276      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50277$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50278    fi
50279  fi
50280
50281    if test "x$MSVC_DLL" = x; then
50282      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50283    fi
50284  else
50285
50286  VAR_NAME="MSVCR_DLL"
50287  DLL_NAME="${MSVCR_NAME}"
50288  MSVC_DLL=
50289
50290  if test "x$MSVC_DLL" = x; then
50291    # Probe: Using well-known location from Visual Studio 10.0
50292    if test "x$VCINSTALLDIR" != x; then
50293      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50294
50295  windows_path="$CYGWIN_VC_INSTALL_DIR"
50296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50297    unix_path=`$CYGPATH -u "$windows_path"`
50298    CYGWIN_VC_INSTALL_DIR="$unix_path"
50299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50301    CYGWIN_VC_INSTALL_DIR="$unix_path"
50302  fi
50303
50304      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50305        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50306      else
50307        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50308      fi
50309      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50310
50311  DLL_NAME="$DLL_NAME"
50312  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50313  METHOD="well-known location in VCINSTALLDIR"
50314  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50315    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50316$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50317
50318    # Need to check if the found msvcr is correct architecture
50319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50320$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50321    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50323      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50324      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50325      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50326        CORRECT_MSVCR_ARCH="PE32 executable"
50327      else
50328        CORRECT_MSVCR_ARCH="PE32+ executable"
50329      fi
50330    else
50331      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50332        CORRECT_MSVCR_ARCH=386
50333      else
50334        CORRECT_MSVCR_ARCH=x86-64
50335      fi
50336    fi
50337    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50339$as_echo "ok" >&6; }
50340      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50341      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50342$as_echo_n "checking for $DLL_NAME... " >&6; }
50343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50344$as_echo "$MSVC_DLL" >&6; }
50345    else
50346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50347$as_echo "incorrect, ignoring" >&6; }
50348      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50349$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50350    fi
50351  fi
50352
50353    fi
50354  fi
50355
50356  if test "x$MSVC_DLL" = x; then
50357    # Probe: Check in the Boot JDK directory.
50358    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50359
50360  DLL_NAME="$DLL_NAME"
50361  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50362  METHOD="well-known location in Boot JDK"
50363  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50364    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50365$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50366
50367    # Need to check if the found msvcr is correct architecture
50368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50369$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50370    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50372      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50373      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50374      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50375        CORRECT_MSVCR_ARCH="PE32 executable"
50376      else
50377        CORRECT_MSVCR_ARCH="PE32+ executable"
50378      fi
50379    else
50380      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50381        CORRECT_MSVCR_ARCH=386
50382      else
50383        CORRECT_MSVCR_ARCH=x86-64
50384      fi
50385    fi
50386    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50388$as_echo "ok" >&6; }
50389      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50391$as_echo_n "checking for $DLL_NAME... " >&6; }
50392      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50393$as_echo "$MSVC_DLL" >&6; }
50394    else
50395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50396$as_echo "incorrect, ignoring" >&6; }
50397      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50398$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50399    fi
50400  fi
50401
50402  fi
50403
50404  if test "x$MSVC_DLL" = x; then
50405    # Probe: Look in the Windows system32 directory
50406    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50407
50408  windows_path="$CYGWIN_SYSTEMROOT"
50409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50410    unix_path=`$CYGPATH -u "$windows_path"`
50411    CYGWIN_SYSTEMROOT="$unix_path"
50412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50414    CYGWIN_SYSTEMROOT="$unix_path"
50415  fi
50416
50417    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50418
50419  DLL_NAME="$DLL_NAME"
50420  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50421  METHOD="well-known location in SYSTEMROOT"
50422  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50423    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50424$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50425
50426    # Need to check if the found msvcr is correct architecture
50427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50428$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50429    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50431      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50432      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50433      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50434        CORRECT_MSVCR_ARCH="PE32 executable"
50435      else
50436        CORRECT_MSVCR_ARCH="PE32+ executable"
50437      fi
50438    else
50439      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50440        CORRECT_MSVCR_ARCH=386
50441      else
50442        CORRECT_MSVCR_ARCH=x86-64
50443      fi
50444    fi
50445    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50447$as_echo "ok" >&6; }
50448      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50450$as_echo_n "checking for $DLL_NAME... " >&6; }
50451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50452$as_echo "$MSVC_DLL" >&6; }
50453    else
50454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50455$as_echo "incorrect, ignoring" >&6; }
50456      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50457$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50458    fi
50459  fi
50460
50461  fi
50462
50463  if test "x$MSVC_DLL" = x; then
50464    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50465    if test "x$VS100COMNTOOLS" != x; then
50466      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50467
50468  windows_path="$CYGWIN_VS_TOOLS_DIR"
50469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50470    unix_path=`$CYGPATH -u "$windows_path"`
50471    CYGWIN_VS_TOOLS_DIR="$unix_path"
50472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50474    CYGWIN_VS_TOOLS_DIR="$unix_path"
50475  fi
50476
50477      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50478        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50479	    | $GREP -i /x64/ | $HEAD --lines 1`
50480      else
50481        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50482	    | $GREP -i /x86/ | $HEAD --lines 1`
50483      fi
50484
50485  DLL_NAME="$DLL_NAME"
50486  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50487  METHOD="search of VS100COMNTOOLS"
50488  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50489    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50490$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50491
50492    # Need to check if the found msvcr is correct architecture
50493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50494$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50495    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50497      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50498      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50499      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50500        CORRECT_MSVCR_ARCH="PE32 executable"
50501      else
50502        CORRECT_MSVCR_ARCH="PE32+ executable"
50503      fi
50504    else
50505      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50506        CORRECT_MSVCR_ARCH=386
50507      else
50508        CORRECT_MSVCR_ARCH=x86-64
50509      fi
50510    fi
50511    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50513$as_echo "ok" >&6; }
50514      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50516$as_echo_n "checking for $DLL_NAME... " >&6; }
50517      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50518$as_echo "$MSVC_DLL" >&6; }
50519    else
50520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50521$as_echo "incorrect, ignoring" >&6; }
50522      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50523$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50524    fi
50525  fi
50526
50527    fi
50528  fi
50529
50530  if test "x$MSVC_DLL" = x; then
50531    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50532    # (This was the original behaviour; kept since it might turn something up)
50533    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50534      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50535        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50536	    | $GREP x64 | $HEAD --lines 1`
50537      else
50538        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50539	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50540        if test "x$POSSIBLE_MSVC_DLL" = x; then
50541          # We're grasping at straws now...
50542          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50543	      | $HEAD --lines 1`
50544        fi
50545      fi
50546
50547
50548  DLL_NAME="$DLL_NAME"
50549  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50550  METHOD="search of VCINSTALLDIR"
50551  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50553$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50554
50555    # Need to check if the found msvcr is correct architecture
50556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50557$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50558    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50560      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50561      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50562      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50563        CORRECT_MSVCR_ARCH="PE32 executable"
50564      else
50565        CORRECT_MSVCR_ARCH="PE32+ executable"
50566      fi
50567    else
50568      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50569        CORRECT_MSVCR_ARCH=386
50570      else
50571        CORRECT_MSVCR_ARCH=x86-64
50572      fi
50573    fi
50574    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50576$as_echo "ok" >&6; }
50577      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50578      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50579$as_echo_n "checking for $DLL_NAME... " >&6; }
50580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50581$as_echo "$MSVC_DLL" >&6; }
50582    else
50583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50584$as_echo "incorrect, ignoring" >&6; }
50585      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50586$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50587    fi
50588  fi
50589
50590    fi
50591  fi
50592
50593  if test "x$MSVC_DLL" = x; then
50594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50595$as_echo_n "checking for $DLL_NAME... " >&6; }
50596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50597$as_echo "no" >&6; }
50598    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50599  fi
50600
50601  MSVCR_DLL=$MSVC_DLL
50602
50603  # Only process if variable expands to non-empty
50604
50605  if test "x$MSVCR_DLL" != x; then
50606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50607
50608  # Input might be given as Windows format, start by converting to
50609  # unix format.
50610  path="$MSVCR_DLL"
50611  new_path=`$CYGPATH -u "$path"`
50612
50613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50616  # "foo.exe" is OK but "foo" is an error.
50617  #
50618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50619  # It is also a way to make sure we got the proper file name for the real test later on.
50620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50621  if test "x$test_shortpath" = x; then
50622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50623$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50624    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50625  fi
50626
50627  # Call helper function which possibly converts this using DOS-style short mode.
50628  # If so, the updated path is stored in $new_path.
50629
50630  input_path="$new_path"
50631  # Check if we need to convert this using DOS-style short mode. If the path
50632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50633  # take no chances and rewrite it.
50634  # Note: m4 eats our [], so we need to use [ and ] instead.
50635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50636  if test "x$has_forbidden_chars" != x; then
50637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50641      # Going to short mode and back again did indeed matter. Since short mode is
50642      # case insensitive, let's make it lowercase to improve readability.
50643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50644      # Now convert it back to Unix-stile (cygpath)
50645      input_path=`$CYGPATH -u "$shortmode_path"`
50646      new_path="$input_path"
50647    fi
50648  fi
50649
50650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50651  if test "x$test_cygdrive_prefix" = x; then
50652    # As a simple fix, exclude /usr/bin since it's not a real path.
50653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50655      # a path prefixed by /cygdrive for fixpath to work.
50656      new_path="$CYGWIN_ROOT_PATH$input_path"
50657    fi
50658  fi
50659
50660
50661  if test "x$path" != "x$new_path"; then
50662    MSVCR_DLL="$new_path"
50663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50664$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50665  fi
50666
50667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50668
50669  path="$MSVCR_DLL"
50670  has_colon=`$ECHO $path | $GREP ^.:`
50671  new_path="$path"
50672  if test "x$has_colon" = x; then
50673    # Not in mixed or Windows style, start by that.
50674    new_path=`cmd //c echo $path`
50675  fi
50676
50677
50678  input_path="$new_path"
50679  # Check if we need to convert this using DOS-style short mode. If the path
50680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50681  # take no chances and rewrite it.
50682  # Note: m4 eats our [], so we need to use [ and ] instead.
50683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50684  if test "x$has_forbidden_chars" != x; then
50685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50687  fi
50688
50689
50690  windows_path="$new_path"
50691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50692    unix_path=`$CYGPATH -u "$windows_path"`
50693    new_path="$unix_path"
50694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50696    new_path="$unix_path"
50697  fi
50698
50699  if test "x$path" != "x$new_path"; then
50700    MSVCR_DLL="$new_path"
50701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50702$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50703  fi
50704
50705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50707
50708    else
50709      # We're on a unix platform. Hooray! :)
50710      path="$MSVCR_DLL"
50711      has_space=`$ECHO "$path" | $GREP " "`
50712      if test "x$has_space" != x; then
50713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50714$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50716      fi
50717
50718      # Use eval to expand a potential ~
50719      eval path="$path"
50720      if test ! -f "$path" && test ! -d "$path"; then
50721        as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50722      fi
50723
50724      MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50725    fi
50726  fi
50727
50728  MSVCR_DLL=$MSVCR_DLL
50729
50730
50731  fi
50732
50733
50734# Check whether --with-msvcp-dll was given.
50735if test "${with_msvcp_dll+set}" = set; then :
50736  withval=$with_msvcp_dll;
50737fi
50738
50739
50740  if test "x$MSVCP_NAME" != "x"; then
50741    if test "x$with_msvcp_dll" != x; then
50742      # If given explicitely by user, do not probe. If not present, fail directly.
50743
50744  DLL_NAME="$DLL_NAME"
50745  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50746  METHOD="--with-msvcp-dll"
50747  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50748    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50749$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50750
50751    # Need to check if the found msvcr is correct architecture
50752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50753$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50754    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50756      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50757      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50758      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50759        CORRECT_MSVCR_ARCH="PE32 executable"
50760      else
50761        CORRECT_MSVCR_ARCH="PE32+ executable"
50762      fi
50763    else
50764      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50765        CORRECT_MSVCR_ARCH=386
50766      else
50767        CORRECT_MSVCR_ARCH=x86-64
50768      fi
50769    fi
50770    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50771      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50772$as_echo "ok" >&6; }
50773      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50774      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50775$as_echo_n "checking for $DLL_NAME... " >&6; }
50776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50777$as_echo "$MSVC_DLL" >&6; }
50778    else
50779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50780$as_echo "incorrect, ignoring" >&6; }
50781      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50782$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50783    fi
50784  fi
50785
50786      if test "x$MSVC_DLL" = x; then
50787        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50788      fi
50789    else
50790
50791  VAR_NAME="MSVCP_DLL"
50792  DLL_NAME="${MSVCP_NAME}"
50793  MSVC_DLL=
50794
50795  if test "x$MSVC_DLL" = x; then
50796    # Probe: Using well-known location from Visual Studio 10.0
50797    if test "x$VCINSTALLDIR" != x; then
50798      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50799
50800  windows_path="$CYGWIN_VC_INSTALL_DIR"
50801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50802    unix_path=`$CYGPATH -u "$windows_path"`
50803    CYGWIN_VC_INSTALL_DIR="$unix_path"
50804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50806    CYGWIN_VC_INSTALL_DIR="$unix_path"
50807  fi
50808
50809      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50810        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50811      else
50812        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50813      fi
50814      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50815
50816  DLL_NAME="$DLL_NAME"
50817  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50818  METHOD="well-known location in VCINSTALLDIR"
50819  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50820    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50821$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50822
50823    # Need to check if the found msvcr is correct architecture
50824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50825$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50826    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50828      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50829      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50830      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50831        CORRECT_MSVCR_ARCH="PE32 executable"
50832      else
50833        CORRECT_MSVCR_ARCH="PE32+ executable"
50834      fi
50835    else
50836      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50837        CORRECT_MSVCR_ARCH=386
50838      else
50839        CORRECT_MSVCR_ARCH=x86-64
50840      fi
50841    fi
50842    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50844$as_echo "ok" >&6; }
50845      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50847$as_echo_n "checking for $DLL_NAME... " >&6; }
50848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50849$as_echo "$MSVC_DLL" >&6; }
50850    else
50851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50852$as_echo "incorrect, ignoring" >&6; }
50853      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50854$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50855    fi
50856  fi
50857
50858    fi
50859  fi
50860
50861  if test "x$MSVC_DLL" = x; then
50862    # Probe: Check in the Boot JDK directory.
50863    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50864
50865  DLL_NAME="$DLL_NAME"
50866  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50867  METHOD="well-known location in Boot JDK"
50868  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50869    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50870$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50871
50872    # Need to check if the found msvcr is correct architecture
50873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50874$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50875    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50877      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50878      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50879      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50880        CORRECT_MSVCR_ARCH="PE32 executable"
50881      else
50882        CORRECT_MSVCR_ARCH="PE32+ executable"
50883      fi
50884    else
50885      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50886        CORRECT_MSVCR_ARCH=386
50887      else
50888        CORRECT_MSVCR_ARCH=x86-64
50889      fi
50890    fi
50891    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50893$as_echo "ok" >&6; }
50894      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50896$as_echo_n "checking for $DLL_NAME... " >&6; }
50897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50898$as_echo "$MSVC_DLL" >&6; }
50899    else
50900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50901$as_echo "incorrect, ignoring" >&6; }
50902      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50903$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50904    fi
50905  fi
50906
50907  fi
50908
50909  if test "x$MSVC_DLL" = x; then
50910    # Probe: Look in the Windows system32 directory
50911    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50912
50913  windows_path="$CYGWIN_SYSTEMROOT"
50914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50915    unix_path=`$CYGPATH -u "$windows_path"`
50916    CYGWIN_SYSTEMROOT="$unix_path"
50917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50919    CYGWIN_SYSTEMROOT="$unix_path"
50920  fi
50921
50922    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50923
50924  DLL_NAME="$DLL_NAME"
50925  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50926  METHOD="well-known location in SYSTEMROOT"
50927  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50928    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50929$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50930
50931    # Need to check if the found msvcr is correct architecture
50932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50933$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50934    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50936      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50937      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50938      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50939        CORRECT_MSVCR_ARCH="PE32 executable"
50940      else
50941        CORRECT_MSVCR_ARCH="PE32+ executable"
50942      fi
50943    else
50944      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50945        CORRECT_MSVCR_ARCH=386
50946      else
50947        CORRECT_MSVCR_ARCH=x86-64
50948      fi
50949    fi
50950    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50952$as_echo "ok" >&6; }
50953      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50954      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50955$as_echo_n "checking for $DLL_NAME... " >&6; }
50956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50957$as_echo "$MSVC_DLL" >&6; }
50958    else
50959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50960$as_echo "incorrect, ignoring" >&6; }
50961      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50962$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50963    fi
50964  fi
50965
50966  fi
50967
50968  if test "x$MSVC_DLL" = x; then
50969    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50970    if test "x$VS100COMNTOOLS" != x; then
50971      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50972
50973  windows_path="$CYGWIN_VS_TOOLS_DIR"
50974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50975    unix_path=`$CYGPATH -u "$windows_path"`
50976    CYGWIN_VS_TOOLS_DIR="$unix_path"
50977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50979    CYGWIN_VS_TOOLS_DIR="$unix_path"
50980  fi
50981
50982      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50983        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50984	    | $GREP -i /x64/ | $HEAD --lines 1`
50985      else
50986        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50987	    | $GREP -i /x86/ | $HEAD --lines 1`
50988      fi
50989
50990  DLL_NAME="$DLL_NAME"
50991  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50992  METHOD="search of VS100COMNTOOLS"
50993  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50994    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50995$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50996
50997    # Need to check if the found msvcr is correct architecture
50998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50999$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51000    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51002      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51003      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51004      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51005        CORRECT_MSVCR_ARCH="PE32 executable"
51006      else
51007        CORRECT_MSVCR_ARCH="PE32+ executable"
51008      fi
51009    else
51010      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51011        CORRECT_MSVCR_ARCH=386
51012      else
51013        CORRECT_MSVCR_ARCH=x86-64
51014      fi
51015    fi
51016    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51018$as_echo "ok" >&6; }
51019      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51020      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51021$as_echo_n "checking for $DLL_NAME... " >&6; }
51022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51023$as_echo "$MSVC_DLL" >&6; }
51024    else
51025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51026$as_echo "incorrect, ignoring" >&6; }
51027      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51028$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51029    fi
51030  fi
51031
51032    fi
51033  fi
51034
51035  if test "x$MSVC_DLL" = x; then
51036    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51037    # (This was the original behaviour; kept since it might turn something up)
51038    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51039      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51040        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51041	    | $GREP x64 | $HEAD --lines 1`
51042      else
51043        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51044	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51045        if test "x$POSSIBLE_MSVC_DLL" = x; then
51046          # We're grasping at straws now...
51047          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51048	      | $HEAD --lines 1`
51049        fi
51050      fi
51051
51052
51053  DLL_NAME="$DLL_NAME"
51054  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51055  METHOD="search of VCINSTALLDIR"
51056  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51057    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51058$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51059
51060    # Need to check if the found msvcr is correct architecture
51061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51062$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51063    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51065      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51066      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51067      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51068        CORRECT_MSVCR_ARCH="PE32 executable"
51069      else
51070        CORRECT_MSVCR_ARCH="PE32+ executable"
51071      fi
51072    else
51073      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51074        CORRECT_MSVCR_ARCH=386
51075      else
51076        CORRECT_MSVCR_ARCH=x86-64
51077      fi
51078    fi
51079    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51081$as_echo "ok" >&6; }
51082      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51083      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51084$as_echo_n "checking for $DLL_NAME... " >&6; }
51085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51086$as_echo "$MSVC_DLL" >&6; }
51087    else
51088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51089$as_echo "incorrect, ignoring" >&6; }
51090      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51091$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51092    fi
51093  fi
51094
51095    fi
51096  fi
51097
51098  if test "x$MSVC_DLL" = x; then
51099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51100$as_echo_n "checking for $DLL_NAME... " >&6; }
51101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51102$as_echo "no" >&6; }
51103    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51104  fi
51105
51106  MSVCP_DLL=$MSVC_DLL
51107
51108  # Only process if variable expands to non-empty
51109
51110  if test "x$MSVCP_DLL" != x; then
51111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51112
51113  # Input might be given as Windows format, start by converting to
51114  # unix format.
51115  path="$MSVCP_DLL"
51116  new_path=`$CYGPATH -u "$path"`
51117
51118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51121  # "foo.exe" is OK but "foo" is an error.
51122  #
51123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51124  # It is also a way to make sure we got the proper file name for the real test later on.
51125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51126  if test "x$test_shortpath" = x; then
51127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
51128$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
51129    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
51130  fi
51131
51132  # Call helper function which possibly converts this using DOS-style short mode.
51133  # If so, the updated path is stored in $new_path.
51134
51135  input_path="$new_path"
51136  # Check if we need to convert this using DOS-style short mode. If the path
51137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51138  # take no chances and rewrite it.
51139  # Note: m4 eats our [], so we need to use [ and ] instead.
51140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51141  if test "x$has_forbidden_chars" != x; then
51142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51146      # Going to short mode and back again did indeed matter. Since short mode is
51147      # case insensitive, let's make it lowercase to improve readability.
51148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51149      # Now convert it back to Unix-stile (cygpath)
51150      input_path=`$CYGPATH -u "$shortmode_path"`
51151      new_path="$input_path"
51152    fi
51153  fi
51154
51155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51156  if test "x$test_cygdrive_prefix" = x; then
51157    # As a simple fix, exclude /usr/bin since it's not a real path.
51158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51160      # a path prefixed by /cygdrive for fixpath to work.
51161      new_path="$CYGWIN_ROOT_PATH$input_path"
51162    fi
51163  fi
51164
51165
51166  if test "x$path" != "x$new_path"; then
51167    MSVCP_DLL="$new_path"
51168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
51169$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
51170  fi
51171
51172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51173
51174  path="$MSVCP_DLL"
51175  has_colon=`$ECHO $path | $GREP ^.:`
51176  new_path="$path"
51177  if test "x$has_colon" = x; then
51178    # Not in mixed or Windows style, start by that.
51179    new_path=`cmd //c echo $path`
51180  fi
51181
51182
51183  input_path="$new_path"
51184  # Check if we need to convert this using DOS-style short mode. If the path
51185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51186  # take no chances and rewrite it.
51187  # Note: m4 eats our [], so we need to use [ and ] instead.
51188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51189  if test "x$has_forbidden_chars" != x; then
51190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51192  fi
51193
51194
51195  windows_path="$new_path"
51196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51197    unix_path=`$CYGPATH -u "$windows_path"`
51198    new_path="$unix_path"
51199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51201    new_path="$unix_path"
51202  fi
51203
51204  if test "x$path" != "x$new_path"; then
51205    MSVCP_DLL="$new_path"
51206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
51207$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
51208  fi
51209
51210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51212
51213    else
51214      # We're on a unix platform. Hooray! :)
51215      path="$MSVCP_DLL"
51216      has_space=`$ECHO "$path" | $GREP " "`
51217      if test "x$has_space" != x; then
51218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
51219$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
51220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51221      fi
51222
51223      # Use eval to expand a potential ~
51224      eval path="$path"
51225      if test ! -f "$path" && test ! -d "$path"; then
51226        as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51227      fi
51228
51229      MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
51230    fi
51231  fi
51232
51233  MSVCP_DLL=$MSVCP_DLL
51234
51235
51236    fi
51237  fi
51238
51239
51240
51241# Check whether --with-dxsdk was given.
51242if test "${with_dxsdk+set}" = set; then :
51243  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
51244$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
51245fi
51246
51247
51248
51249
51250# Check whether --with-dxsdk-lib was given.
51251if test "${with_dxsdk_lib+set}" = set; then :
51252  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
51253$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
51254fi
51255
51256
51257
51258
51259# Check whether --with-dxsdk-include was given.
51260if test "${with_dxsdk_include+set}" = set; then :
51261  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
51262$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
51263fi
51264
51265
51266  fi
51267
51268
51269###############################################################################
51270#
51271# We need to do some final tweaking, when everything else is done.
51272#
51273###############################################################################
51274
51275
51276  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
51277
51278
51279  # The name of the Service Agent jar.
51280  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
51281  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
51282    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
51283  fi
51284
51285
51286
51287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
51288$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
51289
51290    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
51291      ENABLE_INTREE_EC=yes
51292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51293$as_echo "yes" >&6; }
51294    else
51295      ENABLE_INTREE_EC=no
51296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51297$as_echo "no" >&6; }
51298    fi
51299
51300
51301
51302
51303###############################################################################
51304#
51305# Configure parts of the build that only affect the build performance,
51306# not the result.
51307#
51308###############################################################################
51309
51310
51311  # How many cores do we have on this build system?
51312
51313# Check whether --with-num-cores was given.
51314if test "${with_num_cores+set}" = set; then :
51315  withval=$with_num_cores;
51316fi
51317
51318  if test "x$with_num_cores" = x; then
51319    # The number of cores were not specified, try to probe them.
51320
51321  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
51322$as_echo_n "checking for number of cores... " >&6; }
51323  NUM_CORES=1
51324  FOUND_CORES=no
51325
51326  if test -f /proc/cpuinfo; then
51327    # Looks like a Linux (or cygwin) system
51328    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
51329    FOUND_CORES=yes
51330  elif test -x /usr/sbin/psrinfo; then
51331    # Looks like a Solaris system
51332    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
51333    FOUND_CORES=yes
51334  elif test -x /usr/sbin/system_profiler; then
51335    # Looks like a MacOSX system
51336    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
51337    FOUND_CORES=yes
51338  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
51339    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
51340    FOUND_CORES=yes
51341  elif test -n "$NUMBER_OF_PROCESSORS"; then
51342    # On windows, look in the env
51343    NUM_CORES=$NUMBER_OF_PROCESSORS
51344    FOUND_CORES=yes
51345  fi
51346
51347  if test "x$FOUND_CORES" = xyes; then
51348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
51349$as_echo "$NUM_CORES" >&6; }
51350  else
51351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
51352$as_echo "could not detect number of cores, defaulting to 1" >&6; }
51353    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
51354$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
51355  fi
51356
51357  else
51358    NUM_CORES=$with_num_cores
51359  fi
51360
51361
51362
51363  # How much memory do we have on this build system?
51364
51365# Check whether --with-memory-size was given.
51366if test "${with_memory_size+set}" = set; then :
51367  withval=$with_memory_size;
51368fi
51369
51370  if test "x$with_memory_size" = x; then
51371    # The memory size was not specified, try to probe it.
51372
51373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
51374$as_echo_n "checking for memory size... " >&6; }
51375  # Default to 1024 MB
51376  MEMORY_SIZE=1024
51377  FOUND_MEM=no
51378
51379  if test -f /proc/meminfo; then
51380    # Looks like a Linux (or cygwin) system
51381    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51382    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51383    FOUND_MEM=yes
51384  elif test -x /usr/sbin/prtconf; then
51385    # Looks like a Solaris or AIX system
51386    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51387    FOUND_MEM=yes
51388  elif test -x /usr/sbin/system_profiler; then
51389    # Looks like a MacOSX system
51390    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51391    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51392    FOUND_MEM=yes
51393  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51394    # Windows, but without cygwin
51395    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51396    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51397    FOUND_MEM=yes
51398  fi
51399
51400  if test "x$FOUND_MEM" = xyes; then
51401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51402$as_echo "$MEMORY_SIZE MB" >&6; }
51403  else
51404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
51405$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
51406    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51407$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51408  fi
51409
51410  else
51411    MEMORY_SIZE=$with_memory_size
51412  fi
51413
51414
51415
51416  # Provide a decent default number of parallel jobs for make depending on
51417  # number of cores, amount of memory and machine architecture.
51418
51419# Check whether --with-jobs was given.
51420if test "${with_jobs+set}" = set; then :
51421  withval=$with_jobs;
51422fi
51423
51424  if test "x$with_jobs" = x; then
51425    # Number of jobs was not specified, calculate.
51426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51427$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51428    # Approximate memory in GB.
51429    memory_gb=`expr $MEMORY_SIZE / 1024`
51430    # Pick the lowest of memory in gb and number of cores.
51431    if test "$memory_gb" -lt "$NUM_CORES"; then
51432      JOBS="$memory_gb"
51433    else
51434      JOBS="$NUM_CORES"
51435      # On bigger machines, leave some room for other processes to run
51436      if test "$JOBS" -gt "4"; then
51437        JOBS=`expr $JOBS '*' 90 / 100`
51438      fi
51439    fi
51440    # Cap number of jobs to 16
51441    if test "$JOBS" -gt "16"; then
51442      JOBS=16
51443    fi
51444    if test "$JOBS" -eq "0"; then
51445      JOBS=1
51446    fi
51447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51448$as_echo "$JOBS" >&6; }
51449  else
51450    JOBS=$with_jobs
51451  fi
51452
51453
51454
51455# Setup arguments for the boot jdk (after cores and memory have been setup)
51456
51457  ##############################################################################
51458  #
51459  # Specify jvm options for anything that is run with the Boot JDK.
51460  # Not all JVM:s accept the same arguments on the command line.
51461  #
51462
51463# Check whether --with-boot-jdk-jvmargs was given.
51464if test "${with_boot_jdk_jvmargs+set}" = set; then :
51465  withval=$with_boot_jdk_jvmargs;
51466fi
51467
51468
51469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51470$as_echo_n "checking flags for boot jdk java command ... " >&6; }
51471
51472  # Disable special log output when a debug build is used as Boot JDK...
51473
51474  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51475  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51476  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51477  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51478  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51479  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51480    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51481    JVM_ARG_OK=true
51482  else
51483    $ECHO "Arg failed:" >&5
51484    $ECHO "$OUTPUT" >&5
51485    JVM_ARG_OK=false
51486  fi
51487
51488
51489  # Apply user provided options.
51490
51491  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51492  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51493  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51494  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51495  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51496  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51497    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51498    JVM_ARG_OK=true
51499  else
51500    $ECHO "Arg failed:" >&5
51501    $ECHO "$OUTPUT" >&5
51502    JVM_ARG_OK=false
51503  fi
51504
51505
51506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51507$as_echo "$boot_jdk_jvmargs" >&6; }
51508
51509  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51510  JAVA_FLAGS=$boot_jdk_jvmargs
51511
51512
51513
51514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51515$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51516
51517  # Starting amount of heap memory.
51518
51519  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51520  $ECHO "Command: $JAVA -Xms64M -version" >&5
51521  OUTPUT=`$JAVA -Xms64M -version 2>&1`
51522  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51523  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51524  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51525    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51526    JVM_ARG_OK=true
51527  else
51528    $ECHO "Arg failed:" >&5
51529    $ECHO "$OUTPUT" >&5
51530    JVM_ARG_OK=false
51531  fi
51532
51533
51534  # Maximum amount of heap memory.
51535  # Maximum stack size.
51536  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51537  if test "x$BUILD_NUM_BITS" = x32; then
51538    if test "$JVM_MAX_HEAP" -gt "1100"; then
51539      JVM_MAX_HEAP=1100
51540    elif test "$JVM_MAX_HEAP" -lt "512"; then
51541      JVM_MAX_HEAP=512
51542    fi
51543    STACK_SIZE=768
51544  else
51545    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51546    # pointers are used. Apparently, we need to increase the heap and stack
51547    # space for the jvm. More specifically, when running javac to build huge
51548    # jdk batch
51549    if test "$JVM_MAX_HEAP" -gt "1600"; then
51550      JVM_MAX_HEAP=1600
51551    elif test "$JVM_MAX_HEAP" -lt "512"; then
51552      JVM_MAX_HEAP=512
51553    fi
51554    STACK_SIZE=1536
51555  fi
51556
51557  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51558  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51559  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51560  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51561  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51562  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51563    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51564    JVM_ARG_OK=true
51565  else
51566    $ECHO "Arg failed:" >&5
51567    $ECHO "$OUTPUT" >&5
51568    JVM_ARG_OK=false
51569  fi
51570
51571
51572  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51573  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51574  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51575  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51576  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51577  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51578    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51579    JVM_ARG_OK=true
51580  else
51581    $ECHO "Arg failed:" >&5
51582    $ECHO "$OUTPUT" >&5
51583    JVM_ARG_OK=false
51584  fi
51585
51586
51587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51588$as_echo "$boot_jdk_jvmargs_big" >&6; }
51589
51590  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51591
51592
51593
51594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51595$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51596
51597  # Use serial gc for small short lived tools if possible
51598
51599  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51600  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51601  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51602  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51603  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51604  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51605    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51606    JVM_ARG_OK=true
51607  else
51608    $ECHO "Arg failed:" >&5
51609    $ECHO "$OUTPUT" >&5
51610    JVM_ARG_OK=false
51611  fi
51612
51613
51614  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51615  $ECHO "Command: $JAVA -Xms32M -version" >&5
51616  OUTPUT=`$JAVA -Xms32M -version 2>&1`
51617  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51618  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51619  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51620    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51621    JVM_ARG_OK=true
51622  else
51623    $ECHO "Arg failed:" >&5
51624    $ECHO "$OUTPUT" >&5
51625    JVM_ARG_OK=false
51626  fi
51627
51628
51629  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51630  $ECHO "Command: $JAVA -Xmx512M -version" >&5
51631  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51632  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51633  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51634  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51635    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51636    JVM_ARG_OK=true
51637  else
51638    $ECHO "Arg failed:" >&5
51639    $ECHO "$OUTPUT" >&5
51640    JVM_ARG_OK=false
51641  fi
51642
51643
51644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51645$as_echo "$boot_jdk_jvmargs_small" >&6; }
51646
51647  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51648
51649
51650  JAVA_TOOL_FLAGS_SMALL=""
51651  for f in $JAVA_FLAGS_SMALL; do
51652    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51653  done
51654
51655
51656
51657# Setup smart javac (after cores and memory have been setup)
51658
51659
51660# Check whether --with-sjavac-server-java was given.
51661if test "${with_sjavac_server_java+set}" = set; then :
51662  withval=$with_sjavac_server_java;
51663fi
51664
51665
51666  if test "x$with_sjavac_server_java" != x; then
51667    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51668    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51669    if test "x$FOUND_VERSION" = x; then
51670      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51671    fi
51672  else
51673    SJAVAC_SERVER_JAVA="$JAVA"
51674  fi
51675
51676
51677  if test "$MEMORY_SIZE" -gt "3000"; then
51678
51679  $ECHO "Check if jvm arg is ok: -d64" >&5
51680  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51681  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -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    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
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    if test "$JVM_ARG_OK" = true; then
51694      JVM_64BIT=true
51695      JVM_ARG_OK=false
51696    fi
51697  fi
51698
51699  MX_VALUE=`expr $MEMORY_SIZE / 2`
51700  if test "$JVM_64BIT" = true; then
51701    # Set ms lower than mx since more than one instance of the server might
51702    # get launched at the same time before they figure out which instance won.
51703    MS_VALUE=512
51704    if test "$MX_VALUE" -gt "2048"; then
51705      MX_VALUE=2048
51706    fi
51707  else
51708    MS_VALUE=256
51709    if test "$MX_VALUE" -gt "1500"; then
51710      MX_VALUE=1500
51711    fi
51712  fi
51713  if test "$MX_VALUE" -lt "512"; then
51714    MX_VALUE=512
51715  fi
51716
51717  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51718  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51719  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51720  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51721  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51722  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51723    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51724    JVM_ARG_OK=true
51725  else
51726    $ECHO "Arg failed:" >&5
51727    $ECHO "$OUTPUT" >&5
51728    JVM_ARG_OK=false
51729  fi
51730
51731
51732
51733  # Check whether --enable-sjavac was given.
51734if test "${enable_sjavac+set}" = set; then :
51735  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51736else
51737  ENABLE_SJAVAC='no'
51738fi
51739
51740  if test "x$JVM_ARG_OK" = "xfalse"; then
51741    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51742$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51743    ENABLE_SJAVAC=no;
51744  fi
51745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51746$as_echo_n "checking whether to use sjavac... " >&6; }
51747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51748$as_echo "$ENABLE_SJAVAC" >&6; }
51749
51750
51751  if test "x$ENABLE_SJAVAC" = xyes; then
51752    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51753  else
51754    SJAVAC_SERVER_DIR=
51755  fi
51756
51757
51758
51759# Can the C/C++ compiler use precompiled headers?
51760
51761
51762  ###############################################################################
51763  #
51764  # Can the C/C++ compiler use precompiled headers?
51765  #
51766  # Check whether --enable-precompiled-headers was given.
51767if test "${enable_precompiled_headers+set}" = set; then :
51768  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51769else
51770  ENABLE_PRECOMPH=yes
51771fi
51772
51773
51774  USE_PRECOMPILED_HEADER=1
51775  if test "x$ENABLE_PRECOMPH" = xno; then
51776    USE_PRECOMPILED_HEADER=0
51777  fi
51778
51779  if test "x$ENABLE_PRECOMPH" = xyes; then
51780    # Check that the compiler actually supports precomp headers.
51781    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51783$as_echo_n "checking that precompiled headers work... " >&6; }
51784      echo "int alfa();" > conftest.h
51785      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51786      if test ! -f conftest.hpp.gch; then
51787        USE_PRECOMPILED_HEADER=0
51788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51789$as_echo "no" >&6; }
51790      else
51791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51792$as_echo "yes" >&6; }
51793      fi
51794      rm -f conftest.h conftest.hpp.gch
51795    fi
51796  fi
51797
51798
51799
51800
51801# Setup use of ccache, if available
51802
51803  # Check whether --enable-ccache was given.
51804if test "${enable_ccache+set}" = set; then :
51805  enableval=$enable_ccache;
51806fi
51807
51808
51809  CCACHE=
51810  CCACHE_STATUS=
51811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51812$as_echo_n "checking is ccache enabled... " >&6; }
51813  if test "x$enable_ccache" = xyes; then
51814    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
51815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51816$as_echo "yes" >&6; }
51817      OLD_PATH="$PATH"
51818      if test "x$TOOLCHAIN_PATH" != x; then
51819        PATH=$TOOLCHAIN_PATH:$PATH
51820      fi
51821
51822
51823
51824  # Publish this variable in the help.
51825
51826
51827  if test "x$CCACHE" = x; then
51828    # The variable is not set by user, try to locate tool using the code snippet
51829    for ac_prog in ccache
51830do
51831  # Extract the first word of "$ac_prog", so it can be a program name with args.
51832set dummy $ac_prog; ac_word=$2
51833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51834$as_echo_n "checking for $ac_word... " >&6; }
51835if ${ac_cv_path_CCACHE+:} false; then :
51836  $as_echo_n "(cached) " >&6
51837else
51838  case $CCACHE in
51839  [\\/]* | ?:[\\/]*)
51840  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51841  ;;
51842  *)
51843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51844for as_dir in $PATH
51845do
51846  IFS=$as_save_IFS
51847  test -z "$as_dir" && as_dir=.
51848    for ac_exec_ext in '' $ac_executable_extensions; do
51849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51850    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51852    break 2
51853  fi
51854done
51855  done
51856IFS=$as_save_IFS
51857
51858  ;;
51859esac
51860fi
51861CCACHE=$ac_cv_path_CCACHE
51862if test -n "$CCACHE"; then
51863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51864$as_echo "$CCACHE" >&6; }
51865else
51866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51867$as_echo "no" >&6; }
51868fi
51869
51870
51871  test -n "$CCACHE" && break
51872done
51873
51874  else
51875    # The variable is set, but is it from the command line or the environment?
51876
51877    # Try to remove the string !CCACHE! from our list.
51878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51880      # If it failed, the variable was not from the command line. Ignore it,
51881      # but warn the user (except for BASH, which is always set by the calling BASH).
51882      if test "xCCACHE" != xBASH; then
51883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51884$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51885      fi
51886      # Try to locate tool using the code snippet
51887      for ac_prog in ccache
51888do
51889  # Extract the first word of "$ac_prog", so it can be a program name with args.
51890set dummy $ac_prog; ac_word=$2
51891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51892$as_echo_n "checking for $ac_word... " >&6; }
51893if ${ac_cv_path_CCACHE+:} false; then :
51894  $as_echo_n "(cached) " >&6
51895else
51896  case $CCACHE in
51897  [\\/]* | ?:[\\/]*)
51898  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51899  ;;
51900  *)
51901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51902for as_dir in $PATH
51903do
51904  IFS=$as_save_IFS
51905  test -z "$as_dir" && as_dir=.
51906    for ac_exec_ext in '' $ac_executable_extensions; do
51907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51908    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51910    break 2
51911  fi
51912done
51913  done
51914IFS=$as_save_IFS
51915
51916  ;;
51917esac
51918fi
51919CCACHE=$ac_cv_path_CCACHE
51920if test -n "$CCACHE"; then
51921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51922$as_echo "$CCACHE" >&6; }
51923else
51924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51925$as_echo "no" >&6; }
51926fi
51927
51928
51929  test -n "$CCACHE" && break
51930done
51931
51932    else
51933      # If it succeeded, then it was overridden by the user. We will use it
51934      # for the tool.
51935
51936      # First remove it from the list of overridden variables, so we can test
51937      # for unknown variables in the end.
51938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51939
51940      # Check if the provided tool contains a complete path.
51941      tool_specified="$CCACHE"
51942      tool_basename="${tool_specified##*/}"
51943      if test "x$tool_basename" = "x$tool_specified"; then
51944        # A command without a complete path is provided, search $PATH.
51945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51946$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51947        # Extract the first word of "$tool_basename", so it can be a program name with args.
51948set dummy $tool_basename; ac_word=$2
51949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51950$as_echo_n "checking for $ac_word... " >&6; }
51951if ${ac_cv_path_CCACHE+:} false; then :
51952  $as_echo_n "(cached) " >&6
51953else
51954  case $CCACHE in
51955  [\\/]* | ?:[\\/]*)
51956  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51957  ;;
51958  *)
51959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51960for as_dir in $PATH
51961do
51962  IFS=$as_save_IFS
51963  test -z "$as_dir" && as_dir=.
51964    for ac_exec_ext in '' $ac_executable_extensions; do
51965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51966    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51968    break 2
51969  fi
51970done
51971  done
51972IFS=$as_save_IFS
51973
51974  ;;
51975esac
51976fi
51977CCACHE=$ac_cv_path_CCACHE
51978if test -n "$CCACHE"; then
51979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51980$as_echo "$CCACHE" >&6; }
51981else
51982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51983$as_echo "no" >&6; }
51984fi
51985
51986
51987        if test "x$CCACHE" = x; then
51988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51989        fi
51990      else
51991        # Otherwise we believe it is a complete path. Use it as it is.
51992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51993$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51995$as_echo_n "checking for CCACHE... " >&6; }
51996        if test ! -x "$tool_specified"; then
51997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51998$as_echo "not found" >&6; }
51999          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52000        fi
52001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52002$as_echo "$tool_specified" >&6; }
52003      fi
52004    fi
52005  fi
52006
52007
52008
52009  if test "x$CCACHE" = x; then
52010    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52011  fi
52012
52013
52014      PATH="$OLD_PATH"
52015      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52016      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52017    else
52018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52019$as_echo "no" >&6; }
52020      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
52021$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
52022    fi
52023  elif test "x$enable_ccache" = xno; then
52024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52025$as_echo "no, explicitly disabled" >&6; }
52026    CCACHE_STATUS="Disabled"
52027  elif test "x$enable_ccache" = x; then
52028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52029$as_echo "no" >&6; }
52030  else
52031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52032$as_echo "unknown" >&6; }
52033    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52034  fi
52035
52036
52037
52038# Check whether --with-ccache-dir was given.
52039if test "${with_ccache_dir+set}" = set; then :
52040  withval=$with_ccache_dir;
52041fi
52042
52043
52044  if test "x$with_ccache_dir" != x; then
52045    # When using a non home ccache directory, assume the use is to share ccache files
52046    # with other users. Thus change the umask.
52047    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52048    if test "x$CCACHE" = x; then
52049      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52050$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52051    fi
52052  fi
52053
52054  if test "x$CCACHE" != x; then
52055
52056  if test "x$CCACHE" != x; then
52057    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
52058      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
52059          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]'`
52060      if test "x$HAS_BAD_CCACHE" != "x"; then
52061        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
52062      fi
52063      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
52064$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
52065      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
52066      PUSHED_FLAGS="$CXXFLAGS"
52067      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
52068      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52069/* end confdefs.h.  */
52070
52071int
52072main ()
52073{
52074
52075  ;
52076  return 0;
52077}
52078_ACEOF
52079if ac_fn_cxx_try_compile "$LINENO"; then :
52080  CC_KNOWS_CCACHE_TRICK=yes
52081else
52082  CC_KNOWS_CCACHE_TRICK=no
52083fi
52084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52085      CXXFLAGS="$PUSHED_FLAGS"
52086      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
52087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52088$as_echo "yes" >&6; }
52089        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
52090
52091        CCACHE_SLOPPINESS=pch_defines,time_macros
52092      else
52093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52094$as_echo "no" >&6; }
52095        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
52096      fi
52097    fi
52098
52099    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
52100        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
52101
52102    if test "x$SET_CCACHE_DIR" != x; then
52103      mkdir -p $CCACHE_DIR > /dev/null 2>&1
52104      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
52105    fi
52106  fi
52107
52108  fi
52109
52110
52111###############################################################################
52112#
52113# And now the finish...
52114#
52115###############################################################################
52116
52117# Check for some common pitfalls
52118
52119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52120    file_to_test="$SRC_ROOT/LICENSE"
52121    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
52122      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
52123    fi
52124  fi
52125
52126
52127  # Did user specify any unknown variables?
52128
52129  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
52130    # Replace the separating ! with spaces before presenting for end user.
52131    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
52132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
52133$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
52134  fi
52135
52136
52137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
52138$as_echo_n "checking if build directory is on local disk... " >&6; }
52139
52140  # df -l lists only local disks; if the given directory is not found then
52141  # a non-zero exit code is given
52142  if test "x$DF" = x; then
52143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52144      # msys does not have df; use Windows "net use" instead.
52145      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
52146      if test "x$IS_NETWORK_DISK" = x; then
52147        OUTPUT_DIR_IS_LOCAL="yes"
52148      else
52149        OUTPUT_DIR_IS_LOCAL="no"
52150      fi
52151    else
52152      # No df here, say it's local
52153      OUTPUT_DIR_IS_LOCAL="yes"
52154    fi
52155  else
52156    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
52157      OUTPUT_DIR_IS_LOCAL="yes"
52158    else
52159      OUTPUT_DIR_IS_LOCAL="no"
52160    fi
52161  fi
52162
52163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
52164$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
52165
52166
52167
52168  # Check if the user has any old-style ALT_ variables set.
52169  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
52170
52171  # Before generating output files, test if they exist. If they do, this is a reconfigure.
52172  # Since we can't properly handle the dependencies for this, warn the user about the situation
52173  if test -e $OUTPUT_ROOT/spec.gmk; then
52174    IS_RECONFIGURE=yes
52175  else
52176    IS_RECONFIGURE=no
52177  fi
52178
52179
52180# At the end, call the custom hook. (Dummy macro if no custom sources available)
52181
52182
52183# We're messing a bit with internal autoconf variables to put the config.status
52184# in the output directory instead of the current directory.
52185CONFIG_STATUS="$OUTPUT_ROOT/config.status"
52186
52187# Create the actual output files. Now the main work of configure is done.
52188cat >confcache <<\_ACEOF
52189# This file is a shell script that caches the results of configure
52190# tests run on this system so they can be shared between configure
52191# scripts and configure runs, see configure's option --config-cache.
52192# It is not useful on other systems.  If it contains results you don't
52193# want to keep, you may remove or edit it.
52194#
52195# config.status only pays attention to the cache file if you give it
52196# the --recheck option to rerun configure.
52197#
52198# `ac_cv_env_foo' variables (set or unset) will be overridden when
52199# loading this file, other *unset* `ac_cv_foo' will be assigned the
52200# following values.
52201
52202_ACEOF
52203
52204# The following way of writing the cache mishandles newlines in values,
52205# but we know of no workaround that is simple, portable, and efficient.
52206# So, we kill variables containing newlines.
52207# Ultrix sh set writes to stderr and can't be redirected directly,
52208# and sets the high bit in the cache file unless we assign to the vars.
52209(
52210  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
52211    eval ac_val=\$$ac_var
52212    case $ac_val in #(
52213    *${as_nl}*)
52214      case $ac_var in #(
52215      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
52216$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
52217      esac
52218      case $ac_var in #(
52219      _ | IFS | as_nl) ;; #(
52220      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
52221      *) { eval $ac_var=; unset $ac_var;} ;;
52222      esac ;;
52223    esac
52224  done
52225
52226  (set) 2>&1 |
52227    case $as_nl`(ac_space=' '; set) 2>&1` in #(
52228    *${as_nl}ac_space=\ *)
52229      # `set' does not quote correctly, so add quotes: double-quote
52230      # substitution turns \\\\ into \\, and sed turns \\ into \.
52231      sed -n \
52232	"s/'/'\\\\''/g;
52233	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
52234      ;; #(
52235    *)
52236      # `set' quotes correctly as required by POSIX, so do not add quotes.
52237      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
52238      ;;
52239    esac |
52240    sort
52241) |
52242  sed '
52243     /^ac_cv_env_/b end
52244     t clear
52245     :clear
52246     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
52247     t end
52248     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
52249     :end' >>confcache
52250if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
52251  if test -w "$cache_file"; then
52252    if test "x$cache_file" != "x/dev/null"; then
52253      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
52254$as_echo "$as_me: updating cache $cache_file" >&6;}
52255      if test ! -f "$cache_file" || test -h "$cache_file"; then
52256	cat confcache >"$cache_file"
52257      else
52258        case $cache_file in #(
52259        */* | ?:*)
52260	  mv -f confcache "$cache_file"$$ &&
52261	  mv -f "$cache_file"$$ "$cache_file" ;; #(
52262        *)
52263	  mv -f confcache "$cache_file" ;;
52264	esac
52265      fi
52266    fi
52267  else
52268    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
52269$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
52270  fi
52271fi
52272rm -f confcache
52273
52274test "x$prefix" = xNONE && prefix=$ac_default_prefix
52275# Let make expand exec_prefix.
52276test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
52277
52278# Transform confdefs.h into DEFS.
52279# Protect against shell expansion while executing Makefile rules.
52280# Protect against Makefile macro expansion.
52281#
52282# If the first sed substitution is executed (which looks for macros that
52283# take arguments), then branch to the quote section.  Otherwise,
52284# look for a macro that doesn't take arguments.
52285ac_script='
52286:mline
52287/\\$/{
52288 N
52289 s,\\\n,,
52290 b mline
52291}
52292t clear
52293:clear
52294s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
52295t quote
52296s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
52297t quote
52298b any
52299:quote
52300s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
52301s/\[/\\&/g
52302s/\]/\\&/g
52303s/\$/$$/g
52304H
52305:any
52306${
52307	g
52308	s/^\n//
52309	s/\n/ /g
52310	p
52311}
52312'
52313DEFS=`sed -n "$ac_script" confdefs.h`
52314
52315
52316ac_libobjs=
52317ac_ltlibobjs=
52318U=
52319for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
52320  # 1. Remove the extension, and $U if already installed.
52321  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
52322  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
52323  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
52324  #    will be set to the directory where LIBOBJS objects are built.
52325  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
52326  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
52327done
52328LIBOBJS=$ac_libobjs
52329
52330LTLIBOBJS=$ac_ltlibobjs
52331
52332
52333
52334: "${CONFIG_STATUS=./config.status}"
52335ac_write_fail=0
52336ac_clean_files_save=$ac_clean_files
52337ac_clean_files="$ac_clean_files $CONFIG_STATUS"
52338{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
52339$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
52340as_write_fail=0
52341cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
52342#! $SHELL
52343# Generated by $as_me.
52344# Run this file to recreate the current configuration.
52345# Compiler output produced by configure, useful for debugging
52346# configure, is in config.log if it exists.
52347
52348debug=false
52349ac_cs_recheck=false
52350ac_cs_silent=false
52351
52352SHELL=\${CONFIG_SHELL-$SHELL}
52353export SHELL
52354_ASEOF
52355cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
52356## -------------------- ##
52357## M4sh Initialization. ##
52358## -------------------- ##
52359
52360# Be more Bourne compatible
52361DUALCASE=1; export DUALCASE # for MKS sh
52362if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
52363  emulate sh
52364  NULLCMD=:
52365  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
52366  # is contrary to our usage.  Disable this feature.
52367  alias -g '${1+"$@"}'='"$@"'
52368  setopt NO_GLOB_SUBST
52369else
52370  case `(set -o) 2>/dev/null` in #(
52371  *posix*) :
52372    set -o posix ;; #(
52373  *) :
52374     ;;
52375esac
52376fi
52377
52378
52379as_nl='
52380'
52381export as_nl
52382# Printing a long string crashes Solaris 7 /usr/bin/printf.
52383as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52384as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52385as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52386# Prefer a ksh shell builtin over an external printf program on Solaris,
52387# but without wasting forks for bash or zsh.
52388if test -z "$BASH_VERSION$ZSH_VERSION" \
52389    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52390  as_echo='print -r --'
52391  as_echo_n='print -rn --'
52392elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52393  as_echo='printf %s\n'
52394  as_echo_n='printf %s'
52395else
52396  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52397    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52398    as_echo_n='/usr/ucb/echo -n'
52399  else
52400    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52401    as_echo_n_body='eval
52402      arg=$1;
52403      case $arg in #(
52404      *"$as_nl"*)
52405	expr "X$arg" : "X\\(.*\\)$as_nl";
52406	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52407      esac;
52408      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52409    '
52410    export as_echo_n_body
52411    as_echo_n='sh -c $as_echo_n_body as_echo'
52412  fi
52413  export as_echo_body
52414  as_echo='sh -c $as_echo_body as_echo'
52415fi
52416
52417# The user is always right.
52418if test "${PATH_SEPARATOR+set}" != set; then
52419  PATH_SEPARATOR=:
52420  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52421    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52422      PATH_SEPARATOR=';'
52423  }
52424fi
52425
52426
52427# IFS
52428# We need space, tab and new line, in precisely that order.  Quoting is
52429# there to prevent editors from complaining about space-tab.
52430# (If _AS_PATH_WALK were called with IFS unset, it would disable word
52431# splitting by setting IFS to empty value.)
52432IFS=" ""	$as_nl"
52433
52434# Find who we are.  Look in the path if we contain no directory separator.
52435as_myself=
52436case $0 in #((
52437  *[\\/]* ) as_myself=$0 ;;
52438  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52439for as_dir in $PATH
52440do
52441  IFS=$as_save_IFS
52442  test -z "$as_dir" && as_dir=.
52443    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52444  done
52445IFS=$as_save_IFS
52446
52447     ;;
52448esac
52449# We did not find ourselves, most probably we were run as `sh COMMAND'
52450# in which case we are not to be found in the path.
52451if test "x$as_myself" = x; then
52452  as_myself=$0
52453fi
52454if test ! -f "$as_myself"; then
52455  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52456  exit 1
52457fi
52458
52459# Unset variables that we do not need and which cause bugs (e.g. in
52460# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52461# suppresses any "Segmentation fault" message there.  '((' could
52462# trigger a bug in pdksh 5.2.14.
52463for as_var in BASH_ENV ENV MAIL MAILPATH
52464do eval test x\${$as_var+set} = xset \
52465  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52466done
52467PS1='$ '
52468PS2='> '
52469PS4='+ '
52470
52471# NLS nuisances.
52472LC_ALL=C
52473export LC_ALL
52474LANGUAGE=C
52475export LANGUAGE
52476
52477# CDPATH.
52478(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52479
52480
52481# as_fn_error STATUS ERROR [LINENO LOG_FD]
52482# ----------------------------------------
52483# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52484# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52485# script with STATUS, using 1 if that was 0.
52486as_fn_error ()
52487{
52488  as_status=$1; test $as_status -eq 0 && as_status=1
52489  if test "$4"; then
52490    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52491    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52492  fi
52493  $as_echo "$as_me: error: $2" >&2
52494  as_fn_exit $as_status
52495} # as_fn_error
52496
52497
52498# as_fn_set_status STATUS
52499# -----------------------
52500# Set $? to STATUS, without forking.
52501as_fn_set_status ()
52502{
52503  return $1
52504} # as_fn_set_status
52505
52506# as_fn_exit STATUS
52507# -----------------
52508# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52509as_fn_exit ()
52510{
52511  set +e
52512  as_fn_set_status $1
52513  exit $1
52514} # as_fn_exit
52515
52516# as_fn_unset VAR
52517# ---------------
52518# Portably unset VAR.
52519as_fn_unset ()
52520{
52521  { eval $1=; unset $1;}
52522}
52523as_unset=as_fn_unset
52524# as_fn_append VAR VALUE
52525# ----------------------
52526# Append the text in VALUE to the end of the definition contained in VAR. Take
52527# advantage of any shell optimizations that allow amortized linear growth over
52528# repeated appends, instead of the typical quadratic growth present in naive
52529# implementations.
52530if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52531  eval 'as_fn_append ()
52532  {
52533    eval $1+=\$2
52534  }'
52535else
52536  as_fn_append ()
52537  {
52538    eval $1=\$$1\$2
52539  }
52540fi # as_fn_append
52541
52542# as_fn_arith ARG...
52543# ------------------
52544# Perform arithmetic evaluation on the ARGs, and store the result in the
52545# global $as_val. Take advantage of shells that can avoid forks. The arguments
52546# must be portable across $(()) and expr.
52547if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52548  eval 'as_fn_arith ()
52549  {
52550    as_val=$(( $* ))
52551  }'
52552else
52553  as_fn_arith ()
52554  {
52555    as_val=`expr "$@" || test $? -eq 1`
52556  }
52557fi # as_fn_arith
52558
52559
52560if expr a : '\(a\)' >/dev/null 2>&1 &&
52561   test "X`expr 00001 : '.*\(...\)'`" = X001; then
52562  as_expr=expr
52563else
52564  as_expr=false
52565fi
52566
52567if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52568  as_basename=basename
52569else
52570  as_basename=false
52571fi
52572
52573if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52574  as_dirname=dirname
52575else
52576  as_dirname=false
52577fi
52578
52579as_me=`$as_basename -- "$0" ||
52580$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52581	 X"$0" : 'X\(//\)$' \| \
52582	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52583$as_echo X/"$0" |
52584    sed '/^.*\/\([^/][^/]*\)\/*$/{
52585	    s//\1/
52586	    q
52587	  }
52588	  /^X\/\(\/\/\)$/{
52589	    s//\1/
52590	    q
52591	  }
52592	  /^X\/\(\/\).*/{
52593	    s//\1/
52594	    q
52595	  }
52596	  s/.*/./; q'`
52597
52598# Avoid depending upon Character Ranges.
52599as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52600as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52601as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52602as_cr_digits='0123456789'
52603as_cr_alnum=$as_cr_Letters$as_cr_digits
52604
52605ECHO_C= ECHO_N= ECHO_T=
52606case `echo -n x` in #(((((
52607-n*)
52608  case `echo 'xy\c'` in
52609  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
52610  xy)  ECHO_C='\c';;
52611  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52612       ECHO_T='	';;
52613  esac;;
52614*)
52615  ECHO_N='-n';;
52616esac
52617
52618rm -f conf$$ conf$$.exe conf$$.file
52619if test -d conf$$.dir; then
52620  rm -f conf$$.dir/conf$$.file
52621else
52622  rm -f conf$$.dir
52623  mkdir conf$$.dir 2>/dev/null
52624fi
52625if (echo >conf$$.file) 2>/dev/null; then
52626  if ln -s conf$$.file conf$$ 2>/dev/null; then
52627    as_ln_s='ln -s'
52628    # ... but there are two gotchas:
52629    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52630    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52631    # In both cases, we have to default to `cp -pR'.
52632    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52633      as_ln_s='cp -pR'
52634  elif ln conf$$.file conf$$ 2>/dev/null; then
52635    as_ln_s=ln
52636  else
52637    as_ln_s='cp -pR'
52638  fi
52639else
52640  as_ln_s='cp -pR'
52641fi
52642rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52643rmdir conf$$.dir 2>/dev/null
52644
52645
52646# as_fn_mkdir_p
52647# -------------
52648# Create "$as_dir" as a directory, including parents if necessary.
52649as_fn_mkdir_p ()
52650{
52651
52652  case $as_dir in #(
52653  -*) as_dir=./$as_dir;;
52654  esac
52655  test -d "$as_dir" || eval $as_mkdir_p || {
52656    as_dirs=
52657    while :; do
52658      case $as_dir in #(
52659      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52660      *) as_qdir=$as_dir;;
52661      esac
52662      as_dirs="'$as_qdir' $as_dirs"
52663      as_dir=`$as_dirname -- "$as_dir" ||
52664$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52665	 X"$as_dir" : 'X\(//\)[^/]' \| \
52666	 X"$as_dir" : 'X\(//\)$' \| \
52667	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52668$as_echo X"$as_dir" |
52669    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52670	    s//\1/
52671	    q
52672	  }
52673	  /^X\(\/\/\)[^/].*/{
52674	    s//\1/
52675	    q
52676	  }
52677	  /^X\(\/\/\)$/{
52678	    s//\1/
52679	    q
52680	  }
52681	  /^X\(\/\).*/{
52682	    s//\1/
52683	    q
52684	  }
52685	  s/.*/./; q'`
52686      test -d "$as_dir" && break
52687    done
52688    test -z "$as_dirs" || eval "mkdir $as_dirs"
52689  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52690
52691
52692} # as_fn_mkdir_p
52693if mkdir -p . 2>/dev/null; then
52694  as_mkdir_p='mkdir -p "$as_dir"'
52695else
52696  test -d ./-p && rmdir ./-p
52697  as_mkdir_p=false
52698fi
52699
52700
52701# as_fn_executable_p FILE
52702# -----------------------
52703# Test if FILE is an executable regular file.
52704as_fn_executable_p ()
52705{
52706  test -f "$1" && test -x "$1"
52707} # as_fn_executable_p
52708as_test_x='test -x'
52709as_executable_p=as_fn_executable_p
52710
52711# Sed expression to map a string onto a valid CPP name.
52712as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52713
52714# Sed expression to map a string onto a valid variable name.
52715as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52716
52717
52718exec 6>&1
52719## ----------------------------------- ##
52720## Main body of $CONFIG_STATUS script. ##
52721## ----------------------------------- ##
52722_ASEOF
52723test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52724
52725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52726# Save the log message, to keep $0 and so on meaningful, and to
52727# report actual input values of CONFIG_FILES etc. instead of their
52728# values after options handling.
52729ac_log="
52730This file was extended by OpenJDK $as_me jdk9, which was
52731generated by GNU Autoconf 2.69.  Invocation command line was
52732
52733  CONFIG_FILES    = $CONFIG_FILES
52734  CONFIG_HEADERS  = $CONFIG_HEADERS
52735  CONFIG_LINKS    = $CONFIG_LINKS
52736  CONFIG_COMMANDS = $CONFIG_COMMANDS
52737  $ $0 $@
52738
52739on `(hostname || uname -n) 2>/dev/null | sed 1q`
52740"
52741
52742_ACEOF
52743
52744case $ac_config_files in *"
52745"*) set x $ac_config_files; shift; ac_config_files=$*;;
52746esac
52747
52748
52749
52750cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52751# Files that config.status was made for.
52752config_files="$ac_config_files"
52753
52754_ACEOF
52755
52756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52757ac_cs_usage="\
52758\`$as_me' instantiates files and other configuration actions
52759from templates according to the current configuration.  Unless the files
52760and actions are specified as TAGs, all are instantiated by default.
52761
52762Usage: $0 [OPTION]... [TAG]...
52763
52764  -h, --help       print this help, then exit
52765  -V, --version    print version number and configuration settings, then exit
52766      --config     print configuration, then exit
52767  -q, --quiet, --silent
52768                   do not print progress messages
52769  -d, --debug      don't remove temporary files
52770      --recheck    update $as_me by reconfiguring in the same conditions
52771      --file=FILE[:TEMPLATE]
52772                   instantiate the configuration file FILE
52773
52774Configuration files:
52775$config_files
52776
52777Report bugs to <build-dev@openjdk.java.net>.
52778OpenJDK home page: <http://openjdk.java.net>."
52779
52780_ACEOF
52781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52782ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52783ac_cs_version="\\
52784OpenJDK config.status jdk9
52785configured by $0, generated by GNU Autoconf 2.69,
52786  with options \\"\$ac_cs_config\\"
52787
52788Copyright (C) 2012 Free Software Foundation, Inc.
52789This config.status script is free software; the Free Software Foundation
52790gives unlimited permission to copy, distribute and modify it."
52791
52792ac_pwd='$ac_pwd'
52793srcdir='$srcdir'
52794AWK='$AWK'
52795test -n "\$AWK" || AWK=awk
52796_ACEOF
52797
52798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52799# The default lists apply if the user does not specify any file.
52800ac_need_defaults=:
52801while test $# != 0
52802do
52803  case $1 in
52804  --*=?*)
52805    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52806    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52807    ac_shift=:
52808    ;;
52809  --*=)
52810    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52811    ac_optarg=
52812    ac_shift=:
52813    ;;
52814  *)
52815    ac_option=$1
52816    ac_optarg=$2
52817    ac_shift=shift
52818    ;;
52819  esac
52820
52821  case $ac_option in
52822  # Handling of the options.
52823  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52824    ac_cs_recheck=: ;;
52825  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52826    $as_echo "$ac_cs_version"; exit ;;
52827  --config | --confi | --conf | --con | --co | --c )
52828    $as_echo "$ac_cs_config"; exit ;;
52829  --debug | --debu | --deb | --de | --d | -d )
52830    debug=: ;;
52831  --file | --fil | --fi | --f )
52832    $ac_shift
52833    case $ac_optarg in
52834    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52835    '') as_fn_error $? "missing file argument" ;;
52836    esac
52837    as_fn_append CONFIG_FILES " '$ac_optarg'"
52838    ac_need_defaults=false;;
52839  --he | --h |  --help | --hel | -h )
52840    $as_echo "$ac_cs_usage"; exit ;;
52841  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52842  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52843    ac_cs_silent=: ;;
52844
52845  # This is an error.
52846  -*) as_fn_error $? "unrecognized option: \`$1'
52847Try \`$0 --help' for more information." ;;
52848
52849  *) as_fn_append ac_config_targets " $1"
52850     ac_need_defaults=false ;;
52851
52852  esac
52853  shift
52854done
52855
52856ac_configure_extra_args=
52857
52858if $ac_cs_silent; then
52859  exec 6>/dev/null
52860  ac_configure_extra_args="$ac_configure_extra_args --silent"
52861fi
52862
52863_ACEOF
52864cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52865if \$ac_cs_recheck; then
52866  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52867  shift
52868  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52869  CONFIG_SHELL='$SHELL'
52870  export CONFIG_SHELL
52871  exec "\$@"
52872fi
52873
52874_ACEOF
52875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52876exec 5>>config.log
52877{
52878  echo
52879  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52880## Running $as_me. ##
52881_ASBOX
52882  $as_echo "$ac_log"
52883} >&5
52884
52885_ACEOF
52886cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52887_ACEOF
52888
52889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52890
52891# Handling of arguments.
52892for ac_config_target in $ac_config_targets
52893do
52894  case $ac_config_target in
52895    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52896    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52897    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52898    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52899    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52900
52901  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52902  esac
52903done
52904
52905
52906# If the user did not use the arguments to specify the items to instantiate,
52907# then the envvar interface is used.  Set only those that are not.
52908# We use the long form for the default assignment because of an extremely
52909# bizarre bug on SunOS 4.1.3.
52910if $ac_need_defaults; then
52911  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52912fi
52913
52914# Have a temporary directory for convenience.  Make it in the build tree
52915# simply because there is no reason against having it here, and in addition,
52916# creating and moving files from /tmp can sometimes cause problems.
52917# Hook for its removal unless debugging.
52918# Note that there is a small window in which the directory will not be cleaned:
52919# after its creation but before its name has been assigned to `$tmp'.
52920$debug ||
52921{
52922  tmp= ac_tmp=
52923  trap 'exit_status=$?
52924  : "${ac_tmp:=$tmp}"
52925  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52926' 0
52927  trap 'as_fn_exit 1' 1 2 13 15
52928}
52929# Create a (secure) tmp directory for tmp files.
52930
52931{
52932  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52933  test -d "$tmp"
52934}  ||
52935{
52936  tmp=./conf$$-$RANDOM
52937  (umask 077 && mkdir "$tmp")
52938} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52939ac_tmp=$tmp
52940
52941# Set up the scripts for CONFIG_FILES section.
52942# No need to generate them if there are no CONFIG_FILES.
52943# This happens for instance with `./config.status config.h'.
52944if test -n "$CONFIG_FILES"; then
52945
52946
52947ac_cr=`echo X | tr X '\015'`
52948# On cygwin, bash can eat \r inside `` if the user requested igncr.
52949# But we know of no other shell where ac_cr would be empty at this
52950# point, so we can use a bashism as a fallback.
52951if test "x$ac_cr" = x; then
52952  eval ac_cr=\$\'\\r\'
52953fi
52954ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52955if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52956  ac_cs_awk_cr='\\r'
52957else
52958  ac_cs_awk_cr=$ac_cr
52959fi
52960
52961echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52962_ACEOF
52963
52964
52965{
52966  echo "cat >conf$$subs.awk <<_ACEOF" &&
52967  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52968  echo "_ACEOF"
52969} >conf$$subs.sh ||
52970  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52971ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52972ac_delim='%!_!# '
52973for ac_last_try in false false false false false :; do
52974  . ./conf$$subs.sh ||
52975    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52976
52977  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52978  if test $ac_delim_n = $ac_delim_num; then
52979    break
52980  elif $ac_last_try; then
52981    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52982  else
52983    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52984  fi
52985done
52986rm -f conf$$subs.sh
52987
52988cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52989cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52990_ACEOF
52991sed -n '
52992h
52993s/^/S["/; s/!.*/"]=/
52994p
52995g
52996s/^[^!]*!//
52997:repl
52998t repl
52999s/'"$ac_delim"'$//
53000t delim
53001:nl
53002h
53003s/\(.\{148\}\)..*/\1/
53004t more1
53005s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53006p
53007n
53008b repl
53009:more1
53010s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53011p
53012g
53013s/.\{148\}//
53014t nl
53015:delim
53016h
53017s/\(.\{148\}\)..*/\1/
53018t more2
53019s/["\\]/\\&/g; s/^/"/; s/$/"/
53020p
53021b
53022:more2
53023s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53024p
53025g
53026s/.\{148\}//
53027t delim
53028' <conf$$subs.awk | sed '
53029/^[^""]/{
53030  N
53031  s/\n//
53032}
53033' >>$CONFIG_STATUS || ac_write_fail=1
53034rm -f conf$$subs.awk
53035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53036_ACAWK
53037cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53038  for (key in S) S_is_set[key] = 1
53039  FS = ""
53040
53041}
53042{
53043  line = $ 0
53044  nfields = split(line, field, "@")
53045  substed = 0
53046  len = length(field[1])
53047  for (i = 2; i < nfields; i++) {
53048    key = field[i]
53049    keylen = length(key)
53050    if (S_is_set[key]) {
53051      value = S[key]
53052      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53053      len += length(value) + length(field[++i])
53054      substed = 1
53055    } else
53056      len += 1 + keylen
53057  }
53058
53059  print line
53060}
53061
53062_ACAWK
53063_ACEOF
53064cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53065if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
53066  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
53067else
53068  cat
53069fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
53070  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
53071_ACEOF
53072
53073# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
53074# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
53075# trailing colons and then remove the whole line if VPATH becomes empty
53076# (actually we leave an empty line to preserve line numbers).
53077if test "x$srcdir" = x.; then
53078  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
53079h
53080s///
53081s/^/:/
53082s/[	 ]*$/:/
53083s/:\$(srcdir):/:/g
53084s/:\${srcdir}:/:/g
53085s/:@srcdir@:/:/g
53086s/^:*//
53087s/:*$//
53088x
53089s/\(=[	 ]*\).*/\1/
53090G
53091s/\n//
53092s/^[^=]*=[	 ]*$//
53093}'
53094fi
53095
53096cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53097fi # test -n "$CONFIG_FILES"
53098
53099
53100eval set X "  :F $CONFIG_FILES      "
53101shift
53102for ac_tag
53103do
53104  case $ac_tag in
53105  :[FHLC]) ac_mode=$ac_tag; continue;;
53106  esac
53107  case $ac_mode$ac_tag in
53108  :[FHL]*:*);;
53109  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
53110  :[FH]-) ac_tag=-:-;;
53111  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
53112  esac
53113  ac_save_IFS=$IFS
53114  IFS=:
53115  set x $ac_tag
53116  IFS=$ac_save_IFS
53117  shift
53118  ac_file=$1
53119  shift
53120
53121  case $ac_mode in
53122  :L) ac_source=$1;;
53123  :[FH])
53124    ac_file_inputs=
53125    for ac_f
53126    do
53127      case $ac_f in
53128      -) ac_f="$ac_tmp/stdin";;
53129      *) # Look for the file first in the build tree, then in the source tree
53130	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
53131	 # because $ac_f cannot contain `:'.
53132	 test -f "$ac_f" ||
53133	   case $ac_f in
53134	   [\\/$]*) false;;
53135	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
53136	   esac ||
53137	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
53138      esac
53139      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
53140      as_fn_append ac_file_inputs " '$ac_f'"
53141    done
53142
53143    # Let's still pretend it is `configure' which instantiates (i.e., don't
53144    # use $as_me), people would be surprised to read:
53145    #    /* config.h.  Generated by config.status.  */
53146    configure_input='Generated from '`
53147	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
53148	`' by configure.'
53149    if test x"$ac_file" != x-; then
53150      configure_input="$ac_file.  $configure_input"
53151      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
53152$as_echo "$as_me: creating $ac_file" >&6;}
53153    fi
53154    # Neutralize special characters interpreted by sed in replacement strings.
53155    case $configure_input in #(
53156    *\&* | *\|* | *\\* )
53157       ac_sed_conf_input=`$as_echo "$configure_input" |
53158       sed 's/[\\\\&|]/\\\\&/g'`;; #(
53159    *) ac_sed_conf_input=$configure_input;;
53160    esac
53161
53162    case $ac_tag in
53163    *:-:* | *:-) cat >"$ac_tmp/stdin" \
53164      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
53165    esac
53166    ;;
53167  esac
53168
53169  ac_dir=`$as_dirname -- "$ac_file" ||
53170$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53171	 X"$ac_file" : 'X\(//\)[^/]' \| \
53172	 X"$ac_file" : 'X\(//\)$' \| \
53173	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
53174$as_echo X"$ac_file" |
53175    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53176	    s//\1/
53177	    q
53178	  }
53179	  /^X\(\/\/\)[^/].*/{
53180	    s//\1/
53181	    q
53182	  }
53183	  /^X\(\/\/\)$/{
53184	    s//\1/
53185	    q
53186	  }
53187	  /^X\(\/\).*/{
53188	    s//\1/
53189	    q
53190	  }
53191	  s/.*/./; q'`
53192  as_dir="$ac_dir"; as_fn_mkdir_p
53193  ac_builddir=.
53194
53195case "$ac_dir" in
53196.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
53197*)
53198  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
53199  # A ".." for each directory in $ac_dir_suffix.
53200  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
53201  case $ac_top_builddir_sub in
53202  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
53203  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
53204  esac ;;
53205esac
53206ac_abs_top_builddir=$ac_pwd
53207ac_abs_builddir=$ac_pwd$ac_dir_suffix
53208# for backward compatibility:
53209ac_top_builddir=$ac_top_build_prefix
53210
53211case $srcdir in
53212  .)  # We are building in place.
53213    ac_srcdir=.
53214    ac_top_srcdir=$ac_top_builddir_sub
53215    ac_abs_top_srcdir=$ac_pwd ;;
53216  [\\/]* | ?:[\\/]* )  # Absolute name.
53217    ac_srcdir=$srcdir$ac_dir_suffix;
53218    ac_top_srcdir=$srcdir
53219    ac_abs_top_srcdir=$srcdir ;;
53220  *) # Relative name.
53221    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
53222    ac_top_srcdir=$ac_top_build_prefix$srcdir
53223    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
53224esac
53225ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
53226
53227
53228  case $ac_mode in
53229  :F)
53230  #
53231  # CONFIG_FILE
53232  #
53233
53234_ACEOF
53235
53236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53237# If the template does not know about datarootdir, expand it.
53238# FIXME: This hack should be removed a few years after 2.60.
53239ac_datarootdir_hack=; ac_datarootdir_seen=
53240ac_sed_dataroot='
53241/datarootdir/ {
53242  p
53243  q
53244}
53245/@datadir@/p
53246/@docdir@/p
53247/@infodir@/p
53248/@localedir@/p
53249/@mandir@/p'
53250case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
53251*datarootdir*) ac_datarootdir_seen=yes;;
53252*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
53253  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
53254$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
53255_ACEOF
53256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53257  ac_datarootdir_hack='
53258  s&@datadir@&$datadir&g
53259  s&@docdir@&$docdir&g
53260  s&@infodir@&$infodir&g
53261  s&@localedir@&$localedir&g
53262  s&@mandir@&$mandir&g
53263  s&\\\${datarootdir}&$datarootdir&g' ;;
53264esac
53265_ACEOF
53266
53267# Neutralize VPATH when `$srcdir' = `.'.
53268# Shell code in configure.ac might set extrasub.
53269# FIXME: do we really want to maintain this feature?
53270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53271ac_sed_extra="$ac_vpsub
53272$extrasub
53273_ACEOF
53274cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53275:t
53276/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
53277s|@configure_input@|$ac_sed_conf_input|;t t
53278s&@top_builddir@&$ac_top_builddir_sub&;t t
53279s&@top_build_prefix@&$ac_top_build_prefix&;t t
53280s&@srcdir@&$ac_srcdir&;t t
53281s&@abs_srcdir@&$ac_abs_srcdir&;t t
53282s&@top_srcdir@&$ac_top_srcdir&;t t
53283s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
53284s&@builddir@&$ac_builddir&;t t
53285s&@abs_builddir@&$ac_abs_builddir&;t t
53286s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
53287$ac_datarootdir_hack
53288"
53289eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
53290  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53291
53292test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
53293  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
53294  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
53295      "$ac_tmp/out"`; test -z "$ac_out"; } &&
53296  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53297which seems to be undefined.  Please make sure it is defined" >&5
53298$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
53299which seems to be undefined.  Please make sure it is defined" >&2;}
53300
53301  rm -f "$ac_tmp/stdin"
53302  case $ac_file in
53303  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
53304  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
53305  esac \
53306  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
53307 ;;
53308
53309
53310
53311  esac
53312
53313done # for ac_tag
53314
53315
53316as_fn_exit 0
53317_ACEOF
53318ac_clean_files=$ac_clean_files_save
53319
53320test $ac_write_fail = 0 ||
53321  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
53322
53323
53324# configure is writing to config.log, and then calls config.status.
53325# config.status does its own redirection, appending to config.log.
53326# Unfortunately, on DOS this fails, as config.log is still kept open
53327# by configure, so config.status won't be able to write to it; its
53328# output is simply discarded.  So we exec the FD to /dev/null,
53329# effectively closing config.log, so it can be properly (re)opened and
53330# appended to by config.status.  When coming back to configure, we
53331# need to make the FD available again.
53332if test "$no_create" != yes; then
53333  ac_cs_success=:
53334  ac_config_status_args=
53335  test "$silent" = yes &&
53336    ac_config_status_args="$ac_config_status_args --quiet"
53337  exec 5>/dev/null
53338  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53339  exec 5>>config.log
53340  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53341  # would make configure fail if this is the last instruction.
53342  $ac_cs_success || as_fn_exit 1
53343fi
53344if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53345  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53346$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53347fi
53348
53349
53350# Try to move the config.log file to the output directory.
53351if test -e ./config.log; then
53352  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
53353fi
53354
53355# Make the compare script executable
53356$CHMOD +x $OUTPUT_ROOT/compare.sh
53357
53358# Finally output some useful information to the user
53359
53360  # Finally output some useful information to the user
53361
53362  printf "\n"
53363  printf "====================================================\n"
53364  if test "x$no_create" != "xyes"; then
53365    if test "x$IS_RECONFIGURE" != "xyes"; then
53366      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
53367    else
53368      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
53369    fi
53370  else
53371    if test "x$IS_RECONFIGURE" != "xyes"; then
53372      printf "A configuration has been successfully checked but not created\n"
53373    else
53374      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
53375    fi
53376  fi
53377  if test "x$CONFIGURE_COMMAND_LINE" != x; then
53378    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53379  else
53380    printf "using default settings.\n"
53381  fi
53382
53383  printf "\n"
53384  printf "Configuration summary:\n"
53385  printf "* Debug level:    $DEBUG_LEVEL\n"
53386  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
53387  printf "* JDK variant:    $JDK_VARIANT\n"
53388  printf "* JVM variants:   $with_jvm_variants\n"
53389  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53390
53391  printf "\n"
53392  printf "Tools summary:\n"
53393  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53394    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53395  fi
53396  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53397  if test "x$TOOLCHAIN_VERSION" != "x"; then
53398    print_version=" $TOOLCHAIN_VERSION"
53399  fi
53400  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
53401  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53402  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53403
53404  printf "\n"
53405  printf "Build performance summary:\n"
53406  printf "* Cores to use:   $JOBS\n"
53407  printf "* Memory limit:   $MEMORY_SIZE MB\n"
53408  if test "x$CCACHE_STATUS" != "x"; then
53409    printf "* ccache status:  $CCACHE_STATUS\n"
53410  fi
53411  printf "\n"
53412
53413  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53414    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53415    printf "will result in longer build times.\n"
53416    printf "\n"
53417  fi
53418
53419  if test "x$FOUND_ALT_VARIABLES" != "x"; then
53420    printf "WARNING: You have old-style ALT_ environment variables set.\n"
53421    printf "These are not respected, and will be ignored. It is recommended\n"
53422    printf "that you clean your environment. The following variables are set:\n"
53423    printf "$FOUND_ALT_VARIABLES\n"
53424    printf "\n"
53425  fi
53426
53427  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53428    printf "WARNING: Your build output directory is not on a local disk.\n"
53429    printf "This will severely degrade build performance!\n"
53430    printf "It is recommended that you create an output directory on a local disk,\n"
53431    printf "and run the configure script again from that directory.\n"
53432    printf "\n"
53433  fi
53434
53435  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
53436    printf "WARNING: The result of this configuration has overridden an older\n"
53437    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53438    printf "proper build. Failure to do so might result in strange build problems.\n"
53439    printf "\n"
53440  fi
53441
53442  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
53443    printf "WARNING: The result of this configuration was not saved.\n"
53444    printf "You should run without '--no-create | -n' to create the configuration.\n"
53445    printf "\n"
53446  fi
53447
53448
53449
53450if test -e "$OUTPUT_ROOT/config.log"; then
53451  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
53452  if test $? -eq 0; then
53453    printf "The following warnings were produced. Repeated here for convenience:\n"
53454    # We must quote sed expression (using []) to stop m4 from eating the [].
53455    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
53456    printf "\n"
53457  fi
53458fi
53459
53460
53461