generated-configure.sh revision 1352:b052cb38b985
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
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCR_DLL
649LIBCXX
650LLVM_LIBS
651LLVM_LDFLAGS
652LLVM_CFLAGS
653LLVM_CONFIG
654LIBFFI_LIBS
655LIBFFI_CFLAGS
656STATIC_CXX_SETTING
657LIBDL
658LIBM
659LIBZIP_CAN_USE_MMAP
660USE_EXTERNAL_LIBZ
661USE_EXTERNAL_LIBPNG
662PNG_LIBS
663PNG_CFLAGS
664USE_EXTERNAL_LCMS
665LCMS_LIBS
666LCMS_CFLAGS
667USE_EXTERNAL_LIBGIF
668USE_EXTERNAL_LIBJPEG
669ALSA_LIBS
670ALSA_CFLAGS
671FREETYPE_BUNDLE_LIB_PATH
672FREETYPE_LIBS
673FREETYPE_CFLAGS
674CUPS_CFLAGS
675X_EXTRA_LIBS
676X_LIBS
677X_PRE_LIBS
678X_CFLAGS
679XMKMF
680FIXPATH
681ZIP_DEBUGINFO_FILES
682ENABLE_DEBUG_SYMBOLS
683CFLAGS_WARNINGS_ARE_ERRORS
684COMPILER_SUPPORTS_TARGET_BITS_FLAG
685ZERO_ARCHFLAG
686LDFLAGS_CXX_JDK
687LDFLAGS_JDKEXE_SUFFIX
688LDFLAGS_JDKLIB_SUFFIX
689LDFLAGS_JDKEXE
690LDFLAGS_JDKLIB
691CXXFLAGS_JDKEXE
692CXXFLAGS_JDKLIB
693CFLAGS_JDKEXE
694CFLAGS_JDKLIB
695MACOSX_VERSION_MIN
696LEGACY_EXTRA_LDFLAGS
697LEGACY_EXTRA_CXXFLAGS
698LEGACY_EXTRA_CFLAGS
699CXX_O_FLAG_NONE
700CXX_O_FLAG_DEBUG
701CXX_O_FLAG_NORM
702CXX_O_FLAG_HI
703CXX_O_FLAG_HIGHEST
704C_O_FLAG_NONE
705C_O_FLAG_DEBUG
706C_O_FLAG_NORM
707C_O_FLAG_HI
708C_O_FLAG_HIGHEST
709CXXFLAGS_DEBUG_OPTIONS
710CFLAGS_DEBUG_OPTIONS
711CXXFLAGS_DEBUG_SYMBOLS
712CFLAGS_DEBUG_SYMBOLS
713CXX_FLAG_DEPS
714C_FLAG_DEPS
715SET_SHARED_LIBRARY_MAPFILE
716SET_SHARED_LIBRARY_NAME
717SET_SHARED_LIBRARY_ORIGIN
718SET_EXECUTABLE_ORIGIN
719SHARED_LIBRARY_FLAGS
720CXX_FLAG_REORDER
721C_FLAG_REORDER
722SYSROOT_LDFLAGS
723SYSROOT_CFLAGS
724RC_FLAGS
725AR_OUT_OPTION
726LD_OUT_OPTION
727EXE_OUT_OPTION
728CC_OUT_OPTION
729POST_MCS_CMD
730POST_STRIP_CMD
731ARFLAGS
732COMPILER_TARGET_BITS_FLAG
733JT_HOME
734JTREGEXE
735USING_BROKEN_SUSE_LD
736PACKAGE_PATH
737LDEXECXX
738LDEXE
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747ac_ct_OBJDUMP
748OBJDUMP
749ac_ct_OBJCOPY
750OBJCOPY
751ac_ct_NM
752ac_ct_STRIP
753MCS
754GNM
755NM
756STRIP
757MSBUILD
758DUMPBIN
759RC
760MT
761LIPO
762ac_ct_OBJC
763OBJCFLAGS
764OBJC
765ac_ct_AR
766AR
767AS
768LDCXX
769LD
770CXXCPP
771CPP
772ac_ct_CXX
773CXXFLAGS
774CXX
775ac_ct_PROPER_COMPILER_CXX
776PROPER_COMPILER_CXX
777TOOLCHAIN_PATH_CXX
778POTENTIAL_CXX
779OBJEXT
780EXEEXT
781ac_ct_CC
782CPPFLAGS
783LDFLAGS
784CFLAGS
785CC
786ac_ct_PROPER_COMPILER_CC
787PROPER_COMPILER_CC
788TOOLCHAIN_PATH_CC
789POTENTIAL_CC
790VS_LIB
791VS_INCLUDE
792VS_PATH
793CYGWIN_LINK
794EXE_SUFFIX
795OBJ_SUFFIX
796STATIC_LIBRARY
797SHARED_LIBRARY
798STATIC_LIBRARY_SUFFIX
799SHARED_LIBRARY_SUFFIX
800LIBRARY_PREFIX
801TOOLCHAIN_TYPE
802BUILD_HOTSPOT
803HOTSPOT_DIST
804BUILD_OUTPUT
805OVERRIDE_SRC_ROOT
806ADD_SRC_ROOT
807JDK_TOPDIR
808NASHORN_TOPDIR
809HOTSPOT_TOPDIR
810JAXWS_TOPDIR
811JAXP_TOPDIR
812CORBA_TOPDIR
813LANGTOOLS_TOPDIR
814JAVAC_FLAGS
815BOOT_JDK_SOURCETARGET
816JARSIGNER
817NATIVE2ASCII
818JAR
819JAVAH
820JAVAC
821JAVA
822BOOT_JDK
823JAVA_CHECK
824JAVAC_CHECK
825COOKED_BUILD_NUMBER
826JDK_VERSION
827COPYRIGHT_YEAR
828MACOSX_BUNDLE_ID_BASE
829MACOSX_BUNDLE_NAME_BASE
830COMPANY_NAME
831JDK_RC_PLATFORM_NAME
832PRODUCT_SUFFIX
833PRODUCT_NAME
834LAUNCHER_NAME
835MILESTONE
836JDK_BUILD_NUMBER
837JDK_UPDATE_VERSION
838JDK_MICRO_VERSION
839JDK_MINOR_VERSION
840JDK_MAJOR_VERSION
841USER_RELEASE_SUFFIX
842COMPRESS_JARS
843RMICONNECTOR_IIOP
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856CODESIGN
857XATTR
858DSYMUTIL
859IS_GNU_TIME
860TIME
861STAT
862HG
863READELF
864OTOOL
865LDD
866ZIP
867UNZIP
868FIND_DELETE
869OUTPUT_SYNC
870OUTPUT_SYNC_SUPPORTED
871MAKE
872CHECK_TOOLSDIR_MAKE
873CHECK_TOOLSDIR_GMAKE
874CHECK_MAKE
875CHECK_GMAKE
876PKGHANDLER
877OUTPUT_ROOT
878CONF_NAME
879SPEC
880SDKROOT
881XCODEBUILD
882BUILD_VARIANT_RELEASE
883DEBUG_CLASSFILES
884FASTDEBUG
885VARIANT
886DEBUG_LEVEL
887MACOSX_UNIVERSAL
888INCLUDE_SA
889JVM_VARIANT_CORE
890JVM_VARIANT_ZEROSHARK
891JVM_VARIANT_ZERO
892JVM_VARIANT_KERNEL
893JVM_VARIANT_MINIMAL1
894JVM_VARIANT_CLIENT
895JVM_VARIANT_SERVER
896JVM_VARIANTS
897JVM_INTERPRETER
898JDK_VARIANT
899SET_OPENJDK
900BUILD_LOG_WRAPPER
901BUILD_LOG_PREVIOUS
902BUILD_LOG
903TOPDIR
904PATH_SEP
905ZERO_ARCHDEF
906DEFINE_CROSS_COMPILE_ARCH
907LP64
908OPENJDK_TARGET_OS_EXPORT_DIR
909OPENJDK_TARGET_CPU_JLI_CFLAGS
910OPENJDK_TARGET_CPU_OSARCH
911OPENJDK_TARGET_CPU_ISADIR
912OPENJDK_TARGET_CPU_LIBDIR
913OPENJDK_TARGET_CPU_LEGACY_LIB
914OPENJDK_TARGET_CPU_LEGACY
915REQUIRED_OS_VERSION
916REQUIRED_OS_NAME
917COMPILE_TYPE
918OPENJDK_TARGET_CPU_ENDIAN
919OPENJDK_TARGET_CPU_BITS
920OPENJDK_TARGET_CPU_ARCH
921OPENJDK_TARGET_CPU
922OPENJDK_TARGET_OS_ENV
923OPENJDK_TARGET_OS_TYPE
924OPENJDK_TARGET_OS
925OPENJDK_BUILD_CPU_ENDIAN
926OPENJDK_BUILD_CPU_BITS
927OPENJDK_BUILD_CPU_ARCH
928OPENJDK_BUILD_CPU
929OPENJDK_BUILD_OS_ENV
930OPENJDK_BUILD_OS_TYPE
931OPENJDK_BUILD_OS
932OPENJDK_BUILD_AUTOCONF_NAME
933OPENJDK_TARGET_AUTOCONF_NAME
934target_os
935target_vendor
936target_cpu
937target
938host_os
939host_vendor
940host_cpu
941host
942build_os
943build_vendor
944build_cpu
945build
946CPIO
947SETFILE
948DF
949READLINK
950CYGPATH
951SED
952FGREP
953EGREP
954GREP
955AWK
956XARGS
957WHICH
958WC
959UNIQ
960UNAME
961TR
962TOUCH
963TEE
964TAR
965TAIL
966SORT
967SH
968RM
969PRINTF
970NAWK
971MV
972MKTEMP
973MKDIR
974LS
975LN
976HEAD
977FIND
978FILE
979EXPR
980ECHO
981DIRNAME
982DIFF
983DATE
984CUT
985CP
986COMM
987CMP
988CHMOD
989CAT
990BASH
991BASENAME
992DATE_WHEN_CONFIGURED
993CONFIGURE_COMMAND_LINE
994target_alias
995host_alias
996build_alias
997LIBS
998ECHO_T
999ECHO_N
1000ECHO_C
1001DEFS
1002mandir
1003localedir
1004libdir
1005psdir
1006pdfdir
1007dvidir
1008htmldir
1009infodir
1010docdir
1011oldincludedir
1012includedir
1013localstatedir
1014sharedstatedir
1015sysconfdir
1016datadir
1017datarootdir
1018libexecdir
1019sbindir
1020bindir
1021program_transform_name
1022prefix
1023exec_prefix
1024PACKAGE_URL
1025PACKAGE_BUGREPORT
1026PACKAGE_STRING
1027PACKAGE_VERSION
1028PACKAGE_TARNAME
1029PACKAGE_NAME
1030PATH_SEPARATOR
1031SHELL'
1032ac_subst_files=''
1033ac_user_opts='
1034enable_option_checking
1035with_target_bits
1036enable_openjdk_only
1037with_custom_make_dir
1038with_jdk_variant
1039with_jvm_interpreter
1040with_jvm_variants
1041enable_debug
1042with_debug_level
1043with_devkit
1044with_sys_root
1045with_sysroot
1046with_tools_dir
1047with_toolchain_path
1048with_extra_path
1049with_sdk_name
1050with_conf_name
1051with_output_sync
1052with_builddeps_conf
1053with_builddeps_server
1054with_builddeps_dir
1055with_builddeps_group
1056enable_headful
1057enable_hotspot_test_in_build
1058with_cacerts_file
1059enable_unlimited_crypto
1060enable_rmiconnector_iiop
1061with_milestone
1062with_update_version
1063with_user_release_suffix
1064with_build_number
1065with_copyright_year
1066with_boot_jdk
1067with_add_source_root
1068with_override_source_root
1069with_adds_and_overrides
1070with_override_langtools
1071with_override_corba
1072with_override_jaxp
1073with_override_jaxws
1074with_override_hotspot
1075with_override_nashorn
1076with_override_jdk
1077with_import_hotspot
1078with_toolchain_type
1079with_jtreg
1080with_extra_cflags
1081with_extra_cxxflags
1082with_extra_ldflags
1083enable_debug_symbols
1084enable_zip_debug_info
1085with_x
1086with_cups
1087with_cups_include
1088with_freetype
1089with_freetype_include
1090with_freetype_lib
1091with_freetype_src
1092enable_freetype_bundling
1093with_alsa
1094with_alsa_include
1095with_alsa_lib
1096with_libjpeg
1097with_giflib
1098with_lcms
1099with_libpng
1100with_zlib
1101with_stdc__lib
1102with_msvcr_dll
1103with_dxsdk
1104with_dxsdk_lib
1105with_dxsdk_include
1106with_num_cores
1107with_memory_size
1108with_jobs
1109with_boot_jdk_jvmargs
1110with_sjavac_server_java
1111enable_sjavac
1112enable_precompiled_headers
1113enable_ccache
1114with_ccache_dir
1115'
1116      ac_precious_vars='build_alias
1117host_alias
1118target_alias
1119BASENAME
1120BASH
1121CAT
1122CHMOD
1123CMP
1124COMM
1125CP
1126CUT
1127DATE
1128DIFF
1129DIRNAME
1130ECHO
1131EXPR
1132FILE
1133FIND
1134HEAD
1135LN
1136LS
1137MKDIR
1138MKTEMP
1139MV
1140NAWK
1141PRINTF
1142RM
1143SH
1144SORT
1145TAIL
1146TAR
1147TEE
1148TOUCH
1149TR
1150UNAME
1151UNIQ
1152WC
1153WHICH
1154XARGS
1155AWK
1156GREP
1157EGREP
1158FGREP
1159SED
1160CYGPATH
1161READLINK
1162DF
1163SETFILE
1164CPIO
1165UNZIP
1166ZIP
1167LDD
1168OTOOL
1169READELF
1170HG
1171STAT
1172TIME
1173DSYMUTIL
1174XATTR
1175CODESIGN
1176PKG_CONFIG
1177JAVA
1178JAVAC
1179JAVAH
1180JAR
1181NATIVE2ASCII
1182JARSIGNER
1183CC
1184CFLAGS
1185LDFLAGS
1186LIBS
1187CPPFLAGS
1188CXX
1189CXXFLAGS
1190CCC
1191CPP
1192CXXCPP
1193AS
1194AR
1195OBJC
1196OBJCFLAGS
1197LIPO
1198STRIP
1199NM
1200GNM
1201MCS
1202OBJCOPY
1203OBJDUMP
1204BUILD_CC
1205BUILD_CXX
1206BUILD_LD
1207JTREGEXE
1208XMKMF
1209FREETYPE_CFLAGS
1210FREETYPE_LIBS
1211ALSA_CFLAGS
1212ALSA_LIBS
1213LCMS_CFLAGS
1214LCMS_LIBS
1215PNG_CFLAGS
1216PNG_LIBS
1217LIBFFI_CFLAGS
1218LIBFFI_LIBS
1219CCACHE'
1220
1221
1222# Initialize some variables set by options.
1223ac_init_help=
1224ac_init_version=false
1225ac_unrecognized_opts=
1226ac_unrecognized_sep=
1227# The variables have the same names as the options, with
1228# dashes changed to underlines.
1229cache_file=/dev/null
1230exec_prefix=NONE
1231no_create=
1232no_recursion=
1233prefix=NONE
1234program_prefix=NONE
1235program_suffix=NONE
1236program_transform_name=s,x,x,
1237silent=
1238site=
1239srcdir=
1240verbose=
1241x_includes=NONE
1242x_libraries=NONE
1243
1244# Installation directory options.
1245# These are left unexpanded so users can "make install exec_prefix=/foo"
1246# and all the variables that are supposed to be based on exec_prefix
1247# by default will actually change.
1248# Use braces instead of parens because sh, perl, etc. also accept them.
1249# (The list follows the same order as the GNU Coding Standards.)
1250bindir='${exec_prefix}/bin'
1251sbindir='${exec_prefix}/sbin'
1252libexecdir='${exec_prefix}/libexec'
1253datarootdir='${prefix}/share'
1254datadir='${datarootdir}'
1255sysconfdir='${prefix}/etc'
1256sharedstatedir='${prefix}/com'
1257localstatedir='${prefix}/var'
1258includedir='${prefix}/include'
1259oldincludedir='/usr/include'
1260docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1261infodir='${datarootdir}/info'
1262htmldir='${docdir}'
1263dvidir='${docdir}'
1264pdfdir='${docdir}'
1265psdir='${docdir}'
1266libdir='${exec_prefix}/lib'
1267localedir='${datarootdir}/locale'
1268mandir='${datarootdir}/man'
1269
1270ac_prev=
1271ac_dashdash=
1272for ac_option
1273do
1274  # If the previous option needs an argument, assign it.
1275  if test -n "$ac_prev"; then
1276    eval $ac_prev=\$ac_option
1277    ac_prev=
1278    continue
1279  fi
1280
1281  case $ac_option in
1282  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1283  *=)   ac_optarg= ;;
1284  *)    ac_optarg=yes ;;
1285  esac
1286
1287  # Accept the important Cygnus configure options, so we can diagnose typos.
1288
1289  case $ac_dashdash$ac_option in
1290  --)
1291    ac_dashdash=yes ;;
1292
1293  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1294    ac_prev=bindir ;;
1295  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1296    bindir=$ac_optarg ;;
1297
1298  -build | --build | --buil | --bui | --bu)
1299    ac_prev=build_alias ;;
1300  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1301    build_alias=$ac_optarg ;;
1302
1303  -cache-file | --cache-file | --cache-fil | --cache-fi \
1304  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1305    ac_prev=cache_file ;;
1306  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1307  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1308    cache_file=$ac_optarg ;;
1309
1310  --config-cache | -C)
1311    cache_file=config.cache ;;
1312
1313  -datadir | --datadir | --datadi | --datad)
1314    ac_prev=datadir ;;
1315  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1316    datadir=$ac_optarg ;;
1317
1318  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1319  | --dataroo | --dataro | --datar)
1320    ac_prev=datarootdir ;;
1321  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1322  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1323    datarootdir=$ac_optarg ;;
1324
1325  -disable-* | --disable-*)
1326    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1327    # Reject names that are not valid shell variable names.
1328    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1329      as_fn_error $? "invalid feature name: $ac_useropt"
1330    ac_useropt_orig=$ac_useropt
1331    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1332    case $ac_user_opts in
1333      *"
1334"enable_$ac_useropt"
1335"*) ;;
1336      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1337	 ac_unrecognized_sep=', ';;
1338    esac
1339    eval enable_$ac_useropt=no ;;
1340
1341  -docdir | --docdir | --docdi | --doc | --do)
1342    ac_prev=docdir ;;
1343  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1344    docdir=$ac_optarg ;;
1345
1346  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1347    ac_prev=dvidir ;;
1348  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1349    dvidir=$ac_optarg ;;
1350
1351  -enable-* | --enable-*)
1352    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1353    # Reject names that are not valid shell variable names.
1354    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1355      as_fn_error $? "invalid feature name: $ac_useropt"
1356    ac_useropt_orig=$ac_useropt
1357    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1358    case $ac_user_opts in
1359      *"
1360"enable_$ac_useropt"
1361"*) ;;
1362      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1363	 ac_unrecognized_sep=', ';;
1364    esac
1365    eval enable_$ac_useropt=\$ac_optarg ;;
1366
1367  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1368  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1369  | --exec | --exe | --ex)
1370    ac_prev=exec_prefix ;;
1371  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1372  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1373  | --exec=* | --exe=* | --ex=*)
1374    exec_prefix=$ac_optarg ;;
1375
1376  -gas | --gas | --ga | --g)
1377    # Obsolete; use --with-gas.
1378    with_gas=yes ;;
1379
1380  -help | --help | --hel | --he | -h)
1381    ac_init_help=long ;;
1382  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1383    ac_init_help=recursive ;;
1384  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1385    ac_init_help=short ;;
1386
1387  -host | --host | --hos | --ho)
1388    ac_prev=host_alias ;;
1389  -host=* | --host=* | --hos=* | --ho=*)
1390    host_alias=$ac_optarg ;;
1391
1392  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1393    ac_prev=htmldir ;;
1394  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1395  | --ht=*)
1396    htmldir=$ac_optarg ;;
1397
1398  -includedir | --includedir | --includedi | --included | --include \
1399  | --includ | --inclu | --incl | --inc)
1400    ac_prev=includedir ;;
1401  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1402  | --includ=* | --inclu=* | --incl=* | --inc=*)
1403    includedir=$ac_optarg ;;
1404
1405  -infodir | --infodir | --infodi | --infod | --info | --inf)
1406    ac_prev=infodir ;;
1407  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1408    infodir=$ac_optarg ;;
1409
1410  -libdir | --libdir | --libdi | --libd)
1411    ac_prev=libdir ;;
1412  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1413    libdir=$ac_optarg ;;
1414
1415  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1416  | --libexe | --libex | --libe)
1417    ac_prev=libexecdir ;;
1418  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1419  | --libexe=* | --libex=* | --libe=*)
1420    libexecdir=$ac_optarg ;;
1421
1422  -localedir | --localedir | --localedi | --localed | --locale)
1423    ac_prev=localedir ;;
1424  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1425    localedir=$ac_optarg ;;
1426
1427  -localstatedir | --localstatedir | --localstatedi | --localstated \
1428  | --localstate | --localstat | --localsta | --localst | --locals)
1429    ac_prev=localstatedir ;;
1430  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1431  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1432    localstatedir=$ac_optarg ;;
1433
1434  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1435    ac_prev=mandir ;;
1436  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1437    mandir=$ac_optarg ;;
1438
1439  -nfp | --nfp | --nf)
1440    # Obsolete; use --without-fp.
1441    with_fp=no ;;
1442
1443  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1444  | --no-cr | --no-c | -n)
1445    no_create=yes ;;
1446
1447  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1448  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1449    no_recursion=yes ;;
1450
1451  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1452  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1453  | --oldin | --oldi | --old | --ol | --o)
1454    ac_prev=oldincludedir ;;
1455  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1456  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1457  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1458    oldincludedir=$ac_optarg ;;
1459
1460  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1461    ac_prev=prefix ;;
1462  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1463    prefix=$ac_optarg ;;
1464
1465  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1466  | --program-pre | --program-pr | --program-p)
1467    ac_prev=program_prefix ;;
1468  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1469  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1470    program_prefix=$ac_optarg ;;
1471
1472  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1473  | --program-suf | --program-su | --program-s)
1474    ac_prev=program_suffix ;;
1475  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1476  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1477    program_suffix=$ac_optarg ;;
1478
1479  -program-transform-name | --program-transform-name \
1480  | --program-transform-nam | --program-transform-na \
1481  | --program-transform-n | --program-transform- \
1482  | --program-transform | --program-transfor \
1483  | --program-transfo | --program-transf \
1484  | --program-trans | --program-tran \
1485  | --progr-tra | --program-tr | --program-t)
1486    ac_prev=program_transform_name ;;
1487  -program-transform-name=* | --program-transform-name=* \
1488  | --program-transform-nam=* | --program-transform-na=* \
1489  | --program-transform-n=* | --program-transform-=* \
1490  | --program-transform=* | --program-transfor=* \
1491  | --program-transfo=* | --program-transf=* \
1492  | --program-trans=* | --program-tran=* \
1493  | --progr-tra=* | --program-tr=* | --program-t=*)
1494    program_transform_name=$ac_optarg ;;
1495
1496  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1497    ac_prev=pdfdir ;;
1498  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1499    pdfdir=$ac_optarg ;;
1500
1501  -psdir | --psdir | --psdi | --psd | --ps)
1502    ac_prev=psdir ;;
1503  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1504    psdir=$ac_optarg ;;
1505
1506  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1507  | -silent | --silent | --silen | --sile | --sil)
1508    silent=yes ;;
1509
1510  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1511    ac_prev=sbindir ;;
1512  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1513  | --sbi=* | --sb=*)
1514    sbindir=$ac_optarg ;;
1515
1516  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1517  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1518  | --sharedst | --shareds | --shared | --share | --shar \
1519  | --sha | --sh)
1520    ac_prev=sharedstatedir ;;
1521  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1522  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1523  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1524  | --sha=* | --sh=*)
1525    sharedstatedir=$ac_optarg ;;
1526
1527  -site | --site | --sit)
1528    ac_prev=site ;;
1529  -site=* | --site=* | --sit=*)
1530    site=$ac_optarg ;;
1531
1532  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1533    ac_prev=srcdir ;;
1534  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1535    srcdir=$ac_optarg ;;
1536
1537  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1538  | --syscon | --sysco | --sysc | --sys | --sy)
1539    ac_prev=sysconfdir ;;
1540  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1541  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1542    sysconfdir=$ac_optarg ;;
1543
1544  -target | --target | --targe | --targ | --tar | --ta | --t)
1545    ac_prev=target_alias ;;
1546  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1547    target_alias=$ac_optarg ;;
1548
1549  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1550    verbose=yes ;;
1551
1552  -version | --version | --versio | --versi | --vers | -V)
1553    ac_init_version=: ;;
1554
1555  -with-* | --with-*)
1556    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1557    # Reject names that are not valid shell variable names.
1558    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1559      as_fn_error $? "invalid package name: $ac_useropt"
1560    ac_useropt_orig=$ac_useropt
1561    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1562    case $ac_user_opts in
1563      *"
1564"with_$ac_useropt"
1565"*) ;;
1566      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1567	 ac_unrecognized_sep=', ';;
1568    esac
1569    eval with_$ac_useropt=\$ac_optarg ;;
1570
1571  -without-* | --without-*)
1572    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1573    # Reject names that are not valid shell variable names.
1574    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1575      as_fn_error $? "invalid package name: $ac_useropt"
1576    ac_useropt_orig=$ac_useropt
1577    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1578    case $ac_user_opts in
1579      *"
1580"with_$ac_useropt"
1581"*) ;;
1582      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1583	 ac_unrecognized_sep=', ';;
1584    esac
1585    eval with_$ac_useropt=no ;;
1586
1587  --x)
1588    # Obsolete; use --with-x.
1589    with_x=yes ;;
1590
1591  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1592  | --x-incl | --x-inc | --x-in | --x-i)
1593    ac_prev=x_includes ;;
1594  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1595  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1596    x_includes=$ac_optarg ;;
1597
1598  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1599  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1600    ac_prev=x_libraries ;;
1601  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1602  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1603    x_libraries=$ac_optarg ;;
1604
1605  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1606Try \`$0 --help' for more information"
1607    ;;
1608
1609  *=*)
1610    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1611    # Reject names that are not valid shell variable names.
1612    case $ac_envvar in #(
1613      '' | [0-9]* | *[!_$as_cr_alnum]* )
1614      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1615    esac
1616    eval $ac_envvar=\$ac_optarg
1617    export $ac_envvar ;;
1618
1619  *)
1620    # FIXME: should be removed in autoconf 3.0.
1621    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1622    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1623      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1624    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1625    ;;
1626
1627  esac
1628done
1629
1630if test -n "$ac_prev"; then
1631  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1632  as_fn_error $? "missing argument to $ac_option"
1633fi
1634
1635if test -n "$ac_unrecognized_opts"; then
1636  case $enable_option_checking in
1637    no) ;;
1638    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1639    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1640  esac
1641fi
1642
1643# Check all directory arguments for consistency.
1644for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1645		datadir sysconfdir sharedstatedir localstatedir includedir \
1646		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1647		libdir localedir mandir
1648do
1649  eval ac_val=\$$ac_var
1650  # Remove trailing slashes.
1651  case $ac_val in
1652    */ )
1653      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1654      eval $ac_var=\$ac_val;;
1655  esac
1656  # Be sure to have absolute directory names.
1657  case $ac_val in
1658    [\\/$]* | ?:[\\/]* )  continue;;
1659    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1660  esac
1661  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1662done
1663
1664# There might be people who depend on the old broken behavior: `$host'
1665# used to hold the argument of --host etc.
1666# FIXME: To remove some day.
1667build=$build_alias
1668host=$host_alias
1669target=$target_alias
1670
1671# FIXME: To remove some day.
1672if test "x$host_alias" != x; then
1673  if test "x$build_alias" = x; then
1674    cross_compiling=maybe
1675  elif test "x$build_alias" != "x$host_alias"; then
1676    cross_compiling=yes
1677  fi
1678fi
1679
1680ac_tool_prefix=
1681test -n "$host_alias" && ac_tool_prefix=$host_alias-
1682
1683test "$silent" = yes && exec 6>/dev/null
1684
1685
1686ac_pwd=`pwd` && test -n "$ac_pwd" &&
1687ac_ls_di=`ls -di .` &&
1688ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1689  as_fn_error $? "working directory cannot be determined"
1690test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1691  as_fn_error $? "pwd does not report name of working directory"
1692
1693
1694# Find the source files, if location was not specified.
1695if test -z "$srcdir"; then
1696  ac_srcdir_defaulted=yes
1697  # Try the directory containing this script, then the parent directory.
1698  ac_confdir=`$as_dirname -- "$as_myself" ||
1699$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1700	 X"$as_myself" : 'X\(//\)[^/]' \| \
1701	 X"$as_myself" : 'X\(//\)$' \| \
1702	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1703$as_echo X"$as_myself" |
1704    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1705	    s//\1/
1706	    q
1707	  }
1708	  /^X\(\/\/\)[^/].*/{
1709	    s//\1/
1710	    q
1711	  }
1712	  /^X\(\/\/\)$/{
1713	    s//\1/
1714	    q
1715	  }
1716	  /^X\(\/\).*/{
1717	    s//\1/
1718	    q
1719	  }
1720	  s/.*/./; q'`
1721  srcdir=$ac_confdir
1722  if test ! -r "$srcdir/$ac_unique_file"; then
1723    srcdir=..
1724  fi
1725else
1726  ac_srcdir_defaulted=no
1727fi
1728if test ! -r "$srcdir/$ac_unique_file"; then
1729  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1730  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1731fi
1732ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1733ac_abs_confdir=`(
1734	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1735	pwd)`
1736# When building in place, set srcdir=.
1737if test "$ac_abs_confdir" = "$ac_pwd"; then
1738  srcdir=.
1739fi
1740# Remove unnecessary trailing slashes from srcdir.
1741# Double slashes in file names in object file debugging info
1742# mess up M-x gdb in Emacs.
1743case $srcdir in
1744*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1745esac
1746for ac_var in $ac_precious_vars; do
1747  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1748  eval ac_env_${ac_var}_value=\$${ac_var}
1749  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1750  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1751done
1752
1753#
1754# Report the --help message.
1755#
1756if test "$ac_init_help" = "long"; then
1757  # Omit some internal or obsolete options to make the list less imposing.
1758  # This message is too long to be a string in the A/UX 3.1 sh.
1759  cat <<_ACEOF
1760\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1761
1762Usage: $0 [OPTION]... [VAR=VALUE]...
1763
1764To assign environment variables (e.g., CC, CFLAGS...), specify them as
1765VAR=VALUE.  See below for descriptions of some of the useful variables.
1766
1767Defaults for the options are specified in brackets.
1768
1769Configuration:
1770  -h, --help              display this help and exit
1771      --help=short        display options specific to this package
1772      --help=recursive    display the short help of all the included packages
1773  -V, --version           display version information and exit
1774  -q, --quiet, --silent   do not print \`checking ...' messages
1775      --cache-file=FILE   cache test results in FILE [disabled]
1776  -C, --config-cache      alias for \`--cache-file=config.cache'
1777  -n, --no-create         do not create output files
1778      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1779
1780Installation directories:
1781  --prefix=PREFIX         install architecture-independent files in PREFIX
1782                          [$ac_default_prefix]
1783  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1784                          [PREFIX]
1785
1786By default, \`make install' will install all the files in
1787\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1788an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1789for instance \`--prefix=\$HOME'.
1790
1791For better control, use the options below.
1792
1793Fine tuning of the installation directories:
1794  --bindir=DIR            user executables [EPREFIX/bin]
1795  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1796  --libexecdir=DIR        program executables [EPREFIX/libexec]
1797  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1798  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1799  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1800  --libdir=DIR            object code libraries [EPREFIX/lib]
1801  --includedir=DIR        C header files [PREFIX/include]
1802  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1803  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1804  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1805  --infodir=DIR           info documentation [DATAROOTDIR/info]
1806  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1807  --mandir=DIR            man documentation [DATAROOTDIR/man]
1808  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1809  --htmldir=DIR           html documentation [DOCDIR]
1810  --dvidir=DIR            dvi documentation [DOCDIR]
1811  --pdfdir=DIR            pdf documentation [DOCDIR]
1812  --psdir=DIR             ps documentation [DOCDIR]
1813_ACEOF
1814
1815  cat <<\_ACEOF
1816
1817X features:
1818  --x-includes=DIR    X include files are in DIR
1819  --x-libraries=DIR   X library files are in DIR
1820
1821System types:
1822  --build=BUILD     configure for building on BUILD [guessed]
1823  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1824  --target=TARGET   configure for building compilers for TARGET [HOST]
1825_ACEOF
1826fi
1827
1828if test -n "$ac_init_help"; then
1829  case $ac_init_help in
1830     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1831   esac
1832  cat <<\_ACEOF
1833
1834Optional Features:
1835  --disable-option-checking  ignore unrecognized --enable/--with options
1836  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1837  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1838  --enable-openjdk-only   suppress building custom source even if present
1839                          [disabled]
1840  --enable-debug          set the debug level to fastdebug (shorthand for
1841                          --with-debug-level=fastdebug) [disabled]
1842  --disable-headful       disable building headful support (graphical UI
1843                          support) [enabled]
1844  --enable-hotspot-test-in-build
1845                          run the Queens test after Hotspot build [disabled]
1846  --enable-unlimited-crypto
1847                          Enable unlimited crypto policy [disabled]
1848  --enable-rmiconnector-iiop
1849                          enable the JMX RMIConnector iiop transport
1850                          [disabled]
1851  --disable-debug-symbols disable generation of debug symbols [enabled]
1852  --disable-zip-debug-info
1853                          disable zipping of debug-info files [enabled]
1854  --disable-freetype-bundling
1855                          disable bundling of the freetype library with the
1856                          build result [enabled on Windows or when using
1857                          --with-freetype, disabled otherwise]
1858  --enable-sjavac         use sjavac to do fast incremental compiles
1859                          [disabled]
1860  --disable-precompiled-headers
1861                          disable using precompiled headers when compiling C++
1862                          [enabled]
1863  --enable-ccache         enable using ccache to speed up recompilations
1864                          [disabled]
1865
1866Optional Packages:
1867  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1868  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1869  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1870                          support it), e.g. --with-target-bits=32 [guessed]
1871  --with-custom-make-dir  Deprecated. Option is kept for backwards
1872                          compatibility and is ignored
1873  --with-jdk-variant      JDK variant to build (normal) [normal]
1874  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1875  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1876                          client, minimal1, kernel, zero, zeroshark, core)
1877                          [server]
1878  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1879                          optimized (HotSpot build only)) [release]
1880  --with-devkit           use this devkit for compilers, tools and resources
1881  --with-sys-root         alias for --with-sysroot for backwards compatability
1882  --with-sysroot          use this directory as sysroot
1883  --with-tools-dir        alias for --with-toolchain-path for backwards
1884                          compatibility
1885  --with-toolchain-path   prepend these directories when searching for
1886                          toolchain binaries (compilers etc)
1887  --with-extra-path       prepend these directories to the default path
1888  --with-sdk-name         use the platform SDK of the given name. [macosx]
1889  --with-conf-name        use this as the name of the configuration [generated
1890                          from important configuration options]
1891  --with-output-sync      set make output sync type if supported by make.
1892                          [recurse]
1893  --with-builddeps-conf   use this configuration file for the builddeps
1894  --with-builddeps-server download and use build dependencies from this server
1895                          url
1896  --with-builddeps-dir    store downloaded build dependencies here
1897                          [/localhome/builddeps]
1898  --with-builddeps-group  chgrp the downloaded build dependencies to this
1899                          group
1900  --with-cacerts-file     specify alternative cacerts file
1901  --with-milestone        Set milestone value for build [internal]
1902  --with-update-version   Set update version value for build [b00]
1903  --with-user-release-suffix
1904                          Add a custom string to the version string if build
1905                          number is not set.[username_builddateb00]
1906  --with-build-number     Set build number value for build [b00]
1907  --with-copyright-year   Set copyright year value for build [current year]
1908  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1909  --with-add-source-root  for each and every source directory, look in this
1910                          additional source root for the same directory; if it
1911                          exists and have files in it, include it in the build
1912  --with-override-source-root
1913                          for each and every source directory, look in this
1914                          override source root for the same directory; if it
1915                          exists, use that directory instead and ignore the
1916                          directory in the original source root
1917  --with-adds-and-overrides
1918                          use the subdirs 'adds' and 'overrides' in the
1919                          specified directory as add-source-root and
1920                          override-source-root
1921  --with-override-langtools
1922                          use this langtools dir for the build
1923  --with-override-corba   use this corba dir for the build
1924  --with-override-jaxp    use this jaxp dir for the build
1925  --with-override-jaxws   use this jaxws dir for the build
1926  --with-override-hotspot use this hotspot dir for the build
1927  --with-override-nashorn use this nashorn dir for the build
1928  --with-override-jdk     use this jdk dir for the build
1929  --with-import-hotspot   import hotspot binaries from this jdk image or
1930                          hotspot build dist dir instead of building from
1931                          source
1932  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1933                          to show possible values [platform dependent]
1934  --with-jtreg            Regression Test Harness [probed]
1935  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1936  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1937  --with-extra-ldflags    extra flags to be used when linking jdk
1938  --with-x                use the X Window System
1939  --with-cups             specify prefix directory for the cups package
1940                          (expecting the headers under PATH/include)
1941  --with-cups-include     specify directory for the cups include files
1942  --with-freetype         specify prefix directory for the freetype package
1943                          (expecting the libraries under PATH/lib and the
1944                          headers under PATH/include)
1945  --with-freetype-include specify directory for the freetype include files
1946  --with-freetype-lib     specify directory for the freetype library
1947  --with-freetype-src     specify directory with freetype sources to
1948                          automatically build the library (experimental,
1949                          Windows-only)
1950  --with-alsa             specify prefix directory for the alsa package
1951                          (expecting the libraries under PATH/lib and the
1952                          headers under PATH/include)
1953  --with-alsa-include     specify directory for the alsa include files
1954  --with-alsa-lib         specify directory for the alsa library
1955  --with-libjpeg          use libjpeg from build system or OpenJDK source
1956                          (system, bundled) [bundled]
1957  --with-giflib           use giflib from build system or OpenJDK source
1958                          (system, bundled) [bundled]
1959  --with-lcms             use lcms2 from build system or OpenJDK source
1960                          (system, bundled) [bundled]
1961  --with-libpng           use libpng from build system or OpenJDK source
1962                          (system, bundled) [bundled]
1963  --with-zlib             use zlib from build system or OpenJDK source
1964                          (system, bundled) [bundled]
1965  --with-stdc++lib=<static>,<dynamic>,<default>
1966                          force linking of the C++ runtime on Linux to either
1967                          static or dynamic, default is static with dynamic as
1968                          fallback
1969  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1970                          only) [probed]
1971  --with-dxsdk            Deprecated. Option is kept for backwards
1972                          compatibility and is ignored
1973  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1974                          compatibility and is ignored
1975  --with-dxsdk-include    Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-num-cores        number of cores in the build system, e.g.
1978                          --with-num-cores=8 [probed]
1979  --with-memory-size      memory (in MB) available in the build system, e.g.
1980                          --with-memory-size=1024 [probed]
1981  --with-jobs             number of parallel jobs to let make run [calculated
1982                          based on cores and memory]
1983  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1984                          invocations of boot JDK, overriding the default
1985                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1986                          -enableassertions"
1987  --with-sjavac-server-java
1988                          use this java binary for running the sjavac
1989                          background server [Boot JDK java]
1990  --with-ccache-dir       where to store ccache files [~/.ccache]
1991
1992Some influential environment variables:
1993  BASENAME    Override default value for BASENAME
1994  BASH        Override default value for BASH
1995  CAT         Override default value for CAT
1996  CHMOD       Override default value for CHMOD
1997  CMP         Override default value for CMP
1998  COMM        Override default value for COMM
1999  CP          Override default value for CP
2000  CUT         Override default value for CUT
2001  DATE        Override default value for DATE
2002  DIFF        Override default value for DIFF
2003  DIRNAME     Override default value for DIRNAME
2004  ECHO        Override default value for ECHO
2005  EXPR        Override default value for EXPR
2006  FILE        Override default value for FILE
2007  FIND        Override default value for FIND
2008  HEAD        Override default value for HEAD
2009  LN          Override default value for LN
2010  LS          Override default value for LS
2011  MKDIR       Override default value for MKDIR
2012  MKTEMP      Override default value for MKTEMP
2013  MV          Override default value for MV
2014  NAWK        Override default value for NAWK
2015  PRINTF      Override default value for PRINTF
2016  RM          Override default value for RM
2017  SH          Override default value for SH
2018  SORT        Override default value for SORT
2019  TAIL        Override default value for TAIL
2020  TAR         Override default value for TAR
2021  TEE         Override default value for TEE
2022  TOUCH       Override default value for TOUCH
2023  TR          Override default value for TR
2024  UNAME       Override default value for UNAME
2025  UNIQ        Override default value for UNIQ
2026  WC          Override default value for WC
2027  WHICH       Override default value for WHICH
2028  XARGS       Override default value for XARGS
2029  AWK         Override default value for AWK
2030  GREP        Override default value for GREP
2031  EGREP       Override default value for EGREP
2032  FGREP       Override default value for FGREP
2033  SED         Override default value for SED
2034  CYGPATH     Override default value for CYGPATH
2035  READLINK    Override default value for READLINK
2036  DF          Override default value for DF
2037  SETFILE     Override default value for SETFILE
2038  CPIO        Override default value for CPIO
2039  UNZIP       Override default value for UNZIP
2040  ZIP         Override default value for ZIP
2041  LDD         Override default value for LDD
2042  OTOOL       Override default value for OTOOL
2043  READELF     Override default value for READELF
2044  HG          Override default value for HG
2045  STAT        Override default value for STAT
2046  TIME        Override default value for TIME
2047  DSYMUTIL    Override default value for DSYMUTIL
2048  XATTR       Override default value for XATTR
2049  CODESIGN    Override default value for CODESIGN
2050  PKG_CONFIG  path to pkg-config utility
2051  JAVA        Override default value for JAVA
2052  JAVAC       Override default value for JAVAC
2053  JAVAH       Override default value for JAVAH
2054  JAR         Override default value for JAR
2055  NATIVE2ASCII
2056              Override default value for NATIVE2ASCII
2057  JARSIGNER   Override default value for JARSIGNER
2058  CC          C compiler command
2059  CFLAGS      C compiler flags
2060  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2061              nonstandard directory <lib dir>
2062  LIBS        libraries to pass to the linker, e.g. -l<library>
2063  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2064              you have headers in a nonstandard directory <include dir>
2065  CXX         C++ compiler command
2066  CXXFLAGS    C++ compiler flags
2067  CPP         C preprocessor
2068  CXXCPP      C++ preprocessor
2069  AS          Override default value for AS
2070  AR          Override default value for AR
2071  OBJC        Objective C compiler command
2072  OBJCFLAGS   Objective C compiler flags
2073  LIPO        Override default value for LIPO
2074  STRIP       Override default value for STRIP
2075  NM          Override default value for NM
2076  GNM         Override default value for GNM
2077  MCS         Override default value for MCS
2078  OBJCOPY     Override default value for OBJCOPY
2079  OBJDUMP     Override default value for OBJDUMP
2080  BUILD_CC    Override default value for BUILD_CC
2081  BUILD_CXX   Override default value for BUILD_CXX
2082  BUILD_LD    Override default value for BUILD_LD
2083  JTREGEXE    Override default value for JTREGEXE
2084  XMKMF       Path to xmkmf, Makefile generator for X Window System
2085  FREETYPE_CFLAGS
2086              C compiler flags for FREETYPE, overriding pkg-config
2087  FREETYPE_LIBS
2088              linker flags for FREETYPE, overriding pkg-config
2089  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2090  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2091  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2092  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2093  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2094  PNG_LIBS    linker flags for PNG, overriding pkg-config
2095  LIBFFI_CFLAGS
2096              C compiler flags for LIBFFI, overriding pkg-config
2097  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2098  CCACHE      Override default value for CCACHE
2099
2100Use these variables to override the choices made by `configure' or to help
2101it to find libraries and programs with nonstandard names/locations.
2102
2103Report bugs to <build-dev@openjdk.java.net>.
2104OpenJDK home page: <http://openjdk.java.net>.
2105_ACEOF
2106ac_status=$?
2107fi
2108
2109if test "$ac_init_help" = "recursive"; then
2110  # If there are subdirs, report their specific --help.
2111  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2112    test -d "$ac_dir" ||
2113      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2114      continue
2115    ac_builddir=.
2116
2117case "$ac_dir" in
2118.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2119*)
2120  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2121  # A ".." for each directory in $ac_dir_suffix.
2122  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2123  case $ac_top_builddir_sub in
2124  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2125  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2126  esac ;;
2127esac
2128ac_abs_top_builddir=$ac_pwd
2129ac_abs_builddir=$ac_pwd$ac_dir_suffix
2130# for backward compatibility:
2131ac_top_builddir=$ac_top_build_prefix
2132
2133case $srcdir in
2134  .)  # We are building in place.
2135    ac_srcdir=.
2136    ac_top_srcdir=$ac_top_builddir_sub
2137    ac_abs_top_srcdir=$ac_pwd ;;
2138  [\\/]* | ?:[\\/]* )  # Absolute name.
2139    ac_srcdir=$srcdir$ac_dir_suffix;
2140    ac_top_srcdir=$srcdir
2141    ac_abs_top_srcdir=$srcdir ;;
2142  *) # Relative name.
2143    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2144    ac_top_srcdir=$ac_top_build_prefix$srcdir
2145    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2146esac
2147ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2148
2149    cd "$ac_dir" || { ac_status=$?; continue; }
2150    # Check for guested configure.
2151    if test -f "$ac_srcdir/configure.gnu"; then
2152      echo &&
2153      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2154    elif test -f "$ac_srcdir/configure"; then
2155      echo &&
2156      $SHELL "$ac_srcdir/configure" --help=recursive
2157    else
2158      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2159    fi || ac_status=$?
2160    cd "$ac_pwd" || { ac_status=$?; break; }
2161  done
2162fi
2163
2164test -n "$ac_init_help" && exit $ac_status
2165if $ac_init_version; then
2166  cat <<\_ACEOF
2167OpenJDK configure jdk9
2168generated by GNU Autoconf 2.69
2169
2170Copyright (C) 2012 Free Software Foundation, Inc.
2171This configure script is free software; the Free Software Foundation
2172gives unlimited permission to copy, distribute and modify it.
2173_ACEOF
2174  exit
2175fi
2176
2177## ------------------------ ##
2178## Autoconf initialization. ##
2179## ------------------------ ##
2180
2181# ac_fn_c_try_compile LINENO
2182# --------------------------
2183# Try to compile conftest.$ac_ext, and return whether this succeeded.
2184ac_fn_c_try_compile ()
2185{
2186  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187  rm -f conftest.$ac_objext
2188  if { { ac_try="$ac_compile"
2189case "(($ac_try" in
2190  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2191  *) ac_try_echo=$ac_try;;
2192esac
2193eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2194$as_echo "$ac_try_echo"; } >&5
2195  (eval "$ac_compile") 2>conftest.err
2196  ac_status=$?
2197  if test -s conftest.err; then
2198    grep -v '^ *+' conftest.err >conftest.er1
2199    cat conftest.er1 >&5
2200    mv -f conftest.er1 conftest.err
2201  fi
2202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2203  test $ac_status = 0; } && {
2204	 test -z "$ac_c_werror_flag" ||
2205	 test ! -s conftest.err
2206       } && test -s conftest.$ac_objext; then :
2207  ac_retval=0
2208else
2209  $as_echo "$as_me: failed program was:" >&5
2210sed 's/^/| /' conftest.$ac_ext >&5
2211
2212	ac_retval=1
2213fi
2214  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2215  as_fn_set_status $ac_retval
2216
2217} # ac_fn_c_try_compile
2218
2219# ac_fn_cxx_try_compile LINENO
2220# ----------------------------
2221# Try to compile conftest.$ac_ext, and return whether this succeeded.
2222ac_fn_cxx_try_compile ()
2223{
2224  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225  rm -f conftest.$ac_objext
2226  if { { ac_try="$ac_compile"
2227case "(($ac_try" in
2228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229  *) ac_try_echo=$ac_try;;
2230esac
2231eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232$as_echo "$ac_try_echo"; } >&5
2233  (eval "$ac_compile") 2>conftest.err
2234  ac_status=$?
2235  if test -s conftest.err; then
2236    grep -v '^ *+' conftest.err >conftest.er1
2237    cat conftest.er1 >&5
2238    mv -f conftest.er1 conftest.err
2239  fi
2240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2241  test $ac_status = 0; } && {
2242	 test -z "$ac_cxx_werror_flag" ||
2243	 test ! -s conftest.err
2244       } && test -s conftest.$ac_objext; then :
2245  ac_retval=0
2246else
2247  $as_echo "$as_me: failed program was:" >&5
2248sed 's/^/| /' conftest.$ac_ext >&5
2249
2250	ac_retval=1
2251fi
2252  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2253  as_fn_set_status $ac_retval
2254
2255} # ac_fn_cxx_try_compile
2256
2257# ac_fn_c_try_cpp LINENO
2258# ----------------------
2259# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2260ac_fn_c_try_cpp ()
2261{
2262  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2263  if { { ac_try="$ac_cpp conftest.$ac_ext"
2264case "(($ac_try" in
2265  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2266  *) ac_try_echo=$ac_try;;
2267esac
2268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2269$as_echo "$ac_try_echo"; } >&5
2270  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2271  ac_status=$?
2272  if test -s conftest.err; then
2273    grep -v '^ *+' conftest.err >conftest.er1
2274    cat conftest.er1 >&5
2275    mv -f conftest.er1 conftest.err
2276  fi
2277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2278  test $ac_status = 0; } > conftest.i && {
2279	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2280	 test ! -s conftest.err
2281       }; then :
2282  ac_retval=0
2283else
2284  $as_echo "$as_me: failed program was:" >&5
2285sed 's/^/| /' conftest.$ac_ext >&5
2286
2287    ac_retval=1
2288fi
2289  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290  as_fn_set_status $ac_retval
2291
2292} # ac_fn_c_try_cpp
2293
2294# ac_fn_cxx_try_cpp LINENO
2295# ------------------------
2296# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2297ac_fn_cxx_try_cpp ()
2298{
2299  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300  if { { ac_try="$ac_cpp conftest.$ac_ext"
2301case "(($ac_try" in
2302  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2303  *) ac_try_echo=$ac_try;;
2304esac
2305eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2306$as_echo "$ac_try_echo"; } >&5
2307  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2308  ac_status=$?
2309  if test -s conftest.err; then
2310    grep -v '^ *+' conftest.err >conftest.er1
2311    cat conftest.er1 >&5
2312    mv -f conftest.er1 conftest.err
2313  fi
2314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2315  test $ac_status = 0; } > conftest.i && {
2316	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2317	 test ! -s conftest.err
2318       }; then :
2319  ac_retval=0
2320else
2321  $as_echo "$as_me: failed program was:" >&5
2322sed 's/^/| /' conftest.$ac_ext >&5
2323
2324    ac_retval=1
2325fi
2326  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2327  as_fn_set_status $ac_retval
2328
2329} # ac_fn_cxx_try_cpp
2330
2331# ac_fn_objc_try_compile LINENO
2332# -----------------------------
2333# Try to compile conftest.$ac_ext, and return whether this succeeded.
2334ac_fn_objc_try_compile ()
2335{
2336  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337  rm -f conftest.$ac_objext
2338  if { { ac_try="$ac_compile"
2339case "(($ac_try" in
2340  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341  *) ac_try_echo=$ac_try;;
2342esac
2343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2344$as_echo "$ac_try_echo"; } >&5
2345  (eval "$ac_compile") 2>conftest.err
2346  ac_status=$?
2347  if test -s conftest.err; then
2348    grep -v '^ *+' conftest.err >conftest.er1
2349    cat conftest.er1 >&5
2350    mv -f conftest.er1 conftest.err
2351  fi
2352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2353  test $ac_status = 0; } && {
2354	 test -z "$ac_objc_werror_flag" ||
2355	 test ! -s conftest.err
2356       } && test -s conftest.$ac_objext; then :
2357  ac_retval=0
2358else
2359  $as_echo "$as_me: failed program was:" >&5
2360sed 's/^/| /' conftest.$ac_ext >&5
2361
2362	ac_retval=1
2363fi
2364  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365  as_fn_set_status $ac_retval
2366
2367} # ac_fn_objc_try_compile
2368
2369# ac_fn_c_try_link LINENO
2370# -----------------------
2371# Try to link conftest.$ac_ext, and return whether this succeeded.
2372ac_fn_c_try_link ()
2373{
2374  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375  rm -f conftest.$ac_objext conftest$ac_exeext
2376  if { { ac_try="$ac_link"
2377case "(($ac_try" in
2378  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2379  *) ac_try_echo=$ac_try;;
2380esac
2381eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2382$as_echo "$ac_try_echo"; } >&5
2383  (eval "$ac_link") 2>conftest.err
2384  ac_status=$?
2385  if test -s conftest.err; then
2386    grep -v '^ *+' conftest.err >conftest.er1
2387    cat conftest.er1 >&5
2388    mv -f conftest.er1 conftest.err
2389  fi
2390  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2391  test $ac_status = 0; } && {
2392	 test -z "$ac_c_werror_flag" ||
2393	 test ! -s conftest.err
2394       } && test -s conftest$ac_exeext && {
2395	 test "$cross_compiling" = yes ||
2396	 test -x conftest$ac_exeext
2397       }; then :
2398  ac_retval=0
2399else
2400  $as_echo "$as_me: failed program was:" >&5
2401sed 's/^/| /' conftest.$ac_ext >&5
2402
2403	ac_retval=1
2404fi
2405  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2406  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2407  # interfere with the next link command; also delete a directory that is
2408  # left behind by Apple's compiler.  We do this before executing the actions.
2409  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2410  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2411  as_fn_set_status $ac_retval
2412
2413} # ac_fn_c_try_link
2414
2415# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2416# ---------------------------------------------------------
2417# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2418# the include files in INCLUDES and setting the cache variable VAR
2419# accordingly.
2420ac_fn_cxx_check_header_mongrel ()
2421{
2422  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423  if eval \${$3+:} false; then :
2424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2425$as_echo_n "checking for $2... " >&6; }
2426if eval \${$3+:} false; then :
2427  $as_echo_n "(cached) " >&6
2428fi
2429eval ac_res=\$$3
2430	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
2432else
2433  # Is the header compilable?
2434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2435$as_echo_n "checking $2 usability... " >&6; }
2436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437/* end confdefs.h.  */
2438$4
2439#include <$2>
2440_ACEOF
2441if ac_fn_cxx_try_compile "$LINENO"; then :
2442  ac_header_compiler=yes
2443else
2444  ac_header_compiler=no
2445fi
2446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2448$as_echo "$ac_header_compiler" >&6; }
2449
2450# Is the header present?
2451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2452$as_echo_n "checking $2 presence... " >&6; }
2453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h.  */
2455#include <$2>
2456_ACEOF
2457if ac_fn_cxx_try_cpp "$LINENO"; then :
2458  ac_header_preproc=yes
2459else
2460  ac_header_preproc=no
2461fi
2462rm -f conftest.err conftest.i conftest.$ac_ext
2463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2464$as_echo "$ac_header_preproc" >&6; }
2465
2466# So?  What about this header?
2467case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2468  yes:no: )
2469    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2470$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2471    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2472$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2473    ;;
2474  no:yes:* )
2475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2476$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2478$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2480$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2482$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&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( $as_echo "## ----------------------------------------- ##
2486## Report this to build-dev@openjdk.java.net ##
2487## ----------------------------------------- ##"
2488     ) | sed "s/^/$as_me: WARNING:     /" >&2
2489    ;;
2490esac
2491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2492$as_echo_n "checking for $2... " >&6; }
2493if eval \${$3+:} false; then :
2494  $as_echo_n "(cached) " >&6
2495else
2496  eval "$3=\$ac_header_compiler"
2497fi
2498eval ac_res=\$$3
2499	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2500$as_echo "$ac_res" >&6; }
2501fi
2502  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503
2504} # ac_fn_cxx_check_header_mongrel
2505
2506# ac_fn_cxx_try_run LINENO
2507# ------------------------
2508# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2509# that executables *can* be run.
2510ac_fn_cxx_try_run ()
2511{
2512  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513  if { { ac_try="$ac_link"
2514case "(($ac_try" in
2515  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2516  *) ac_try_echo=$ac_try;;
2517esac
2518eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2519$as_echo "$ac_try_echo"; } >&5
2520  (eval "$ac_link") 2>&5
2521  ac_status=$?
2522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2524  { { case "(($ac_try" in
2525  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2526  *) ac_try_echo=$ac_try;;
2527esac
2528eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2529$as_echo "$ac_try_echo"; } >&5
2530  (eval "$ac_try") 2>&5
2531  ac_status=$?
2532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533  test $ac_status = 0; }; }; then :
2534  ac_retval=0
2535else
2536  $as_echo "$as_me: program exited with status $ac_status" >&5
2537       $as_echo "$as_me: failed program was:" >&5
2538sed 's/^/| /' conftest.$ac_ext >&5
2539
2540       ac_retval=$ac_status
2541fi
2542  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2543  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2544  as_fn_set_status $ac_retval
2545
2546} # ac_fn_cxx_try_run
2547
2548# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2549# ---------------------------------------------------------
2550# Tests whether HEADER exists and can be compiled using the include files in
2551# INCLUDES, setting the cache variable VAR accordingly.
2552ac_fn_cxx_check_header_compile ()
2553{
2554  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2556$as_echo_n "checking for $2... " >&6; }
2557if eval \${$3+:} false; then :
2558  $as_echo_n "(cached) " >&6
2559else
2560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2561/* end confdefs.h.  */
2562$4
2563#include <$2>
2564_ACEOF
2565if ac_fn_cxx_try_compile "$LINENO"; then :
2566  eval "$3=yes"
2567else
2568  eval "$3=no"
2569fi
2570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2571fi
2572eval ac_res=\$$3
2573	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2574$as_echo "$ac_res" >&6; }
2575  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576
2577} # ac_fn_cxx_check_header_compile
2578
2579# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2580# ----------------------------------------------
2581# Tries to find the compile-time value of EXPR in a program that includes
2582# INCLUDES, setting VAR accordingly. Returns whether the value could be
2583# computed
2584ac_fn_cxx_compute_int ()
2585{
2586  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2587  if test "$cross_compiling" = yes; then
2588    # Depending upon the size, compute the lo and hi bounds.
2589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2590/* end confdefs.h.  */
2591$4
2592int
2593main ()
2594{
2595static int test_array [1 - 2 * !(($2) >= 0)];
2596test_array [0] = 0;
2597return test_array [0];
2598
2599  ;
2600  return 0;
2601}
2602_ACEOF
2603if ac_fn_cxx_try_compile "$LINENO"; then :
2604  ac_lo=0 ac_mid=0
2605  while :; do
2606    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h.  */
2608$4
2609int
2610main ()
2611{
2612static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2613test_array [0] = 0;
2614return test_array [0];
2615
2616  ;
2617  return 0;
2618}
2619_ACEOF
2620if ac_fn_cxx_try_compile "$LINENO"; then :
2621  ac_hi=$ac_mid; break
2622else
2623  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2624			if test $ac_lo -le $ac_mid; then
2625			  ac_lo= ac_hi=
2626			  break
2627			fi
2628			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2629fi
2630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2631  done
2632else
2633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634/* end confdefs.h.  */
2635$4
2636int
2637main ()
2638{
2639static int test_array [1 - 2 * !(($2) < 0)];
2640test_array [0] = 0;
2641return test_array [0];
2642
2643  ;
2644  return 0;
2645}
2646_ACEOF
2647if ac_fn_cxx_try_compile "$LINENO"; then :
2648  ac_hi=-1 ac_mid=-1
2649  while :; do
2650    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651/* end confdefs.h.  */
2652$4
2653int
2654main ()
2655{
2656static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2657test_array [0] = 0;
2658return test_array [0];
2659
2660  ;
2661  return 0;
2662}
2663_ACEOF
2664if ac_fn_cxx_try_compile "$LINENO"; then :
2665  ac_lo=$ac_mid; break
2666else
2667  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2668			if test $ac_mid -le $ac_hi; then
2669			  ac_lo= ac_hi=
2670			  break
2671			fi
2672			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675  done
2676else
2677  ac_lo= ac_hi=
2678fi
2679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2680fi
2681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682# Binary search between lo and hi bounds.
2683while test "x$ac_lo" != "x$ac_hi"; do
2684  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686/* end confdefs.h.  */
2687$4
2688int
2689main ()
2690{
2691static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2692test_array [0] = 0;
2693return test_array [0];
2694
2695  ;
2696  return 0;
2697}
2698_ACEOF
2699if ac_fn_cxx_try_compile "$LINENO"; then :
2700  ac_hi=$ac_mid
2701else
2702  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2703fi
2704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2705done
2706case $ac_lo in #((
2707?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2708'') ac_retval=1 ;;
2709esac
2710  else
2711    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2712/* end confdefs.h.  */
2713$4
2714static long int longval () { return $2; }
2715static unsigned long int ulongval () { return $2; }
2716#include <stdio.h>
2717#include <stdlib.h>
2718int
2719main ()
2720{
2721
2722  FILE *f = fopen ("conftest.val", "w");
2723  if (! f)
2724    return 1;
2725  if (($2) < 0)
2726    {
2727      long int i = longval ();
2728      if (i != ($2))
2729	return 1;
2730      fprintf (f, "%ld", i);
2731    }
2732  else
2733    {
2734      unsigned long int i = ulongval ();
2735      if (i != ($2))
2736	return 1;
2737      fprintf (f, "%lu", i);
2738    }
2739  /* Do not output a trailing newline, as this causes \r\n confusion
2740     on some platforms.  */
2741  return ferror (f) || fclose (f) != 0;
2742
2743  ;
2744  return 0;
2745}
2746_ACEOF
2747if ac_fn_cxx_try_run "$LINENO"; then :
2748  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2749else
2750  ac_retval=1
2751fi
2752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2753  conftest.$ac_objext conftest.beam conftest.$ac_ext
2754rm -f conftest.val
2755
2756  fi
2757  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2758  as_fn_set_status $ac_retval
2759
2760} # ac_fn_cxx_compute_int
2761
2762# ac_fn_cxx_try_link LINENO
2763# -------------------------
2764# Try to link conftest.$ac_ext, and return whether this succeeded.
2765ac_fn_cxx_try_link ()
2766{
2767  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2768  rm -f conftest.$ac_objext conftest$ac_exeext
2769  if { { ac_try="$ac_link"
2770case "(($ac_try" in
2771  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772  *) ac_try_echo=$ac_try;;
2773esac
2774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2775$as_echo "$ac_try_echo"; } >&5
2776  (eval "$ac_link") 2>conftest.err
2777  ac_status=$?
2778  if test -s conftest.err; then
2779    grep -v '^ *+' conftest.err >conftest.er1
2780    cat conftest.er1 >&5
2781    mv -f conftest.er1 conftest.err
2782  fi
2783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2784  test $ac_status = 0; } && {
2785	 test -z "$ac_cxx_werror_flag" ||
2786	 test ! -s conftest.err
2787       } && test -s conftest$ac_exeext && {
2788	 test "$cross_compiling" = yes ||
2789	 test -x conftest$ac_exeext
2790       }; then :
2791  ac_retval=0
2792else
2793  $as_echo "$as_me: failed program was:" >&5
2794sed 's/^/| /' conftest.$ac_ext >&5
2795
2796	ac_retval=1
2797fi
2798  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2799  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2800  # interfere with the next link command; also delete a directory that is
2801  # left behind by Apple's compiler.  We do this before executing the actions.
2802  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2803  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2804  as_fn_set_status $ac_retval
2805
2806} # ac_fn_cxx_try_link
2807
2808# ac_fn_cxx_check_func LINENO FUNC VAR
2809# ------------------------------------
2810# Tests whether FUNC exists, setting the cache variable VAR accordingly
2811ac_fn_cxx_check_func ()
2812{
2813  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2815$as_echo_n "checking for $2... " >&6; }
2816if eval \${$3+:} false; then :
2817  $as_echo_n "(cached) " >&6
2818else
2819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h.  */
2821/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2822   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2823#define $2 innocuous_$2
2824
2825/* System header to define __stub macros and hopefully few prototypes,
2826    which can conflict with char $2 (); below.
2827    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2828    <limits.h> exists even on freestanding compilers.  */
2829
2830#ifdef __STDC__
2831# include <limits.h>
2832#else
2833# include <assert.h>
2834#endif
2835
2836#undef $2
2837
2838/* Override any GCC internal prototype to avoid an error.
2839   Use char because int might match the return type of a GCC
2840   builtin and then its argument prototype would still apply.  */
2841#ifdef __cplusplus
2842extern "C"
2843#endif
2844char $2 ();
2845/* The GNU C library defines this for functions which it implements
2846    to always fail with ENOSYS.  Some functions are actually named
2847    something starting with __ and the normal name is an alias.  */
2848#if defined __stub_$2 || defined __stub___$2
2849choke me
2850#endif
2851
2852int
2853main ()
2854{
2855return $2 ();
2856  ;
2857  return 0;
2858}
2859_ACEOF
2860if ac_fn_cxx_try_link "$LINENO"; then :
2861  eval "$3=yes"
2862else
2863  eval "$3=no"
2864fi
2865rm -f core conftest.err conftest.$ac_objext \
2866    conftest$ac_exeext conftest.$ac_ext
2867fi
2868eval ac_res=\$$3
2869	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2870$as_echo "$ac_res" >&6; }
2871  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2872
2873} # ac_fn_cxx_check_func
2874
2875# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2876# -------------------------------------------------------
2877# Tests whether HEADER exists and can be compiled using the include files in
2878# INCLUDES, setting the cache variable VAR accordingly.
2879ac_fn_c_check_header_compile ()
2880{
2881  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2883$as_echo_n "checking for $2... " >&6; }
2884if eval \${$3+:} false; then :
2885  $as_echo_n "(cached) " >&6
2886else
2887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2888/* end confdefs.h.  */
2889$4
2890#include <$2>
2891_ACEOF
2892if ac_fn_c_try_compile "$LINENO"; then :
2893  eval "$3=yes"
2894else
2895  eval "$3=no"
2896fi
2897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898fi
2899eval ac_res=\$$3
2900	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2901$as_echo "$ac_res" >&6; }
2902  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2903
2904} # ac_fn_c_check_header_compile
2905cat >config.log <<_ACEOF
2906This file contains any messages produced by compilers while
2907running configure, to aid debugging if configure makes a mistake.
2908
2909It was created by OpenJDK $as_me jdk9, which was
2910generated by GNU Autoconf 2.69.  Invocation command line was
2911
2912  $ $0 $@
2913
2914_ACEOF
2915exec 5>>config.log
2916{
2917cat <<_ASUNAME
2918## --------- ##
2919## Platform. ##
2920## --------- ##
2921
2922hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2923uname -m = `(uname -m) 2>/dev/null || echo unknown`
2924uname -r = `(uname -r) 2>/dev/null || echo unknown`
2925uname -s = `(uname -s) 2>/dev/null || echo unknown`
2926uname -v = `(uname -v) 2>/dev/null || echo unknown`
2927
2928/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2929/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2930
2931/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2932/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2933/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2934/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2935/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2936/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2937/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2938
2939_ASUNAME
2940
2941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2942for as_dir in $PATH
2943do
2944  IFS=$as_save_IFS
2945  test -z "$as_dir" && as_dir=.
2946    $as_echo "PATH: $as_dir"
2947  done
2948IFS=$as_save_IFS
2949
2950} >&5
2951
2952cat >&5 <<_ACEOF
2953
2954
2955## ----------- ##
2956## Core tests. ##
2957## ----------- ##
2958
2959_ACEOF
2960
2961
2962# Keep a trace of the command line.
2963# Strip out --no-create and --no-recursion so they do not pile up.
2964# Strip out --silent because we don't want to record it for future runs.
2965# Also quote any args containing shell meta-characters.
2966# Make two passes to allow for proper duplicate-argument suppression.
2967ac_configure_args=
2968ac_configure_args0=
2969ac_configure_args1=
2970ac_must_keep_next=false
2971for ac_pass in 1 2
2972do
2973  for ac_arg
2974  do
2975    case $ac_arg in
2976    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2977    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2978    | -silent | --silent | --silen | --sile | --sil)
2979      continue ;;
2980    *\'*)
2981      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2982    esac
2983    case $ac_pass in
2984    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2985    2)
2986      as_fn_append ac_configure_args1 " '$ac_arg'"
2987      if test $ac_must_keep_next = true; then
2988	ac_must_keep_next=false # Got value, back to normal.
2989      else
2990	case $ac_arg in
2991	  *=* | --config-cache | -C | -disable-* | --disable-* \
2992	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2993	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2994	  | -with-* | --with-* | -without-* | --without-* | --x)
2995	    case "$ac_configure_args0 " in
2996	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2997	    esac
2998	    ;;
2999	  -* ) ac_must_keep_next=true ;;
3000	esac
3001      fi
3002      as_fn_append ac_configure_args " '$ac_arg'"
3003      ;;
3004    esac
3005  done
3006done
3007{ ac_configure_args0=; unset ac_configure_args0;}
3008{ ac_configure_args1=; unset ac_configure_args1;}
3009
3010# When interrupted or exit'd, cleanup temporary files, and complete
3011# config.log.  We remove comments because anyway the quotes in there
3012# would cause problems or look ugly.
3013# WARNING: Use '\'' to represent an apostrophe within the trap.
3014# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3015trap 'exit_status=$?
3016  # Save into config.log some information that might help in debugging.
3017  {
3018    echo
3019
3020    $as_echo "## ---------------- ##
3021## Cache variables. ##
3022## ---------------- ##"
3023    echo
3024    # The following way of writing the cache mishandles newlines in values,
3025(
3026  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3027    eval ac_val=\$$ac_var
3028    case $ac_val in #(
3029    *${as_nl}*)
3030      case $ac_var in #(
3031      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3032$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3033      esac
3034      case $ac_var in #(
3035      _ | IFS | as_nl) ;; #(
3036      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3037      *) { eval $ac_var=; unset $ac_var;} ;;
3038      esac ;;
3039    esac
3040  done
3041  (set) 2>&1 |
3042    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3043    *${as_nl}ac_space=\ *)
3044      sed -n \
3045	"s/'\''/'\''\\\\'\'''\''/g;
3046	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3047      ;; #(
3048    *)
3049      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3050      ;;
3051    esac |
3052    sort
3053)
3054    echo
3055
3056    $as_echo "## ----------------- ##
3057## Output variables. ##
3058## ----------------- ##"
3059    echo
3060    for ac_var in $ac_subst_vars
3061    do
3062      eval ac_val=\$$ac_var
3063      case $ac_val in
3064      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3065      esac
3066      $as_echo "$ac_var='\''$ac_val'\''"
3067    done | sort
3068    echo
3069
3070    if test -n "$ac_subst_files"; then
3071      $as_echo "## ------------------- ##
3072## File substitutions. ##
3073## ------------------- ##"
3074      echo
3075      for ac_var in $ac_subst_files
3076      do
3077	eval ac_val=\$$ac_var
3078	case $ac_val in
3079	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3080	esac
3081	$as_echo "$ac_var='\''$ac_val'\''"
3082      done | sort
3083      echo
3084    fi
3085
3086    if test -s confdefs.h; then
3087      $as_echo "## ----------- ##
3088## confdefs.h. ##
3089## ----------- ##"
3090      echo
3091      cat confdefs.h
3092      echo
3093    fi
3094    test "$ac_signal" != 0 &&
3095      $as_echo "$as_me: caught signal $ac_signal"
3096    $as_echo "$as_me: exit $exit_status"
3097  } >&5
3098  rm -f core *.core core.conftest.* &&
3099    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3100    exit $exit_status
3101' 0
3102for ac_signal in 1 2 13 15; do
3103  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3104done
3105ac_signal=0
3106
3107# confdefs.h avoids OS command line length limits that DEFS can exceed.
3108rm -f -r conftest* confdefs.h
3109
3110$as_echo "/* confdefs.h */" > confdefs.h
3111
3112# Predefined preprocessor variables.
3113
3114cat >>confdefs.h <<_ACEOF
3115#define PACKAGE_NAME "$PACKAGE_NAME"
3116_ACEOF
3117
3118cat >>confdefs.h <<_ACEOF
3119#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3120_ACEOF
3121
3122cat >>confdefs.h <<_ACEOF
3123#define PACKAGE_VERSION "$PACKAGE_VERSION"
3124_ACEOF
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_STRING "$PACKAGE_STRING"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_URL "$PACKAGE_URL"
3136_ACEOF
3137
3138
3139# Let the site file select an alternate cache file if it wants to.
3140# Prefer an explicitly selected file to automatically selected ones.
3141ac_site_file1=NONE
3142ac_site_file2=NONE
3143if test -n "$CONFIG_SITE"; then
3144  # We do not want a PATH search for config.site.
3145  case $CONFIG_SITE in #((
3146    -*)  ac_site_file1=./$CONFIG_SITE;;
3147    */*) ac_site_file1=$CONFIG_SITE;;
3148    *)   ac_site_file1=./$CONFIG_SITE;;
3149  esac
3150elif test "x$prefix" != xNONE; then
3151  ac_site_file1=$prefix/share/config.site
3152  ac_site_file2=$prefix/etc/config.site
3153else
3154  ac_site_file1=$ac_default_prefix/share/config.site
3155  ac_site_file2=$ac_default_prefix/etc/config.site
3156fi
3157for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3158do
3159  test "x$ac_site_file" = xNONE && continue
3160  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3161    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3162$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3163    sed 's/^/| /' "$ac_site_file" >&5
3164    . "$ac_site_file" \
3165      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3167as_fn_error $? "failed to load site script $ac_site_file
3168See \`config.log' for more details" "$LINENO" 5; }
3169  fi
3170done
3171
3172if test -r "$cache_file"; then
3173  # Some versions of bash will fail to source /dev/null (special files
3174  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3175  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3176    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3177$as_echo "$as_me: loading cache $cache_file" >&6;}
3178    case $cache_file in
3179      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3180      *)                      . "./$cache_file";;
3181    esac
3182  fi
3183else
3184  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3185$as_echo "$as_me: creating cache $cache_file" >&6;}
3186  >$cache_file
3187fi
3188
3189# Check that the precious variables saved in the cache have kept the same
3190# value.
3191ac_cache_corrupted=false
3192for ac_var in $ac_precious_vars; do
3193  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3194  eval ac_new_set=\$ac_env_${ac_var}_set
3195  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3196  eval ac_new_val=\$ac_env_${ac_var}_value
3197  case $ac_old_set,$ac_new_set in
3198    set,)
3199      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3200$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3201      ac_cache_corrupted=: ;;
3202    ,set)
3203      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3204$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3205      ac_cache_corrupted=: ;;
3206    ,);;
3207    *)
3208      if test "x$ac_old_val" != "x$ac_new_val"; then
3209	# differences in whitespace do not lead to failure.
3210	ac_old_val_w=`echo x $ac_old_val`
3211	ac_new_val_w=`echo x $ac_new_val`
3212	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3213	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3214$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3215	  ac_cache_corrupted=:
3216	else
3217	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3218$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3219	  eval $ac_var=\$ac_old_val
3220	fi
3221	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3222$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3223	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3224$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3225      fi;;
3226  esac
3227  # Pass precious variables to config.status.
3228  if test "$ac_new_set" = set; then
3229    case $ac_new_val in
3230    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3231    *) ac_arg=$ac_var=$ac_new_val ;;
3232    esac
3233    case " $ac_configure_args " in
3234      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3235      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3236    esac
3237  fi
3238done
3239if $ac_cache_corrupted; then
3240  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3242  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3243$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3244  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3245fi
3246## -------------------- ##
3247## Main body of script. ##
3248## -------------------- ##
3249
3250ac_ext=c
3251ac_cpp='$CPP $CPPFLAGS'
3252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3254ac_compiler_gnu=$ac_cv_c_compiler_gnu
3255
3256
3257
3258ac_aux_dir=
3259for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3260  if test -f "$ac_dir/install-sh"; then
3261    ac_aux_dir=$ac_dir
3262    ac_install_sh="$ac_aux_dir/install-sh -c"
3263    break
3264  elif test -f "$ac_dir/install.sh"; then
3265    ac_aux_dir=$ac_dir
3266    ac_install_sh="$ac_aux_dir/install.sh -c"
3267    break
3268  elif test -f "$ac_dir/shtool"; then
3269    ac_aux_dir=$ac_dir
3270    ac_install_sh="$ac_aux_dir/shtool install -c"
3271    break
3272  fi
3273done
3274if test -z "$ac_aux_dir"; then
3275  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
3276fi
3277
3278# These three variables are undocumented and unsupported,
3279# and are intended to be withdrawn in a future Autoconf release.
3280# They can cause serious problems if a builder's source tree is in a directory
3281# whose full name contains unusual characters.
3282ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3283ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3284ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3285
3286
3287# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3288
3289#
3290# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3291# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3292#
3293# This code is free software; you can redistribute it and/or modify it
3294# under the terms of the GNU General Public License version 2 only, as
3295# published by the Free Software Foundation.  Oracle designates this
3296# particular file as subject to the "Classpath" exception as provided
3297# by Oracle in the LICENSE file that accompanied this code.
3298#
3299# This code is distributed in the hope that it will be useful, but WITHOUT
3300# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3301# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3302# version 2 for more details (a copy is included in the LICENSE file that
3303# accompanied this code).
3304#
3305# You should have received a copy of the GNU General Public License version
3306# 2 along with this work; if not, write to the Free Software Foundation,
3307# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3308#
3309# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3310# or visit www.oracle.com if you need additional information or have any
3311# questions.
3312#
3313
3314#
3315# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3316#
3317# This program is free software; you can redistribute it and/or modify
3318# it under the terms of the GNU General Public License as published by
3319# the Free Software Foundation; either version 2 of the License, or
3320# (at your option) any later version.
3321#
3322# This program is distributed in the hope that it will be useful, but
3323# WITHOUT ANY WARRANTY; without even the implied warranty of
3324# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3325# General Public License for more details.
3326#
3327# You should have received a copy of the GNU General Public License
3328# along with this program; if not, write to the Free Software
3329# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3330#
3331# As a special exception to the GNU General Public License, if you
3332# distribute this file as part of a program that contains a
3333# configuration script generated by Autoconf, you may include it under
3334# the same distribution terms that you use for the rest of that program.
3335
3336# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3337# ----------------------------------
3338# PKG_PROG_PKG_CONFIG
3339
3340# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3341#
3342# Check to see whether a particular set of modules exists.  Similar
3343# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3344#
3345#
3346# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3347# this or PKG_CHECK_MODULES is called, or make sure to call
3348# PKG_CHECK_EXISTS manually
3349# --------------------------------------------------------------
3350
3351
3352
3353# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3354# ---------------------------------------------
3355# _PKG_CONFIG
3356
3357# _PKG_SHORT_ERRORS_SUPPORTED
3358# -----------------------------
3359# _PKG_SHORT_ERRORS_SUPPORTED
3360
3361
3362# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3363# [ACTION-IF-NOT-FOUND])
3364#
3365#
3366# Note that if there is a possibility the first call to
3367# PKG_CHECK_MODULES might not happen, you should be sure to include an
3368# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3369#
3370#
3371# --------------------------------------------------------------
3372# PKG_CHECK_MODULES
3373
3374
3375# Include these first...
3376#
3377# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3378# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3379#
3380# This code is free software; you can redistribute it and/or modify it
3381# under the terms of the GNU General Public License version 2 only, as
3382# published by the Free Software Foundation.  Oracle designates this
3383# particular file as subject to the "Classpath" exception as provided
3384# by Oracle in the LICENSE file that accompanied this code.
3385#
3386# This code is distributed in the hope that it will be useful, but WITHOUT
3387# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3388# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3389# version 2 for more details (a copy is included in the LICENSE file that
3390# accompanied this code).
3391#
3392# You should have received a copy of the GNU General Public License version
3393# 2 along with this work; if not, write to the Free Software Foundation,
3394# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3395#
3396# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3397# or visit www.oracle.com if you need additional information or have any
3398# questions.
3399#
3400
3401# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3402# If so, then append $1 to $2 \
3403# Also set JVM_ARG_OK to true/false depending on outcome.
3404
3405
3406# Appends a string to a path variable, only adding the : when needed.
3407
3408
3409# Prepends a string to a path variable, only adding the : when needed.
3410
3411
3412# This will make sure the given variable points to a full and proper
3413# path. This means:
3414# 1) There will be no spaces in the path. On unix platforms,
3415#    spaces in the path will result in an error. On Windows,
3416#    the path will be rewritten using short-style to be space-free.
3417# 2) The path will be absolute, and it will be in unix-style (on
3418#     cygwin).
3419# $1: The name of the variable to fix
3420
3421
3422# This will make sure the given variable points to a executable
3423# with a full and proper path. This means:
3424# 1) There will be no spaces in the path. On unix platforms,
3425#    spaces in the path will result in an error. On Windows,
3426#    the path will be rewritten using short-style to be space-free.
3427# 2) The path will be absolute, and it will be in unix-style (on
3428#     cygwin).
3429# Any arguments given to the executable is preserved.
3430# If the input variable does not have a directory specification, then
3431# it need to be in the PATH.
3432# $1: The name of the variable to fix
3433
3434
3435
3436
3437# Register a --with argument but mark it as deprecated
3438# $1: The name of the with argument to deprecate, not including --with-
3439
3440
3441# Register a --enable argument but mark it as deprecated
3442# $1: The name of the with argument to deprecate, not including --enable-
3443# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3444
3445
3446
3447
3448# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3449# $1: variable to check
3450
3451
3452# Check that there are no unprocessed overridden variables left.
3453# If so, they are an incorrect argument and we will exit with an error.
3454
3455
3456# Setup a tool for the given variable. If correctly specified by the user,
3457# use that value, otherwise search for the tool using the supplied code snippet.
3458# $1: variable to set
3459# $2: code snippet to call to look for the tool
3460
3461
3462# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3463# $1: variable to set
3464# $2: executable name (or list of names) to look for
3465
3466
3467# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3468# $1: variable to set
3469# $2: executable name (or list of names) to look for
3470
3471
3472# Like BASIC_PATH_PROGS but fails if no tool was found.
3473# $1: variable to set
3474# $2: executable name (or list of names) to look for
3475
3476
3477# Like BASIC_SETUP_TOOL but fails if no tool was found.
3478# $1: variable to set
3479# $2: autoconf macro to call to look for the special tool
3480
3481
3482# Setup the most fundamental tools that relies on not much else to set up,
3483# but is used by much of the early bootstrap code.
3484
3485
3486# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496#%%% Simple tools %%%
3497
3498# Check if we have found a usable version of make
3499# $1: the path to a potential make binary (or empty)
3500# $2: the description on how we found this
3501
3502
3503
3504
3505# Goes looking for a usable version of GNU make.
3506
3507
3508
3509
3510
3511
3512# Check if build directory is on local disk. If not possible to determine,
3513# we prefer to claim it's local.
3514# Argument 1: directory to test
3515# Argument 2: what to do if it is on local disk
3516# Argument 3: what to do otherwise (remote disk or failure)
3517
3518
3519# Check that source files have basic read permissions set. This might
3520# not be the case in cygwin in certain conditions.
3521
3522
3523
3524
3525#
3526# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3527# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3528#
3529# This code is free software; you can redistribute it and/or modify it
3530# under the terms of the GNU General Public License version 2 only, as
3531# published by the Free Software Foundation.  Oracle designates this
3532# particular file as subject to the "Classpath" exception as provided
3533# by Oracle in the LICENSE file that accompanied this code.
3534#
3535# This code is distributed in the hope that it will be useful, but WITHOUT
3536# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3537# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3538# version 2 for more details (a copy is included in the LICENSE file that
3539# accompanied this code).
3540#
3541# You should have received a copy of the GNU General Public License version
3542# 2 along with this work; if not, write to the Free Software Foundation,
3543# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3544#
3545# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3546# or visit www.oracle.com if you need additional information or have any
3547# questions.
3548#
3549
3550
3551
3552
3553
3554# Helper function which possibly converts a path using DOS-style short mode.
3555# If so, the updated path is stored in $new_path.
3556# $1: The path to check
3557
3558
3559# Helper function which possibly converts a path using DOS-style short mode.
3560# If so, the updated path is stored in $new_path.
3561# $1: The path to check
3562
3563
3564# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3565# and could probably be heavily simplified. However, all changes in this
3566# area tend to need lot of testing in different scenarios, and in lack of
3567# proper unit testing, cleaning this up has not been deemed worth the effort
3568# at the moment.
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3579
3580
3581
3582
3583#
3584# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3585# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3586#
3587# This code is free software; you can redistribute it and/or modify it
3588# under the terms of the GNU General Public License version 2 only, as
3589# published by the Free Software Foundation.  Oracle designates this
3590# particular file as subject to the "Classpath" exception as provided
3591# by Oracle in the LICENSE file that accompanied this code.
3592#
3593# This code is distributed in the hope that it will be useful, but WITHOUT
3594# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3595# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3596# version 2 for more details (a copy is included in the LICENSE file that
3597# accompanied this code).
3598#
3599# You should have received a copy of the GNU General Public License version
3600# 2 along with this work; if not, write to the Free Software Foundation,
3601# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3602#
3603# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3604# or visit www.oracle.com if you need additional information or have any
3605# questions.
3606#
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618# ... then the rest
3619#
3620# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3622#
3623# This code is free software; you can redistribute it and/or modify it
3624# under the terms of the GNU General Public License version 2 only, as
3625# published by the Free Software Foundation.  Oracle designates this
3626# particular file as subject to the "Classpath" exception as provided
3627# by Oracle in the LICENSE file that accompanied this code.
3628#
3629# This code is distributed in the hope that it will be useful, but WITHOUT
3630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3632# version 2 for more details (a copy is included in the LICENSE file that
3633# accompanied this code).
3634#
3635# You should have received a copy of the GNU General Public License version
3636# 2 along with this work; if not, write to the Free Software Foundation,
3637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3638#
3639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3640# or visit www.oracle.com if you need additional information or have any
3641# questions.
3642#
3643
3644########################################################################
3645# This file handles detection of the Boot JDK. The Boot JDK detection
3646# process has been developed as a response to solve a complex real-world
3647# problem. Initially, it was simple, but it has grown as platform after
3648# platform, idiosyncracy after idiosyncracy has been supported.
3649#
3650# The basic idea is this:
3651# 1) You need an acceptable *) JDK to use as a Boot JDK
3652# 2) There are several ways to locate a JDK, that are mostly platform
3653#    dependent **)
3654# 3) You can have multiple JDKs installed
3655# 4) If possible, configure should try to dig out an acceptable JDK
3656#    automatically, without having to resort to command-line options
3657#
3658# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3659#     javac) and not a JRE, etc.
3660#
3661# **) On Windows we typically use a well-known path.
3662#     On MacOSX we typically use the tool java_home.
3663#     On Linux we typically find javac in the $PATH, and then follow a
3664#     chain of symlinks that often ends up in a real JDK.
3665#
3666# This leads to the code where we check in different ways to locate a
3667# JDK, and if one is found, check if it is acceptable. If not, we print
3668# our reasons for rejecting it (useful when debugging non-working
3669# configure situations) and continue checking the next one.
3670########################################################################
3671
3672# Execute the check given as argument, and verify the result
3673# If the Boot JDK was previously found, do nothing
3674# $1 A command line (typically autoconf macro) to execute
3675
3676
3677# Test: Is bootjdk explicitely set by command line arguments?
3678
3679
3680# Test: Is bootjdk available from builddeps?
3681
3682
3683# Test: Is $JAVA_HOME set?
3684
3685
3686# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3687
3688
3689# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3690# $1: Argument to the java_home binary (optional)
3691
3692
3693# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3694
3695
3696# Look for a jdk in the given path. If there are multiple, try to select the newest.
3697# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3698# $1 = Path to directory containing jdk installations.
3699# $2 = String to append to the found JDK directory to get the proper JDK home
3700
3701
3702# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3703# environmental variable as base for where to look.
3704# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3705
3706
3707# Test: Is there a JDK installed in default, well-known locations?
3708
3709
3710# Check that a command-line tool in the Boot JDK is correct
3711# $1 = name of variable to assign
3712# $2 = name of binary
3713
3714
3715###############################################################################
3716#
3717# We need a Boot JDK to bootstrap the build.
3718#
3719
3720
3721
3722
3723
3724#
3725# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3726# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3727#
3728# This code is free software; you can redistribute it and/or modify it
3729# under the terms of the GNU General Public License version 2 only, as
3730# published by the Free Software Foundation.  Oracle designates this
3731# particular file as subject to the "Classpath" exception as provided
3732# by Oracle in the LICENSE file that accompanied this code.
3733#
3734# This code is distributed in the hope that it will be useful, but WITHOUT
3735# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3736# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3737# version 2 for more details (a copy is included in the LICENSE file that
3738# accompanied this code).
3739#
3740# You should have received a copy of the GNU General Public License version
3741# 2 along with this work; if not, write to the Free Software Foundation,
3742# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3743#
3744# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3745# or visit www.oracle.com if you need additional information or have any
3746# questions.
3747#
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768#
3769# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3770# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3771#
3772# This code is free software; you can redistribute it and/or modify it
3773# under the terms of the GNU General Public License version 2 only, as
3774# published by the Free Software Foundation.  Oracle designates this
3775# particular file as subject to the "Classpath" exception as provided
3776# by Oracle in the LICENSE file that accompanied this code.
3777#
3778# This code is distributed in the hope that it will be useful, but WITHOUT
3779# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3780# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3781# version 2 for more details (a copy is included in the LICENSE file that
3782# accompanied this code).
3783#
3784# You should have received a copy of the GNU General Public License version
3785# 2 along with this work; if not, write to the Free Software Foundation,
3786# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3787#
3788# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3789# or visit www.oracle.com if you need additional information or have any
3790# questions.
3791#
3792
3793
3794
3795
3796
3797# Documentation on common flags used for solstudio in HIGHEST.
3798#
3799# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3800#          done with care, there are some assumptions below that need to
3801#          be understood about the use of pointers, and IEEE behavior.
3802#
3803# -fns: Use non-standard floating point mode (not IEEE 754)
3804# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3805# -fsingle: Use single precision floating point with 'float'
3806# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3807#   (Source with excessing pointer casting and data access with mixed
3808#    pointer types are not recommended)
3809# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3810#   (If you expect perfect errno behavior, do not use this)
3811# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3812# -xrestrict: Pointer parameters to functions do not overlap
3813#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3814#    If you pass in multiple pointers to the same data, do not use this)
3815# -xlibmil: Inline some library routines
3816#   (If you expect perfect errno behavior, do not use this)
3817# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3818#   (If you expect perfect errno behavior, do not use this)
3819#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3820
3821    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3822    # Bug?
3823    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3824    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3825    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3826    #fi
3827
3828
3829
3830
3831
3832# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3833#                                   [RUN-IF-FALSE])
3834# ------------------------------------------------------------
3835# Check that the c and c++ compilers support an argument
3836
3837
3838# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3839#                                    [RUN-IF-FALSE])
3840# ------------------------------------------------------------
3841# Check that the linker support an argument
3842
3843
3844
3845
3846#
3847# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3848# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3849#
3850# This code is free software; you can redistribute it and/or modify it
3851# under the terms of the GNU General Public License version 2 only, as
3852# published by the Free Software Foundation.  Oracle designates this
3853# particular file as subject to the "Classpath" exception as provided
3854# by Oracle in the LICENSE file that accompanied this code.
3855#
3856# This code is distributed in the hope that it will be useful, but WITHOUT
3857# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3858# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3859# version 2 for more details (a copy is included in the LICENSE file that
3860# accompanied this code).
3861#
3862# You should have received a copy of the GNU General Public License version
3863# 2 along with this work; if not, write to the Free Software Foundation,
3864# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3865#
3866# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3867# or visit www.oracle.com if you need additional information or have any
3868# questions.
3869#
3870
3871
3872
3873
3874
3875cygwin_help() {
3876  case $1 in
3877    unzip)
3878      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3879      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3880      ;;
3881    zip)
3882      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3883      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3884      ;;
3885    make)
3886      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3888      ;;
3889    freetype)
3890      HELP_MSG="
3891The freetype library can now be build during the configure process.
3892Download the freetype sources and unpack them into an arbitrary directory:
3893
3894wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3895tar -xzf freetype-2.5.3.tar.gz
3896
3897Then run configure with '--with-freetype-src=<freetype_src>'. This will
3898automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3899builds or into '<freetype_src>/lib32' for 32-bit builds.
3900Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3901and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3902      ;;
3903  esac
3904}
3905
3906msys_help() {
3907  PKGHANDLER_COMMAND=""
3908}
3909
3910apt_help() {
3911  case $1 in
3912    devkit)
3913      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3914    openjdk)
3915      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3916    alsa)
3917      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3918    cups)
3919      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3920    freetype)
3921      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3922    pulse)
3923      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3924    x11)
3925      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3926    ccache)
3927      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3928  esac
3929}
3930
3931yum_help() {
3932  case $1 in
3933    devkit)
3934      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3935    openjdk)
3936      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3937    alsa)
3938      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3939    cups)
3940      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3941    freetype)
3942      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3943    pulse)
3944      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3945    x11)
3946      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3947    ccache)
3948      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3949  esac
3950}
3951
3952port_help() {
3953  PKGHANDLER_COMMAND=""
3954}
3955
3956pkgutil_help() {
3957  PKGHANDLER_COMMAND=""
3958}
3959
3960pkgadd_help() {
3961  PKGHANDLER_COMMAND=""
3962}
3963
3964# This function will check if we're called from the "configure" wrapper while
3965# printing --help. If so, we will print out additional information that can
3966# only be extracted within the autoconf script, and then exit. This must be
3967# called at the very beginning in configure.ac.
3968
3969
3970
3971
3972
3973
3974#
3975# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3976# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977#
3978# This code is free software; you can redistribute it and/or modify it
3979# under the terms of the GNU General Public License version 2 only, as
3980# published by the Free Software Foundation.  Oracle designates this
3981# particular file as subject to the "Classpath" exception as provided
3982# by Oracle in the LICENSE file that accompanied this code.
3983#
3984# This code is distributed in the hope that it will be useful, but WITHOUT
3985# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987# version 2 for more details (a copy is included in the LICENSE file that
3988# accompanied this code).
3989#
3990# You should have received a copy of the GNU General Public License version
3991# 2 along with this work; if not, write to the Free Software Foundation,
3992# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993#
3994# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995# or visit www.oracle.com if you need additional information or have any
3996# questions.
3997#
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008###############################################################################
4009#
4010# Should we build only OpenJDK even if closed sources are present?
4011#
4012
4013
4014
4015
4016###############################################################################
4017#
4018# Setup version numbers
4019#
4020
4021
4022
4023
4024
4025
4026#
4027# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4028# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4029#
4030# This code is free software; you can redistribute it and/or modify it
4031# under the terms of the GNU General Public License version 2 only, as
4032# published by the Free Software Foundation.  Oracle designates this
4033# particular file as subject to the "Classpath" exception as provided
4034# by Oracle in the LICENSE file that accompanied this code.
4035#
4036# This code is distributed in the hope that it will be useful, but WITHOUT
4037# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4038# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4039# version 2 for more details (a copy is included in the LICENSE file that
4040# accompanied this code).
4041#
4042# You should have received a copy of the GNU General Public License version
4043# 2 along with this work; if not, write to the Free Software Foundation,
4044# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4045#
4046# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4047# or visit www.oracle.com if you need additional information or have any
4048# questions.
4049#
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071#
4072# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4073# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4074#
4075# This code is free software; you can redistribute it and/or modify it
4076# under the terms of the GNU General Public License version 2 only, as
4077# published by the Free Software Foundation.  Oracle designates this
4078# particular file as subject to the "Classpath" exception as provided
4079# by Oracle in the LICENSE file that accompanied this code.
4080#
4081# This code is distributed in the hope that it will be useful, but WITHOUT
4082# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4083# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4084# version 2 for more details (a copy is included in the LICENSE file that
4085# accompanied this code).
4086#
4087# You should have received a copy of the GNU General Public License version
4088# 2 along with this work; if not, write to the Free Software Foundation,
4089# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4090#
4091# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4092# or visit www.oracle.com if you need additional information or have any
4093# questions.
4094#
4095
4096# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4097# Converts autoconf style CPU name to OpenJDK style, into
4098# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4099
4100
4101# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4102# Converts autoconf style OS name to OpenJDK style, into
4103# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4104
4105
4106# Expects $host_os $host_cpu $build_os and $build_cpu
4107# and $with_target_bits to have been setup!
4108#
4109# Translate the standard triplet(quadruplet) definition
4110# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4111# OPENJDK_BUILD_OS, etc.
4112
4113
4114# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4115# accordingly. Must be done after setting up build and target system, but before
4116# doing anything else with these values.
4117
4118
4119# Setup the legacy variables, for controlling the old makefiles.
4120#
4121
4122
4123
4124
4125#%%% Build and target systems %%%
4126
4127
4128
4129
4130# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4131# Add -mX to various FLAGS variables.
4132
4133
4134
4135
4136
4137
4138#
4139# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4140# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4141#
4142# This code is free software; you can redistribute it and/or modify it
4143# under the terms of the GNU General Public License version 2 only, as
4144# published by the Free Software Foundation.  Oracle designates this
4145# particular file as subject to the "Classpath" exception as provided
4146# by Oracle in the LICENSE file that accompanied this code.
4147#
4148# This code is distributed in the hope that it will be useful, but WITHOUT
4149# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4150# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4151# version 2 for more details (a copy is included in the LICENSE file that
4152# accompanied this code).
4153#
4154# You should have received a copy of the GNU General Public License version
4155# 2 along with this work; if not, write to the Free Software Foundation,
4156# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4157#
4158# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4159# or visit www.oracle.com if you need additional information or have any
4160# questions.
4161#
4162
4163
4164
4165
4166
4167
4168
4169
4170#
4171# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4172# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4173#
4174# This code is free software; you can redistribute it and/or modify it
4175# under the terms of the GNU General Public License version 2 only, as
4176# published by the Free Software Foundation.  Oracle designates this
4177# particular file as subject to the "Classpath" exception as provided
4178# by Oracle in the LICENSE file that accompanied this code.
4179#
4180# This code is distributed in the hope that it will be useful, but WITHOUT
4181# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4182# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4183# version 2 for more details (a copy is included in the LICENSE file that
4184# accompanied this code).
4185#
4186# You should have received a copy of the GNU General Public License version
4187# 2 along with this work; if not, write to the Free Software Foundation,
4188# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4189#
4190# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4191# or visit www.oracle.com if you need additional information or have any
4192# questions.
4193#
4194
4195########################################################################
4196# This file is responsible for detecting, verifying and setting up the
4197# toolchain, i.e. the compiler, linker and related utilities. It will setup
4198# proper paths to the binaries, but it will not setup any flags.
4199#
4200# The binaries used is determined by the toolchain type, which is the family of
4201# compilers and related tools that are used.
4202########################################################################
4203
4204
4205# All valid toolchains, regardless of platform (used by help.m4)
4206VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4207
4208# These toolchains are valid on different platforms
4209VALID_TOOLCHAINS_linux="gcc clang"
4210VALID_TOOLCHAINS_solaris="solstudio"
4211VALID_TOOLCHAINS_macosx="gcc clang"
4212VALID_TOOLCHAINS_aix="xlc"
4213VALID_TOOLCHAINS_windows="microsoft"
4214
4215# Toolchain descriptions
4216TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4217TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4218TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4219TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4220TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4221
4222# Setup a number of variables describing how native output files are
4223# named on this platform/toolchain.
4224
4225
4226# Determine which toolchain type to use, and make sure it is valid for this
4227# platform. Setup various information about the selected toolchain.
4228
4229
4230# Before we start detecting the toolchain executables, we might need some
4231# special setup, e.g. additional paths etc.
4232
4233
4234# Restore path, etc
4235
4236
4237# Check if a compiler is of the toolchain type we expect, and save the version
4238# information from it. If the compiler does not match the expected type,
4239# this function will abort using AC_MSG_ERROR. If it matches, the version will
4240# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4241# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4242#
4243# $1 = compiler to test (CC or CXX)
4244# $2 = human readable name of compiler (C or C++)
4245
4246
4247# Try to locate the given C or C++ compiler in the path, or otherwise.
4248#
4249# $1 = compiler to test (CC or CXX)
4250# $2 = human readable name of compiler (C or C++)
4251# $3 = list of compiler names to search for
4252
4253
4254# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4255# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4256# archiver (AR). Verify that the compilers are correct according to the
4257# toolchain type.
4258
4259
4260# Setup additional tools that is considered a part of the toolchain, but not the
4261# core part. Many of these are highly platform-specific and do not exist,
4262# and/or are not needed on all platforms.
4263
4264
4265# Setup the build tools (i.e, the compiler and linker used to build programs
4266# that should be run on the build platform, not the target platform, as a build
4267# helper). Since the non-cross-compile case uses the normal, target compilers
4268# for this, we can only do this after these have been setup.
4269
4270
4271# Setup legacy variables that are still needed as alternative ways to refer to
4272# parts of the toolchain.
4273
4274
4275# Do some additional checks on the detected tools.
4276
4277
4278# Setup the JTReg Regression Test Harness.
4279
4280
4281#
4282# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4283# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4284#
4285# This code is free software; you can redistribute it and/or modify it
4286# under the terms of the GNU General Public License version 2 only, as
4287# published by the Free Software Foundation.  Oracle designates this
4288# particular file as subject to the "Classpath" exception as provided
4289# by Oracle in the LICENSE file that accompanied this code.
4290#
4291# This code is distributed in the hope that it will be useful, but WITHOUT
4292# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4293# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4294# version 2 for more details (a copy is included in the LICENSE file that
4295# accompanied this code).
4296#
4297# You should have received a copy of the GNU General Public License version
4298# 2 along with this work; if not, write to the Free Software Foundation,
4299# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4300#
4301# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4302# or visit www.oracle.com if you need additional information or have any
4303# questions.
4304#
4305
4306
4307
4308
4309
4310
4311
4312# Check if the VS env variables were setup prior to running configure.
4313# If not, then find vcvarsall.bat and run it automatically, and integrate
4314# the set env variables into the spec file.
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326# This line needs to be here, verbatim, after all includes and the dummy hook
4327# definitions. It is replaced with custom functionality when building
4328# custom sources.
4329#CUSTOM_AUTOCONF_INCLUDE
4330
4331# Do not change or remove the following line, it is needed for consistency checks:
4332DATE_WHEN_GENERATED=1418339094
4333
4334###############################################################################
4335#
4336# Initialization / Boot-strapping
4337#
4338# The bootstrapping process needs to solve the "chicken or the egg" problem,
4339# thus it jumps back and forth, each time gaining something needed later on.
4340#
4341###############################################################################
4342
4343# If we are requested to print additional help, do that and then exit.
4344# This must be the very first call.
4345
4346  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4347    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4348    $PRINTF "Which are valid to use depends on the build platform.\n"
4349    for toolchain in $VALID_TOOLCHAINS_all; do
4350      # Use indirect variable referencing
4351      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4352      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4353      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4354    done
4355
4356    # And now exit directly
4357    exit 0
4358  fi
4359
4360
4361# Basic initialization that must happen first of all in the normal process.
4362
4363  # Save the original command line. This is passed to us by the wrapper configure script.
4364
4365  DATE_WHEN_CONFIGURED=`LANG=C date`
4366
4367  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4368$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4369  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4370$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4371
4372
4373  # Start with tools that do not need have cross compilation support
4374  # and can be expected to be found in the default PATH. These tools are
4375  # used by configure. Nor are these tools expected to be found in the
4376  # devkit from the builddeps server either, since they are
4377  # needed to download the devkit.
4378
4379  # First are all the simple required tools.
4380
4381
4382
4383  # Publish this variable in the help.
4384
4385
4386  if test "x$BASENAME" = x; then
4387    # The variable is not set by user, try to locate tool using the code snippet
4388    for ac_prog in basename
4389do
4390  # Extract the first word of "$ac_prog", so it can be a program name with args.
4391set dummy $ac_prog; ac_word=$2
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4393$as_echo_n "checking for $ac_word... " >&6; }
4394if ${ac_cv_path_BASENAME+:} false; then :
4395  $as_echo_n "(cached) " >&6
4396else
4397  case $BASENAME in
4398  [\\/]* | ?:[\\/]*)
4399  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4400  ;;
4401  *)
4402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in $PATH
4404do
4405  IFS=$as_save_IFS
4406  test -z "$as_dir" && as_dir=.
4407    for ac_exec_ext in '' $ac_executable_extensions; do
4408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4409    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4411    break 2
4412  fi
4413done
4414  done
4415IFS=$as_save_IFS
4416
4417  ;;
4418esac
4419fi
4420BASENAME=$ac_cv_path_BASENAME
4421if test -n "$BASENAME"; then
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4423$as_echo "$BASENAME" >&6; }
4424else
4425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4426$as_echo "no" >&6; }
4427fi
4428
4429
4430  test -n "$BASENAME" && break
4431done
4432
4433  else
4434    # The variable is set, but is it from the command line or the environment?
4435
4436    # Try to remove the string !BASENAME! from our list.
4437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4439      # If it failed, the variable was not from the command line. Ignore it,
4440      # but warn the user (except for BASH, which is always set by the calling BASH).
4441      if test "xBASENAME" != xBASH; then
4442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4443$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4444      fi
4445      # Try to locate tool using the code snippet
4446      for ac_prog in basename
4447do
4448  # Extract the first word of "$ac_prog", so it can be a program name with args.
4449set dummy $ac_prog; ac_word=$2
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4451$as_echo_n "checking for $ac_word... " >&6; }
4452if ${ac_cv_path_BASENAME+:} false; then :
4453  $as_echo_n "(cached) " >&6
4454else
4455  case $BASENAME in
4456  [\\/]* | ?:[\\/]*)
4457  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4458  ;;
4459  *)
4460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in $PATH
4462do
4463  IFS=$as_save_IFS
4464  test -z "$as_dir" && as_dir=.
4465    for ac_exec_ext in '' $ac_executable_extensions; do
4466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4467    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4469    break 2
4470  fi
4471done
4472  done
4473IFS=$as_save_IFS
4474
4475  ;;
4476esac
4477fi
4478BASENAME=$ac_cv_path_BASENAME
4479if test -n "$BASENAME"; then
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4481$as_echo "$BASENAME" >&6; }
4482else
4483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4484$as_echo "no" >&6; }
4485fi
4486
4487
4488  test -n "$BASENAME" && break
4489done
4490
4491    else
4492      # If it succeeded, then it was overridden by the user. We will use it
4493      # for the tool.
4494
4495      # First remove it from the list of overridden variables, so we can test
4496      # for unknown variables in the end.
4497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4498
4499      # Check if the provided tool contains a complete path.
4500      tool_specified="$BASENAME"
4501      tool_basename="${tool_specified##*/}"
4502      if test "x$tool_basename" = "x$tool_specified"; then
4503        # A command without a complete path is provided, search $PATH.
4504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4505$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4506        # Extract the first word of "$tool_basename", so it can be a program name with args.
4507set dummy $tool_basename; ac_word=$2
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4509$as_echo_n "checking for $ac_word... " >&6; }
4510if ${ac_cv_path_BASENAME+:} false; then :
4511  $as_echo_n "(cached) " >&6
4512else
4513  case $BASENAME in
4514  [\\/]* | ?:[\\/]*)
4515  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4516  ;;
4517  *)
4518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH
4520do
4521  IFS=$as_save_IFS
4522  test -z "$as_dir" && as_dir=.
4523    for ac_exec_ext in '' $ac_executable_extensions; do
4524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4525    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4527    break 2
4528  fi
4529done
4530  done
4531IFS=$as_save_IFS
4532
4533  ;;
4534esac
4535fi
4536BASENAME=$ac_cv_path_BASENAME
4537if test -n "$BASENAME"; then
4538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4539$as_echo "$BASENAME" >&6; }
4540else
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542$as_echo "no" >&6; }
4543fi
4544
4545
4546        if test "x$BASENAME" = x; then
4547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4548        fi
4549      else
4550        # Otherwise we believe it is a complete path. Use it as it is.
4551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4552$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4554$as_echo_n "checking for BASENAME... " >&6; }
4555        if test ! -x "$tool_specified"; then
4556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4557$as_echo "not found" >&6; }
4558          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4559        fi
4560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4561$as_echo "$tool_specified" >&6; }
4562      fi
4563    fi
4564  fi
4565
4566
4567
4568  if test "x$BASENAME" = x; then
4569    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4570  fi
4571
4572
4573
4574
4575
4576  # Publish this variable in the help.
4577
4578
4579  if test "x$BASH" = x; then
4580    # The variable is not set by user, try to locate tool using the code snippet
4581    for ac_prog in bash
4582do
4583  # Extract the first word of "$ac_prog", so it can be a program name with args.
4584set dummy $ac_prog; ac_word=$2
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586$as_echo_n "checking for $ac_word... " >&6; }
4587if ${ac_cv_path_BASH+:} false; then :
4588  $as_echo_n "(cached) " >&6
4589else
4590  case $BASH in
4591  [\\/]* | ?:[\\/]*)
4592  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4593  ;;
4594  *)
4595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in $PATH
4597do
4598  IFS=$as_save_IFS
4599  test -z "$as_dir" && as_dir=.
4600    for ac_exec_ext in '' $ac_executable_extensions; do
4601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4602    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4604    break 2
4605  fi
4606done
4607  done
4608IFS=$as_save_IFS
4609
4610  ;;
4611esac
4612fi
4613BASH=$ac_cv_path_BASH
4614if test -n "$BASH"; then
4615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4616$as_echo "$BASH" >&6; }
4617else
4618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619$as_echo "no" >&6; }
4620fi
4621
4622
4623  test -n "$BASH" && break
4624done
4625
4626  else
4627    # The variable is set, but is it from the command line or the environment?
4628
4629    # Try to remove the string !BASH! from our list.
4630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4632      # If it failed, the variable was not from the command line. Ignore it,
4633      # but warn the user (except for BASH, which is always set by the calling BASH).
4634      if test "xBASH" != xBASH; then
4635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4636$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4637      fi
4638      # Try to locate tool using the code snippet
4639      for ac_prog in bash
4640do
4641  # Extract the first word of "$ac_prog", so it can be a program name with args.
4642set dummy $ac_prog; ac_word=$2
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644$as_echo_n "checking for $ac_word... " >&6; }
4645if ${ac_cv_path_BASH+:} false; then :
4646  $as_echo_n "(cached) " >&6
4647else
4648  case $BASH in
4649  [\\/]* | ?:[\\/]*)
4650  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4651  ;;
4652  *)
4653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in $PATH
4655do
4656  IFS=$as_save_IFS
4657  test -z "$as_dir" && as_dir=.
4658    for ac_exec_ext in '' $ac_executable_extensions; do
4659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4660    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662    break 2
4663  fi
4664done
4665  done
4666IFS=$as_save_IFS
4667
4668  ;;
4669esac
4670fi
4671BASH=$ac_cv_path_BASH
4672if test -n "$BASH"; then
4673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4674$as_echo "$BASH" >&6; }
4675else
4676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680
4681  test -n "$BASH" && break
4682done
4683
4684    else
4685      # If it succeeded, then it was overridden by the user. We will use it
4686      # for the tool.
4687
4688      # First remove it from the list of overridden variables, so we can test
4689      # for unknown variables in the end.
4690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4691
4692      # Check if the provided tool contains a complete path.
4693      tool_specified="$BASH"
4694      tool_basename="${tool_specified##*/}"
4695      if test "x$tool_basename" = "x$tool_specified"; then
4696        # A command without a complete path is provided, search $PATH.
4697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4698$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4699        # Extract the first word of "$tool_basename", so it can be a program name with args.
4700set dummy $tool_basename; ac_word=$2
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702$as_echo_n "checking for $ac_word... " >&6; }
4703if ${ac_cv_path_BASH+:} false; then :
4704  $as_echo_n "(cached) " >&6
4705else
4706  case $BASH in
4707  [\\/]* | ?:[\\/]*)
4708  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4709  ;;
4710  *)
4711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in $PATH
4713do
4714  IFS=$as_save_IFS
4715  test -z "$as_dir" && as_dir=.
4716    for ac_exec_ext in '' $ac_executable_extensions; do
4717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4718    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720    break 2
4721  fi
4722done
4723  done
4724IFS=$as_save_IFS
4725
4726  ;;
4727esac
4728fi
4729BASH=$ac_cv_path_BASH
4730if test -n "$BASH"; then
4731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4732$as_echo "$BASH" >&6; }
4733else
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
4736fi
4737
4738
4739        if test "x$BASH" = x; then
4740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4741        fi
4742      else
4743        # Otherwise we believe it is a complete path. Use it as it is.
4744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4745$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4747$as_echo_n "checking for BASH... " >&6; }
4748        if test ! -x "$tool_specified"; then
4749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4750$as_echo "not found" >&6; }
4751          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4752        fi
4753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4754$as_echo "$tool_specified" >&6; }
4755      fi
4756    fi
4757  fi
4758
4759
4760
4761  if test "x$BASH" = x; then
4762    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4763  fi
4764
4765
4766
4767
4768
4769  # Publish this variable in the help.
4770
4771
4772  if test "x$CAT" = x; then
4773    # The variable is not set by user, try to locate tool using the code snippet
4774    for ac_prog in cat
4775do
4776  # Extract the first word of "$ac_prog", so it can be a program name with args.
4777set dummy $ac_prog; ac_word=$2
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
4780if ${ac_cv_path_CAT+:} false; then :
4781  $as_echo_n "(cached) " >&6
4782else
4783  case $CAT in
4784  [\\/]* | ?:[\\/]*)
4785  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4786  ;;
4787  *)
4788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in $PATH
4790do
4791  IFS=$as_save_IFS
4792  test -z "$as_dir" && as_dir=.
4793    for ac_exec_ext in '' $ac_executable_extensions; do
4794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4795    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4797    break 2
4798  fi
4799done
4800  done
4801IFS=$as_save_IFS
4802
4803  ;;
4804esac
4805fi
4806CAT=$ac_cv_path_CAT
4807if test -n "$CAT"; then
4808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4809$as_echo "$CAT" >&6; }
4810else
4811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
4813fi
4814
4815
4816  test -n "$CAT" && break
4817done
4818
4819  else
4820    # The variable is set, but is it from the command line or the environment?
4821
4822    # Try to remove the string !CAT! from our list.
4823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4825      # If it failed, the variable was not from the command line. Ignore it,
4826      # but warn the user (except for BASH, which is always set by the calling BASH).
4827      if test "xCAT" != xBASH; then
4828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4829$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4830      fi
4831      # Try to locate tool using the code snippet
4832      for ac_prog in cat
4833do
4834  # Extract the first word of "$ac_prog", so it can be a program name with args.
4835set dummy $ac_prog; ac_word=$2
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837$as_echo_n "checking for $ac_word... " >&6; }
4838if ${ac_cv_path_CAT+:} false; then :
4839  $as_echo_n "(cached) " >&6
4840else
4841  case $CAT in
4842  [\\/]* | ?:[\\/]*)
4843  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4844  ;;
4845  *)
4846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847for as_dir in $PATH
4848do
4849  IFS=$as_save_IFS
4850  test -z "$as_dir" && as_dir=.
4851    for ac_exec_ext in '' $ac_executable_extensions; do
4852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4853    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855    break 2
4856  fi
4857done
4858  done
4859IFS=$as_save_IFS
4860
4861  ;;
4862esac
4863fi
4864CAT=$ac_cv_path_CAT
4865if test -n "$CAT"; then
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4867$as_echo "$CAT" >&6; }
4868else
4869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872
4873
4874  test -n "$CAT" && break
4875done
4876
4877    else
4878      # If it succeeded, then it was overridden by the user. We will use it
4879      # for the tool.
4880
4881      # First remove it from the list of overridden variables, so we can test
4882      # for unknown variables in the end.
4883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4884
4885      # Check if the provided tool contains a complete path.
4886      tool_specified="$CAT"
4887      tool_basename="${tool_specified##*/}"
4888      if test "x$tool_basename" = "x$tool_specified"; then
4889        # A command without a complete path is provided, search $PATH.
4890        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4891$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4892        # Extract the first word of "$tool_basename", so it can be a program name with args.
4893set dummy $tool_basename; ac_word=$2
4894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4895$as_echo_n "checking for $ac_word... " >&6; }
4896if ${ac_cv_path_CAT+:} false; then :
4897  $as_echo_n "(cached) " >&6
4898else
4899  case $CAT in
4900  [\\/]* | ?:[\\/]*)
4901  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4902  ;;
4903  *)
4904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in $PATH
4906do
4907  IFS=$as_save_IFS
4908  test -z "$as_dir" && as_dir=.
4909    for ac_exec_ext in '' $ac_executable_extensions; do
4910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4911    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4913    break 2
4914  fi
4915done
4916  done
4917IFS=$as_save_IFS
4918
4919  ;;
4920esac
4921fi
4922CAT=$ac_cv_path_CAT
4923if test -n "$CAT"; then
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4925$as_echo "$CAT" >&6; }
4926else
4927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928$as_echo "no" >&6; }
4929fi
4930
4931
4932        if test "x$CAT" = x; then
4933          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4934        fi
4935      else
4936        # Otherwise we believe it is a complete path. Use it as it is.
4937        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4938$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4940$as_echo_n "checking for CAT... " >&6; }
4941        if test ! -x "$tool_specified"; then
4942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4943$as_echo "not found" >&6; }
4944          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4945        fi
4946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4947$as_echo "$tool_specified" >&6; }
4948      fi
4949    fi
4950  fi
4951
4952
4953
4954  if test "x$CAT" = x; then
4955    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4956  fi
4957
4958
4959
4960
4961
4962  # Publish this variable in the help.
4963
4964
4965  if test "x$CHMOD" = x; then
4966    # The variable is not set by user, try to locate tool using the code snippet
4967    for ac_prog in chmod
4968do
4969  # Extract the first word of "$ac_prog", so it can be a program name with args.
4970set dummy $ac_prog; ac_word=$2
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
4973if ${ac_cv_path_CHMOD+:} false; then :
4974  $as_echo_n "(cached) " >&6
4975else
4976  case $CHMOD in
4977  [\\/]* | ?:[\\/]*)
4978  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4979  ;;
4980  *)
4981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984  IFS=$as_save_IFS
4985  test -z "$as_dir" && as_dir=.
4986    for ac_exec_ext in '' $ac_executable_extensions; do
4987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4988    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990    break 2
4991  fi
4992done
4993  done
4994IFS=$as_save_IFS
4995
4996  ;;
4997esac
4998fi
4999CHMOD=$ac_cv_path_CHMOD
5000if test -n "$CHMOD"; then
5001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5002$as_echo "$CHMOD" >&6; }
5003else
5004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006fi
5007
5008
5009  test -n "$CHMOD" && break
5010done
5011
5012  else
5013    # The variable is set, but is it from the command line or the environment?
5014
5015    # Try to remove the string !CHMOD! from our list.
5016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5018      # If it failed, the variable was not from the command line. Ignore it,
5019      # but warn the user (except for BASH, which is always set by the calling BASH).
5020      if test "xCHMOD" != xBASH; then
5021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5022$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5023      fi
5024      # Try to locate tool using the code snippet
5025      for ac_prog in chmod
5026do
5027  # Extract the first word of "$ac_prog", so it can be a program name with args.
5028set dummy $ac_prog; ac_word=$2
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030$as_echo_n "checking for $ac_word... " >&6; }
5031if ${ac_cv_path_CHMOD+:} false; then :
5032  $as_echo_n "(cached) " >&6
5033else
5034  case $CHMOD in
5035  [\\/]* | ?:[\\/]*)
5036  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5037  ;;
5038  *)
5039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042  IFS=$as_save_IFS
5043  test -z "$as_dir" && as_dir=.
5044    for ac_exec_ext in '' $ac_executable_extensions; do
5045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048    break 2
5049  fi
5050done
5051  done
5052IFS=$as_save_IFS
5053
5054  ;;
5055esac
5056fi
5057CHMOD=$ac_cv_path_CHMOD
5058if test -n "$CHMOD"; then
5059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5060$as_echo "$CHMOD" >&6; }
5061else
5062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
5064fi
5065
5066
5067  test -n "$CHMOD" && break
5068done
5069
5070    else
5071      # If it succeeded, then it was overridden by the user. We will use it
5072      # for the tool.
5073
5074      # First remove it from the list of overridden variables, so we can test
5075      # for unknown variables in the end.
5076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5077
5078      # Check if the provided tool contains a complete path.
5079      tool_specified="$CHMOD"
5080      tool_basename="${tool_specified##*/}"
5081      if test "x$tool_basename" = "x$tool_specified"; then
5082        # A command without a complete path is provided, search $PATH.
5083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5084$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5085        # Extract the first word of "$tool_basename", so it can be a program name with args.
5086set dummy $tool_basename; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
5089if ${ac_cv_path_CHMOD+:} false; then :
5090  $as_echo_n "(cached) " >&6
5091else
5092  case $CHMOD in
5093  [\\/]* | ?:[\\/]*)
5094  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5095  ;;
5096  *)
5097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100  IFS=$as_save_IFS
5101  test -z "$as_dir" && as_dir=.
5102    for ac_exec_ext in '' $ac_executable_extensions; do
5103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5104    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106    break 2
5107  fi
5108done
5109  done
5110IFS=$as_save_IFS
5111
5112  ;;
5113esac
5114fi
5115CHMOD=$ac_cv_path_CHMOD
5116if test -n "$CHMOD"; then
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5118$as_echo "$CHMOD" >&6; }
5119else
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124
5125        if test "x$CHMOD" = x; then
5126          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5127        fi
5128      else
5129        # Otherwise we believe it is a complete path. Use it as it is.
5130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5131$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5133$as_echo_n "checking for CHMOD... " >&6; }
5134        if test ! -x "$tool_specified"; then
5135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5136$as_echo "not found" >&6; }
5137          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5138        fi
5139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5140$as_echo "$tool_specified" >&6; }
5141      fi
5142    fi
5143  fi
5144
5145
5146
5147  if test "x$CHMOD" = x; then
5148    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5149  fi
5150
5151
5152
5153
5154
5155  # Publish this variable in the help.
5156
5157
5158  if test "x$CMP" = x; then
5159    # The variable is not set by user, try to locate tool using the code snippet
5160    for ac_prog in cmp
5161do
5162  # Extract the first word of "$ac_prog", so it can be a program name with args.
5163set dummy $ac_prog; ac_word=$2
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
5166if ${ac_cv_path_CMP+:} false; then :
5167  $as_echo_n "(cached) " >&6
5168else
5169  case $CMP in
5170  [\\/]* | ?:[\\/]*)
5171  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5172  ;;
5173  *)
5174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5175for as_dir in $PATH
5176do
5177  IFS=$as_save_IFS
5178  test -z "$as_dir" && as_dir=.
5179    for ac_exec_ext in '' $ac_executable_extensions; do
5180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5181    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5183    break 2
5184  fi
5185done
5186  done
5187IFS=$as_save_IFS
5188
5189  ;;
5190esac
5191fi
5192CMP=$ac_cv_path_CMP
5193if test -n "$CMP"; then
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5195$as_echo "$CMP" >&6; }
5196else
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198$as_echo "no" >&6; }
5199fi
5200
5201
5202  test -n "$CMP" && break
5203done
5204
5205  else
5206    # The variable is set, but is it from the command line or the environment?
5207
5208    # Try to remove the string !CMP! from our list.
5209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5211      # If it failed, the variable was not from the command line. Ignore it,
5212      # but warn the user (except for BASH, which is always set by the calling BASH).
5213      if test "xCMP" != xBASH; then
5214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5215$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5216      fi
5217      # Try to locate tool using the code snippet
5218      for ac_prog in cmp
5219do
5220  # Extract the first word of "$ac_prog", so it can be a program name with args.
5221set dummy $ac_prog; ac_word=$2
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223$as_echo_n "checking for $ac_word... " >&6; }
5224if ${ac_cv_path_CMP+:} false; then :
5225  $as_echo_n "(cached) " >&6
5226else
5227  case $CMP in
5228  [\\/]* | ?:[\\/]*)
5229  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5230  ;;
5231  *)
5232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5233for as_dir in $PATH
5234do
5235  IFS=$as_save_IFS
5236  test -z "$as_dir" && as_dir=.
5237    for ac_exec_ext in '' $ac_executable_extensions; do
5238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5239    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5241    break 2
5242  fi
5243done
5244  done
5245IFS=$as_save_IFS
5246
5247  ;;
5248esac
5249fi
5250CMP=$ac_cv_path_CMP
5251if test -n "$CMP"; then
5252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5253$as_echo "$CMP" >&6; }
5254else
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256$as_echo "no" >&6; }
5257fi
5258
5259
5260  test -n "$CMP" && break
5261done
5262
5263    else
5264      # If it succeeded, then it was overridden by the user. We will use it
5265      # for the tool.
5266
5267      # First remove it from the list of overridden variables, so we can test
5268      # for unknown variables in the end.
5269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5270
5271      # Check if the provided tool contains a complete path.
5272      tool_specified="$CMP"
5273      tool_basename="${tool_specified##*/}"
5274      if test "x$tool_basename" = "x$tool_specified"; then
5275        # A command without a complete path is provided, search $PATH.
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5277$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5278        # Extract the first word of "$tool_basename", so it can be a program name with args.
5279set dummy $tool_basename; ac_word=$2
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281$as_echo_n "checking for $ac_word... " >&6; }
5282if ${ac_cv_path_CMP+:} false; then :
5283  $as_echo_n "(cached) " >&6
5284else
5285  case $CMP in
5286  [\\/]* | ?:[\\/]*)
5287  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5288  ;;
5289  *)
5290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291for as_dir in $PATH
5292do
5293  IFS=$as_save_IFS
5294  test -z "$as_dir" && as_dir=.
5295    for ac_exec_ext in '' $ac_executable_extensions; do
5296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5297    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299    break 2
5300  fi
5301done
5302  done
5303IFS=$as_save_IFS
5304
5305  ;;
5306esac
5307fi
5308CMP=$ac_cv_path_CMP
5309if test -n "$CMP"; then
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5311$as_echo "$CMP" >&6; }
5312else
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314$as_echo "no" >&6; }
5315fi
5316
5317
5318        if test "x$CMP" = x; then
5319          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5320        fi
5321      else
5322        # Otherwise we believe it is a complete path. Use it as it is.
5323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5324$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5325        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5326$as_echo_n "checking for CMP... " >&6; }
5327        if test ! -x "$tool_specified"; then
5328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5329$as_echo "not found" >&6; }
5330          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5331        fi
5332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5333$as_echo "$tool_specified" >&6; }
5334      fi
5335    fi
5336  fi
5337
5338
5339
5340  if test "x$CMP" = x; then
5341    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5342  fi
5343
5344
5345
5346
5347
5348  # Publish this variable in the help.
5349
5350
5351  if test "x$COMM" = x; then
5352    # The variable is not set by user, try to locate tool using the code snippet
5353    for ac_prog in comm
5354do
5355  # Extract the first word of "$ac_prog", so it can be a program name with args.
5356set dummy $ac_prog; ac_word=$2
5357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5358$as_echo_n "checking for $ac_word... " >&6; }
5359if ${ac_cv_path_COMM+:} false; then :
5360  $as_echo_n "(cached) " >&6
5361else
5362  case $COMM in
5363  [\\/]* | ?:[\\/]*)
5364  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5365  ;;
5366  *)
5367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5368for as_dir in $PATH
5369do
5370  IFS=$as_save_IFS
5371  test -z "$as_dir" && as_dir=.
5372    for ac_exec_ext in '' $ac_executable_extensions; do
5373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5374    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5376    break 2
5377  fi
5378done
5379  done
5380IFS=$as_save_IFS
5381
5382  ;;
5383esac
5384fi
5385COMM=$ac_cv_path_COMM
5386if test -n "$COMM"; then
5387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5388$as_echo "$COMM" >&6; }
5389else
5390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391$as_echo "no" >&6; }
5392fi
5393
5394
5395  test -n "$COMM" && break
5396done
5397
5398  else
5399    # The variable is set, but is it from the command line or the environment?
5400
5401    # Try to remove the string !COMM! from our list.
5402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5404      # If it failed, the variable was not from the command line. Ignore it,
5405      # but warn the user (except for BASH, which is always set by the calling BASH).
5406      if test "xCOMM" != xBASH; then
5407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5408$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5409      fi
5410      # Try to locate tool using the code snippet
5411      for ac_prog in comm
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if ${ac_cv_path_COMM+:} false; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $COMM in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5432    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443COMM=$ac_cv_path_COMM
5444if test -n "$COMM"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5446$as_echo "$COMM" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$COMM" && break
5454done
5455
5456    else
5457      # If it succeeded, then it was overridden by the user. We will use it
5458      # for the tool.
5459
5460      # First remove it from the list of overridden variables, so we can test
5461      # for unknown variables in the end.
5462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5463
5464      # Check if the provided tool contains a complete path.
5465      tool_specified="$COMM"
5466      tool_basename="${tool_specified##*/}"
5467      if test "x$tool_basename" = "x$tool_specified"; then
5468        # A command without a complete path is provided, search $PATH.
5469        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5470$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5471        # Extract the first word of "$tool_basename", so it can be a program name with args.
5472set dummy $tool_basename; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if ${ac_cv_path_COMM+:} false; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $COMM in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5490    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501COMM=$ac_cv_path_COMM
5502if test -n "$COMM"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5504$as_echo "$COMM" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511        if test "x$COMM" = x; then
5512          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5513        fi
5514      else
5515        # Otherwise we believe it is a complete path. Use it as it is.
5516        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5517$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5519$as_echo_n "checking for COMM... " >&6; }
5520        if test ! -x "$tool_specified"; then
5521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5522$as_echo "not found" >&6; }
5523          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5524        fi
5525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5526$as_echo "$tool_specified" >&6; }
5527      fi
5528    fi
5529  fi
5530
5531
5532
5533  if test "x$COMM" = x; then
5534    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5535  fi
5536
5537
5538
5539
5540
5541  # Publish this variable in the help.
5542
5543
5544  if test "x$CP" = x; then
5545    # The variable is not set by user, try to locate tool using the code snippet
5546    for ac_prog in cp
5547do
5548  # Extract the first word of "$ac_prog", so it can be a program name with args.
5549set dummy $ac_prog; ac_word=$2
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551$as_echo_n "checking for $ac_word... " >&6; }
5552if ${ac_cv_path_CP+:} false; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555  case $CP in
5556  [\\/]* | ?:[\\/]*)
5557  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5558  ;;
5559  *)
5560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561for as_dir in $PATH
5562do
5563  IFS=$as_save_IFS
5564  test -z "$as_dir" && as_dir=.
5565    for ac_exec_ext in '' $ac_executable_extensions; do
5566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569    break 2
5570  fi
5571done
5572  done
5573IFS=$as_save_IFS
5574
5575  ;;
5576esac
5577fi
5578CP=$ac_cv_path_CP
5579if test -n "$CP"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5581$as_echo "$CP" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588  test -n "$CP" && break
5589done
5590
5591  else
5592    # The variable is set, but is it from the command line or the environment?
5593
5594    # Try to remove the string !CP! from our list.
5595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5597      # If it failed, the variable was not from the command line. Ignore it,
5598      # but warn the user (except for BASH, which is always set by the calling BASH).
5599      if test "xCP" != xBASH; then
5600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5601$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5602      fi
5603      # Try to locate tool using the code snippet
5604      for ac_prog in cp
5605do
5606  # Extract the first word of "$ac_prog", so it can be a program name with args.
5607set dummy $ac_prog; ac_word=$2
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5609$as_echo_n "checking for $ac_word... " >&6; }
5610if ${ac_cv_path_CP+:} false; then :
5611  $as_echo_n "(cached) " >&6
5612else
5613  case $CP in
5614  [\\/]* | ?:[\\/]*)
5615  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5616  ;;
5617  *)
5618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619for as_dir in $PATH
5620do
5621  IFS=$as_save_IFS
5622  test -z "$as_dir" && as_dir=.
5623    for ac_exec_ext in '' $ac_executable_extensions; do
5624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5625    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5627    break 2
5628  fi
5629done
5630  done
5631IFS=$as_save_IFS
5632
5633  ;;
5634esac
5635fi
5636CP=$ac_cv_path_CP
5637if test -n "$CP"; then
5638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5639$as_echo "$CP" >&6; }
5640else
5641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642$as_echo "no" >&6; }
5643fi
5644
5645
5646  test -n "$CP" && break
5647done
5648
5649    else
5650      # If it succeeded, then it was overridden by the user. We will use it
5651      # for the tool.
5652
5653      # First remove it from the list of overridden variables, so we can test
5654      # for unknown variables in the end.
5655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5656
5657      # Check if the provided tool contains a complete path.
5658      tool_specified="$CP"
5659      tool_basename="${tool_specified##*/}"
5660      if test "x$tool_basename" = "x$tool_specified"; then
5661        # A command without a complete path is provided, search $PATH.
5662        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5663$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5664        # Extract the first word of "$tool_basename", so it can be a program name with args.
5665set dummy $tool_basename; ac_word=$2
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
5668if ${ac_cv_path_CP+:} false; then :
5669  $as_echo_n "(cached) " >&6
5670else
5671  case $CP in
5672  [\\/]* | ?:[\\/]*)
5673  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5674  ;;
5675  *)
5676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5677for as_dir in $PATH
5678do
5679  IFS=$as_save_IFS
5680  test -z "$as_dir" && as_dir=.
5681    for ac_exec_ext in '' $ac_executable_extensions; do
5682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5683    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5685    break 2
5686  fi
5687done
5688  done
5689IFS=$as_save_IFS
5690
5691  ;;
5692esac
5693fi
5694CP=$ac_cv_path_CP
5695if test -n "$CP"; then
5696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5697$as_echo "$CP" >&6; }
5698else
5699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
5701fi
5702
5703
5704        if test "x$CP" = x; then
5705          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5706        fi
5707      else
5708        # Otherwise we believe it is a complete path. Use it as it is.
5709        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5710$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5712$as_echo_n "checking for CP... " >&6; }
5713        if test ! -x "$tool_specified"; then
5714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5715$as_echo "not found" >&6; }
5716          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5717        fi
5718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5719$as_echo "$tool_specified" >&6; }
5720      fi
5721    fi
5722  fi
5723
5724
5725
5726  if test "x$CP" = x; then
5727    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5728  fi
5729
5730
5731
5732
5733
5734  # Publish this variable in the help.
5735
5736
5737  if test "x$CUT" = x; then
5738    # The variable is not set by user, try to locate tool using the code snippet
5739    for ac_prog in cut
5740do
5741  # Extract the first word of "$ac_prog", so it can be a program name with args.
5742set dummy $ac_prog; ac_word=$2
5743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5744$as_echo_n "checking for $ac_word... " >&6; }
5745if ${ac_cv_path_CUT+:} false; then :
5746  $as_echo_n "(cached) " >&6
5747else
5748  case $CUT in
5749  [\\/]* | ?:[\\/]*)
5750  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5751  ;;
5752  *)
5753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5754for as_dir in $PATH
5755do
5756  IFS=$as_save_IFS
5757  test -z "$as_dir" && as_dir=.
5758    for ac_exec_ext in '' $ac_executable_extensions; do
5759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5760    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5762    break 2
5763  fi
5764done
5765  done
5766IFS=$as_save_IFS
5767
5768  ;;
5769esac
5770fi
5771CUT=$ac_cv_path_CUT
5772if test -n "$CUT"; then
5773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5774$as_echo "$CUT" >&6; }
5775else
5776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777$as_echo "no" >&6; }
5778fi
5779
5780
5781  test -n "$CUT" && break
5782done
5783
5784  else
5785    # The variable is set, but is it from the command line or the environment?
5786
5787    # Try to remove the string !CUT! from our list.
5788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5790      # If it failed, the variable was not from the command line. Ignore it,
5791      # but warn the user (except for BASH, which is always set by the calling BASH).
5792      if test "xCUT" != xBASH; then
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5794$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5795      fi
5796      # Try to locate tool using the code snippet
5797      for ac_prog in cut
5798do
5799  # Extract the first word of "$ac_prog", so it can be a program name with args.
5800set dummy $ac_prog; ac_word=$2
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802$as_echo_n "checking for $ac_word... " >&6; }
5803if ${ac_cv_path_CUT+:} false; then :
5804  $as_echo_n "(cached) " >&6
5805else
5806  case $CUT in
5807  [\\/]* | ?:[\\/]*)
5808  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5809  ;;
5810  *)
5811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812for as_dir in $PATH
5813do
5814  IFS=$as_save_IFS
5815  test -z "$as_dir" && as_dir=.
5816    for ac_exec_ext in '' $ac_executable_extensions; do
5817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5818    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5820    break 2
5821  fi
5822done
5823  done
5824IFS=$as_save_IFS
5825
5826  ;;
5827esac
5828fi
5829CUT=$ac_cv_path_CUT
5830if test -n "$CUT"; then
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5832$as_echo "$CUT" >&6; }
5833else
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836fi
5837
5838
5839  test -n "$CUT" && break
5840done
5841
5842    else
5843      # If it succeeded, then it was overridden by the user. We will use it
5844      # for the tool.
5845
5846      # First remove it from the list of overridden variables, so we can test
5847      # for unknown variables in the end.
5848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5849
5850      # Check if the provided tool contains a complete path.
5851      tool_specified="$CUT"
5852      tool_basename="${tool_specified##*/}"
5853      if test "x$tool_basename" = "x$tool_specified"; then
5854        # A command without a complete path is provided, search $PATH.
5855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5856$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5857        # Extract the first word of "$tool_basename", so it can be a program name with args.
5858set dummy $tool_basename; ac_word=$2
5859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5860$as_echo_n "checking for $ac_word... " >&6; }
5861if ${ac_cv_path_CUT+:} false; then :
5862  $as_echo_n "(cached) " >&6
5863else
5864  case $CUT in
5865  [\\/]* | ?:[\\/]*)
5866  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5867  ;;
5868  *)
5869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870for as_dir in $PATH
5871do
5872  IFS=$as_save_IFS
5873  test -z "$as_dir" && as_dir=.
5874    for ac_exec_ext in '' $ac_executable_extensions; do
5875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5876    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5878    break 2
5879  fi
5880done
5881  done
5882IFS=$as_save_IFS
5883
5884  ;;
5885esac
5886fi
5887CUT=$ac_cv_path_CUT
5888if test -n "$CUT"; then
5889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5890$as_echo "$CUT" >&6; }
5891else
5892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893$as_echo "no" >&6; }
5894fi
5895
5896
5897        if test "x$CUT" = x; then
5898          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5899        fi
5900      else
5901        # Otherwise we believe it is a complete path. Use it as it is.
5902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5903$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5905$as_echo_n "checking for CUT... " >&6; }
5906        if test ! -x "$tool_specified"; then
5907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5908$as_echo "not found" >&6; }
5909          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5910        fi
5911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5912$as_echo "$tool_specified" >&6; }
5913      fi
5914    fi
5915  fi
5916
5917
5918
5919  if test "x$CUT" = x; then
5920    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5921  fi
5922
5923
5924
5925
5926
5927  # Publish this variable in the help.
5928
5929
5930  if test "x$DATE" = x; then
5931    # The variable is not set by user, try to locate tool using the code snippet
5932    for ac_prog in date
5933do
5934  # Extract the first word of "$ac_prog", so it can be a program name with args.
5935set dummy $ac_prog; ac_word=$2
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937$as_echo_n "checking for $ac_word... " >&6; }
5938if ${ac_cv_path_DATE+:} false; then :
5939  $as_echo_n "(cached) " >&6
5940else
5941  case $DATE in
5942  [\\/]* | ?:[\\/]*)
5943  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5944  ;;
5945  *)
5946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947for as_dir in $PATH
5948do
5949  IFS=$as_save_IFS
5950  test -z "$as_dir" && as_dir=.
5951    for ac_exec_ext in '' $ac_executable_extensions; do
5952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5953    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955    break 2
5956  fi
5957done
5958  done
5959IFS=$as_save_IFS
5960
5961  ;;
5962esac
5963fi
5964DATE=$ac_cv_path_DATE
5965if test -n "$DATE"; then
5966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5967$as_echo "$DATE" >&6; }
5968else
5969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970$as_echo "no" >&6; }
5971fi
5972
5973
5974  test -n "$DATE" && break
5975done
5976
5977  else
5978    # The variable is set, but is it from the command line or the environment?
5979
5980    # Try to remove the string !DATE! from our list.
5981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5983      # If it failed, the variable was not from the command line. Ignore it,
5984      # but warn the user (except for BASH, which is always set by the calling BASH).
5985      if test "xDATE" != xBASH; then
5986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5987$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5988      fi
5989      # Try to locate tool using the code snippet
5990      for ac_prog in date
5991do
5992  # Extract the first word of "$ac_prog", so it can be a program name with args.
5993set dummy $ac_prog; ac_word=$2
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995$as_echo_n "checking for $ac_word... " >&6; }
5996if ${ac_cv_path_DATE+:} false; then :
5997  $as_echo_n "(cached) " >&6
5998else
5999  case $DATE in
6000  [\\/]* | ?:[\\/]*)
6001  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6002  ;;
6003  *)
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_exec_ext in '' $ac_executable_extensions; do
6010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6011    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013    break 2
6014  fi
6015done
6016  done
6017IFS=$as_save_IFS
6018
6019  ;;
6020esac
6021fi
6022DATE=$ac_cv_path_DATE
6023if test -n "$DATE"; then
6024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6025$as_echo "$DATE" >&6; }
6026else
6027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
6029fi
6030
6031
6032  test -n "$DATE" && break
6033done
6034
6035    else
6036      # If it succeeded, then it was overridden by the user. We will use it
6037      # for the tool.
6038
6039      # First remove it from the list of overridden variables, so we can test
6040      # for unknown variables in the end.
6041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6042
6043      # Check if the provided tool contains a complete path.
6044      tool_specified="$DATE"
6045      tool_basename="${tool_specified##*/}"
6046      if test "x$tool_basename" = "x$tool_specified"; then
6047        # A command without a complete path is provided, search $PATH.
6048        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6049$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6050        # Extract the first word of "$tool_basename", so it can be a program name with args.
6051set dummy $tool_basename; ac_word=$2
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
6054if ${ac_cv_path_DATE+:} false; then :
6055  $as_echo_n "(cached) " >&6
6056else
6057  case $DATE in
6058  [\\/]* | ?:[\\/]*)
6059  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6060  ;;
6061  *)
6062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063for as_dir in $PATH
6064do
6065  IFS=$as_save_IFS
6066  test -z "$as_dir" && as_dir=.
6067    for ac_exec_ext in '' $ac_executable_extensions; do
6068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6069    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6071    break 2
6072  fi
6073done
6074  done
6075IFS=$as_save_IFS
6076
6077  ;;
6078esac
6079fi
6080DATE=$ac_cv_path_DATE
6081if test -n "$DATE"; then
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6083$as_echo "$DATE" >&6; }
6084else
6085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086$as_echo "no" >&6; }
6087fi
6088
6089
6090        if test "x$DATE" = x; then
6091          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6092        fi
6093      else
6094        # Otherwise we believe it is a complete path. Use it as it is.
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6096$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6098$as_echo_n "checking for DATE... " >&6; }
6099        if test ! -x "$tool_specified"; then
6100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6101$as_echo "not found" >&6; }
6102          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6103        fi
6104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6105$as_echo "$tool_specified" >&6; }
6106      fi
6107    fi
6108  fi
6109
6110
6111
6112  if test "x$DATE" = x; then
6113    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6114  fi
6115
6116
6117
6118
6119
6120  # Publish this variable in the help.
6121
6122
6123  if test "x$DIFF" = x; then
6124    # The variable is not set by user, try to locate tool using the code snippet
6125    for ac_prog in gdiff diff
6126do
6127  # Extract the first word of "$ac_prog", so it can be a program name with args.
6128set dummy $ac_prog; ac_word=$2
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6130$as_echo_n "checking for $ac_word... " >&6; }
6131if ${ac_cv_path_DIFF+:} false; then :
6132  $as_echo_n "(cached) " >&6
6133else
6134  case $DIFF in
6135  [\\/]* | ?:[\\/]*)
6136  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6137  ;;
6138  *)
6139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH
6141do
6142  IFS=$as_save_IFS
6143  test -z "$as_dir" && as_dir=.
6144    for ac_exec_ext in '' $ac_executable_extensions; do
6145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6146    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6148    break 2
6149  fi
6150done
6151  done
6152IFS=$as_save_IFS
6153
6154  ;;
6155esac
6156fi
6157DIFF=$ac_cv_path_DIFF
6158if test -n "$DIFF"; then
6159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6160$as_echo "$DIFF" >&6; }
6161else
6162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163$as_echo "no" >&6; }
6164fi
6165
6166
6167  test -n "$DIFF" && break
6168done
6169
6170  else
6171    # The variable is set, but is it from the command line or the environment?
6172
6173    # Try to remove the string !DIFF! from our list.
6174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6176      # If it failed, the variable was not from the command line. Ignore it,
6177      # but warn the user (except for BASH, which is always set by the calling BASH).
6178      if test "xDIFF" != xBASH; then
6179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6180$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6181      fi
6182      # Try to locate tool using the code snippet
6183      for ac_prog in gdiff diff
6184do
6185  # Extract the first word of "$ac_prog", so it can be a program name with args.
6186set dummy $ac_prog; ac_word=$2
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if ${ac_cv_path_DIFF+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  case $DIFF in
6193  [\\/]* | ?:[\\/]*)
6194  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6195  ;;
6196  *)
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_exec_ext in '' $ac_executable_extensions; do
6203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206    break 2
6207  fi
6208done
6209  done
6210IFS=$as_save_IFS
6211
6212  ;;
6213esac
6214fi
6215DIFF=$ac_cv_path_DIFF
6216if test -n "$DIFF"; then
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6218$as_echo "$DIFF" >&6; }
6219else
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225  test -n "$DIFF" && break
6226done
6227
6228    else
6229      # If it succeeded, then it was overridden by the user. We will use it
6230      # for the tool.
6231
6232      # First remove it from the list of overridden variables, so we can test
6233      # for unknown variables in the end.
6234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6235
6236      # Check if the provided tool contains a complete path.
6237      tool_specified="$DIFF"
6238      tool_basename="${tool_specified##*/}"
6239      if test "x$tool_basename" = "x$tool_specified"; then
6240        # A command without a complete path is provided, search $PATH.
6241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6242$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6243        # Extract the first word of "$tool_basename", so it can be a program name with args.
6244set dummy $tool_basename; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_path_DIFF+:} false; then :
6248  $as_echo_n "(cached) " >&6
6249else
6250  case $DIFF in
6251  [\\/]* | ?:[\\/]*)
6252  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6253  ;;
6254  *)
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_exec_ext in '' $ac_executable_extensions; do
6261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264    break 2
6265  fi
6266done
6267  done
6268IFS=$as_save_IFS
6269
6270  ;;
6271esac
6272fi
6273DIFF=$ac_cv_path_DIFF
6274if test -n "$DIFF"; then
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6276$as_echo "$DIFF" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283        if test "x$DIFF" = x; then
6284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6285        fi
6286      else
6287        # Otherwise we believe it is a complete path. Use it as it is.
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6289$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6291$as_echo_n "checking for DIFF... " >&6; }
6292        if test ! -x "$tool_specified"; then
6293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6294$as_echo "not found" >&6; }
6295          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6296        fi
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6298$as_echo "$tool_specified" >&6; }
6299      fi
6300    fi
6301  fi
6302
6303
6304
6305  if test "x$DIFF" = x; then
6306    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6307  fi
6308
6309
6310
6311
6312
6313  # Publish this variable in the help.
6314
6315
6316  if test "x$DIRNAME" = x; then
6317    # The variable is not set by user, try to locate tool using the code snippet
6318    for ac_prog in dirname
6319do
6320  # Extract the first word of "$ac_prog", so it can be a program name with args.
6321set dummy $ac_prog; ac_word=$2
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6323$as_echo_n "checking for $ac_word... " >&6; }
6324if ${ac_cv_path_DIRNAME+:} false; then :
6325  $as_echo_n "(cached) " >&6
6326else
6327  case $DIRNAME in
6328  [\\/]* | ?:[\\/]*)
6329  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6330  ;;
6331  *)
6332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6333for as_dir in $PATH
6334do
6335  IFS=$as_save_IFS
6336  test -z "$as_dir" && as_dir=.
6337    for ac_exec_ext in '' $ac_executable_extensions; do
6338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6339    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6341    break 2
6342  fi
6343done
6344  done
6345IFS=$as_save_IFS
6346
6347  ;;
6348esac
6349fi
6350DIRNAME=$ac_cv_path_DIRNAME
6351if test -n "$DIRNAME"; then
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6353$as_echo "$DIRNAME" >&6; }
6354else
6355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6356$as_echo "no" >&6; }
6357fi
6358
6359
6360  test -n "$DIRNAME" && break
6361done
6362
6363  else
6364    # The variable is set, but is it from the command line or the environment?
6365
6366    # Try to remove the string !DIRNAME! from our list.
6367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6369      # If it failed, the variable was not from the command line. Ignore it,
6370      # but warn the user (except for BASH, which is always set by the calling BASH).
6371      if test "xDIRNAME" != xBASH; then
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6373$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6374      fi
6375      # Try to locate tool using the code snippet
6376      for ac_prog in dirname
6377do
6378  # Extract the first word of "$ac_prog", so it can be a program name with args.
6379set dummy $ac_prog; ac_word=$2
6380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6381$as_echo_n "checking for $ac_word... " >&6; }
6382if ${ac_cv_path_DIRNAME+:} false; then :
6383  $as_echo_n "(cached) " >&6
6384else
6385  case $DIRNAME in
6386  [\\/]* | ?:[\\/]*)
6387  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6388  ;;
6389  *)
6390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6391for as_dir in $PATH
6392do
6393  IFS=$as_save_IFS
6394  test -z "$as_dir" && as_dir=.
6395    for ac_exec_ext in '' $ac_executable_extensions; do
6396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6397    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6399    break 2
6400  fi
6401done
6402  done
6403IFS=$as_save_IFS
6404
6405  ;;
6406esac
6407fi
6408DIRNAME=$ac_cv_path_DIRNAME
6409if test -n "$DIRNAME"; then
6410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6411$as_echo "$DIRNAME" >&6; }
6412else
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; }
6415fi
6416
6417
6418  test -n "$DIRNAME" && break
6419done
6420
6421    else
6422      # If it succeeded, then it was overridden by the user. We will use it
6423      # for the tool.
6424
6425      # First remove it from the list of overridden variables, so we can test
6426      # for unknown variables in the end.
6427      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6428
6429      # Check if the provided tool contains a complete path.
6430      tool_specified="$DIRNAME"
6431      tool_basename="${tool_specified##*/}"
6432      if test "x$tool_basename" = "x$tool_specified"; then
6433        # A command without a complete path is provided, search $PATH.
6434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6435$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6436        # Extract the first word of "$tool_basename", so it can be a program name with args.
6437set dummy $tool_basename; ac_word=$2
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439$as_echo_n "checking for $ac_word... " >&6; }
6440if ${ac_cv_path_DIRNAME+:} false; then :
6441  $as_echo_n "(cached) " >&6
6442else
6443  case $DIRNAME in
6444  [\\/]* | ?:[\\/]*)
6445  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6446  ;;
6447  *)
6448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449for as_dir in $PATH
6450do
6451  IFS=$as_save_IFS
6452  test -z "$as_dir" && as_dir=.
6453    for ac_exec_ext in '' $ac_executable_extensions; do
6454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6455    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6457    break 2
6458  fi
6459done
6460  done
6461IFS=$as_save_IFS
6462
6463  ;;
6464esac
6465fi
6466DIRNAME=$ac_cv_path_DIRNAME
6467if test -n "$DIRNAME"; then
6468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6469$as_echo "$DIRNAME" >&6; }
6470else
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
6473fi
6474
6475
6476        if test "x$DIRNAME" = x; then
6477          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6478        fi
6479      else
6480        # Otherwise we believe it is a complete path. Use it as it is.
6481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6482$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6484$as_echo_n "checking for DIRNAME... " >&6; }
6485        if test ! -x "$tool_specified"; then
6486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6487$as_echo "not found" >&6; }
6488          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6489        fi
6490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6491$as_echo "$tool_specified" >&6; }
6492      fi
6493    fi
6494  fi
6495
6496
6497
6498  if test "x$DIRNAME" = x; then
6499    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6500  fi
6501
6502
6503
6504
6505
6506  # Publish this variable in the help.
6507
6508
6509  if test "x$ECHO" = x; then
6510    # The variable is not set by user, try to locate tool using the code snippet
6511    for ac_prog in echo
6512do
6513  # Extract the first word of "$ac_prog", so it can be a program name with args.
6514set dummy $ac_prog; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_ECHO+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $ECHO in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543ECHO=$ac_cv_path_ECHO
6544if test -n "$ECHO"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6546$as_echo "$ECHO" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553  test -n "$ECHO" && break
6554done
6555
6556  else
6557    # The variable is set, but is it from the command line or the environment?
6558
6559    # Try to remove the string !ECHO! from our list.
6560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6562      # If it failed, the variable was not from the command line. Ignore it,
6563      # but warn the user (except for BASH, which is always set by the calling BASH).
6564      if test "xECHO" != xBASH; then
6565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6566$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6567      fi
6568      # Try to locate tool using the code snippet
6569      for ac_prog in echo
6570do
6571  # Extract the first word of "$ac_prog", so it can be a program name with args.
6572set dummy $ac_prog; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_ECHO+:} false; then :
6576  $as_echo_n "(cached) " >&6
6577else
6578  case $ECHO in
6579  [\\/]* | ?:[\\/]*)
6580  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6581  ;;
6582  *)
6583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586  IFS=$as_save_IFS
6587  test -z "$as_dir" && as_dir=.
6588    for ac_exec_ext in '' $ac_executable_extensions; do
6589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592    break 2
6593  fi
6594done
6595  done
6596IFS=$as_save_IFS
6597
6598  ;;
6599esac
6600fi
6601ECHO=$ac_cv_path_ECHO
6602if test -n "$ECHO"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6604$as_echo "$ECHO" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611  test -n "$ECHO" && break
6612done
6613
6614    else
6615      # If it succeeded, then it was overridden by the user. We will use it
6616      # for the tool.
6617
6618      # First remove it from the list of overridden variables, so we can test
6619      # for unknown variables in the end.
6620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6621
6622      # Check if the provided tool contains a complete path.
6623      tool_specified="$ECHO"
6624      tool_basename="${tool_specified##*/}"
6625      if test "x$tool_basename" = "x$tool_specified"; then
6626        # A command without a complete path is provided, search $PATH.
6627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6628$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6629        # Extract the first word of "$tool_basename", so it can be a program name with args.
6630set dummy $tool_basename; ac_word=$2
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6632$as_echo_n "checking for $ac_word... " >&6; }
6633if ${ac_cv_path_ECHO+:} false; then :
6634  $as_echo_n "(cached) " >&6
6635else
6636  case $ECHO in
6637  [\\/]* | ?:[\\/]*)
6638  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6639  ;;
6640  *)
6641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6642for as_dir in $PATH
6643do
6644  IFS=$as_save_IFS
6645  test -z "$as_dir" && as_dir=.
6646    for ac_exec_ext in '' $ac_executable_extensions; do
6647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6648    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6650    break 2
6651  fi
6652done
6653  done
6654IFS=$as_save_IFS
6655
6656  ;;
6657esac
6658fi
6659ECHO=$ac_cv_path_ECHO
6660if test -n "$ECHO"; then
6661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6662$as_echo "$ECHO" >&6; }
6663else
6664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6665$as_echo "no" >&6; }
6666fi
6667
6668
6669        if test "x$ECHO" = x; then
6670          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6671        fi
6672      else
6673        # Otherwise we believe it is a complete path. Use it as it is.
6674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6675$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6677$as_echo_n "checking for ECHO... " >&6; }
6678        if test ! -x "$tool_specified"; then
6679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6680$as_echo "not found" >&6; }
6681          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6682        fi
6683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6684$as_echo "$tool_specified" >&6; }
6685      fi
6686    fi
6687  fi
6688
6689
6690
6691  if test "x$ECHO" = x; then
6692    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6693  fi
6694
6695
6696
6697
6698
6699  # Publish this variable in the help.
6700
6701
6702  if test "x$EXPR" = x; then
6703    # The variable is not set by user, try to locate tool using the code snippet
6704    for ac_prog in expr
6705do
6706  # Extract the first word of "$ac_prog", so it can be a program name with args.
6707set dummy $ac_prog; ac_word=$2
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709$as_echo_n "checking for $ac_word... " >&6; }
6710if ${ac_cv_path_EXPR+:} false; then :
6711  $as_echo_n "(cached) " >&6
6712else
6713  case $EXPR in
6714  [\\/]* | ?:[\\/]*)
6715  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6716  ;;
6717  *)
6718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6719for as_dir in $PATH
6720do
6721  IFS=$as_save_IFS
6722  test -z "$as_dir" && as_dir=.
6723    for ac_exec_ext in '' $ac_executable_extensions; do
6724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6725    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6727    break 2
6728  fi
6729done
6730  done
6731IFS=$as_save_IFS
6732
6733  ;;
6734esac
6735fi
6736EXPR=$ac_cv_path_EXPR
6737if test -n "$EXPR"; then
6738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6739$as_echo "$EXPR" >&6; }
6740else
6741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6742$as_echo "no" >&6; }
6743fi
6744
6745
6746  test -n "$EXPR" && break
6747done
6748
6749  else
6750    # The variable is set, but is it from the command line or the environment?
6751
6752    # Try to remove the string !EXPR! from our list.
6753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6755      # If it failed, the variable was not from the command line. Ignore it,
6756      # but warn the user (except for BASH, which is always set by the calling BASH).
6757      if test "xEXPR" != xBASH; then
6758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6759$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6760      fi
6761      # Try to locate tool using the code snippet
6762      for ac_prog in expr
6763do
6764  # Extract the first word of "$ac_prog", so it can be a program name with args.
6765set dummy $ac_prog; ac_word=$2
6766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6767$as_echo_n "checking for $ac_word... " >&6; }
6768if ${ac_cv_path_EXPR+:} false; then :
6769  $as_echo_n "(cached) " >&6
6770else
6771  case $EXPR in
6772  [\\/]* | ?:[\\/]*)
6773  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6774  ;;
6775  *)
6776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6777for as_dir in $PATH
6778do
6779  IFS=$as_save_IFS
6780  test -z "$as_dir" && as_dir=.
6781    for ac_exec_ext in '' $ac_executable_extensions; do
6782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6783    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6785    break 2
6786  fi
6787done
6788  done
6789IFS=$as_save_IFS
6790
6791  ;;
6792esac
6793fi
6794EXPR=$ac_cv_path_EXPR
6795if test -n "$EXPR"; then
6796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6797$as_echo "$EXPR" >&6; }
6798else
6799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6800$as_echo "no" >&6; }
6801fi
6802
6803
6804  test -n "$EXPR" && break
6805done
6806
6807    else
6808      # If it succeeded, then it was overridden by the user. We will use it
6809      # for the tool.
6810
6811      # First remove it from the list of overridden variables, so we can test
6812      # for unknown variables in the end.
6813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6814
6815      # Check if the provided tool contains a complete path.
6816      tool_specified="$EXPR"
6817      tool_basename="${tool_specified##*/}"
6818      if test "x$tool_basename" = "x$tool_specified"; then
6819        # A command without a complete path is provided, search $PATH.
6820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6821$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6822        # Extract the first word of "$tool_basename", so it can be a program name with args.
6823set dummy $tool_basename; ac_word=$2
6824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6825$as_echo_n "checking for $ac_word... " >&6; }
6826if ${ac_cv_path_EXPR+:} false; then :
6827  $as_echo_n "(cached) " >&6
6828else
6829  case $EXPR in
6830  [\\/]* | ?:[\\/]*)
6831  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6832  ;;
6833  *)
6834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6835for as_dir in $PATH
6836do
6837  IFS=$as_save_IFS
6838  test -z "$as_dir" && as_dir=.
6839    for ac_exec_ext in '' $ac_executable_extensions; do
6840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6841    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6843    break 2
6844  fi
6845done
6846  done
6847IFS=$as_save_IFS
6848
6849  ;;
6850esac
6851fi
6852EXPR=$ac_cv_path_EXPR
6853if test -n "$EXPR"; then
6854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6855$as_echo "$EXPR" >&6; }
6856else
6857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6858$as_echo "no" >&6; }
6859fi
6860
6861
6862        if test "x$EXPR" = x; then
6863          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6864        fi
6865      else
6866        # Otherwise we believe it is a complete path. Use it as it is.
6867        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6868$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6870$as_echo_n "checking for EXPR... " >&6; }
6871        if test ! -x "$tool_specified"; then
6872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6873$as_echo "not found" >&6; }
6874          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6875        fi
6876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6877$as_echo "$tool_specified" >&6; }
6878      fi
6879    fi
6880  fi
6881
6882
6883
6884  if test "x$EXPR" = x; then
6885    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6886  fi
6887
6888
6889
6890
6891
6892  # Publish this variable in the help.
6893
6894
6895  if test "x$FILE" = x; then
6896    # The variable is not set by user, try to locate tool using the code snippet
6897    for ac_prog in file
6898do
6899  # Extract the first word of "$ac_prog", so it can be a program name with args.
6900set dummy $ac_prog; ac_word=$2
6901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6902$as_echo_n "checking for $ac_word... " >&6; }
6903if ${ac_cv_path_FILE+:} false; then :
6904  $as_echo_n "(cached) " >&6
6905else
6906  case $FILE in
6907  [\\/]* | ?:[\\/]*)
6908  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6909  ;;
6910  *)
6911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6912for as_dir in $PATH
6913do
6914  IFS=$as_save_IFS
6915  test -z "$as_dir" && as_dir=.
6916    for ac_exec_ext in '' $ac_executable_extensions; do
6917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6918    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6920    break 2
6921  fi
6922done
6923  done
6924IFS=$as_save_IFS
6925
6926  ;;
6927esac
6928fi
6929FILE=$ac_cv_path_FILE
6930if test -n "$FILE"; then
6931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6932$as_echo "$FILE" >&6; }
6933else
6934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6935$as_echo "no" >&6; }
6936fi
6937
6938
6939  test -n "$FILE" && break
6940done
6941
6942  else
6943    # The variable is set, but is it from the command line or the environment?
6944
6945    # Try to remove the string !FILE! from our list.
6946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6948      # If it failed, the variable was not from the command line. Ignore it,
6949      # but warn the user (except for BASH, which is always set by the calling BASH).
6950      if test "xFILE" != xBASH; then
6951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6952$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6953      fi
6954      # Try to locate tool using the code snippet
6955      for ac_prog in file
6956do
6957  # Extract the first word of "$ac_prog", so it can be a program name with args.
6958set dummy $ac_prog; ac_word=$2
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6960$as_echo_n "checking for $ac_word... " >&6; }
6961if ${ac_cv_path_FILE+:} false; then :
6962  $as_echo_n "(cached) " >&6
6963else
6964  case $FILE in
6965  [\\/]* | ?:[\\/]*)
6966  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6967  ;;
6968  *)
6969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6970for as_dir in $PATH
6971do
6972  IFS=$as_save_IFS
6973  test -z "$as_dir" && as_dir=.
6974    for ac_exec_ext in '' $ac_executable_extensions; do
6975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6976    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6978    break 2
6979  fi
6980done
6981  done
6982IFS=$as_save_IFS
6983
6984  ;;
6985esac
6986fi
6987FILE=$ac_cv_path_FILE
6988if test -n "$FILE"; then
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6990$as_echo "$FILE" >&6; }
6991else
6992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6993$as_echo "no" >&6; }
6994fi
6995
6996
6997  test -n "$FILE" && break
6998done
6999
7000    else
7001      # If it succeeded, then it was overridden by the user. We will use it
7002      # for the tool.
7003
7004      # First remove it from the list of overridden variables, so we can test
7005      # for unknown variables in the end.
7006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7007
7008      # Check if the provided tool contains a complete path.
7009      tool_specified="$FILE"
7010      tool_basename="${tool_specified##*/}"
7011      if test "x$tool_basename" = "x$tool_specified"; then
7012        # A command without a complete path is provided, search $PATH.
7013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7014$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7015        # Extract the first word of "$tool_basename", so it can be a program name with args.
7016set dummy $tool_basename; ac_word=$2
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7018$as_echo_n "checking for $ac_word... " >&6; }
7019if ${ac_cv_path_FILE+:} false; then :
7020  $as_echo_n "(cached) " >&6
7021else
7022  case $FILE in
7023  [\\/]* | ?:[\\/]*)
7024  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7025  ;;
7026  *)
7027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028for as_dir in $PATH
7029do
7030  IFS=$as_save_IFS
7031  test -z "$as_dir" && as_dir=.
7032    for ac_exec_ext in '' $ac_executable_extensions; do
7033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036    break 2
7037  fi
7038done
7039  done
7040IFS=$as_save_IFS
7041
7042  ;;
7043esac
7044fi
7045FILE=$ac_cv_path_FILE
7046if test -n "$FILE"; then
7047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7048$as_echo "$FILE" >&6; }
7049else
7050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051$as_echo "no" >&6; }
7052fi
7053
7054
7055        if test "x$FILE" = x; then
7056          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7057        fi
7058      else
7059        # Otherwise we believe it is a complete path. Use it as it is.
7060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7061$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7063$as_echo_n "checking for FILE... " >&6; }
7064        if test ! -x "$tool_specified"; then
7065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7066$as_echo "not found" >&6; }
7067          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7068        fi
7069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7070$as_echo "$tool_specified" >&6; }
7071      fi
7072    fi
7073  fi
7074
7075
7076
7077  if test "x$FILE" = x; then
7078    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7079  fi
7080
7081
7082
7083
7084
7085  # Publish this variable in the help.
7086
7087
7088  if test "x$FIND" = x; then
7089    # The variable is not set by user, try to locate tool using the code snippet
7090    for ac_prog in find
7091do
7092  # Extract the first word of "$ac_prog", so it can be a program name with args.
7093set dummy $ac_prog; ac_word=$2
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7095$as_echo_n "checking for $ac_word... " >&6; }
7096if ${ac_cv_path_FIND+:} false; then :
7097  $as_echo_n "(cached) " >&6
7098else
7099  case $FIND in
7100  [\\/]* | ?:[\\/]*)
7101  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7102  ;;
7103  *)
7104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7105for as_dir in $PATH
7106do
7107  IFS=$as_save_IFS
7108  test -z "$as_dir" && as_dir=.
7109    for ac_exec_ext in '' $ac_executable_extensions; do
7110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7111    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7113    break 2
7114  fi
7115done
7116  done
7117IFS=$as_save_IFS
7118
7119  ;;
7120esac
7121fi
7122FIND=$ac_cv_path_FIND
7123if test -n "$FIND"; then
7124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7125$as_echo "$FIND" >&6; }
7126else
7127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
7129fi
7130
7131
7132  test -n "$FIND" && break
7133done
7134
7135  else
7136    # The variable is set, but is it from the command line or the environment?
7137
7138    # Try to remove the string !FIND! from our list.
7139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7141      # If it failed, the variable was not from the command line. Ignore it,
7142      # but warn the user (except for BASH, which is always set by the calling BASH).
7143      if test "xFIND" != xBASH; then
7144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7145$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7146      fi
7147      # Try to locate tool using the code snippet
7148      for ac_prog in find
7149do
7150  # Extract the first word of "$ac_prog", so it can be a program name with args.
7151set dummy $ac_prog; ac_word=$2
7152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153$as_echo_n "checking for $ac_word... " >&6; }
7154if ${ac_cv_path_FIND+:} false; then :
7155  $as_echo_n "(cached) " >&6
7156else
7157  case $FIND in
7158  [\\/]* | ?:[\\/]*)
7159  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7160  ;;
7161  *)
7162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163for as_dir in $PATH
7164do
7165  IFS=$as_save_IFS
7166  test -z "$as_dir" && as_dir=.
7167    for ac_exec_ext in '' $ac_executable_extensions; do
7168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7169    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7171    break 2
7172  fi
7173done
7174  done
7175IFS=$as_save_IFS
7176
7177  ;;
7178esac
7179fi
7180FIND=$ac_cv_path_FIND
7181if test -n "$FIND"; then
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7183$as_echo "$FIND" >&6; }
7184else
7185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186$as_echo "no" >&6; }
7187fi
7188
7189
7190  test -n "$FIND" && break
7191done
7192
7193    else
7194      # If it succeeded, then it was overridden by the user. We will use it
7195      # for the tool.
7196
7197      # First remove it from the list of overridden variables, so we can test
7198      # for unknown variables in the end.
7199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7200
7201      # Check if the provided tool contains a complete path.
7202      tool_specified="$FIND"
7203      tool_basename="${tool_specified##*/}"
7204      if test "x$tool_basename" = "x$tool_specified"; then
7205        # A command without a complete path is provided, search $PATH.
7206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7207$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7208        # Extract the first word of "$tool_basename", so it can be a program name with args.
7209set dummy $tool_basename; ac_word=$2
7210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211$as_echo_n "checking for $ac_word... " >&6; }
7212if ${ac_cv_path_FIND+:} false; then :
7213  $as_echo_n "(cached) " >&6
7214else
7215  case $FIND in
7216  [\\/]* | ?:[\\/]*)
7217  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7218  ;;
7219  *)
7220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221for as_dir in $PATH
7222do
7223  IFS=$as_save_IFS
7224  test -z "$as_dir" && as_dir=.
7225    for ac_exec_ext in '' $ac_executable_extensions; do
7226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229    break 2
7230  fi
7231done
7232  done
7233IFS=$as_save_IFS
7234
7235  ;;
7236esac
7237fi
7238FIND=$ac_cv_path_FIND
7239if test -n "$FIND"; then
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7241$as_echo "$FIND" >&6; }
7242else
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244$as_echo "no" >&6; }
7245fi
7246
7247
7248        if test "x$FIND" = x; then
7249          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7250        fi
7251      else
7252        # Otherwise we believe it is a complete path. Use it as it is.
7253        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7254$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7256$as_echo_n "checking for FIND... " >&6; }
7257        if test ! -x "$tool_specified"; then
7258          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7259$as_echo "not found" >&6; }
7260          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7261        fi
7262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7263$as_echo "$tool_specified" >&6; }
7264      fi
7265    fi
7266  fi
7267
7268
7269
7270  if test "x$FIND" = x; then
7271    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7272  fi
7273
7274
7275
7276
7277
7278  # Publish this variable in the help.
7279
7280
7281  if test "x$HEAD" = x; then
7282    # The variable is not set by user, try to locate tool using the code snippet
7283    for ac_prog in head
7284do
7285  # Extract the first word of "$ac_prog", so it can be a program name with args.
7286set dummy $ac_prog; ac_word=$2
7287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7288$as_echo_n "checking for $ac_word... " >&6; }
7289if ${ac_cv_path_HEAD+:} false; then :
7290  $as_echo_n "(cached) " >&6
7291else
7292  case $HEAD in
7293  [\\/]* | ?:[\\/]*)
7294  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7295  ;;
7296  *)
7297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7298for as_dir in $PATH
7299do
7300  IFS=$as_save_IFS
7301  test -z "$as_dir" && as_dir=.
7302    for ac_exec_ext in '' $ac_executable_extensions; do
7303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7304    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7306    break 2
7307  fi
7308done
7309  done
7310IFS=$as_save_IFS
7311
7312  ;;
7313esac
7314fi
7315HEAD=$ac_cv_path_HEAD
7316if test -n "$HEAD"; then
7317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7318$as_echo "$HEAD" >&6; }
7319else
7320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321$as_echo "no" >&6; }
7322fi
7323
7324
7325  test -n "$HEAD" && break
7326done
7327
7328  else
7329    # The variable is set, but is it from the command line or the environment?
7330
7331    # Try to remove the string !HEAD! from our list.
7332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7334      # If it failed, the variable was not from the command line. Ignore it,
7335      # but warn the user (except for BASH, which is always set by the calling BASH).
7336      if test "xHEAD" != xBASH; then
7337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7338$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7339      fi
7340      # Try to locate tool using the code snippet
7341      for ac_prog in head
7342do
7343  # Extract the first word of "$ac_prog", so it can be a program name with args.
7344set dummy $ac_prog; ac_word=$2
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7346$as_echo_n "checking for $ac_word... " >&6; }
7347if ${ac_cv_path_HEAD+:} false; then :
7348  $as_echo_n "(cached) " >&6
7349else
7350  case $HEAD in
7351  [\\/]* | ?:[\\/]*)
7352  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7353  ;;
7354  *)
7355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7356for as_dir in $PATH
7357do
7358  IFS=$as_save_IFS
7359  test -z "$as_dir" && as_dir=.
7360    for ac_exec_ext in '' $ac_executable_extensions; do
7361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7362    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7364    break 2
7365  fi
7366done
7367  done
7368IFS=$as_save_IFS
7369
7370  ;;
7371esac
7372fi
7373HEAD=$ac_cv_path_HEAD
7374if test -n "$HEAD"; then
7375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7376$as_echo "$HEAD" >&6; }
7377else
7378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379$as_echo "no" >&6; }
7380fi
7381
7382
7383  test -n "$HEAD" && break
7384done
7385
7386    else
7387      # If it succeeded, then it was overridden by the user. We will use it
7388      # for the tool.
7389
7390      # First remove it from the list of overridden variables, so we can test
7391      # for unknown variables in the end.
7392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7393
7394      # Check if the provided tool contains a complete path.
7395      tool_specified="$HEAD"
7396      tool_basename="${tool_specified##*/}"
7397      if test "x$tool_basename" = "x$tool_specified"; then
7398        # A command without a complete path is provided, search $PATH.
7399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7400$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7401        # Extract the first word of "$tool_basename", so it can be a program name with args.
7402set dummy $tool_basename; ac_word=$2
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404$as_echo_n "checking for $ac_word... " >&6; }
7405if ${ac_cv_path_HEAD+:} false; then :
7406  $as_echo_n "(cached) " >&6
7407else
7408  case $HEAD in
7409  [\\/]* | ?:[\\/]*)
7410  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7411  ;;
7412  *)
7413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7414for as_dir in $PATH
7415do
7416  IFS=$as_save_IFS
7417  test -z "$as_dir" && as_dir=.
7418    for ac_exec_ext in '' $ac_executable_extensions; do
7419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7420    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7422    break 2
7423  fi
7424done
7425  done
7426IFS=$as_save_IFS
7427
7428  ;;
7429esac
7430fi
7431HEAD=$ac_cv_path_HEAD
7432if test -n "$HEAD"; then
7433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7434$as_echo "$HEAD" >&6; }
7435else
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
7438fi
7439
7440
7441        if test "x$HEAD" = x; then
7442          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7443        fi
7444      else
7445        # Otherwise we believe it is a complete path. Use it as it is.
7446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7447$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7449$as_echo_n "checking for HEAD... " >&6; }
7450        if test ! -x "$tool_specified"; then
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7452$as_echo "not found" >&6; }
7453          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7454        fi
7455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7456$as_echo "$tool_specified" >&6; }
7457      fi
7458    fi
7459  fi
7460
7461
7462
7463  if test "x$HEAD" = x; then
7464    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7465  fi
7466
7467
7468
7469
7470
7471  # Publish this variable in the help.
7472
7473
7474  if test "x$LN" = x; then
7475    # The variable is not set by user, try to locate tool using the code snippet
7476    for ac_prog in ln
7477do
7478  # Extract the first word of "$ac_prog", so it can be a program name with args.
7479set dummy $ac_prog; ac_word=$2
7480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7481$as_echo_n "checking for $ac_word... " >&6; }
7482if ${ac_cv_path_LN+:} false; then :
7483  $as_echo_n "(cached) " >&6
7484else
7485  case $LN in
7486  [\\/]* | ?:[\\/]*)
7487  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7488  ;;
7489  *)
7490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7491for as_dir in $PATH
7492do
7493  IFS=$as_save_IFS
7494  test -z "$as_dir" && as_dir=.
7495    for ac_exec_ext in '' $ac_executable_extensions; do
7496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7497    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7499    break 2
7500  fi
7501done
7502  done
7503IFS=$as_save_IFS
7504
7505  ;;
7506esac
7507fi
7508LN=$ac_cv_path_LN
7509if test -n "$LN"; then
7510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7511$as_echo "$LN" >&6; }
7512else
7513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7514$as_echo "no" >&6; }
7515fi
7516
7517
7518  test -n "$LN" && break
7519done
7520
7521  else
7522    # The variable is set, but is it from the command line or the environment?
7523
7524    # Try to remove the string !LN! from our list.
7525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7527      # If it failed, the variable was not from the command line. Ignore it,
7528      # but warn the user (except for BASH, which is always set by the calling BASH).
7529      if test "xLN" != xBASH; then
7530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7531$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7532      fi
7533      # Try to locate tool using the code snippet
7534      for ac_prog in ln
7535do
7536  # Extract the first word of "$ac_prog", so it can be a program name with args.
7537set dummy $ac_prog; ac_word=$2
7538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539$as_echo_n "checking for $ac_word... " >&6; }
7540if ${ac_cv_path_LN+:} false; then :
7541  $as_echo_n "(cached) " >&6
7542else
7543  case $LN in
7544  [\\/]* | ?:[\\/]*)
7545  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7546  ;;
7547  *)
7548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7549for as_dir in $PATH
7550do
7551  IFS=$as_save_IFS
7552  test -z "$as_dir" && as_dir=.
7553    for ac_exec_ext in '' $ac_executable_extensions; do
7554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7555    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7557    break 2
7558  fi
7559done
7560  done
7561IFS=$as_save_IFS
7562
7563  ;;
7564esac
7565fi
7566LN=$ac_cv_path_LN
7567if test -n "$LN"; then
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7569$as_echo "$LN" >&6; }
7570else
7571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572$as_echo "no" >&6; }
7573fi
7574
7575
7576  test -n "$LN" && break
7577done
7578
7579    else
7580      # If it succeeded, then it was overridden by the user. We will use it
7581      # for the tool.
7582
7583      # First remove it from the list of overridden variables, so we can test
7584      # for unknown variables in the end.
7585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7586
7587      # Check if the provided tool contains a complete path.
7588      tool_specified="$LN"
7589      tool_basename="${tool_specified##*/}"
7590      if test "x$tool_basename" = "x$tool_specified"; then
7591        # A command without a complete path is provided, search $PATH.
7592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7593$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7594        # Extract the first word of "$tool_basename", so it can be a program name with args.
7595set dummy $tool_basename; ac_word=$2
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7597$as_echo_n "checking for $ac_word... " >&6; }
7598if ${ac_cv_path_LN+:} false; then :
7599  $as_echo_n "(cached) " >&6
7600else
7601  case $LN in
7602  [\\/]* | ?:[\\/]*)
7603  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7604  ;;
7605  *)
7606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7607for as_dir in $PATH
7608do
7609  IFS=$as_save_IFS
7610  test -z "$as_dir" && as_dir=.
7611    for ac_exec_ext in '' $ac_executable_extensions; do
7612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7613    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7615    break 2
7616  fi
7617done
7618  done
7619IFS=$as_save_IFS
7620
7621  ;;
7622esac
7623fi
7624LN=$ac_cv_path_LN
7625if test -n "$LN"; then
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7627$as_echo "$LN" >&6; }
7628else
7629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7630$as_echo "no" >&6; }
7631fi
7632
7633
7634        if test "x$LN" = x; then
7635          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7636        fi
7637      else
7638        # Otherwise we believe it is a complete path. Use it as it is.
7639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7640$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7642$as_echo_n "checking for LN... " >&6; }
7643        if test ! -x "$tool_specified"; then
7644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7645$as_echo "not found" >&6; }
7646          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7647        fi
7648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7649$as_echo "$tool_specified" >&6; }
7650      fi
7651    fi
7652  fi
7653
7654
7655
7656  if test "x$LN" = x; then
7657    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7658  fi
7659
7660
7661
7662
7663
7664  # Publish this variable in the help.
7665
7666
7667  if test "x$LS" = x; then
7668    # The variable is not set by user, try to locate tool using the code snippet
7669    for ac_prog in ls
7670do
7671  # Extract the first word of "$ac_prog", so it can be a program name with args.
7672set dummy $ac_prog; ac_word=$2
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674$as_echo_n "checking for $ac_word... " >&6; }
7675if ${ac_cv_path_LS+:} false; then :
7676  $as_echo_n "(cached) " >&6
7677else
7678  case $LS in
7679  [\\/]* | ?:[\\/]*)
7680  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7681  ;;
7682  *)
7683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686  IFS=$as_save_IFS
7687  test -z "$as_dir" && as_dir=.
7688    for ac_exec_ext in '' $ac_executable_extensions; do
7689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692    break 2
7693  fi
7694done
7695  done
7696IFS=$as_save_IFS
7697
7698  ;;
7699esac
7700fi
7701LS=$ac_cv_path_LS
7702if test -n "$LS"; then
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7704$as_echo "$LS" >&6; }
7705else
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707$as_echo "no" >&6; }
7708fi
7709
7710
7711  test -n "$LS" && break
7712done
7713
7714  else
7715    # The variable is set, but is it from the command line or the environment?
7716
7717    # Try to remove the string !LS! from our list.
7718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7720      # If it failed, the variable was not from the command line. Ignore it,
7721      # but warn the user (except for BASH, which is always set by the calling BASH).
7722      if test "xLS" != xBASH; then
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7724$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7725      fi
7726      # Try to locate tool using the code snippet
7727      for ac_prog in ls
7728do
7729  # Extract the first word of "$ac_prog", so it can be a program name with args.
7730set dummy $ac_prog; ac_word=$2
7731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7732$as_echo_n "checking for $ac_word... " >&6; }
7733if ${ac_cv_path_LS+:} false; then :
7734  $as_echo_n "(cached) " >&6
7735else
7736  case $LS in
7737  [\\/]* | ?:[\\/]*)
7738  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7739  ;;
7740  *)
7741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7742for as_dir in $PATH
7743do
7744  IFS=$as_save_IFS
7745  test -z "$as_dir" && as_dir=.
7746    for ac_exec_ext in '' $ac_executable_extensions; do
7747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7748    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7750    break 2
7751  fi
7752done
7753  done
7754IFS=$as_save_IFS
7755
7756  ;;
7757esac
7758fi
7759LS=$ac_cv_path_LS
7760if test -n "$LS"; then
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7762$as_echo "$LS" >&6; }
7763else
7764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7765$as_echo "no" >&6; }
7766fi
7767
7768
7769  test -n "$LS" && break
7770done
7771
7772    else
7773      # If it succeeded, then it was overridden by the user. We will use it
7774      # for the tool.
7775
7776      # First remove it from the list of overridden variables, so we can test
7777      # for unknown variables in the end.
7778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7779
7780      # Check if the provided tool contains a complete path.
7781      tool_specified="$LS"
7782      tool_basename="${tool_specified##*/}"
7783      if test "x$tool_basename" = "x$tool_specified"; then
7784        # A command without a complete path is provided, search $PATH.
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7786$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7787        # Extract the first word of "$tool_basename", so it can be a program name with args.
7788set dummy $tool_basename; ac_word=$2
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7790$as_echo_n "checking for $ac_word... " >&6; }
7791if ${ac_cv_path_LS+:} false; then :
7792  $as_echo_n "(cached) " >&6
7793else
7794  case $LS in
7795  [\\/]* | ?:[\\/]*)
7796  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7797  ;;
7798  *)
7799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7800for as_dir in $PATH
7801do
7802  IFS=$as_save_IFS
7803  test -z "$as_dir" && as_dir=.
7804    for ac_exec_ext in '' $ac_executable_extensions; do
7805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7806    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7808    break 2
7809  fi
7810done
7811  done
7812IFS=$as_save_IFS
7813
7814  ;;
7815esac
7816fi
7817LS=$ac_cv_path_LS
7818if test -n "$LS"; then
7819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7820$as_echo "$LS" >&6; }
7821else
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823$as_echo "no" >&6; }
7824fi
7825
7826
7827        if test "x$LS" = x; then
7828          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7829        fi
7830      else
7831        # Otherwise we believe it is a complete path. Use it as it is.
7832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7833$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7835$as_echo_n "checking for LS... " >&6; }
7836        if test ! -x "$tool_specified"; then
7837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7838$as_echo "not found" >&6; }
7839          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7840        fi
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7842$as_echo "$tool_specified" >&6; }
7843      fi
7844    fi
7845  fi
7846
7847
7848
7849  if test "x$LS" = x; then
7850    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7851  fi
7852
7853
7854
7855
7856
7857  # Publish this variable in the help.
7858
7859
7860  if test "x$MKDIR" = x; then
7861    # The variable is not set by user, try to locate tool using the code snippet
7862    for ac_prog in mkdir
7863do
7864  # Extract the first word of "$ac_prog", so it can be a program name with args.
7865set dummy $ac_prog; ac_word=$2
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7867$as_echo_n "checking for $ac_word... " >&6; }
7868if ${ac_cv_path_MKDIR+:} false; then :
7869  $as_echo_n "(cached) " >&6
7870else
7871  case $MKDIR in
7872  [\\/]* | ?:[\\/]*)
7873  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7874  ;;
7875  *)
7876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7877for as_dir in $PATH
7878do
7879  IFS=$as_save_IFS
7880  test -z "$as_dir" && as_dir=.
7881    for ac_exec_ext in '' $ac_executable_extensions; do
7882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7883    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7885    break 2
7886  fi
7887done
7888  done
7889IFS=$as_save_IFS
7890
7891  ;;
7892esac
7893fi
7894MKDIR=$ac_cv_path_MKDIR
7895if test -n "$MKDIR"; then
7896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7897$as_echo "$MKDIR" >&6; }
7898else
7899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7900$as_echo "no" >&6; }
7901fi
7902
7903
7904  test -n "$MKDIR" && break
7905done
7906
7907  else
7908    # The variable is set, but is it from the command line or the environment?
7909
7910    # Try to remove the string !MKDIR! from our list.
7911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7913      # If it failed, the variable was not from the command line. Ignore it,
7914      # but warn the user (except for BASH, which is always set by the calling BASH).
7915      if test "xMKDIR" != xBASH; then
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7917$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7918      fi
7919      # Try to locate tool using the code snippet
7920      for ac_prog in mkdir
7921do
7922  # Extract the first word of "$ac_prog", so it can be a program name with args.
7923set dummy $ac_prog; ac_word=$2
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7925$as_echo_n "checking for $ac_word... " >&6; }
7926if ${ac_cv_path_MKDIR+:} false; then :
7927  $as_echo_n "(cached) " >&6
7928else
7929  case $MKDIR in
7930  [\\/]* | ?:[\\/]*)
7931  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7932  ;;
7933  *)
7934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7935for as_dir in $PATH
7936do
7937  IFS=$as_save_IFS
7938  test -z "$as_dir" && as_dir=.
7939    for ac_exec_ext in '' $ac_executable_extensions; do
7940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7941    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7943    break 2
7944  fi
7945done
7946  done
7947IFS=$as_save_IFS
7948
7949  ;;
7950esac
7951fi
7952MKDIR=$ac_cv_path_MKDIR
7953if test -n "$MKDIR"; then
7954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7955$as_echo "$MKDIR" >&6; }
7956else
7957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7958$as_echo "no" >&6; }
7959fi
7960
7961
7962  test -n "$MKDIR" && break
7963done
7964
7965    else
7966      # If it succeeded, then it was overridden by the user. We will use it
7967      # for the tool.
7968
7969      # First remove it from the list of overridden variables, so we can test
7970      # for unknown variables in the end.
7971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7972
7973      # Check if the provided tool contains a complete path.
7974      tool_specified="$MKDIR"
7975      tool_basename="${tool_specified##*/}"
7976      if test "x$tool_basename" = "x$tool_specified"; then
7977        # A command without a complete path is provided, search $PATH.
7978        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7979$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7980        # Extract the first word of "$tool_basename", so it can be a program name with args.
7981set dummy $tool_basename; ac_word=$2
7982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7983$as_echo_n "checking for $ac_word... " >&6; }
7984if ${ac_cv_path_MKDIR+:} false; then :
7985  $as_echo_n "(cached) " >&6
7986else
7987  case $MKDIR in
7988  [\\/]* | ?:[\\/]*)
7989  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7990  ;;
7991  *)
7992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7993for as_dir in $PATH
7994do
7995  IFS=$as_save_IFS
7996  test -z "$as_dir" && as_dir=.
7997    for ac_exec_ext in '' $ac_executable_extensions; do
7998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7999    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8001    break 2
8002  fi
8003done
8004  done
8005IFS=$as_save_IFS
8006
8007  ;;
8008esac
8009fi
8010MKDIR=$ac_cv_path_MKDIR
8011if test -n "$MKDIR"; then
8012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8013$as_echo "$MKDIR" >&6; }
8014else
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016$as_echo "no" >&6; }
8017fi
8018
8019
8020        if test "x$MKDIR" = x; then
8021          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8022        fi
8023      else
8024        # Otherwise we believe it is a complete path. Use it as it is.
8025        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8026$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8028$as_echo_n "checking for MKDIR... " >&6; }
8029        if test ! -x "$tool_specified"; then
8030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8031$as_echo "not found" >&6; }
8032          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8033        fi
8034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8035$as_echo "$tool_specified" >&6; }
8036      fi
8037    fi
8038  fi
8039
8040
8041
8042  if test "x$MKDIR" = x; then
8043    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8044  fi
8045
8046
8047
8048
8049
8050  # Publish this variable in the help.
8051
8052
8053  if test "x$MKTEMP" = x; then
8054    # The variable is not set by user, try to locate tool using the code snippet
8055    for ac_prog in mktemp
8056do
8057  # Extract the first word of "$ac_prog", so it can be a program name with args.
8058set dummy $ac_prog; ac_word=$2
8059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8060$as_echo_n "checking for $ac_word... " >&6; }
8061if ${ac_cv_path_MKTEMP+:} false; then :
8062  $as_echo_n "(cached) " >&6
8063else
8064  case $MKTEMP in
8065  [\\/]* | ?:[\\/]*)
8066  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8067  ;;
8068  *)
8069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8070for as_dir in $PATH
8071do
8072  IFS=$as_save_IFS
8073  test -z "$as_dir" && as_dir=.
8074    for ac_exec_ext in '' $ac_executable_extensions; do
8075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8076    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8078    break 2
8079  fi
8080done
8081  done
8082IFS=$as_save_IFS
8083
8084  ;;
8085esac
8086fi
8087MKTEMP=$ac_cv_path_MKTEMP
8088if test -n "$MKTEMP"; then
8089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8090$as_echo "$MKTEMP" >&6; }
8091else
8092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8093$as_echo "no" >&6; }
8094fi
8095
8096
8097  test -n "$MKTEMP" && break
8098done
8099
8100  else
8101    # The variable is set, but is it from the command line or the environment?
8102
8103    # Try to remove the string !MKTEMP! from our list.
8104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8106      # If it failed, the variable was not from the command line. Ignore it,
8107      # but warn the user (except for BASH, which is always set by the calling BASH).
8108      if test "xMKTEMP" != xBASH; then
8109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8110$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8111      fi
8112      # Try to locate tool using the code snippet
8113      for ac_prog in mktemp
8114do
8115  # Extract the first word of "$ac_prog", so it can be a program name with args.
8116set dummy $ac_prog; ac_word=$2
8117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8118$as_echo_n "checking for $ac_word... " >&6; }
8119if ${ac_cv_path_MKTEMP+:} false; then :
8120  $as_echo_n "(cached) " >&6
8121else
8122  case $MKTEMP in
8123  [\\/]* | ?:[\\/]*)
8124  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8125  ;;
8126  *)
8127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128for as_dir in $PATH
8129do
8130  IFS=$as_save_IFS
8131  test -z "$as_dir" && as_dir=.
8132    for ac_exec_ext in '' $ac_executable_extensions; do
8133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136    break 2
8137  fi
8138done
8139  done
8140IFS=$as_save_IFS
8141
8142  ;;
8143esac
8144fi
8145MKTEMP=$ac_cv_path_MKTEMP
8146if test -n "$MKTEMP"; then
8147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8148$as_echo "$MKTEMP" >&6; }
8149else
8150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8151$as_echo "no" >&6; }
8152fi
8153
8154
8155  test -n "$MKTEMP" && break
8156done
8157
8158    else
8159      # If it succeeded, then it was overridden by the user. We will use it
8160      # for the tool.
8161
8162      # First remove it from the list of overridden variables, so we can test
8163      # for unknown variables in the end.
8164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8165
8166      # Check if the provided tool contains a complete path.
8167      tool_specified="$MKTEMP"
8168      tool_basename="${tool_specified##*/}"
8169      if test "x$tool_basename" = "x$tool_specified"; then
8170        # A command without a complete path is provided, search $PATH.
8171        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8172$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8173        # Extract the first word of "$tool_basename", so it can be a program name with args.
8174set dummy $tool_basename; ac_word=$2
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8176$as_echo_n "checking for $ac_word... " >&6; }
8177if ${ac_cv_path_MKTEMP+:} false; then :
8178  $as_echo_n "(cached) " >&6
8179else
8180  case $MKTEMP in
8181  [\\/]* | ?:[\\/]*)
8182  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8183  ;;
8184  *)
8185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8186for as_dir in $PATH
8187do
8188  IFS=$as_save_IFS
8189  test -z "$as_dir" && as_dir=.
8190    for ac_exec_ext in '' $ac_executable_extensions; do
8191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8192    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8194    break 2
8195  fi
8196done
8197  done
8198IFS=$as_save_IFS
8199
8200  ;;
8201esac
8202fi
8203MKTEMP=$ac_cv_path_MKTEMP
8204if test -n "$MKTEMP"; then
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8206$as_echo "$MKTEMP" >&6; }
8207else
8208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8209$as_echo "no" >&6; }
8210fi
8211
8212
8213        if test "x$MKTEMP" = x; then
8214          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8215        fi
8216      else
8217        # Otherwise we believe it is a complete path. Use it as it is.
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8219$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8221$as_echo_n "checking for MKTEMP... " >&6; }
8222        if test ! -x "$tool_specified"; then
8223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8224$as_echo "not found" >&6; }
8225          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8226        fi
8227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8228$as_echo "$tool_specified" >&6; }
8229      fi
8230    fi
8231  fi
8232
8233
8234
8235  if test "x$MKTEMP" = x; then
8236    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8237  fi
8238
8239
8240
8241
8242
8243  # Publish this variable in the help.
8244
8245
8246  if test "x$MV" = x; then
8247    # The variable is not set by user, try to locate tool using the code snippet
8248    for ac_prog in mv
8249do
8250  # Extract the first word of "$ac_prog", so it can be a program name with args.
8251set dummy $ac_prog; ac_word=$2
8252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8253$as_echo_n "checking for $ac_word... " >&6; }
8254if ${ac_cv_path_MV+:} false; then :
8255  $as_echo_n "(cached) " >&6
8256else
8257  case $MV in
8258  [\\/]* | ?:[\\/]*)
8259  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8260  ;;
8261  *)
8262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8263for as_dir in $PATH
8264do
8265  IFS=$as_save_IFS
8266  test -z "$as_dir" && as_dir=.
8267    for ac_exec_ext in '' $ac_executable_extensions; do
8268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8269    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8271    break 2
8272  fi
8273done
8274  done
8275IFS=$as_save_IFS
8276
8277  ;;
8278esac
8279fi
8280MV=$ac_cv_path_MV
8281if test -n "$MV"; then
8282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8283$as_echo "$MV" >&6; }
8284else
8285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8286$as_echo "no" >&6; }
8287fi
8288
8289
8290  test -n "$MV" && break
8291done
8292
8293  else
8294    # The variable is set, but is it from the command line or the environment?
8295
8296    # Try to remove the string !MV! from our list.
8297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8299      # If it failed, the variable was not from the command line. Ignore it,
8300      # but warn the user (except for BASH, which is always set by the calling BASH).
8301      if test "xMV" != xBASH; then
8302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8303$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8304      fi
8305      # Try to locate tool using the code snippet
8306      for ac_prog in mv
8307do
8308  # Extract the first word of "$ac_prog", so it can be a program name with args.
8309set dummy $ac_prog; ac_word=$2
8310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8311$as_echo_n "checking for $ac_word... " >&6; }
8312if ${ac_cv_path_MV+:} false; then :
8313  $as_echo_n "(cached) " >&6
8314else
8315  case $MV in
8316  [\\/]* | ?:[\\/]*)
8317  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8318  ;;
8319  *)
8320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8321for as_dir in $PATH
8322do
8323  IFS=$as_save_IFS
8324  test -z "$as_dir" && as_dir=.
8325    for ac_exec_ext in '' $ac_executable_extensions; do
8326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8327    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8329    break 2
8330  fi
8331done
8332  done
8333IFS=$as_save_IFS
8334
8335  ;;
8336esac
8337fi
8338MV=$ac_cv_path_MV
8339if test -n "$MV"; then
8340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8341$as_echo "$MV" >&6; }
8342else
8343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8344$as_echo "no" >&6; }
8345fi
8346
8347
8348  test -n "$MV" && break
8349done
8350
8351    else
8352      # If it succeeded, then it was overridden by the user. We will use it
8353      # for the tool.
8354
8355      # First remove it from the list of overridden variables, so we can test
8356      # for unknown variables in the end.
8357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8358
8359      # Check if the provided tool contains a complete path.
8360      tool_specified="$MV"
8361      tool_basename="${tool_specified##*/}"
8362      if test "x$tool_basename" = "x$tool_specified"; then
8363        # A command without a complete path is provided, search $PATH.
8364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8365$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8366        # Extract the first word of "$tool_basename", so it can be a program name with args.
8367set dummy $tool_basename; ac_word=$2
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369$as_echo_n "checking for $ac_word... " >&6; }
8370if ${ac_cv_path_MV+:} false; then :
8371  $as_echo_n "(cached) " >&6
8372else
8373  case $MV in
8374  [\\/]* | ?:[\\/]*)
8375  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8376  ;;
8377  *)
8378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379for as_dir in $PATH
8380do
8381  IFS=$as_save_IFS
8382  test -z "$as_dir" && as_dir=.
8383    for ac_exec_ext in '' $ac_executable_extensions; do
8384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387    break 2
8388  fi
8389done
8390  done
8391IFS=$as_save_IFS
8392
8393  ;;
8394esac
8395fi
8396MV=$ac_cv_path_MV
8397if test -n "$MV"; then
8398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8399$as_echo "$MV" >&6; }
8400else
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402$as_echo "no" >&6; }
8403fi
8404
8405
8406        if test "x$MV" = x; then
8407          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8408        fi
8409      else
8410        # Otherwise we believe it is a complete path. Use it as it is.
8411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8412$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8414$as_echo_n "checking for MV... " >&6; }
8415        if test ! -x "$tool_specified"; then
8416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8417$as_echo "not found" >&6; }
8418          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8419        fi
8420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8421$as_echo "$tool_specified" >&6; }
8422      fi
8423    fi
8424  fi
8425
8426
8427
8428  if test "x$MV" = x; then
8429    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8430  fi
8431
8432
8433
8434
8435
8436  # Publish this variable in the help.
8437
8438
8439  if test "x$NAWK" = x; then
8440    # The variable is not set by user, try to locate tool using the code snippet
8441    for ac_prog in nawk gawk awk
8442do
8443  # Extract the first word of "$ac_prog", so it can be a program name with args.
8444set dummy $ac_prog; ac_word=$2
8445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8446$as_echo_n "checking for $ac_word... " >&6; }
8447if ${ac_cv_path_NAWK+:} false; then :
8448  $as_echo_n "(cached) " >&6
8449else
8450  case $NAWK in
8451  [\\/]* | ?:[\\/]*)
8452  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8453  ;;
8454  *)
8455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8456for as_dir in $PATH
8457do
8458  IFS=$as_save_IFS
8459  test -z "$as_dir" && as_dir=.
8460    for ac_exec_ext in '' $ac_executable_extensions; do
8461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8462    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8464    break 2
8465  fi
8466done
8467  done
8468IFS=$as_save_IFS
8469
8470  ;;
8471esac
8472fi
8473NAWK=$ac_cv_path_NAWK
8474if test -n "$NAWK"; then
8475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8476$as_echo "$NAWK" >&6; }
8477else
8478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479$as_echo "no" >&6; }
8480fi
8481
8482
8483  test -n "$NAWK" && break
8484done
8485
8486  else
8487    # The variable is set, but is it from the command line or the environment?
8488
8489    # Try to remove the string !NAWK! from our list.
8490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8492      # If it failed, the variable was not from the command line. Ignore it,
8493      # but warn the user (except for BASH, which is always set by the calling BASH).
8494      if test "xNAWK" != xBASH; then
8495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8496$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8497      fi
8498      # Try to locate tool using the code snippet
8499      for ac_prog in nawk gawk awk
8500do
8501  # Extract the first word of "$ac_prog", so it can be a program name with args.
8502set dummy $ac_prog; ac_word=$2
8503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8504$as_echo_n "checking for $ac_word... " >&6; }
8505if ${ac_cv_path_NAWK+:} false; then :
8506  $as_echo_n "(cached) " >&6
8507else
8508  case $NAWK in
8509  [\\/]* | ?:[\\/]*)
8510  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8511  ;;
8512  *)
8513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8514for as_dir in $PATH
8515do
8516  IFS=$as_save_IFS
8517  test -z "$as_dir" && as_dir=.
8518    for ac_exec_ext in '' $ac_executable_extensions; do
8519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8520    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8522    break 2
8523  fi
8524done
8525  done
8526IFS=$as_save_IFS
8527
8528  ;;
8529esac
8530fi
8531NAWK=$ac_cv_path_NAWK
8532if test -n "$NAWK"; then
8533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8534$as_echo "$NAWK" >&6; }
8535else
8536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537$as_echo "no" >&6; }
8538fi
8539
8540
8541  test -n "$NAWK" && break
8542done
8543
8544    else
8545      # If it succeeded, then it was overridden by the user. We will use it
8546      # for the tool.
8547
8548      # First remove it from the list of overridden variables, so we can test
8549      # for unknown variables in the end.
8550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8551
8552      # Check if the provided tool contains a complete path.
8553      tool_specified="$NAWK"
8554      tool_basename="${tool_specified##*/}"
8555      if test "x$tool_basename" = "x$tool_specified"; then
8556        # A command without a complete path is provided, search $PATH.
8557        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8558$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8559        # Extract the first word of "$tool_basename", so it can be a program name with args.
8560set dummy $tool_basename; ac_word=$2
8561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8562$as_echo_n "checking for $ac_word... " >&6; }
8563if ${ac_cv_path_NAWK+:} false; then :
8564  $as_echo_n "(cached) " >&6
8565else
8566  case $NAWK in
8567  [\\/]* | ?:[\\/]*)
8568  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8569  ;;
8570  *)
8571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8572for as_dir in $PATH
8573do
8574  IFS=$as_save_IFS
8575  test -z "$as_dir" && as_dir=.
8576    for ac_exec_ext in '' $ac_executable_extensions; do
8577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8578    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8580    break 2
8581  fi
8582done
8583  done
8584IFS=$as_save_IFS
8585
8586  ;;
8587esac
8588fi
8589NAWK=$ac_cv_path_NAWK
8590if test -n "$NAWK"; then
8591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8592$as_echo "$NAWK" >&6; }
8593else
8594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8595$as_echo "no" >&6; }
8596fi
8597
8598
8599        if test "x$NAWK" = x; then
8600          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8601        fi
8602      else
8603        # Otherwise we believe it is a complete path. Use it as it is.
8604        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8605$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8607$as_echo_n "checking for NAWK... " >&6; }
8608        if test ! -x "$tool_specified"; then
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8610$as_echo "not found" >&6; }
8611          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8612        fi
8613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8614$as_echo "$tool_specified" >&6; }
8615      fi
8616    fi
8617  fi
8618
8619
8620
8621  if test "x$NAWK" = x; then
8622    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8623  fi
8624
8625
8626
8627
8628
8629  # Publish this variable in the help.
8630
8631
8632  if test "x$PRINTF" = x; then
8633    # The variable is not set by user, try to locate tool using the code snippet
8634    for ac_prog in printf
8635do
8636  # Extract the first word of "$ac_prog", so it can be a program name with args.
8637set dummy $ac_prog; ac_word=$2
8638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8639$as_echo_n "checking for $ac_word... " >&6; }
8640if ${ac_cv_path_PRINTF+:} false; then :
8641  $as_echo_n "(cached) " >&6
8642else
8643  case $PRINTF in
8644  [\\/]* | ?:[\\/]*)
8645  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8646  ;;
8647  *)
8648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649for as_dir in $PATH
8650do
8651  IFS=$as_save_IFS
8652  test -z "$as_dir" && as_dir=.
8653    for ac_exec_ext in '' $ac_executable_extensions; do
8654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8655    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8657    break 2
8658  fi
8659done
8660  done
8661IFS=$as_save_IFS
8662
8663  ;;
8664esac
8665fi
8666PRINTF=$ac_cv_path_PRINTF
8667if test -n "$PRINTF"; then
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8669$as_echo "$PRINTF" >&6; }
8670else
8671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672$as_echo "no" >&6; }
8673fi
8674
8675
8676  test -n "$PRINTF" && break
8677done
8678
8679  else
8680    # The variable is set, but is it from the command line or the environment?
8681
8682    # Try to remove the string !PRINTF! from our list.
8683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8685      # If it failed, the variable was not from the command line. Ignore it,
8686      # but warn the user (except for BASH, which is always set by the calling BASH).
8687      if test "xPRINTF" != xBASH; then
8688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8689$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8690      fi
8691      # Try to locate tool using the code snippet
8692      for ac_prog in printf
8693do
8694  # Extract the first word of "$ac_prog", so it can be a program name with args.
8695set dummy $ac_prog; ac_word=$2
8696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8697$as_echo_n "checking for $ac_word... " >&6; }
8698if ${ac_cv_path_PRINTF+:} false; then :
8699  $as_echo_n "(cached) " >&6
8700else
8701  case $PRINTF in
8702  [\\/]* | ?:[\\/]*)
8703  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8704  ;;
8705  *)
8706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707for as_dir in $PATH
8708do
8709  IFS=$as_save_IFS
8710  test -z "$as_dir" && as_dir=.
8711    for ac_exec_ext in '' $ac_executable_extensions; do
8712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8713    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8715    break 2
8716  fi
8717done
8718  done
8719IFS=$as_save_IFS
8720
8721  ;;
8722esac
8723fi
8724PRINTF=$ac_cv_path_PRINTF
8725if test -n "$PRINTF"; then
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8727$as_echo "$PRINTF" >&6; }
8728else
8729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730$as_echo "no" >&6; }
8731fi
8732
8733
8734  test -n "$PRINTF" && break
8735done
8736
8737    else
8738      # If it succeeded, then it was overridden by the user. We will use it
8739      # for the tool.
8740
8741      # First remove it from the list of overridden variables, so we can test
8742      # for unknown variables in the end.
8743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8744
8745      # Check if the provided tool contains a complete path.
8746      tool_specified="$PRINTF"
8747      tool_basename="${tool_specified##*/}"
8748      if test "x$tool_basename" = "x$tool_specified"; then
8749        # A command without a complete path is provided, search $PATH.
8750        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8751$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8752        # Extract the first word of "$tool_basename", so it can be a program name with args.
8753set dummy $tool_basename; ac_word=$2
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755$as_echo_n "checking for $ac_word... " >&6; }
8756if ${ac_cv_path_PRINTF+:} false; then :
8757  $as_echo_n "(cached) " >&6
8758else
8759  case $PRINTF in
8760  [\\/]* | ?:[\\/]*)
8761  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8762  ;;
8763  *)
8764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765for as_dir in $PATH
8766do
8767  IFS=$as_save_IFS
8768  test -z "$as_dir" && as_dir=.
8769    for ac_exec_ext in '' $ac_executable_extensions; do
8770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8771    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773    break 2
8774  fi
8775done
8776  done
8777IFS=$as_save_IFS
8778
8779  ;;
8780esac
8781fi
8782PRINTF=$ac_cv_path_PRINTF
8783if test -n "$PRINTF"; then
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8785$as_echo "$PRINTF" >&6; }
8786else
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
8789fi
8790
8791
8792        if test "x$PRINTF" = x; then
8793          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8794        fi
8795      else
8796        # Otherwise we believe it is a complete path. Use it as it is.
8797        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8798$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8800$as_echo_n "checking for PRINTF... " >&6; }
8801        if test ! -x "$tool_specified"; then
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8803$as_echo "not found" >&6; }
8804          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8805        fi
8806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8807$as_echo "$tool_specified" >&6; }
8808      fi
8809    fi
8810  fi
8811
8812
8813
8814  if test "x$PRINTF" = x; then
8815    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8816  fi
8817
8818
8819
8820
8821
8822  # Publish this variable in the help.
8823
8824
8825  if test "x$RM" = x; then
8826    # The variable is not set by user, try to locate tool using the code snippet
8827    for ac_prog in rm
8828do
8829  # Extract the first word of "$ac_prog", so it can be a program name with args.
8830set dummy $ac_prog; ac_word=$2
8831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8832$as_echo_n "checking for $ac_word... " >&6; }
8833if ${ac_cv_path_RM+:} false; then :
8834  $as_echo_n "(cached) " >&6
8835else
8836  case $RM in
8837  [\\/]* | ?:[\\/]*)
8838  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8839  ;;
8840  *)
8841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8842for as_dir in $PATH
8843do
8844  IFS=$as_save_IFS
8845  test -z "$as_dir" && as_dir=.
8846    for ac_exec_ext in '' $ac_executable_extensions; do
8847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8848    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8850    break 2
8851  fi
8852done
8853  done
8854IFS=$as_save_IFS
8855
8856  ;;
8857esac
8858fi
8859RM=$ac_cv_path_RM
8860if test -n "$RM"; then
8861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8862$as_echo "$RM" >&6; }
8863else
8864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8865$as_echo "no" >&6; }
8866fi
8867
8868
8869  test -n "$RM" && break
8870done
8871
8872  else
8873    # The variable is set, but is it from the command line or the environment?
8874
8875    # Try to remove the string !RM! from our list.
8876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8878      # If it failed, the variable was not from the command line. Ignore it,
8879      # but warn the user (except for BASH, which is always set by the calling BASH).
8880      if test "xRM" != xBASH; then
8881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8882$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8883      fi
8884      # Try to locate tool using the code snippet
8885      for ac_prog in rm
8886do
8887  # Extract the first word of "$ac_prog", so it can be a program name with args.
8888set dummy $ac_prog; ac_word=$2
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8890$as_echo_n "checking for $ac_word... " >&6; }
8891if ${ac_cv_path_RM+:} false; then :
8892  $as_echo_n "(cached) " >&6
8893else
8894  case $RM in
8895  [\\/]* | ?:[\\/]*)
8896  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8897  ;;
8898  *)
8899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900for as_dir in $PATH
8901do
8902  IFS=$as_save_IFS
8903  test -z "$as_dir" && as_dir=.
8904    for ac_exec_ext in '' $ac_executable_extensions; do
8905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8908    break 2
8909  fi
8910done
8911  done
8912IFS=$as_save_IFS
8913
8914  ;;
8915esac
8916fi
8917RM=$ac_cv_path_RM
8918if test -n "$RM"; then
8919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8920$as_echo "$RM" >&6; }
8921else
8922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
8924fi
8925
8926
8927  test -n "$RM" && break
8928done
8929
8930    else
8931      # If it succeeded, then it was overridden by the user. We will use it
8932      # for the tool.
8933
8934      # First remove it from the list of overridden variables, so we can test
8935      # for unknown variables in the end.
8936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8937
8938      # Check if the provided tool contains a complete path.
8939      tool_specified="$RM"
8940      tool_basename="${tool_specified##*/}"
8941      if test "x$tool_basename" = "x$tool_specified"; then
8942        # A command without a complete path is provided, search $PATH.
8943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8944$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8945        # Extract the first word of "$tool_basename", so it can be a program name with args.
8946set dummy $tool_basename; ac_word=$2
8947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8948$as_echo_n "checking for $ac_word... " >&6; }
8949if ${ac_cv_path_RM+:} false; then :
8950  $as_echo_n "(cached) " >&6
8951else
8952  case $RM in
8953  [\\/]* | ?:[\\/]*)
8954  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8955  ;;
8956  *)
8957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8958for as_dir in $PATH
8959do
8960  IFS=$as_save_IFS
8961  test -z "$as_dir" && as_dir=.
8962    for ac_exec_ext in '' $ac_executable_extensions; do
8963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8964    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8966    break 2
8967  fi
8968done
8969  done
8970IFS=$as_save_IFS
8971
8972  ;;
8973esac
8974fi
8975RM=$ac_cv_path_RM
8976if test -n "$RM"; then
8977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8978$as_echo "$RM" >&6; }
8979else
8980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8981$as_echo "no" >&6; }
8982fi
8983
8984
8985        if test "x$RM" = x; then
8986          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8987        fi
8988      else
8989        # Otherwise we believe it is a complete path. Use it as it is.
8990        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8991$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8993$as_echo_n "checking for RM... " >&6; }
8994        if test ! -x "$tool_specified"; then
8995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8996$as_echo "not found" >&6; }
8997          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8998        fi
8999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9000$as_echo "$tool_specified" >&6; }
9001      fi
9002    fi
9003  fi
9004
9005
9006
9007  if test "x$RM" = x; then
9008    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9009  fi
9010
9011
9012
9013
9014
9015  # Publish this variable in the help.
9016
9017
9018  if test "x$SH" = x; then
9019    # The variable is not set by user, try to locate tool using the code snippet
9020    for ac_prog in sh
9021do
9022  # Extract the first word of "$ac_prog", so it can be a program name with args.
9023set dummy $ac_prog; ac_word=$2
9024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9025$as_echo_n "checking for $ac_word... " >&6; }
9026if ${ac_cv_path_SH+:} false; then :
9027  $as_echo_n "(cached) " >&6
9028else
9029  case $SH in
9030  [\\/]* | ?:[\\/]*)
9031  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9032  ;;
9033  *)
9034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9035for as_dir in $PATH
9036do
9037  IFS=$as_save_IFS
9038  test -z "$as_dir" && as_dir=.
9039    for ac_exec_ext in '' $ac_executable_extensions; do
9040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9041    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9043    break 2
9044  fi
9045done
9046  done
9047IFS=$as_save_IFS
9048
9049  ;;
9050esac
9051fi
9052SH=$ac_cv_path_SH
9053if test -n "$SH"; then
9054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9055$as_echo "$SH" >&6; }
9056else
9057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9058$as_echo "no" >&6; }
9059fi
9060
9061
9062  test -n "$SH" && break
9063done
9064
9065  else
9066    # The variable is set, but is it from the command line or the environment?
9067
9068    # Try to remove the string !SH! from our list.
9069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9071      # If it failed, the variable was not from the command line. Ignore it,
9072      # but warn the user (except for BASH, which is always set by the calling BASH).
9073      if test "xSH" != xBASH; then
9074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9075$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9076      fi
9077      # Try to locate tool using the code snippet
9078      for ac_prog in sh
9079do
9080  # Extract the first word of "$ac_prog", so it can be a program name with args.
9081set dummy $ac_prog; ac_word=$2
9082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9083$as_echo_n "checking for $ac_word... " >&6; }
9084if ${ac_cv_path_SH+:} false; then :
9085  $as_echo_n "(cached) " >&6
9086else
9087  case $SH in
9088  [\\/]* | ?:[\\/]*)
9089  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9090  ;;
9091  *)
9092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9093for as_dir in $PATH
9094do
9095  IFS=$as_save_IFS
9096  test -z "$as_dir" && as_dir=.
9097    for ac_exec_ext in '' $ac_executable_extensions; do
9098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9099    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9101    break 2
9102  fi
9103done
9104  done
9105IFS=$as_save_IFS
9106
9107  ;;
9108esac
9109fi
9110SH=$ac_cv_path_SH
9111if test -n "$SH"; then
9112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9113$as_echo "$SH" >&6; }
9114else
9115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
9117fi
9118
9119
9120  test -n "$SH" && break
9121done
9122
9123    else
9124      # If it succeeded, then it was overridden by the user. We will use it
9125      # for the tool.
9126
9127      # First remove it from the list of overridden variables, so we can test
9128      # for unknown variables in the end.
9129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9130
9131      # Check if the provided tool contains a complete path.
9132      tool_specified="$SH"
9133      tool_basename="${tool_specified##*/}"
9134      if test "x$tool_basename" = "x$tool_specified"; then
9135        # A command without a complete path is provided, search $PATH.
9136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9137$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9138        # Extract the first word of "$tool_basename", so it can be a program name with args.
9139set dummy $tool_basename; ac_word=$2
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9141$as_echo_n "checking for $ac_word... " >&6; }
9142if ${ac_cv_path_SH+:} false; then :
9143  $as_echo_n "(cached) " >&6
9144else
9145  case $SH in
9146  [\\/]* | ?:[\\/]*)
9147  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9148  ;;
9149  *)
9150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9151for as_dir in $PATH
9152do
9153  IFS=$as_save_IFS
9154  test -z "$as_dir" && as_dir=.
9155    for ac_exec_ext in '' $ac_executable_extensions; do
9156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9157    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9159    break 2
9160  fi
9161done
9162  done
9163IFS=$as_save_IFS
9164
9165  ;;
9166esac
9167fi
9168SH=$ac_cv_path_SH
9169if test -n "$SH"; then
9170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9171$as_echo "$SH" >&6; }
9172else
9173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174$as_echo "no" >&6; }
9175fi
9176
9177
9178        if test "x$SH" = x; then
9179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9180        fi
9181      else
9182        # Otherwise we believe it is a complete path. Use it as it is.
9183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9184$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9186$as_echo_n "checking for SH... " >&6; }
9187        if test ! -x "$tool_specified"; then
9188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9189$as_echo "not found" >&6; }
9190          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9191        fi
9192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9193$as_echo "$tool_specified" >&6; }
9194      fi
9195    fi
9196  fi
9197
9198
9199
9200  if test "x$SH" = x; then
9201    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9202  fi
9203
9204
9205
9206
9207
9208  # Publish this variable in the help.
9209
9210
9211  if test "x$SORT" = x; then
9212    # The variable is not set by user, try to locate tool using the code snippet
9213    for ac_prog in sort
9214do
9215  # Extract the first word of "$ac_prog", so it can be a program name with args.
9216set dummy $ac_prog; ac_word=$2
9217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9218$as_echo_n "checking for $ac_word... " >&6; }
9219if ${ac_cv_path_SORT+:} false; then :
9220  $as_echo_n "(cached) " >&6
9221else
9222  case $SORT in
9223  [\\/]* | ?:[\\/]*)
9224  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9225  ;;
9226  *)
9227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9228for as_dir in $PATH
9229do
9230  IFS=$as_save_IFS
9231  test -z "$as_dir" && as_dir=.
9232    for ac_exec_ext in '' $ac_executable_extensions; do
9233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9234    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9236    break 2
9237  fi
9238done
9239  done
9240IFS=$as_save_IFS
9241
9242  ;;
9243esac
9244fi
9245SORT=$ac_cv_path_SORT
9246if test -n "$SORT"; then
9247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9248$as_echo "$SORT" >&6; }
9249else
9250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9251$as_echo "no" >&6; }
9252fi
9253
9254
9255  test -n "$SORT" && break
9256done
9257
9258  else
9259    # The variable is set, but is it from the command line or the environment?
9260
9261    # Try to remove the string !SORT! from our list.
9262    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9263    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9264      # If it failed, the variable was not from the command line. Ignore it,
9265      # but warn the user (except for BASH, which is always set by the calling BASH).
9266      if test "xSORT" != xBASH; then
9267        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9268$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9269      fi
9270      # Try to locate tool using the code snippet
9271      for ac_prog in sort
9272do
9273  # Extract the first word of "$ac_prog", so it can be a program name with args.
9274set dummy $ac_prog; ac_word=$2
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9276$as_echo_n "checking for $ac_word... " >&6; }
9277if ${ac_cv_path_SORT+:} false; then :
9278  $as_echo_n "(cached) " >&6
9279else
9280  case $SORT in
9281  [\\/]* | ?:[\\/]*)
9282  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9283  ;;
9284  *)
9285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9286for as_dir in $PATH
9287do
9288  IFS=$as_save_IFS
9289  test -z "$as_dir" && as_dir=.
9290    for ac_exec_ext in '' $ac_executable_extensions; do
9291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9292    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9294    break 2
9295  fi
9296done
9297  done
9298IFS=$as_save_IFS
9299
9300  ;;
9301esac
9302fi
9303SORT=$ac_cv_path_SORT
9304if test -n "$SORT"; then
9305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9306$as_echo "$SORT" >&6; }
9307else
9308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
9310fi
9311
9312
9313  test -n "$SORT" && break
9314done
9315
9316    else
9317      # If it succeeded, then it was overridden by the user. We will use it
9318      # for the tool.
9319
9320      # First remove it from the list of overridden variables, so we can test
9321      # for unknown variables in the end.
9322      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9323
9324      # Check if the provided tool contains a complete path.
9325      tool_specified="$SORT"
9326      tool_basename="${tool_specified##*/}"
9327      if test "x$tool_basename" = "x$tool_specified"; then
9328        # A command without a complete path is provided, search $PATH.
9329        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9330$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9331        # Extract the first word of "$tool_basename", so it can be a program name with args.
9332set dummy $tool_basename; ac_word=$2
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334$as_echo_n "checking for $ac_word... " >&6; }
9335if ${ac_cv_path_SORT+:} false; then :
9336  $as_echo_n "(cached) " >&6
9337else
9338  case $SORT in
9339  [\\/]* | ?:[\\/]*)
9340  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9341  ;;
9342  *)
9343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9344for as_dir in $PATH
9345do
9346  IFS=$as_save_IFS
9347  test -z "$as_dir" && as_dir=.
9348    for ac_exec_ext in '' $ac_executable_extensions; do
9349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9350    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9352    break 2
9353  fi
9354done
9355  done
9356IFS=$as_save_IFS
9357
9358  ;;
9359esac
9360fi
9361SORT=$ac_cv_path_SORT
9362if test -n "$SORT"; then
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9364$as_echo "$SORT" >&6; }
9365else
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
9368fi
9369
9370
9371        if test "x$SORT" = x; then
9372          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9373        fi
9374      else
9375        # Otherwise we believe it is a complete path. Use it as it is.
9376        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9377$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9379$as_echo_n "checking for SORT... " >&6; }
9380        if test ! -x "$tool_specified"; then
9381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9382$as_echo "not found" >&6; }
9383          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9384        fi
9385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9386$as_echo "$tool_specified" >&6; }
9387      fi
9388    fi
9389  fi
9390
9391
9392
9393  if test "x$SORT" = x; then
9394    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9395  fi
9396
9397
9398
9399
9400
9401  # Publish this variable in the help.
9402
9403
9404  if test "x$TAIL" = x; then
9405    # The variable is not set by user, try to locate tool using the code snippet
9406    for ac_prog in tail
9407do
9408  # Extract the first word of "$ac_prog", so it can be a program name with args.
9409set dummy $ac_prog; ac_word=$2
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9411$as_echo_n "checking for $ac_word... " >&6; }
9412if ${ac_cv_path_TAIL+:} false; then :
9413  $as_echo_n "(cached) " >&6
9414else
9415  case $TAIL in
9416  [\\/]* | ?:[\\/]*)
9417  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9418  ;;
9419  *)
9420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9421for as_dir in $PATH
9422do
9423  IFS=$as_save_IFS
9424  test -z "$as_dir" && as_dir=.
9425    for ac_exec_ext in '' $ac_executable_extensions; do
9426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9427    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9429    break 2
9430  fi
9431done
9432  done
9433IFS=$as_save_IFS
9434
9435  ;;
9436esac
9437fi
9438TAIL=$ac_cv_path_TAIL
9439if test -n "$TAIL"; then
9440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9441$as_echo "$TAIL" >&6; }
9442else
9443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9444$as_echo "no" >&6; }
9445fi
9446
9447
9448  test -n "$TAIL" && break
9449done
9450
9451  else
9452    # The variable is set, but is it from the command line or the environment?
9453
9454    # Try to remove the string !TAIL! from our list.
9455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9457      # If it failed, the variable was not from the command line. Ignore it,
9458      # but warn the user (except for BASH, which is always set by the calling BASH).
9459      if test "xTAIL" != xBASH; then
9460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9461$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9462      fi
9463      # Try to locate tool using the code snippet
9464      for ac_prog in tail
9465do
9466  # Extract the first word of "$ac_prog", so it can be a program name with args.
9467set dummy $ac_prog; ac_word=$2
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9469$as_echo_n "checking for $ac_word... " >&6; }
9470if ${ac_cv_path_TAIL+:} false; then :
9471  $as_echo_n "(cached) " >&6
9472else
9473  case $TAIL in
9474  [\\/]* | ?:[\\/]*)
9475  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9476  ;;
9477  *)
9478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9479for as_dir in $PATH
9480do
9481  IFS=$as_save_IFS
9482  test -z "$as_dir" && as_dir=.
9483    for ac_exec_ext in '' $ac_executable_extensions; do
9484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9485    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9487    break 2
9488  fi
9489done
9490  done
9491IFS=$as_save_IFS
9492
9493  ;;
9494esac
9495fi
9496TAIL=$ac_cv_path_TAIL
9497if test -n "$TAIL"; then
9498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9499$as_echo "$TAIL" >&6; }
9500else
9501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
9503fi
9504
9505
9506  test -n "$TAIL" && break
9507done
9508
9509    else
9510      # If it succeeded, then it was overridden by the user. We will use it
9511      # for the tool.
9512
9513      # First remove it from the list of overridden variables, so we can test
9514      # for unknown variables in the end.
9515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9516
9517      # Check if the provided tool contains a complete path.
9518      tool_specified="$TAIL"
9519      tool_basename="${tool_specified##*/}"
9520      if test "x$tool_basename" = "x$tool_specified"; then
9521        # A command without a complete path is provided, search $PATH.
9522        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9523$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9524        # Extract the first word of "$tool_basename", so it can be a program name with args.
9525set dummy $tool_basename; ac_word=$2
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9527$as_echo_n "checking for $ac_word... " >&6; }
9528if ${ac_cv_path_TAIL+:} false; then :
9529  $as_echo_n "(cached) " >&6
9530else
9531  case $TAIL in
9532  [\\/]* | ?:[\\/]*)
9533  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9534  ;;
9535  *)
9536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9537for as_dir in $PATH
9538do
9539  IFS=$as_save_IFS
9540  test -z "$as_dir" && as_dir=.
9541    for ac_exec_ext in '' $ac_executable_extensions; do
9542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9543    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9545    break 2
9546  fi
9547done
9548  done
9549IFS=$as_save_IFS
9550
9551  ;;
9552esac
9553fi
9554TAIL=$ac_cv_path_TAIL
9555if test -n "$TAIL"; then
9556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9557$as_echo "$TAIL" >&6; }
9558else
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
9561fi
9562
9563
9564        if test "x$TAIL" = x; then
9565          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9566        fi
9567      else
9568        # Otherwise we believe it is a complete path. Use it as it is.
9569        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9570$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9572$as_echo_n "checking for TAIL... " >&6; }
9573        if test ! -x "$tool_specified"; then
9574          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9575$as_echo "not found" >&6; }
9576          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9577        fi
9578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9579$as_echo "$tool_specified" >&6; }
9580      fi
9581    fi
9582  fi
9583
9584
9585
9586  if test "x$TAIL" = x; then
9587    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9588  fi
9589
9590
9591
9592
9593
9594  # Publish this variable in the help.
9595
9596
9597  if test "x$TAR" = x; then
9598    # The variable is not set by user, try to locate tool using the code snippet
9599    for ac_prog in tar
9600do
9601  # Extract the first word of "$ac_prog", so it can be a program name with args.
9602set dummy $ac_prog; ac_word=$2
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9604$as_echo_n "checking for $ac_word... " >&6; }
9605if ${ac_cv_path_TAR+:} false; then :
9606  $as_echo_n "(cached) " >&6
9607else
9608  case $TAR in
9609  [\\/]* | ?:[\\/]*)
9610  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9611  ;;
9612  *)
9613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9614for as_dir in $PATH
9615do
9616  IFS=$as_save_IFS
9617  test -z "$as_dir" && as_dir=.
9618    for ac_exec_ext in '' $ac_executable_extensions; do
9619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9620    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9622    break 2
9623  fi
9624done
9625  done
9626IFS=$as_save_IFS
9627
9628  ;;
9629esac
9630fi
9631TAR=$ac_cv_path_TAR
9632if test -n "$TAR"; then
9633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9634$as_echo "$TAR" >&6; }
9635else
9636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9637$as_echo "no" >&6; }
9638fi
9639
9640
9641  test -n "$TAR" && break
9642done
9643
9644  else
9645    # The variable is set, but is it from the command line or the environment?
9646
9647    # Try to remove the string !TAR! from our list.
9648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9650      # If it failed, the variable was not from the command line. Ignore it,
9651      # but warn the user (except for BASH, which is always set by the calling BASH).
9652      if test "xTAR" != xBASH; then
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9654$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9655      fi
9656      # Try to locate tool using the code snippet
9657      for ac_prog in tar
9658do
9659  # Extract the first word of "$ac_prog", so it can be a program name with args.
9660set dummy $ac_prog; ac_word=$2
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9662$as_echo_n "checking for $ac_word... " >&6; }
9663if ${ac_cv_path_TAR+:} false; then :
9664  $as_echo_n "(cached) " >&6
9665else
9666  case $TAR in
9667  [\\/]* | ?:[\\/]*)
9668  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9669  ;;
9670  *)
9671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9672for as_dir in $PATH
9673do
9674  IFS=$as_save_IFS
9675  test -z "$as_dir" && as_dir=.
9676    for ac_exec_ext in '' $ac_executable_extensions; do
9677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9678    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9680    break 2
9681  fi
9682done
9683  done
9684IFS=$as_save_IFS
9685
9686  ;;
9687esac
9688fi
9689TAR=$ac_cv_path_TAR
9690if test -n "$TAR"; then
9691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9692$as_echo "$TAR" >&6; }
9693else
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
9696fi
9697
9698
9699  test -n "$TAR" && break
9700done
9701
9702    else
9703      # If it succeeded, then it was overridden by the user. We will use it
9704      # for the tool.
9705
9706      # First remove it from the list of overridden variables, so we can test
9707      # for unknown variables in the end.
9708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9709
9710      # Check if the provided tool contains a complete path.
9711      tool_specified="$TAR"
9712      tool_basename="${tool_specified##*/}"
9713      if test "x$tool_basename" = "x$tool_specified"; then
9714        # A command without a complete path is provided, search $PATH.
9715        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9716$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9717        # Extract the first word of "$tool_basename", so it can be a program name with args.
9718set dummy $tool_basename; ac_word=$2
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9720$as_echo_n "checking for $ac_word... " >&6; }
9721if ${ac_cv_path_TAR+:} false; then :
9722  $as_echo_n "(cached) " >&6
9723else
9724  case $TAR in
9725  [\\/]* | ?:[\\/]*)
9726  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9727  ;;
9728  *)
9729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9730for as_dir in $PATH
9731do
9732  IFS=$as_save_IFS
9733  test -z "$as_dir" && as_dir=.
9734    for ac_exec_ext in '' $ac_executable_extensions; do
9735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9736    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9738    break 2
9739  fi
9740done
9741  done
9742IFS=$as_save_IFS
9743
9744  ;;
9745esac
9746fi
9747TAR=$ac_cv_path_TAR
9748if test -n "$TAR"; then
9749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9750$as_echo "$TAR" >&6; }
9751else
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753$as_echo "no" >&6; }
9754fi
9755
9756
9757        if test "x$TAR" = x; then
9758          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9759        fi
9760      else
9761        # Otherwise we believe it is a complete path. Use it as it is.
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9763$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9765$as_echo_n "checking for TAR... " >&6; }
9766        if test ! -x "$tool_specified"; then
9767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9768$as_echo "not found" >&6; }
9769          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9770        fi
9771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9772$as_echo "$tool_specified" >&6; }
9773      fi
9774    fi
9775  fi
9776
9777
9778
9779  if test "x$TAR" = x; then
9780    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9781  fi
9782
9783
9784
9785
9786
9787  # Publish this variable in the help.
9788
9789
9790  if test "x$TEE" = x; then
9791    # The variable is not set by user, try to locate tool using the code snippet
9792    for ac_prog in tee
9793do
9794  # Extract the first word of "$ac_prog", so it can be a program name with args.
9795set dummy $ac_prog; ac_word=$2
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9797$as_echo_n "checking for $ac_word... " >&6; }
9798if ${ac_cv_path_TEE+:} false; then :
9799  $as_echo_n "(cached) " >&6
9800else
9801  case $TEE in
9802  [\\/]* | ?:[\\/]*)
9803  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9804  ;;
9805  *)
9806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9807for as_dir in $PATH
9808do
9809  IFS=$as_save_IFS
9810  test -z "$as_dir" && as_dir=.
9811    for ac_exec_ext in '' $ac_executable_extensions; do
9812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9813    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9815    break 2
9816  fi
9817done
9818  done
9819IFS=$as_save_IFS
9820
9821  ;;
9822esac
9823fi
9824TEE=$ac_cv_path_TEE
9825if test -n "$TEE"; then
9826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9827$as_echo "$TEE" >&6; }
9828else
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9830$as_echo "no" >&6; }
9831fi
9832
9833
9834  test -n "$TEE" && break
9835done
9836
9837  else
9838    # The variable is set, but is it from the command line or the environment?
9839
9840    # Try to remove the string !TEE! from our list.
9841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9843      # If it failed, the variable was not from the command line. Ignore it,
9844      # but warn the user (except for BASH, which is always set by the calling BASH).
9845      if test "xTEE" != xBASH; then
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9847$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9848      fi
9849      # Try to locate tool using the code snippet
9850      for ac_prog in tee
9851do
9852  # Extract the first word of "$ac_prog", so it can be a program name with args.
9853set dummy $ac_prog; ac_word=$2
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9855$as_echo_n "checking for $ac_word... " >&6; }
9856if ${ac_cv_path_TEE+:} false; then :
9857  $as_echo_n "(cached) " >&6
9858else
9859  case $TEE in
9860  [\\/]* | ?:[\\/]*)
9861  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9862  ;;
9863  *)
9864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865for as_dir in $PATH
9866do
9867  IFS=$as_save_IFS
9868  test -z "$as_dir" && as_dir=.
9869    for ac_exec_ext in '' $ac_executable_extensions; do
9870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9871    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9873    break 2
9874  fi
9875done
9876  done
9877IFS=$as_save_IFS
9878
9879  ;;
9880esac
9881fi
9882TEE=$ac_cv_path_TEE
9883if test -n "$TEE"; then
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9885$as_echo "$TEE" >&6; }
9886else
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889fi
9890
9891
9892  test -n "$TEE" && break
9893done
9894
9895    else
9896      # If it succeeded, then it was overridden by the user. We will use it
9897      # for the tool.
9898
9899      # First remove it from the list of overridden variables, so we can test
9900      # for unknown variables in the end.
9901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9902
9903      # Check if the provided tool contains a complete path.
9904      tool_specified="$TEE"
9905      tool_basename="${tool_specified##*/}"
9906      if test "x$tool_basename" = "x$tool_specified"; then
9907        # A command without a complete path is provided, search $PATH.
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9909$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9910        # Extract the first word of "$tool_basename", so it can be a program name with args.
9911set dummy $tool_basename; ac_word=$2
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9913$as_echo_n "checking for $ac_word... " >&6; }
9914if ${ac_cv_path_TEE+:} false; then :
9915  $as_echo_n "(cached) " >&6
9916else
9917  case $TEE in
9918  [\\/]* | ?:[\\/]*)
9919  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9920  ;;
9921  *)
9922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9923for as_dir in $PATH
9924do
9925  IFS=$as_save_IFS
9926  test -z "$as_dir" && as_dir=.
9927    for ac_exec_ext in '' $ac_executable_extensions; do
9928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9929    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9931    break 2
9932  fi
9933done
9934  done
9935IFS=$as_save_IFS
9936
9937  ;;
9938esac
9939fi
9940TEE=$ac_cv_path_TEE
9941if test -n "$TEE"; then
9942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9943$as_echo "$TEE" >&6; }
9944else
9945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946$as_echo "no" >&6; }
9947fi
9948
9949
9950        if test "x$TEE" = x; then
9951          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9952        fi
9953      else
9954        # Otherwise we believe it is a complete path. Use it as it is.
9955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9956$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9957        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9958$as_echo_n "checking for TEE... " >&6; }
9959        if test ! -x "$tool_specified"; then
9960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9961$as_echo "not found" >&6; }
9962          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9963        fi
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9965$as_echo "$tool_specified" >&6; }
9966      fi
9967    fi
9968  fi
9969
9970
9971
9972  if test "x$TEE" = x; then
9973    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9974  fi
9975
9976
9977
9978
9979
9980  # Publish this variable in the help.
9981
9982
9983  if test "x$TOUCH" = x; then
9984    # The variable is not set by user, try to locate tool using the code snippet
9985    for ac_prog in touch
9986do
9987  # Extract the first word of "$ac_prog", so it can be a program name with args.
9988set dummy $ac_prog; ac_word=$2
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9990$as_echo_n "checking for $ac_word... " >&6; }
9991if ${ac_cv_path_TOUCH+:} false; then :
9992  $as_echo_n "(cached) " >&6
9993else
9994  case $TOUCH in
9995  [\\/]* | ?:[\\/]*)
9996  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9997  ;;
9998  *)
9999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10000for as_dir in $PATH
10001do
10002  IFS=$as_save_IFS
10003  test -z "$as_dir" && as_dir=.
10004    for ac_exec_ext in '' $ac_executable_extensions; do
10005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10006    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10008    break 2
10009  fi
10010done
10011  done
10012IFS=$as_save_IFS
10013
10014  ;;
10015esac
10016fi
10017TOUCH=$ac_cv_path_TOUCH
10018if test -n "$TOUCH"; then
10019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10020$as_echo "$TOUCH" >&6; }
10021else
10022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10023$as_echo "no" >&6; }
10024fi
10025
10026
10027  test -n "$TOUCH" && break
10028done
10029
10030  else
10031    # The variable is set, but is it from the command line or the environment?
10032
10033    # Try to remove the string !TOUCH! from our list.
10034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10036      # If it failed, the variable was not from the command line. Ignore it,
10037      # but warn the user (except for BASH, which is always set by the calling BASH).
10038      if test "xTOUCH" != xBASH; then
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10040$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10041      fi
10042      # Try to locate tool using the code snippet
10043      for ac_prog in touch
10044do
10045  # Extract the first word of "$ac_prog", so it can be a program name with args.
10046set dummy $ac_prog; ac_word=$2
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048$as_echo_n "checking for $ac_word... " >&6; }
10049if ${ac_cv_path_TOUCH+:} false; then :
10050  $as_echo_n "(cached) " >&6
10051else
10052  case $TOUCH in
10053  [\\/]* | ?:[\\/]*)
10054  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10055  ;;
10056  *)
10057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058for as_dir in $PATH
10059do
10060  IFS=$as_save_IFS
10061  test -z "$as_dir" && as_dir=.
10062    for ac_exec_ext in '' $ac_executable_extensions; do
10063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10064    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066    break 2
10067  fi
10068done
10069  done
10070IFS=$as_save_IFS
10071
10072  ;;
10073esac
10074fi
10075TOUCH=$ac_cv_path_TOUCH
10076if test -n "$TOUCH"; then
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10078$as_echo "$TOUCH" >&6; }
10079else
10080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082fi
10083
10084
10085  test -n "$TOUCH" && break
10086done
10087
10088    else
10089      # If it succeeded, then it was overridden by the user. We will use it
10090      # for the tool.
10091
10092      # First remove it from the list of overridden variables, so we can test
10093      # for unknown variables in the end.
10094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10095
10096      # Check if the provided tool contains a complete path.
10097      tool_specified="$TOUCH"
10098      tool_basename="${tool_specified##*/}"
10099      if test "x$tool_basename" = "x$tool_specified"; then
10100        # A command without a complete path is provided, search $PATH.
10101        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10102$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10103        # Extract the first word of "$tool_basename", so it can be a program name with args.
10104set dummy $tool_basename; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if ${ac_cv_path_TOUCH+:} false; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $TOUCH in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133TOUCH=$ac_cv_path_TOUCH
10134if test -n "$TOUCH"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10136$as_echo "$TOUCH" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143        if test "x$TOUCH" = x; then
10144          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10145        fi
10146      else
10147        # Otherwise we believe it is a complete path. Use it as it is.
10148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10149$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10151$as_echo_n "checking for TOUCH... " >&6; }
10152        if test ! -x "$tool_specified"; then
10153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10154$as_echo "not found" >&6; }
10155          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10156        fi
10157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10158$as_echo "$tool_specified" >&6; }
10159      fi
10160    fi
10161  fi
10162
10163
10164
10165  if test "x$TOUCH" = x; then
10166    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10167  fi
10168
10169
10170
10171
10172
10173  # Publish this variable in the help.
10174
10175
10176  if test "x$TR" = x; then
10177    # The variable is not set by user, try to locate tool using the code snippet
10178    for ac_prog in tr
10179do
10180  # Extract the first word of "$ac_prog", so it can be a program name with args.
10181set dummy $ac_prog; ac_word=$2
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10183$as_echo_n "checking for $ac_word... " >&6; }
10184if ${ac_cv_path_TR+:} false; then :
10185  $as_echo_n "(cached) " >&6
10186else
10187  case $TR in
10188  [\\/]* | ?:[\\/]*)
10189  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10190  ;;
10191  *)
10192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10193for as_dir in $PATH
10194do
10195  IFS=$as_save_IFS
10196  test -z "$as_dir" && as_dir=.
10197    for ac_exec_ext in '' $ac_executable_extensions; do
10198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10199    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10201    break 2
10202  fi
10203done
10204  done
10205IFS=$as_save_IFS
10206
10207  ;;
10208esac
10209fi
10210TR=$ac_cv_path_TR
10211if test -n "$TR"; then
10212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10213$as_echo "$TR" >&6; }
10214else
10215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10216$as_echo "no" >&6; }
10217fi
10218
10219
10220  test -n "$TR" && break
10221done
10222
10223  else
10224    # The variable is set, but is it from the command line or the environment?
10225
10226    # Try to remove the string !TR! from our list.
10227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10229      # If it failed, the variable was not from the command line. Ignore it,
10230      # but warn the user (except for BASH, which is always set by the calling BASH).
10231      if test "xTR" != xBASH; then
10232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10233$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10234      fi
10235      # Try to locate tool using the code snippet
10236      for ac_prog in tr
10237do
10238  # Extract the first word of "$ac_prog", so it can be a program name with args.
10239set dummy $ac_prog; ac_word=$2
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241$as_echo_n "checking for $ac_word... " >&6; }
10242if ${ac_cv_path_TR+:} false; then :
10243  $as_echo_n "(cached) " >&6
10244else
10245  case $TR in
10246  [\\/]* | ?:[\\/]*)
10247  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10248  ;;
10249  *)
10250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251for as_dir in $PATH
10252do
10253  IFS=$as_save_IFS
10254  test -z "$as_dir" && as_dir=.
10255    for ac_exec_ext in '' $ac_executable_extensions; do
10256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10257    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259    break 2
10260  fi
10261done
10262  done
10263IFS=$as_save_IFS
10264
10265  ;;
10266esac
10267fi
10268TR=$ac_cv_path_TR
10269if test -n "$TR"; then
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10271$as_echo "$TR" >&6; }
10272else
10273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
10275fi
10276
10277
10278  test -n "$TR" && break
10279done
10280
10281    else
10282      # If it succeeded, then it was overridden by the user. We will use it
10283      # for the tool.
10284
10285      # First remove it from the list of overridden variables, so we can test
10286      # for unknown variables in the end.
10287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10288
10289      # Check if the provided tool contains a complete path.
10290      tool_specified="$TR"
10291      tool_basename="${tool_specified##*/}"
10292      if test "x$tool_basename" = "x$tool_specified"; then
10293        # A command without a complete path is provided, search $PATH.
10294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10295$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10296        # Extract the first word of "$tool_basename", so it can be a program name with args.
10297set dummy $tool_basename; ac_word=$2
10298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10299$as_echo_n "checking for $ac_word... " >&6; }
10300if ${ac_cv_path_TR+:} false; then :
10301  $as_echo_n "(cached) " >&6
10302else
10303  case $TR in
10304  [\\/]* | ?:[\\/]*)
10305  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10306  ;;
10307  *)
10308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10309for as_dir in $PATH
10310do
10311  IFS=$as_save_IFS
10312  test -z "$as_dir" && as_dir=.
10313    for ac_exec_ext in '' $ac_executable_extensions; do
10314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10315    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10317    break 2
10318  fi
10319done
10320  done
10321IFS=$as_save_IFS
10322
10323  ;;
10324esac
10325fi
10326TR=$ac_cv_path_TR
10327if test -n "$TR"; then
10328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10329$as_echo "$TR" >&6; }
10330else
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
10333fi
10334
10335
10336        if test "x$TR" = x; then
10337          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10338        fi
10339      else
10340        # Otherwise we believe it is a complete path. Use it as it is.
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10342$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10344$as_echo_n "checking for TR... " >&6; }
10345        if test ! -x "$tool_specified"; then
10346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10347$as_echo "not found" >&6; }
10348          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10349        fi
10350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10351$as_echo "$tool_specified" >&6; }
10352      fi
10353    fi
10354  fi
10355
10356
10357
10358  if test "x$TR" = x; then
10359    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10360  fi
10361
10362
10363
10364
10365
10366  # Publish this variable in the help.
10367
10368
10369  if test "x$UNAME" = x; then
10370    # The variable is not set by user, try to locate tool using the code snippet
10371    for ac_prog in uname
10372do
10373  # Extract the first word of "$ac_prog", so it can be a program name with args.
10374set dummy $ac_prog; ac_word=$2
10375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10376$as_echo_n "checking for $ac_word... " >&6; }
10377if ${ac_cv_path_UNAME+:} false; then :
10378  $as_echo_n "(cached) " >&6
10379else
10380  case $UNAME in
10381  [\\/]* | ?:[\\/]*)
10382  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10383  ;;
10384  *)
10385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10386for as_dir in $PATH
10387do
10388  IFS=$as_save_IFS
10389  test -z "$as_dir" && as_dir=.
10390    for ac_exec_ext in '' $ac_executable_extensions; do
10391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10392    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10394    break 2
10395  fi
10396done
10397  done
10398IFS=$as_save_IFS
10399
10400  ;;
10401esac
10402fi
10403UNAME=$ac_cv_path_UNAME
10404if test -n "$UNAME"; then
10405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10406$as_echo "$UNAME" >&6; }
10407else
10408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
10410fi
10411
10412
10413  test -n "$UNAME" && break
10414done
10415
10416  else
10417    # The variable is set, but is it from the command line or the environment?
10418
10419    # Try to remove the string !UNAME! from our list.
10420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10422      # If it failed, the variable was not from the command line. Ignore it,
10423      # but warn the user (except for BASH, which is always set by the calling BASH).
10424      if test "xUNAME" != xBASH; then
10425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10426$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10427      fi
10428      # Try to locate tool using the code snippet
10429      for ac_prog in uname
10430do
10431  # Extract the first word of "$ac_prog", so it can be a program name with args.
10432set dummy $ac_prog; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_UNAME+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $UNAME in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461UNAME=$ac_cv_path_UNAME
10462if test -n "$UNAME"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10464$as_echo "$UNAME" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470
10471  test -n "$UNAME" && break
10472done
10473
10474    else
10475      # If it succeeded, then it was overridden by the user. We will use it
10476      # for the tool.
10477
10478      # First remove it from the list of overridden variables, so we can test
10479      # for unknown variables in the end.
10480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10481
10482      # Check if the provided tool contains a complete path.
10483      tool_specified="$UNAME"
10484      tool_basename="${tool_specified##*/}"
10485      if test "x$tool_basename" = "x$tool_specified"; then
10486        # A command without a complete path is provided, search $PATH.
10487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10488$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10489        # Extract the first word of "$tool_basename", so it can be a program name with args.
10490set dummy $tool_basename; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if ${ac_cv_path_UNAME+:} false; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $UNAME in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519UNAME=$ac_cv_path_UNAME
10520if test -n "$UNAME"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10522$as_echo "$UNAME" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529        if test "x$UNAME" = x; then
10530          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10531        fi
10532      else
10533        # Otherwise we believe it is a complete path. Use it as it is.
10534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10535$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10537$as_echo_n "checking for UNAME... " >&6; }
10538        if test ! -x "$tool_specified"; then
10539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10540$as_echo "not found" >&6; }
10541          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10542        fi
10543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10544$as_echo "$tool_specified" >&6; }
10545      fi
10546    fi
10547  fi
10548
10549
10550
10551  if test "x$UNAME" = x; then
10552    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10553  fi
10554
10555
10556
10557
10558
10559  # Publish this variable in the help.
10560
10561
10562  if test "x$UNIQ" = x; then
10563    # The variable is not set by user, try to locate tool using the code snippet
10564    for ac_prog in uniq
10565do
10566  # Extract the first word of "$ac_prog", so it can be a program name with args.
10567set dummy $ac_prog; ac_word=$2
10568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10569$as_echo_n "checking for $ac_word... " >&6; }
10570if ${ac_cv_path_UNIQ+:} false; then :
10571  $as_echo_n "(cached) " >&6
10572else
10573  case $UNIQ in
10574  [\\/]* | ?:[\\/]*)
10575  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10576  ;;
10577  *)
10578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10579for as_dir in $PATH
10580do
10581  IFS=$as_save_IFS
10582  test -z "$as_dir" && as_dir=.
10583    for ac_exec_ext in '' $ac_executable_extensions; do
10584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10585    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10587    break 2
10588  fi
10589done
10590  done
10591IFS=$as_save_IFS
10592
10593  ;;
10594esac
10595fi
10596UNIQ=$ac_cv_path_UNIQ
10597if test -n "$UNIQ"; then
10598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10599$as_echo "$UNIQ" >&6; }
10600else
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10602$as_echo "no" >&6; }
10603fi
10604
10605
10606  test -n "$UNIQ" && break
10607done
10608
10609  else
10610    # The variable is set, but is it from the command line or the environment?
10611
10612    # Try to remove the string !UNIQ! from our list.
10613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10615      # If it failed, the variable was not from the command line. Ignore it,
10616      # but warn the user (except for BASH, which is always set by the calling BASH).
10617      if test "xUNIQ" != xBASH; then
10618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10619$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10620      fi
10621      # Try to locate tool using the code snippet
10622      for ac_prog in uniq
10623do
10624  # Extract the first word of "$ac_prog", so it can be a program name with args.
10625set dummy $ac_prog; ac_word=$2
10626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627$as_echo_n "checking for $ac_word... " >&6; }
10628if ${ac_cv_path_UNIQ+:} false; then :
10629  $as_echo_n "(cached) " >&6
10630else
10631  case $UNIQ in
10632  [\\/]* | ?:[\\/]*)
10633  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10634  ;;
10635  *)
10636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637for as_dir in $PATH
10638do
10639  IFS=$as_save_IFS
10640  test -z "$as_dir" && as_dir=.
10641    for ac_exec_ext in '' $ac_executable_extensions; do
10642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10643    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645    break 2
10646  fi
10647done
10648  done
10649IFS=$as_save_IFS
10650
10651  ;;
10652esac
10653fi
10654UNIQ=$ac_cv_path_UNIQ
10655if test -n "$UNIQ"; then
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10657$as_echo "$UNIQ" >&6; }
10658else
10659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660$as_echo "no" >&6; }
10661fi
10662
10663
10664  test -n "$UNIQ" && break
10665done
10666
10667    else
10668      # If it succeeded, then it was overridden by the user. We will use it
10669      # for the tool.
10670
10671      # First remove it from the list of overridden variables, so we can test
10672      # for unknown variables in the end.
10673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10674
10675      # Check if the provided tool contains a complete path.
10676      tool_specified="$UNIQ"
10677      tool_basename="${tool_specified##*/}"
10678      if test "x$tool_basename" = "x$tool_specified"; then
10679        # A command without a complete path is provided, search $PATH.
10680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10681$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10682        # Extract the first word of "$tool_basename", so it can be a program name with args.
10683set dummy $tool_basename; ac_word=$2
10684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10685$as_echo_n "checking for $ac_word... " >&6; }
10686if ${ac_cv_path_UNIQ+:} false; then :
10687  $as_echo_n "(cached) " >&6
10688else
10689  case $UNIQ in
10690  [\\/]* | ?:[\\/]*)
10691  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10692  ;;
10693  *)
10694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10695for as_dir in $PATH
10696do
10697  IFS=$as_save_IFS
10698  test -z "$as_dir" && as_dir=.
10699    for ac_exec_ext in '' $ac_executable_extensions; do
10700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10701    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10703    break 2
10704  fi
10705done
10706  done
10707IFS=$as_save_IFS
10708
10709  ;;
10710esac
10711fi
10712UNIQ=$ac_cv_path_UNIQ
10713if test -n "$UNIQ"; then
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10715$as_echo "$UNIQ" >&6; }
10716else
10717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718$as_echo "no" >&6; }
10719fi
10720
10721
10722        if test "x$UNIQ" = x; then
10723          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10724        fi
10725      else
10726        # Otherwise we believe it is a complete path. Use it as it is.
10727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10728$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10730$as_echo_n "checking for UNIQ... " >&6; }
10731        if test ! -x "$tool_specified"; then
10732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10733$as_echo "not found" >&6; }
10734          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10735        fi
10736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10737$as_echo "$tool_specified" >&6; }
10738      fi
10739    fi
10740  fi
10741
10742
10743
10744  if test "x$UNIQ" = x; then
10745    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10746  fi
10747
10748
10749
10750
10751
10752  # Publish this variable in the help.
10753
10754
10755  if test "x$WC" = x; then
10756    # The variable is not set by user, try to locate tool using the code snippet
10757    for ac_prog in wc
10758do
10759  # Extract the first word of "$ac_prog", so it can be a program name with args.
10760set dummy $ac_prog; ac_word=$2
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762$as_echo_n "checking for $ac_word... " >&6; }
10763if ${ac_cv_path_WC+:} false; then :
10764  $as_echo_n "(cached) " >&6
10765else
10766  case $WC in
10767  [\\/]* | ?:[\\/]*)
10768  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10769  ;;
10770  *)
10771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772for as_dir in $PATH
10773do
10774  IFS=$as_save_IFS
10775  test -z "$as_dir" && as_dir=.
10776    for ac_exec_ext in '' $ac_executable_extensions; do
10777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780    break 2
10781  fi
10782done
10783  done
10784IFS=$as_save_IFS
10785
10786  ;;
10787esac
10788fi
10789WC=$ac_cv_path_WC
10790if test -n "$WC"; then
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10792$as_echo "$WC" >&6; }
10793else
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796fi
10797
10798
10799  test -n "$WC" && break
10800done
10801
10802  else
10803    # The variable is set, but is it from the command line or the environment?
10804
10805    # Try to remove the string !WC! from our list.
10806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10808      # If it failed, the variable was not from the command line. Ignore it,
10809      # but warn the user (except for BASH, which is always set by the calling BASH).
10810      if test "xWC" != xBASH; then
10811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10812$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10813      fi
10814      # Try to locate tool using the code snippet
10815      for ac_prog in wc
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_WC+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $WC in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847WC=$ac_cv_path_WC
10848if test -n "$WC"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10850$as_echo "$WC" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$WC" && break
10858done
10859
10860    else
10861      # If it succeeded, then it was overridden by the user. We will use it
10862      # for the tool.
10863
10864      # First remove it from the list of overridden variables, so we can test
10865      # for unknown variables in the end.
10866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10867
10868      # Check if the provided tool contains a complete path.
10869      tool_specified="$WC"
10870      tool_basename="${tool_specified##*/}"
10871      if test "x$tool_basename" = "x$tool_specified"; then
10872        # A command without a complete path is provided, search $PATH.
10873        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10874$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10875        # Extract the first word of "$tool_basename", so it can be a program name with args.
10876set dummy $tool_basename; ac_word=$2
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10878$as_echo_n "checking for $ac_word... " >&6; }
10879if ${ac_cv_path_WC+:} false; then :
10880  $as_echo_n "(cached) " >&6
10881else
10882  case $WC in
10883  [\\/]* | ?:[\\/]*)
10884  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10885  ;;
10886  *)
10887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10888for as_dir in $PATH
10889do
10890  IFS=$as_save_IFS
10891  test -z "$as_dir" && as_dir=.
10892    for ac_exec_ext in '' $ac_executable_extensions; do
10893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10894    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10896    break 2
10897  fi
10898done
10899  done
10900IFS=$as_save_IFS
10901
10902  ;;
10903esac
10904fi
10905WC=$ac_cv_path_WC
10906if test -n "$WC"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10908$as_echo "$WC" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915        if test "x$WC" = x; then
10916          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10917        fi
10918      else
10919        # Otherwise we believe it is a complete path. Use it as it is.
10920        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10921$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10923$as_echo_n "checking for WC... " >&6; }
10924        if test ! -x "$tool_specified"; then
10925          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10926$as_echo "not found" >&6; }
10927          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10928        fi
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10930$as_echo "$tool_specified" >&6; }
10931      fi
10932    fi
10933  fi
10934
10935
10936
10937  if test "x$WC" = x; then
10938    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10939  fi
10940
10941
10942
10943
10944
10945  # Publish this variable in the help.
10946
10947
10948  if test "x$WHICH" = x; then
10949    # The variable is not set by user, try to locate tool using the code snippet
10950    for ac_prog in which
10951do
10952  # Extract the first word of "$ac_prog", so it can be a program name with args.
10953set dummy $ac_prog; ac_word=$2
10954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10955$as_echo_n "checking for $ac_word... " >&6; }
10956if ${ac_cv_path_WHICH+:} false; then :
10957  $as_echo_n "(cached) " >&6
10958else
10959  case $WHICH in
10960  [\\/]* | ?:[\\/]*)
10961  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10962  ;;
10963  *)
10964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10965for as_dir in $PATH
10966do
10967  IFS=$as_save_IFS
10968  test -z "$as_dir" && as_dir=.
10969    for ac_exec_ext in '' $ac_executable_extensions; do
10970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10971    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10973    break 2
10974  fi
10975done
10976  done
10977IFS=$as_save_IFS
10978
10979  ;;
10980esac
10981fi
10982WHICH=$ac_cv_path_WHICH
10983if test -n "$WHICH"; then
10984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10985$as_echo "$WHICH" >&6; }
10986else
10987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
10989fi
10990
10991
10992  test -n "$WHICH" && break
10993done
10994
10995  else
10996    # The variable is set, but is it from the command line or the environment?
10997
10998    # Try to remove the string !WHICH! from our list.
10999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11001      # If it failed, the variable was not from the command line. Ignore it,
11002      # but warn the user (except for BASH, which is always set by the calling BASH).
11003      if test "xWHICH" != xBASH; then
11004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11005$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11006      fi
11007      # Try to locate tool using the code snippet
11008      for ac_prog in which
11009do
11010  # Extract the first word of "$ac_prog", so it can be a program name with args.
11011set dummy $ac_prog; ac_word=$2
11012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11013$as_echo_n "checking for $ac_word... " >&6; }
11014if ${ac_cv_path_WHICH+:} false; then :
11015  $as_echo_n "(cached) " >&6
11016else
11017  case $WHICH in
11018  [\\/]* | ?:[\\/]*)
11019  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11020  ;;
11021  *)
11022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11023for as_dir in $PATH
11024do
11025  IFS=$as_save_IFS
11026  test -z "$as_dir" && as_dir=.
11027    for ac_exec_ext in '' $ac_executable_extensions; do
11028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11029    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11031    break 2
11032  fi
11033done
11034  done
11035IFS=$as_save_IFS
11036
11037  ;;
11038esac
11039fi
11040WHICH=$ac_cv_path_WHICH
11041if test -n "$WHICH"; then
11042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11043$as_echo "$WHICH" >&6; }
11044else
11045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11046$as_echo "no" >&6; }
11047fi
11048
11049
11050  test -n "$WHICH" && break
11051done
11052
11053    else
11054      # If it succeeded, then it was overridden by the user. We will use it
11055      # for the tool.
11056
11057      # First remove it from the list of overridden variables, so we can test
11058      # for unknown variables in the end.
11059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11060
11061      # Check if the provided tool contains a complete path.
11062      tool_specified="$WHICH"
11063      tool_basename="${tool_specified##*/}"
11064      if test "x$tool_basename" = "x$tool_specified"; then
11065        # A command without a complete path is provided, search $PATH.
11066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11067$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11068        # Extract the first word of "$tool_basename", so it can be a program name with args.
11069set dummy $tool_basename; ac_word=$2
11070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11071$as_echo_n "checking for $ac_word... " >&6; }
11072if ${ac_cv_path_WHICH+:} false; then :
11073  $as_echo_n "(cached) " >&6
11074else
11075  case $WHICH in
11076  [\\/]* | ?:[\\/]*)
11077  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11078  ;;
11079  *)
11080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11081for as_dir in $PATH
11082do
11083  IFS=$as_save_IFS
11084  test -z "$as_dir" && as_dir=.
11085    for ac_exec_ext in '' $ac_executable_extensions; do
11086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11087    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11089    break 2
11090  fi
11091done
11092  done
11093IFS=$as_save_IFS
11094
11095  ;;
11096esac
11097fi
11098WHICH=$ac_cv_path_WHICH
11099if test -n "$WHICH"; then
11100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11101$as_echo "$WHICH" >&6; }
11102else
11103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104$as_echo "no" >&6; }
11105fi
11106
11107
11108        if test "x$WHICH" = x; then
11109          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11110        fi
11111      else
11112        # Otherwise we believe it is a complete path. Use it as it is.
11113        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11114$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11116$as_echo_n "checking for WHICH... " >&6; }
11117        if test ! -x "$tool_specified"; then
11118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11119$as_echo "not found" >&6; }
11120          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11121        fi
11122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11123$as_echo "$tool_specified" >&6; }
11124      fi
11125    fi
11126  fi
11127
11128
11129
11130  if test "x$WHICH" = x; then
11131    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11132  fi
11133
11134
11135
11136
11137
11138  # Publish this variable in the help.
11139
11140
11141  if test "x$XARGS" = x; then
11142    # The variable is not set by user, try to locate tool using the code snippet
11143    for ac_prog in xargs
11144do
11145  # Extract the first word of "$ac_prog", so it can be a program name with args.
11146set dummy $ac_prog; ac_word=$2
11147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11148$as_echo_n "checking for $ac_word... " >&6; }
11149if ${ac_cv_path_XARGS+:} false; then :
11150  $as_echo_n "(cached) " >&6
11151else
11152  case $XARGS in
11153  [\\/]* | ?:[\\/]*)
11154  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11155  ;;
11156  *)
11157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11158for as_dir in $PATH
11159do
11160  IFS=$as_save_IFS
11161  test -z "$as_dir" && as_dir=.
11162    for ac_exec_ext in '' $ac_executable_extensions; do
11163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11164    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11166    break 2
11167  fi
11168done
11169  done
11170IFS=$as_save_IFS
11171
11172  ;;
11173esac
11174fi
11175XARGS=$ac_cv_path_XARGS
11176if test -n "$XARGS"; then
11177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11178$as_echo "$XARGS" >&6; }
11179else
11180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11181$as_echo "no" >&6; }
11182fi
11183
11184
11185  test -n "$XARGS" && break
11186done
11187
11188  else
11189    # The variable is set, but is it from the command line or the environment?
11190
11191    # Try to remove the string !XARGS! from our list.
11192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11194      # If it failed, the variable was not from the command line. Ignore it,
11195      # but warn the user (except for BASH, which is always set by the calling BASH).
11196      if test "xXARGS" != xBASH; then
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11198$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11199      fi
11200      # Try to locate tool using the code snippet
11201      for ac_prog in xargs
11202do
11203  # Extract the first word of "$ac_prog", so it can be a program name with args.
11204set dummy $ac_prog; ac_word=$2
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11206$as_echo_n "checking for $ac_word... " >&6; }
11207if ${ac_cv_path_XARGS+:} false; then :
11208  $as_echo_n "(cached) " >&6
11209else
11210  case $XARGS in
11211  [\\/]* | ?:[\\/]*)
11212  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11213  ;;
11214  *)
11215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11216for as_dir in $PATH
11217do
11218  IFS=$as_save_IFS
11219  test -z "$as_dir" && as_dir=.
11220    for ac_exec_ext in '' $ac_executable_extensions; do
11221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11222    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11224    break 2
11225  fi
11226done
11227  done
11228IFS=$as_save_IFS
11229
11230  ;;
11231esac
11232fi
11233XARGS=$ac_cv_path_XARGS
11234if test -n "$XARGS"; then
11235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11236$as_echo "$XARGS" >&6; }
11237else
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
11240fi
11241
11242
11243  test -n "$XARGS" && break
11244done
11245
11246    else
11247      # If it succeeded, then it was overridden by the user. We will use it
11248      # for the tool.
11249
11250      # First remove it from the list of overridden variables, so we can test
11251      # for unknown variables in the end.
11252      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11253
11254      # Check if the provided tool contains a complete path.
11255      tool_specified="$XARGS"
11256      tool_basename="${tool_specified##*/}"
11257      if test "x$tool_basename" = "x$tool_specified"; then
11258        # A command without a complete path is provided, search $PATH.
11259        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11260$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11261        # Extract the first word of "$tool_basename", so it can be a program name with args.
11262set dummy $tool_basename; ac_word=$2
11263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11264$as_echo_n "checking for $ac_word... " >&6; }
11265if ${ac_cv_path_XARGS+:} false; then :
11266  $as_echo_n "(cached) " >&6
11267else
11268  case $XARGS in
11269  [\\/]* | ?:[\\/]*)
11270  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11271  ;;
11272  *)
11273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11274for as_dir in $PATH
11275do
11276  IFS=$as_save_IFS
11277  test -z "$as_dir" && as_dir=.
11278    for ac_exec_ext in '' $ac_executable_extensions; do
11279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11280    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11282    break 2
11283  fi
11284done
11285  done
11286IFS=$as_save_IFS
11287
11288  ;;
11289esac
11290fi
11291XARGS=$ac_cv_path_XARGS
11292if test -n "$XARGS"; then
11293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11294$as_echo "$XARGS" >&6; }
11295else
11296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
11298fi
11299
11300
11301        if test "x$XARGS" = x; then
11302          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11303        fi
11304      else
11305        # Otherwise we believe it is a complete path. Use it as it is.
11306        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11307$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11309$as_echo_n "checking for XARGS... " >&6; }
11310        if test ! -x "$tool_specified"; then
11311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11312$as_echo "not found" >&6; }
11313          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11314        fi
11315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11316$as_echo "$tool_specified" >&6; }
11317      fi
11318    fi
11319  fi
11320
11321
11322
11323  if test "x$XARGS" = x; then
11324    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11325  fi
11326
11327
11328
11329  # Then required tools that require some special treatment.
11330
11331
11332  # Publish this variable in the help.
11333
11334
11335  if test "x$AWK" = x; then
11336    # The variable is not set by user, try to locate tool using the code snippet
11337    for ac_prog in gawk mawk nawk awk
11338do
11339  # Extract the first word of "$ac_prog", so it can be a program name with args.
11340set dummy $ac_prog; ac_word=$2
11341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11342$as_echo_n "checking for $ac_word... " >&6; }
11343if ${ac_cv_prog_AWK+:} false; then :
11344  $as_echo_n "(cached) " >&6
11345else
11346  if test -n "$AWK"; then
11347  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11348else
11349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11350for as_dir in $PATH
11351do
11352  IFS=$as_save_IFS
11353  test -z "$as_dir" && as_dir=.
11354    for ac_exec_ext in '' $ac_executable_extensions; do
11355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11356    ac_cv_prog_AWK="$ac_prog"
11357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11358    break 2
11359  fi
11360done
11361  done
11362IFS=$as_save_IFS
11363
11364fi
11365fi
11366AWK=$ac_cv_prog_AWK
11367if test -n "$AWK"; then
11368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11369$as_echo "$AWK" >&6; }
11370else
11371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
11373fi
11374
11375
11376  test -n "$AWK" && break
11377done
11378
11379  else
11380    # The variable is set, but is it from the command line or the environment?
11381
11382    # Try to remove the string !AWK! from our list.
11383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11385      # If it failed, the variable was not from the command line. Ignore it,
11386      # but warn the user (except for BASH, which is always set by the calling BASH).
11387      if test "xAWK" != xBASH; then
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11389$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11390      fi
11391      # Try to locate tool using the code snippet
11392      for ac_prog in gawk mawk nawk awk
11393do
11394  # Extract the first word of "$ac_prog", so it can be a program name with args.
11395set dummy $ac_prog; ac_word=$2
11396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11397$as_echo_n "checking for $ac_word... " >&6; }
11398if ${ac_cv_prog_AWK+:} false; then :
11399  $as_echo_n "(cached) " >&6
11400else
11401  if test -n "$AWK"; then
11402  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11403else
11404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11405for as_dir in $PATH
11406do
11407  IFS=$as_save_IFS
11408  test -z "$as_dir" && as_dir=.
11409    for ac_exec_ext in '' $ac_executable_extensions; do
11410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11411    ac_cv_prog_AWK="$ac_prog"
11412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11413    break 2
11414  fi
11415done
11416  done
11417IFS=$as_save_IFS
11418
11419fi
11420fi
11421AWK=$ac_cv_prog_AWK
11422if test -n "$AWK"; then
11423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11424$as_echo "$AWK" >&6; }
11425else
11426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11427$as_echo "no" >&6; }
11428fi
11429
11430
11431  test -n "$AWK" && break
11432done
11433
11434    else
11435      # If it succeeded, then it was overridden by the user. We will use it
11436      # for the tool.
11437
11438      # First remove it from the list of overridden variables, so we can test
11439      # for unknown variables in the end.
11440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11441
11442      # Check if the provided tool contains a complete path.
11443      tool_specified="$AWK"
11444      tool_basename="${tool_specified##*/}"
11445      if test "x$tool_basename" = "x$tool_specified"; then
11446        # A command without a complete path is provided, search $PATH.
11447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11448$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11449        # Extract the first word of "$tool_basename", so it can be a program name with args.
11450set dummy $tool_basename; ac_word=$2
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11452$as_echo_n "checking for $ac_word... " >&6; }
11453if ${ac_cv_path_AWK+:} false; then :
11454  $as_echo_n "(cached) " >&6
11455else
11456  case $AWK in
11457  [\\/]* | ?:[\\/]*)
11458  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11459  ;;
11460  *)
11461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462for as_dir in $PATH
11463do
11464  IFS=$as_save_IFS
11465  test -z "$as_dir" && as_dir=.
11466    for ac_exec_ext in '' $ac_executable_extensions; do
11467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470    break 2
11471  fi
11472done
11473  done
11474IFS=$as_save_IFS
11475
11476  ;;
11477esac
11478fi
11479AWK=$ac_cv_path_AWK
11480if test -n "$AWK"; then
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11482$as_echo "$AWK" >&6; }
11483else
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
11486fi
11487
11488
11489        if test "x$AWK" = x; then
11490          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11491        fi
11492      else
11493        # Otherwise we believe it is a complete path. Use it as it is.
11494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11495$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11497$as_echo_n "checking for AWK... " >&6; }
11498        if test ! -x "$tool_specified"; then
11499          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11500$as_echo "not found" >&6; }
11501          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11502        fi
11503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11504$as_echo "$tool_specified" >&6; }
11505      fi
11506    fi
11507  fi
11508
11509
11510  if test "x$AWK" = x; then
11511    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11512  fi
11513
11514
11515
11516
11517  # Publish this variable in the help.
11518
11519
11520  if test "x$GREP" = x; then
11521    # The variable is not set by user, try to locate tool using the code snippet
11522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11523$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11524if ${ac_cv_path_GREP+:} false; then :
11525  $as_echo_n "(cached) " >&6
11526else
11527  if test -z "$GREP"; then
11528  ac_path_GREP_found=false
11529  # Loop through the user's path and test for each of PROGNAME-LIST
11530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11531for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11532do
11533  IFS=$as_save_IFS
11534  test -z "$as_dir" && as_dir=.
11535    for ac_prog in grep ggrep; do
11536    for ac_exec_ext in '' $ac_executable_extensions; do
11537      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11538      as_fn_executable_p "$ac_path_GREP" || continue
11539# Check for GNU ac_path_GREP and select it if it is found.
11540  # Check for GNU $ac_path_GREP
11541case `"$ac_path_GREP" --version 2>&1` in
11542*GNU*)
11543  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11544*)
11545  ac_count=0
11546  $as_echo_n 0123456789 >"conftest.in"
11547  while :
11548  do
11549    cat "conftest.in" "conftest.in" >"conftest.tmp"
11550    mv "conftest.tmp" "conftest.in"
11551    cp "conftest.in" "conftest.nl"
11552    $as_echo 'GREP' >> "conftest.nl"
11553    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11554    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11555    as_fn_arith $ac_count + 1 && ac_count=$as_val
11556    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11557      # Best one so far, save it but keep looking for a better one
11558      ac_cv_path_GREP="$ac_path_GREP"
11559      ac_path_GREP_max=$ac_count
11560    fi
11561    # 10*(2^10) chars as input seems more than enough
11562    test $ac_count -gt 10 && break
11563  done
11564  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11565esac
11566
11567      $ac_path_GREP_found && break 3
11568    done
11569  done
11570  done
11571IFS=$as_save_IFS
11572  if test -z "$ac_cv_path_GREP"; then
11573    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11574  fi
11575else
11576  ac_cv_path_GREP=$GREP
11577fi
11578
11579fi
11580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11581$as_echo "$ac_cv_path_GREP" >&6; }
11582 GREP="$ac_cv_path_GREP"
11583
11584
11585  else
11586    # The variable is set, but is it from the command line or the environment?
11587
11588    # Try to remove the string !GREP! from our list.
11589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11591      # If it failed, the variable was not from the command line. Ignore it,
11592      # but warn the user (except for BASH, which is always set by the calling BASH).
11593      if test "xGREP" != xBASH; then
11594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11595$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11596      fi
11597      # Try to locate tool using the code snippet
11598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11599$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11600if ${ac_cv_path_GREP+:} false; then :
11601  $as_echo_n "(cached) " >&6
11602else
11603  if test -z "$GREP"; then
11604  ac_path_GREP_found=false
11605  # Loop through the user's path and test for each of PROGNAME-LIST
11606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11607for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11608do
11609  IFS=$as_save_IFS
11610  test -z "$as_dir" && as_dir=.
11611    for ac_prog in grep ggrep; do
11612    for ac_exec_ext in '' $ac_executable_extensions; do
11613      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11614      as_fn_executable_p "$ac_path_GREP" || continue
11615# Check for GNU ac_path_GREP and select it if it is found.
11616  # Check for GNU $ac_path_GREP
11617case `"$ac_path_GREP" --version 2>&1` in
11618*GNU*)
11619  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11620*)
11621  ac_count=0
11622  $as_echo_n 0123456789 >"conftest.in"
11623  while :
11624  do
11625    cat "conftest.in" "conftest.in" >"conftest.tmp"
11626    mv "conftest.tmp" "conftest.in"
11627    cp "conftest.in" "conftest.nl"
11628    $as_echo 'GREP' >> "conftest.nl"
11629    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11630    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11631    as_fn_arith $ac_count + 1 && ac_count=$as_val
11632    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11633      # Best one so far, save it but keep looking for a better one
11634      ac_cv_path_GREP="$ac_path_GREP"
11635      ac_path_GREP_max=$ac_count
11636    fi
11637    # 10*(2^10) chars as input seems more than enough
11638    test $ac_count -gt 10 && break
11639  done
11640  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11641esac
11642
11643      $ac_path_GREP_found && break 3
11644    done
11645  done
11646  done
11647IFS=$as_save_IFS
11648  if test -z "$ac_cv_path_GREP"; then
11649    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11650  fi
11651else
11652  ac_cv_path_GREP=$GREP
11653fi
11654
11655fi
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11657$as_echo "$ac_cv_path_GREP" >&6; }
11658 GREP="$ac_cv_path_GREP"
11659
11660
11661    else
11662      # If it succeeded, then it was overridden by the user. We will use it
11663      # for the tool.
11664
11665      # First remove it from the list of overridden variables, so we can test
11666      # for unknown variables in the end.
11667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11668
11669      # Check if the provided tool contains a complete path.
11670      tool_specified="$GREP"
11671      tool_basename="${tool_specified##*/}"
11672      if test "x$tool_basename" = "x$tool_specified"; then
11673        # A command without a complete path is provided, search $PATH.
11674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11675$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11676        # Extract the first word of "$tool_basename", so it can be a program name with args.
11677set dummy $tool_basename; ac_word=$2
11678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11679$as_echo_n "checking for $ac_word... " >&6; }
11680if ${ac_cv_path_GREP+:} false; then :
11681  $as_echo_n "(cached) " >&6
11682else
11683  case $GREP in
11684  [\\/]* | ?:[\\/]*)
11685  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11686  ;;
11687  *)
11688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11689for as_dir in $PATH
11690do
11691  IFS=$as_save_IFS
11692  test -z "$as_dir" && as_dir=.
11693    for ac_exec_ext in '' $ac_executable_extensions; do
11694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11695    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11697    break 2
11698  fi
11699done
11700  done
11701IFS=$as_save_IFS
11702
11703  ;;
11704esac
11705fi
11706GREP=$ac_cv_path_GREP
11707if test -n "$GREP"; then
11708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11709$as_echo "$GREP" >&6; }
11710else
11711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11712$as_echo "no" >&6; }
11713fi
11714
11715
11716        if test "x$GREP" = x; then
11717          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11718        fi
11719      else
11720        # Otherwise we believe it is a complete path. Use it as it is.
11721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11722$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11724$as_echo_n "checking for GREP... " >&6; }
11725        if test ! -x "$tool_specified"; then
11726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11727$as_echo "not found" >&6; }
11728          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11729        fi
11730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11731$as_echo "$tool_specified" >&6; }
11732      fi
11733    fi
11734  fi
11735
11736
11737  if test "x$GREP" = x; then
11738    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11739  fi
11740
11741
11742
11743
11744  # Publish this variable in the help.
11745
11746
11747  if test "x$EGREP" = x; then
11748    # The variable is not set by user, try to locate tool using the code snippet
11749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11750$as_echo_n "checking for egrep... " >&6; }
11751if ${ac_cv_path_EGREP+:} false; then :
11752  $as_echo_n "(cached) " >&6
11753else
11754  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11755   then ac_cv_path_EGREP="$GREP -E"
11756   else
11757     if test -z "$EGREP"; then
11758  ac_path_EGREP_found=false
11759  # Loop through the user's path and test for each of PROGNAME-LIST
11760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11761for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11762do
11763  IFS=$as_save_IFS
11764  test -z "$as_dir" && as_dir=.
11765    for ac_prog in egrep; do
11766    for ac_exec_ext in '' $ac_executable_extensions; do
11767      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11768      as_fn_executable_p "$ac_path_EGREP" || continue
11769# Check for GNU ac_path_EGREP and select it if it is found.
11770  # Check for GNU $ac_path_EGREP
11771case `"$ac_path_EGREP" --version 2>&1` in
11772*GNU*)
11773  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11774*)
11775  ac_count=0
11776  $as_echo_n 0123456789 >"conftest.in"
11777  while :
11778  do
11779    cat "conftest.in" "conftest.in" >"conftest.tmp"
11780    mv "conftest.tmp" "conftest.in"
11781    cp "conftest.in" "conftest.nl"
11782    $as_echo 'EGREP' >> "conftest.nl"
11783    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11784    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11785    as_fn_arith $ac_count + 1 && ac_count=$as_val
11786    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11787      # Best one so far, save it but keep looking for a better one
11788      ac_cv_path_EGREP="$ac_path_EGREP"
11789      ac_path_EGREP_max=$ac_count
11790    fi
11791    # 10*(2^10) chars as input seems more than enough
11792    test $ac_count -gt 10 && break
11793  done
11794  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11795esac
11796
11797      $ac_path_EGREP_found && break 3
11798    done
11799  done
11800  done
11801IFS=$as_save_IFS
11802  if test -z "$ac_cv_path_EGREP"; then
11803    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11804  fi
11805else
11806  ac_cv_path_EGREP=$EGREP
11807fi
11808
11809   fi
11810fi
11811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11812$as_echo "$ac_cv_path_EGREP" >&6; }
11813 EGREP="$ac_cv_path_EGREP"
11814
11815
11816  else
11817    # The variable is set, but is it from the command line or the environment?
11818
11819    # Try to remove the string !EGREP! from our list.
11820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11822      # If it failed, the variable was not from the command line. Ignore it,
11823      # but warn the user (except for BASH, which is always set by the calling BASH).
11824      if test "xEGREP" != xBASH; then
11825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11826$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11827      fi
11828      # Try to locate tool using the code snippet
11829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11830$as_echo_n "checking for egrep... " >&6; }
11831if ${ac_cv_path_EGREP+:} false; then :
11832  $as_echo_n "(cached) " >&6
11833else
11834  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11835   then ac_cv_path_EGREP="$GREP -E"
11836   else
11837     if test -z "$EGREP"; then
11838  ac_path_EGREP_found=false
11839  # Loop through the user's path and test for each of PROGNAME-LIST
11840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11841for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11842do
11843  IFS=$as_save_IFS
11844  test -z "$as_dir" && as_dir=.
11845    for ac_prog in egrep; do
11846    for ac_exec_ext in '' $ac_executable_extensions; do
11847      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11848      as_fn_executable_p "$ac_path_EGREP" || continue
11849# Check for GNU ac_path_EGREP and select it if it is found.
11850  # Check for GNU $ac_path_EGREP
11851case `"$ac_path_EGREP" --version 2>&1` in
11852*GNU*)
11853  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11854*)
11855  ac_count=0
11856  $as_echo_n 0123456789 >"conftest.in"
11857  while :
11858  do
11859    cat "conftest.in" "conftest.in" >"conftest.tmp"
11860    mv "conftest.tmp" "conftest.in"
11861    cp "conftest.in" "conftest.nl"
11862    $as_echo 'EGREP' >> "conftest.nl"
11863    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11864    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11865    as_fn_arith $ac_count + 1 && ac_count=$as_val
11866    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11867      # Best one so far, save it but keep looking for a better one
11868      ac_cv_path_EGREP="$ac_path_EGREP"
11869      ac_path_EGREP_max=$ac_count
11870    fi
11871    # 10*(2^10) chars as input seems more than enough
11872    test $ac_count -gt 10 && break
11873  done
11874  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11875esac
11876
11877      $ac_path_EGREP_found && break 3
11878    done
11879  done
11880  done
11881IFS=$as_save_IFS
11882  if test -z "$ac_cv_path_EGREP"; then
11883    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11884  fi
11885else
11886  ac_cv_path_EGREP=$EGREP
11887fi
11888
11889   fi
11890fi
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11892$as_echo "$ac_cv_path_EGREP" >&6; }
11893 EGREP="$ac_cv_path_EGREP"
11894
11895
11896    else
11897      # If it succeeded, then it was overridden by the user. We will use it
11898      # for the tool.
11899
11900      # First remove it from the list of overridden variables, so we can test
11901      # for unknown variables in the end.
11902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11903
11904      # Check if the provided tool contains a complete path.
11905      tool_specified="$EGREP"
11906      tool_basename="${tool_specified##*/}"
11907      if test "x$tool_basename" = "x$tool_specified"; then
11908        # A command without a complete path is provided, search $PATH.
11909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11910$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11911        # Extract the first word of "$tool_basename", so it can be a program name with args.
11912set dummy $tool_basename; ac_word=$2
11913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11914$as_echo_n "checking for $ac_word... " >&6; }
11915if ${ac_cv_path_EGREP+:} false; then :
11916  $as_echo_n "(cached) " >&6
11917else
11918  case $EGREP in
11919  [\\/]* | ?:[\\/]*)
11920  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11921  ;;
11922  *)
11923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11924for as_dir in $PATH
11925do
11926  IFS=$as_save_IFS
11927  test -z "$as_dir" && as_dir=.
11928    for ac_exec_ext in '' $ac_executable_extensions; do
11929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11930    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11932    break 2
11933  fi
11934done
11935  done
11936IFS=$as_save_IFS
11937
11938  ;;
11939esac
11940fi
11941EGREP=$ac_cv_path_EGREP
11942if test -n "$EGREP"; then
11943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11944$as_echo "$EGREP" >&6; }
11945else
11946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11947$as_echo "no" >&6; }
11948fi
11949
11950
11951        if test "x$EGREP" = x; then
11952          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11953        fi
11954      else
11955        # Otherwise we believe it is a complete path. Use it as it is.
11956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11957$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11959$as_echo_n "checking for EGREP... " >&6; }
11960        if test ! -x "$tool_specified"; then
11961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11962$as_echo "not found" >&6; }
11963          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11964        fi
11965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11966$as_echo "$tool_specified" >&6; }
11967      fi
11968    fi
11969  fi
11970
11971
11972  if test "x$EGREP" = x; then
11973    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11974  fi
11975
11976
11977
11978
11979  # Publish this variable in the help.
11980
11981
11982  if test "x$FGREP" = x; then
11983    # The variable is not set by user, try to locate tool using the code snippet
11984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11985$as_echo_n "checking for fgrep... " >&6; }
11986if ${ac_cv_path_FGREP+:} false; then :
11987  $as_echo_n "(cached) " >&6
11988else
11989  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11990   then ac_cv_path_FGREP="$GREP -F"
11991   else
11992     if test -z "$FGREP"; then
11993  ac_path_FGREP_found=false
11994  # Loop through the user's path and test for each of PROGNAME-LIST
11995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11996for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11997do
11998  IFS=$as_save_IFS
11999  test -z "$as_dir" && as_dir=.
12000    for ac_prog in fgrep; do
12001    for ac_exec_ext in '' $ac_executable_extensions; do
12002      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12003      as_fn_executable_p "$ac_path_FGREP" || continue
12004# Check for GNU ac_path_FGREP and select it if it is found.
12005  # Check for GNU $ac_path_FGREP
12006case `"$ac_path_FGREP" --version 2>&1` in
12007*GNU*)
12008  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12009*)
12010  ac_count=0
12011  $as_echo_n 0123456789 >"conftest.in"
12012  while :
12013  do
12014    cat "conftest.in" "conftest.in" >"conftest.tmp"
12015    mv "conftest.tmp" "conftest.in"
12016    cp "conftest.in" "conftest.nl"
12017    $as_echo 'FGREP' >> "conftest.nl"
12018    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12019    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12020    as_fn_arith $ac_count + 1 && ac_count=$as_val
12021    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12022      # Best one so far, save it but keep looking for a better one
12023      ac_cv_path_FGREP="$ac_path_FGREP"
12024      ac_path_FGREP_max=$ac_count
12025    fi
12026    # 10*(2^10) chars as input seems more than enough
12027    test $ac_count -gt 10 && break
12028  done
12029  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12030esac
12031
12032      $ac_path_FGREP_found && break 3
12033    done
12034  done
12035  done
12036IFS=$as_save_IFS
12037  if test -z "$ac_cv_path_FGREP"; then
12038    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12039  fi
12040else
12041  ac_cv_path_FGREP=$FGREP
12042fi
12043
12044   fi
12045fi
12046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12047$as_echo "$ac_cv_path_FGREP" >&6; }
12048 FGREP="$ac_cv_path_FGREP"
12049
12050
12051  else
12052    # The variable is set, but is it from the command line or the environment?
12053
12054    # Try to remove the string !FGREP! from our list.
12055    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12056    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12057      # If it failed, the variable was not from the command line. Ignore it,
12058      # but warn the user (except for BASH, which is always set by the calling BASH).
12059      if test "xFGREP" != xBASH; then
12060        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12061$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12062      fi
12063      # Try to locate tool using the code snippet
12064      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12065$as_echo_n "checking for fgrep... " >&6; }
12066if ${ac_cv_path_FGREP+:} false; then :
12067  $as_echo_n "(cached) " >&6
12068else
12069  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12070   then ac_cv_path_FGREP="$GREP -F"
12071   else
12072     if test -z "$FGREP"; then
12073  ac_path_FGREP_found=false
12074  # Loop through the user's path and test for each of PROGNAME-LIST
12075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12077do
12078  IFS=$as_save_IFS
12079  test -z "$as_dir" && as_dir=.
12080    for ac_prog in fgrep; do
12081    for ac_exec_ext in '' $ac_executable_extensions; do
12082      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12083      as_fn_executable_p "$ac_path_FGREP" || continue
12084# Check for GNU ac_path_FGREP and select it if it is found.
12085  # Check for GNU $ac_path_FGREP
12086case `"$ac_path_FGREP" --version 2>&1` in
12087*GNU*)
12088  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12089*)
12090  ac_count=0
12091  $as_echo_n 0123456789 >"conftest.in"
12092  while :
12093  do
12094    cat "conftest.in" "conftest.in" >"conftest.tmp"
12095    mv "conftest.tmp" "conftest.in"
12096    cp "conftest.in" "conftest.nl"
12097    $as_echo 'FGREP' >> "conftest.nl"
12098    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12099    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12100    as_fn_arith $ac_count + 1 && ac_count=$as_val
12101    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12102      # Best one so far, save it but keep looking for a better one
12103      ac_cv_path_FGREP="$ac_path_FGREP"
12104      ac_path_FGREP_max=$ac_count
12105    fi
12106    # 10*(2^10) chars as input seems more than enough
12107    test $ac_count -gt 10 && break
12108  done
12109  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12110esac
12111
12112      $ac_path_FGREP_found && break 3
12113    done
12114  done
12115  done
12116IFS=$as_save_IFS
12117  if test -z "$ac_cv_path_FGREP"; then
12118    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12119  fi
12120else
12121  ac_cv_path_FGREP=$FGREP
12122fi
12123
12124   fi
12125fi
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12127$as_echo "$ac_cv_path_FGREP" >&6; }
12128 FGREP="$ac_cv_path_FGREP"
12129
12130
12131    else
12132      # If it succeeded, then it was overridden by the user. We will use it
12133      # for the tool.
12134
12135      # First remove it from the list of overridden variables, so we can test
12136      # for unknown variables in the end.
12137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12138
12139      # Check if the provided tool contains a complete path.
12140      tool_specified="$FGREP"
12141      tool_basename="${tool_specified##*/}"
12142      if test "x$tool_basename" = "x$tool_specified"; then
12143        # A command without a complete path is provided, search $PATH.
12144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12145$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12146        # Extract the first word of "$tool_basename", so it can be a program name with args.
12147set dummy $tool_basename; ac_word=$2
12148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12149$as_echo_n "checking for $ac_word... " >&6; }
12150if ${ac_cv_path_FGREP+:} false; then :
12151  $as_echo_n "(cached) " >&6
12152else
12153  case $FGREP in
12154  [\\/]* | ?:[\\/]*)
12155  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12156  ;;
12157  *)
12158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12159for as_dir in $PATH
12160do
12161  IFS=$as_save_IFS
12162  test -z "$as_dir" && as_dir=.
12163    for ac_exec_ext in '' $ac_executable_extensions; do
12164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12165    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12167    break 2
12168  fi
12169done
12170  done
12171IFS=$as_save_IFS
12172
12173  ;;
12174esac
12175fi
12176FGREP=$ac_cv_path_FGREP
12177if test -n "$FGREP"; then
12178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12179$as_echo "$FGREP" >&6; }
12180else
12181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12182$as_echo "no" >&6; }
12183fi
12184
12185
12186        if test "x$FGREP" = x; then
12187          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12188        fi
12189      else
12190        # Otherwise we believe it is a complete path. Use it as it is.
12191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12192$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12194$as_echo_n "checking for FGREP... " >&6; }
12195        if test ! -x "$tool_specified"; then
12196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12197$as_echo "not found" >&6; }
12198          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12199        fi
12200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12201$as_echo "$tool_specified" >&6; }
12202      fi
12203    fi
12204  fi
12205
12206
12207  if test "x$FGREP" = x; then
12208    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12209  fi
12210
12211
12212
12213
12214  # Publish this variable in the help.
12215
12216
12217  if test "x$SED" = x; then
12218    # The variable is not set by user, try to locate tool using the code snippet
12219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12220$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12221if ${ac_cv_path_SED+:} false; then :
12222  $as_echo_n "(cached) " >&6
12223else
12224            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12225     for ac_i in 1 2 3 4 5 6 7; do
12226       ac_script="$ac_script$as_nl$ac_script"
12227     done
12228     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12229     { ac_script=; unset ac_script;}
12230     if test -z "$SED"; then
12231  ac_path_SED_found=false
12232  # Loop through the user's path and test for each of PROGNAME-LIST
12233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12234for as_dir in $PATH
12235do
12236  IFS=$as_save_IFS
12237  test -z "$as_dir" && as_dir=.
12238    for ac_prog in sed gsed; do
12239    for ac_exec_ext in '' $ac_executable_extensions; do
12240      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12241      as_fn_executable_p "$ac_path_SED" || continue
12242# Check for GNU ac_path_SED and select it if it is found.
12243  # Check for GNU $ac_path_SED
12244case `"$ac_path_SED" --version 2>&1` in
12245*GNU*)
12246  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12247*)
12248  ac_count=0
12249  $as_echo_n 0123456789 >"conftest.in"
12250  while :
12251  do
12252    cat "conftest.in" "conftest.in" >"conftest.tmp"
12253    mv "conftest.tmp" "conftest.in"
12254    cp "conftest.in" "conftest.nl"
12255    $as_echo '' >> "conftest.nl"
12256    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12257    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12258    as_fn_arith $ac_count + 1 && ac_count=$as_val
12259    if test $ac_count -gt ${ac_path_SED_max-0}; then
12260      # Best one so far, save it but keep looking for a better one
12261      ac_cv_path_SED="$ac_path_SED"
12262      ac_path_SED_max=$ac_count
12263    fi
12264    # 10*(2^10) chars as input seems more than enough
12265    test $ac_count -gt 10 && break
12266  done
12267  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12268esac
12269
12270      $ac_path_SED_found && break 3
12271    done
12272  done
12273  done
12274IFS=$as_save_IFS
12275  if test -z "$ac_cv_path_SED"; then
12276    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12277  fi
12278else
12279  ac_cv_path_SED=$SED
12280fi
12281
12282fi
12283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12284$as_echo "$ac_cv_path_SED" >&6; }
12285 SED="$ac_cv_path_SED"
12286  rm -f conftest.sed
12287
12288  else
12289    # The variable is set, but is it from the command line or the environment?
12290
12291    # Try to remove the string !SED! from our list.
12292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12294      # If it failed, the variable was not from the command line. Ignore it,
12295      # but warn the user (except for BASH, which is always set by the calling BASH).
12296      if test "xSED" != xBASH; then
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12298$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12299      fi
12300      # Try to locate tool using the code snippet
12301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12302$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12303if ${ac_cv_path_SED+:} false; then :
12304  $as_echo_n "(cached) " >&6
12305else
12306            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12307     for ac_i in 1 2 3 4 5 6 7; do
12308       ac_script="$ac_script$as_nl$ac_script"
12309     done
12310     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12311     { ac_script=; unset ac_script;}
12312     if test -z "$SED"; then
12313  ac_path_SED_found=false
12314  # Loop through the user's path and test for each of PROGNAME-LIST
12315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12316for as_dir in $PATH
12317do
12318  IFS=$as_save_IFS
12319  test -z "$as_dir" && as_dir=.
12320    for ac_prog in sed gsed; do
12321    for ac_exec_ext in '' $ac_executable_extensions; do
12322      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12323      as_fn_executable_p "$ac_path_SED" || continue
12324# Check for GNU ac_path_SED and select it if it is found.
12325  # Check for GNU $ac_path_SED
12326case `"$ac_path_SED" --version 2>&1` in
12327*GNU*)
12328  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12329*)
12330  ac_count=0
12331  $as_echo_n 0123456789 >"conftest.in"
12332  while :
12333  do
12334    cat "conftest.in" "conftest.in" >"conftest.tmp"
12335    mv "conftest.tmp" "conftest.in"
12336    cp "conftest.in" "conftest.nl"
12337    $as_echo '' >> "conftest.nl"
12338    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12339    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12340    as_fn_arith $ac_count + 1 && ac_count=$as_val
12341    if test $ac_count -gt ${ac_path_SED_max-0}; then
12342      # Best one so far, save it but keep looking for a better one
12343      ac_cv_path_SED="$ac_path_SED"
12344      ac_path_SED_max=$ac_count
12345    fi
12346    # 10*(2^10) chars as input seems more than enough
12347    test $ac_count -gt 10 && break
12348  done
12349  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12350esac
12351
12352      $ac_path_SED_found && break 3
12353    done
12354  done
12355  done
12356IFS=$as_save_IFS
12357  if test -z "$ac_cv_path_SED"; then
12358    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12359  fi
12360else
12361  ac_cv_path_SED=$SED
12362fi
12363
12364fi
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12366$as_echo "$ac_cv_path_SED" >&6; }
12367 SED="$ac_cv_path_SED"
12368  rm -f conftest.sed
12369
12370    else
12371      # If it succeeded, then it was overridden by the user. We will use it
12372      # for the tool.
12373
12374      # First remove it from the list of overridden variables, so we can test
12375      # for unknown variables in the end.
12376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12377
12378      # Check if the provided tool contains a complete path.
12379      tool_specified="$SED"
12380      tool_basename="${tool_specified##*/}"
12381      if test "x$tool_basename" = "x$tool_specified"; then
12382        # A command without a complete path is provided, search $PATH.
12383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12384$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12385        # Extract the first word of "$tool_basename", so it can be a program name with args.
12386set dummy $tool_basename; ac_word=$2
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12388$as_echo_n "checking for $ac_word... " >&6; }
12389if ${ac_cv_path_SED+:} false; then :
12390  $as_echo_n "(cached) " >&6
12391else
12392  case $SED in
12393  [\\/]* | ?:[\\/]*)
12394  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12395  ;;
12396  *)
12397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12398for as_dir in $PATH
12399do
12400  IFS=$as_save_IFS
12401  test -z "$as_dir" && as_dir=.
12402    for ac_exec_ext in '' $ac_executable_extensions; do
12403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12404    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12406    break 2
12407  fi
12408done
12409  done
12410IFS=$as_save_IFS
12411
12412  ;;
12413esac
12414fi
12415SED=$ac_cv_path_SED
12416if test -n "$SED"; then
12417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12418$as_echo "$SED" >&6; }
12419else
12420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12421$as_echo "no" >&6; }
12422fi
12423
12424
12425        if test "x$SED" = x; then
12426          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12427        fi
12428      else
12429        # Otherwise we believe it is a complete path. Use it as it is.
12430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12431$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12433$as_echo_n "checking for SED... " >&6; }
12434        if test ! -x "$tool_specified"; then
12435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12436$as_echo "not found" >&6; }
12437          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12438        fi
12439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12440$as_echo "$tool_specified" >&6; }
12441      fi
12442    fi
12443  fi
12444
12445
12446  if test "x$SED" = x; then
12447    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12448  fi
12449
12450
12451
12452  # Always force rm.
12453  RM="$RM -f"
12454
12455  # pwd behaves differently on various platforms and some don't support the -L flag.
12456  # Always use the bash builtin pwd to get uniform behavior.
12457  THEPWDCMD=pwd
12458
12459  # These are not required on all platforms
12460
12461
12462  # Publish this variable in the help.
12463
12464
12465  if test "x$CYGPATH" = x; then
12466    # The variable is not set by user, try to locate tool using the code snippet
12467    for ac_prog in cygpath
12468do
12469  # Extract the first word of "$ac_prog", so it can be a program name with args.
12470set dummy $ac_prog; ac_word=$2
12471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12472$as_echo_n "checking for $ac_word... " >&6; }
12473if ${ac_cv_path_CYGPATH+:} false; then :
12474  $as_echo_n "(cached) " >&6
12475else
12476  case $CYGPATH in
12477  [\\/]* | ?:[\\/]*)
12478  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12479  ;;
12480  *)
12481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12482for as_dir in $PATH
12483do
12484  IFS=$as_save_IFS
12485  test -z "$as_dir" && as_dir=.
12486    for ac_exec_ext in '' $ac_executable_extensions; do
12487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12488    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12490    break 2
12491  fi
12492done
12493  done
12494IFS=$as_save_IFS
12495
12496  ;;
12497esac
12498fi
12499CYGPATH=$ac_cv_path_CYGPATH
12500if test -n "$CYGPATH"; then
12501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12502$as_echo "$CYGPATH" >&6; }
12503else
12504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12505$as_echo "no" >&6; }
12506fi
12507
12508
12509  test -n "$CYGPATH" && break
12510done
12511
12512  else
12513    # The variable is set, but is it from the command line or the environment?
12514
12515    # Try to remove the string !CYGPATH! from our list.
12516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12518      # If it failed, the variable was not from the command line. Ignore it,
12519      # but warn the user (except for BASH, which is always set by the calling BASH).
12520      if test "xCYGPATH" != xBASH; then
12521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12522$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12523      fi
12524      # Try to locate tool using the code snippet
12525      for ac_prog in cygpath
12526do
12527  # Extract the first word of "$ac_prog", so it can be a program name with args.
12528set dummy $ac_prog; ac_word=$2
12529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12530$as_echo_n "checking for $ac_word... " >&6; }
12531if ${ac_cv_path_CYGPATH+:} false; then :
12532  $as_echo_n "(cached) " >&6
12533else
12534  case $CYGPATH in
12535  [\\/]* | ?:[\\/]*)
12536  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12537  ;;
12538  *)
12539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12540for as_dir in $PATH
12541do
12542  IFS=$as_save_IFS
12543  test -z "$as_dir" && as_dir=.
12544    for ac_exec_ext in '' $ac_executable_extensions; do
12545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12546    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12548    break 2
12549  fi
12550done
12551  done
12552IFS=$as_save_IFS
12553
12554  ;;
12555esac
12556fi
12557CYGPATH=$ac_cv_path_CYGPATH
12558if test -n "$CYGPATH"; then
12559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12560$as_echo "$CYGPATH" >&6; }
12561else
12562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12563$as_echo "no" >&6; }
12564fi
12565
12566
12567  test -n "$CYGPATH" && break
12568done
12569
12570    else
12571      # If it succeeded, then it was overridden by the user. We will use it
12572      # for the tool.
12573
12574      # First remove it from the list of overridden variables, so we can test
12575      # for unknown variables in the end.
12576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12577
12578      # Check if the provided tool contains a complete path.
12579      tool_specified="$CYGPATH"
12580      tool_basename="${tool_specified##*/}"
12581      if test "x$tool_basename" = "x$tool_specified"; then
12582        # A command without a complete path is provided, search $PATH.
12583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12584$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12585        # Extract the first word of "$tool_basename", so it can be a program name with args.
12586set dummy $tool_basename; ac_word=$2
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588$as_echo_n "checking for $ac_word... " >&6; }
12589if ${ac_cv_path_CYGPATH+:} false; then :
12590  $as_echo_n "(cached) " >&6
12591else
12592  case $CYGPATH in
12593  [\\/]* | ?:[\\/]*)
12594  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12595  ;;
12596  *)
12597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598for as_dir in $PATH
12599do
12600  IFS=$as_save_IFS
12601  test -z "$as_dir" && as_dir=.
12602    for ac_exec_ext in '' $ac_executable_extensions; do
12603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606    break 2
12607  fi
12608done
12609  done
12610IFS=$as_save_IFS
12611
12612  ;;
12613esac
12614fi
12615CYGPATH=$ac_cv_path_CYGPATH
12616if test -n "$CYGPATH"; then
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12618$as_echo "$CYGPATH" >&6; }
12619else
12620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623
12624
12625        if test "x$CYGPATH" = x; then
12626          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12627        fi
12628      else
12629        # Otherwise we believe it is a complete path. Use it as it is.
12630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12631$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12633$as_echo_n "checking for CYGPATH... " >&6; }
12634        if test ! -x "$tool_specified"; then
12635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12636$as_echo "not found" >&6; }
12637          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12638        fi
12639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12640$as_echo "$tool_specified" >&6; }
12641      fi
12642    fi
12643  fi
12644
12645
12646
12647
12648  # Publish this variable in the help.
12649
12650
12651  if test "x$READLINK" = x; then
12652    # The variable is not set by user, try to locate tool using the code snippet
12653    for ac_prog in greadlink readlink
12654do
12655  # Extract the first word of "$ac_prog", so it can be a program name with args.
12656set dummy $ac_prog; ac_word=$2
12657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12658$as_echo_n "checking for $ac_word... " >&6; }
12659if ${ac_cv_path_READLINK+:} false; then :
12660  $as_echo_n "(cached) " >&6
12661else
12662  case $READLINK in
12663  [\\/]* | ?:[\\/]*)
12664  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12665  ;;
12666  *)
12667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12668for as_dir in $PATH
12669do
12670  IFS=$as_save_IFS
12671  test -z "$as_dir" && as_dir=.
12672    for ac_exec_ext in '' $ac_executable_extensions; do
12673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12674    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12676    break 2
12677  fi
12678done
12679  done
12680IFS=$as_save_IFS
12681
12682  ;;
12683esac
12684fi
12685READLINK=$ac_cv_path_READLINK
12686if test -n "$READLINK"; then
12687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12688$as_echo "$READLINK" >&6; }
12689else
12690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12691$as_echo "no" >&6; }
12692fi
12693
12694
12695  test -n "$READLINK" && break
12696done
12697
12698  else
12699    # The variable is set, but is it from the command line or the environment?
12700
12701    # Try to remove the string !READLINK! from our list.
12702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12704      # If it failed, the variable was not from the command line. Ignore it,
12705      # but warn the user (except for BASH, which is always set by the calling BASH).
12706      if test "xREADLINK" != xBASH; then
12707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12708$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12709      fi
12710      # Try to locate tool using the code snippet
12711      for ac_prog in greadlink readlink
12712do
12713  # Extract the first word of "$ac_prog", so it can be a program name with args.
12714set dummy $ac_prog; ac_word=$2
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716$as_echo_n "checking for $ac_word... " >&6; }
12717if ${ac_cv_path_READLINK+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  case $READLINK in
12721  [\\/]* | ?:[\\/]*)
12722  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12723  ;;
12724  *)
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734    break 2
12735  fi
12736done
12737  done
12738IFS=$as_save_IFS
12739
12740  ;;
12741esac
12742fi
12743READLINK=$ac_cv_path_READLINK
12744if test -n "$READLINK"; then
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12746$as_echo "$READLINK" >&6; }
12747else
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750fi
12751
12752
12753  test -n "$READLINK" && break
12754done
12755
12756    else
12757      # If it succeeded, then it was overridden by the user. We will use it
12758      # for the tool.
12759
12760      # First remove it from the list of overridden variables, so we can test
12761      # for unknown variables in the end.
12762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12763
12764      # Check if the provided tool contains a complete path.
12765      tool_specified="$READLINK"
12766      tool_basename="${tool_specified##*/}"
12767      if test "x$tool_basename" = "x$tool_specified"; then
12768        # A command without a complete path is provided, search $PATH.
12769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12770$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12771        # Extract the first word of "$tool_basename", so it can be a program name with args.
12772set dummy $tool_basename; ac_word=$2
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774$as_echo_n "checking for $ac_word... " >&6; }
12775if ${ac_cv_path_READLINK+:} false; then :
12776  $as_echo_n "(cached) " >&6
12777else
12778  case $READLINK in
12779  [\\/]* | ?:[\\/]*)
12780  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12781  ;;
12782  *)
12783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784for as_dir in $PATH
12785do
12786  IFS=$as_save_IFS
12787  test -z "$as_dir" && as_dir=.
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792    break 2
12793  fi
12794done
12795  done
12796IFS=$as_save_IFS
12797
12798  ;;
12799esac
12800fi
12801READLINK=$ac_cv_path_READLINK
12802if test -n "$READLINK"; then
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12804$as_echo "$READLINK" >&6; }
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807$as_echo "no" >&6; }
12808fi
12809
12810
12811        if test "x$READLINK" = x; then
12812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12813        fi
12814      else
12815        # Otherwise we believe it is a complete path. Use it as it is.
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12817$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12819$as_echo_n "checking for READLINK... " >&6; }
12820        if test ! -x "$tool_specified"; then
12821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12822$as_echo "not found" >&6; }
12823          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12824        fi
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12826$as_echo "$tool_specified" >&6; }
12827      fi
12828    fi
12829  fi
12830
12831
12832
12833
12834  # Publish this variable in the help.
12835
12836
12837  if test "x$DF" = x; then
12838    # The variable is not set by user, try to locate tool using the code snippet
12839    for ac_prog in df
12840do
12841  # Extract the first word of "$ac_prog", so it can be a program name with args.
12842set dummy $ac_prog; ac_word=$2
12843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12844$as_echo_n "checking for $ac_word... " >&6; }
12845if ${ac_cv_path_DF+:} false; then :
12846  $as_echo_n "(cached) " >&6
12847else
12848  case $DF in
12849  [\\/]* | ?:[\\/]*)
12850  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12851  ;;
12852  *)
12853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12854for as_dir in $PATH
12855do
12856  IFS=$as_save_IFS
12857  test -z "$as_dir" && as_dir=.
12858    for ac_exec_ext in '' $ac_executable_extensions; do
12859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12860    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12862    break 2
12863  fi
12864done
12865  done
12866IFS=$as_save_IFS
12867
12868  ;;
12869esac
12870fi
12871DF=$ac_cv_path_DF
12872if test -n "$DF"; then
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12874$as_echo "$DF" >&6; }
12875else
12876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12877$as_echo "no" >&6; }
12878fi
12879
12880
12881  test -n "$DF" && break
12882done
12883
12884  else
12885    # The variable is set, but is it from the command line or the environment?
12886
12887    # Try to remove the string !DF! from our list.
12888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12890      # If it failed, the variable was not from the command line. Ignore it,
12891      # but warn the user (except for BASH, which is always set by the calling BASH).
12892      if test "xDF" != xBASH; then
12893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12894$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12895      fi
12896      # Try to locate tool using the code snippet
12897      for ac_prog in df
12898do
12899  # Extract the first word of "$ac_prog", so it can be a program name with args.
12900set dummy $ac_prog; ac_word=$2
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12902$as_echo_n "checking for $ac_word... " >&6; }
12903if ${ac_cv_path_DF+:} false; then :
12904  $as_echo_n "(cached) " >&6
12905else
12906  case $DF in
12907  [\\/]* | ?:[\\/]*)
12908  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12909  ;;
12910  *)
12911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12912for as_dir in $PATH
12913do
12914  IFS=$as_save_IFS
12915  test -z "$as_dir" && as_dir=.
12916    for ac_exec_ext in '' $ac_executable_extensions; do
12917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12918    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12920    break 2
12921  fi
12922done
12923  done
12924IFS=$as_save_IFS
12925
12926  ;;
12927esac
12928fi
12929DF=$ac_cv_path_DF
12930if test -n "$DF"; then
12931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12932$as_echo "$DF" >&6; }
12933else
12934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12935$as_echo "no" >&6; }
12936fi
12937
12938
12939  test -n "$DF" && break
12940done
12941
12942    else
12943      # If it succeeded, then it was overridden by the user. We will use it
12944      # for the tool.
12945
12946      # First remove it from the list of overridden variables, so we can test
12947      # for unknown variables in the end.
12948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12949
12950      # Check if the provided tool contains a complete path.
12951      tool_specified="$DF"
12952      tool_basename="${tool_specified##*/}"
12953      if test "x$tool_basename" = "x$tool_specified"; then
12954        # A command without a complete path is provided, search $PATH.
12955        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12956$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12957        # Extract the first word of "$tool_basename", so it can be a program name with args.
12958set dummy $tool_basename; ac_word=$2
12959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12960$as_echo_n "checking for $ac_word... " >&6; }
12961if ${ac_cv_path_DF+:} false; then :
12962  $as_echo_n "(cached) " >&6
12963else
12964  case $DF in
12965  [\\/]* | ?:[\\/]*)
12966  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12967  ;;
12968  *)
12969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12970for as_dir in $PATH
12971do
12972  IFS=$as_save_IFS
12973  test -z "$as_dir" && as_dir=.
12974    for ac_exec_ext in '' $ac_executable_extensions; do
12975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12976    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12978    break 2
12979  fi
12980done
12981  done
12982IFS=$as_save_IFS
12983
12984  ;;
12985esac
12986fi
12987DF=$ac_cv_path_DF
12988if test -n "$DF"; then
12989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12990$as_echo "$DF" >&6; }
12991else
12992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12993$as_echo "no" >&6; }
12994fi
12995
12996
12997        if test "x$DF" = x; then
12998          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12999        fi
13000      else
13001        # Otherwise we believe it is a complete path. Use it as it is.
13002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13003$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13005$as_echo_n "checking for DF... " >&6; }
13006        if test ! -x "$tool_specified"; then
13007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13008$as_echo "not found" >&6; }
13009          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13010        fi
13011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13012$as_echo "$tool_specified" >&6; }
13013      fi
13014    fi
13015  fi
13016
13017
13018
13019
13020  # Publish this variable in the help.
13021
13022
13023  if test "x$SETFILE" = x; then
13024    # The variable is not set by user, try to locate tool using the code snippet
13025    for ac_prog in SetFile
13026do
13027  # Extract the first word of "$ac_prog", so it can be a program name with args.
13028set dummy $ac_prog; ac_word=$2
13029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13030$as_echo_n "checking for $ac_word... " >&6; }
13031if ${ac_cv_path_SETFILE+:} false; then :
13032  $as_echo_n "(cached) " >&6
13033else
13034  case $SETFILE in
13035  [\\/]* | ?:[\\/]*)
13036  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13037  ;;
13038  *)
13039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13040for as_dir in $PATH
13041do
13042  IFS=$as_save_IFS
13043  test -z "$as_dir" && as_dir=.
13044    for ac_exec_ext in '' $ac_executable_extensions; do
13045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13046    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13048    break 2
13049  fi
13050done
13051  done
13052IFS=$as_save_IFS
13053
13054  ;;
13055esac
13056fi
13057SETFILE=$ac_cv_path_SETFILE
13058if test -n "$SETFILE"; then
13059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13060$as_echo "$SETFILE" >&6; }
13061else
13062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13063$as_echo "no" >&6; }
13064fi
13065
13066
13067  test -n "$SETFILE" && break
13068done
13069
13070  else
13071    # The variable is set, but is it from the command line or the environment?
13072
13073    # Try to remove the string !SETFILE! from our list.
13074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13076      # If it failed, the variable was not from the command line. Ignore it,
13077      # but warn the user (except for BASH, which is always set by the calling BASH).
13078      if test "xSETFILE" != xBASH; then
13079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13080$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13081      fi
13082      # Try to locate tool using the code snippet
13083      for ac_prog in SetFile
13084do
13085  # Extract the first word of "$ac_prog", so it can be a program name with args.
13086set dummy $ac_prog; ac_word=$2
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13088$as_echo_n "checking for $ac_word... " >&6; }
13089if ${ac_cv_path_SETFILE+:} false; then :
13090  $as_echo_n "(cached) " >&6
13091else
13092  case $SETFILE in
13093  [\\/]* | ?:[\\/]*)
13094  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13095  ;;
13096  *)
13097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13098for as_dir in $PATH
13099do
13100  IFS=$as_save_IFS
13101  test -z "$as_dir" && as_dir=.
13102    for ac_exec_ext in '' $ac_executable_extensions; do
13103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13104    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13106    break 2
13107  fi
13108done
13109  done
13110IFS=$as_save_IFS
13111
13112  ;;
13113esac
13114fi
13115SETFILE=$ac_cv_path_SETFILE
13116if test -n "$SETFILE"; then
13117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13118$as_echo "$SETFILE" >&6; }
13119else
13120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13121$as_echo "no" >&6; }
13122fi
13123
13124
13125  test -n "$SETFILE" && break
13126done
13127
13128    else
13129      # If it succeeded, then it was overridden by the user. We will use it
13130      # for the tool.
13131
13132      # First remove it from the list of overridden variables, so we can test
13133      # for unknown variables in the end.
13134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13135
13136      # Check if the provided tool contains a complete path.
13137      tool_specified="$SETFILE"
13138      tool_basename="${tool_specified##*/}"
13139      if test "x$tool_basename" = "x$tool_specified"; then
13140        # A command without a complete path is provided, search $PATH.
13141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13142$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13143        # Extract the first word of "$tool_basename", so it can be a program name with args.
13144set dummy $tool_basename; ac_word=$2
13145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13146$as_echo_n "checking for $ac_word... " >&6; }
13147if ${ac_cv_path_SETFILE+:} false; then :
13148  $as_echo_n "(cached) " >&6
13149else
13150  case $SETFILE in
13151  [\\/]* | ?:[\\/]*)
13152  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13153  ;;
13154  *)
13155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13156for as_dir in $PATH
13157do
13158  IFS=$as_save_IFS
13159  test -z "$as_dir" && as_dir=.
13160    for ac_exec_ext in '' $ac_executable_extensions; do
13161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13162    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13164    break 2
13165  fi
13166done
13167  done
13168IFS=$as_save_IFS
13169
13170  ;;
13171esac
13172fi
13173SETFILE=$ac_cv_path_SETFILE
13174if test -n "$SETFILE"; then
13175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13176$as_echo "$SETFILE" >&6; }
13177else
13178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13179$as_echo "no" >&6; }
13180fi
13181
13182
13183        if test "x$SETFILE" = x; then
13184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13185        fi
13186      else
13187        # Otherwise we believe it is a complete path. Use it as it is.
13188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13189$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13191$as_echo_n "checking for SETFILE... " >&6; }
13192        if test ! -x "$tool_specified"; then
13193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13194$as_echo "not found" >&6; }
13195          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13196        fi
13197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13198$as_echo "$tool_specified" >&6; }
13199      fi
13200    fi
13201  fi
13202
13203
13204
13205
13206  # Publish this variable in the help.
13207
13208
13209  if test "x$CPIO" = x; then
13210    # The variable is not set by user, try to locate tool using the code snippet
13211    for ac_prog in cpio bsdcpio
13212do
13213  # Extract the first word of "$ac_prog", so it can be a program name with args.
13214set dummy $ac_prog; ac_word=$2
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13216$as_echo_n "checking for $ac_word... " >&6; }
13217if ${ac_cv_path_CPIO+:} false; then :
13218  $as_echo_n "(cached) " >&6
13219else
13220  case $CPIO in
13221  [\\/]* | ?:[\\/]*)
13222  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13223  ;;
13224  *)
13225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13226for as_dir in $PATH
13227do
13228  IFS=$as_save_IFS
13229  test -z "$as_dir" && as_dir=.
13230    for ac_exec_ext in '' $ac_executable_extensions; do
13231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13232    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13234    break 2
13235  fi
13236done
13237  done
13238IFS=$as_save_IFS
13239
13240  ;;
13241esac
13242fi
13243CPIO=$ac_cv_path_CPIO
13244if test -n "$CPIO"; then
13245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13246$as_echo "$CPIO" >&6; }
13247else
13248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13249$as_echo "no" >&6; }
13250fi
13251
13252
13253  test -n "$CPIO" && break
13254done
13255
13256  else
13257    # The variable is set, but is it from the command line or the environment?
13258
13259    # Try to remove the string !CPIO! from our list.
13260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13262      # If it failed, the variable was not from the command line. Ignore it,
13263      # but warn the user (except for BASH, which is always set by the calling BASH).
13264      if test "xCPIO" != xBASH; then
13265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13266$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13267      fi
13268      # Try to locate tool using the code snippet
13269      for ac_prog in cpio bsdcpio
13270do
13271  # Extract the first word of "$ac_prog", so it can be a program name with args.
13272set dummy $ac_prog; ac_word=$2
13273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13274$as_echo_n "checking for $ac_word... " >&6; }
13275if ${ac_cv_path_CPIO+:} false; then :
13276  $as_echo_n "(cached) " >&6
13277else
13278  case $CPIO in
13279  [\\/]* | ?:[\\/]*)
13280  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13281  ;;
13282  *)
13283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13284for as_dir in $PATH
13285do
13286  IFS=$as_save_IFS
13287  test -z "$as_dir" && as_dir=.
13288    for ac_exec_ext in '' $ac_executable_extensions; do
13289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13290    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13292    break 2
13293  fi
13294done
13295  done
13296IFS=$as_save_IFS
13297
13298  ;;
13299esac
13300fi
13301CPIO=$ac_cv_path_CPIO
13302if test -n "$CPIO"; then
13303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13304$as_echo "$CPIO" >&6; }
13305else
13306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13307$as_echo "no" >&6; }
13308fi
13309
13310
13311  test -n "$CPIO" && break
13312done
13313
13314    else
13315      # If it succeeded, then it was overridden by the user. We will use it
13316      # for the tool.
13317
13318      # First remove it from the list of overridden variables, so we can test
13319      # for unknown variables in the end.
13320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13321
13322      # Check if the provided tool contains a complete path.
13323      tool_specified="$CPIO"
13324      tool_basename="${tool_specified##*/}"
13325      if test "x$tool_basename" = "x$tool_specified"; then
13326        # A command without a complete path is provided, search $PATH.
13327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13328$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13329        # Extract the first word of "$tool_basename", so it can be a program name with args.
13330set dummy $tool_basename; ac_word=$2
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13332$as_echo_n "checking for $ac_word... " >&6; }
13333if ${ac_cv_path_CPIO+:} false; then :
13334  $as_echo_n "(cached) " >&6
13335else
13336  case $CPIO in
13337  [\\/]* | ?:[\\/]*)
13338  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13339  ;;
13340  *)
13341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13342for as_dir in $PATH
13343do
13344  IFS=$as_save_IFS
13345  test -z "$as_dir" && as_dir=.
13346    for ac_exec_ext in '' $ac_executable_extensions; do
13347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13348    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13350    break 2
13351  fi
13352done
13353  done
13354IFS=$as_save_IFS
13355
13356  ;;
13357esac
13358fi
13359CPIO=$ac_cv_path_CPIO
13360if test -n "$CPIO"; then
13361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13362$as_echo "$CPIO" >&6; }
13363else
13364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13365$as_echo "no" >&6; }
13366fi
13367
13368
13369        if test "x$CPIO" = x; then
13370          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13371        fi
13372      else
13373        # Otherwise we believe it is a complete path. Use it as it is.
13374        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13375$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13377$as_echo_n "checking for CPIO... " >&6; }
13378        if test ! -x "$tool_specified"; then
13379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13380$as_echo "not found" >&6; }
13381          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13382        fi
13383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13384$as_echo "$tool_specified" >&6; }
13385      fi
13386    fi
13387  fi
13388
13389
13390
13391
13392# Now we can determine OpenJDK build and target platforms. This is required to
13393# have early on.
13394# Make sure we can run config.sub.
13395$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13396  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13397
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13399$as_echo_n "checking build system type... " >&6; }
13400if ${ac_cv_build+:} false; then :
13401  $as_echo_n "(cached) " >&6
13402else
13403  ac_build_alias=$build_alias
13404test "x$ac_build_alias" = x &&
13405  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13406test "x$ac_build_alias" = x &&
13407  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13408ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13409  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13410
13411fi
13412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13413$as_echo "$ac_cv_build" >&6; }
13414case $ac_cv_build in
13415*-*-*) ;;
13416*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13417esac
13418build=$ac_cv_build
13419ac_save_IFS=$IFS; IFS='-'
13420set x $ac_cv_build
13421shift
13422build_cpu=$1
13423build_vendor=$2
13424shift; shift
13425# Remember, the first character of IFS is used to create $*,
13426# except with old shells:
13427build_os=$*
13428IFS=$ac_save_IFS
13429case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13430
13431
13432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13433$as_echo_n "checking host system type... " >&6; }
13434if ${ac_cv_host+:} false; then :
13435  $as_echo_n "(cached) " >&6
13436else
13437  if test "x$host_alias" = x; then
13438  ac_cv_host=$ac_cv_build
13439else
13440  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13441    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13442fi
13443
13444fi
13445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13446$as_echo "$ac_cv_host" >&6; }
13447case $ac_cv_host in
13448*-*-*) ;;
13449*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13450esac
13451host=$ac_cv_host
13452ac_save_IFS=$IFS; IFS='-'
13453set x $ac_cv_host
13454shift
13455host_cpu=$1
13456host_vendor=$2
13457shift; shift
13458# Remember, the first character of IFS is used to create $*,
13459# except with old shells:
13460host_os=$*
13461IFS=$ac_save_IFS
13462case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13463
13464
13465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13466$as_echo_n "checking target system type... " >&6; }
13467if ${ac_cv_target+:} false; then :
13468  $as_echo_n "(cached) " >&6
13469else
13470  if test "x$target_alias" = x; then
13471  ac_cv_target=$ac_cv_host
13472else
13473  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13474    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13475fi
13476
13477fi
13478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13479$as_echo "$ac_cv_target" >&6; }
13480case $ac_cv_target in
13481*-*-*) ;;
13482*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13483esac
13484target=$ac_cv_target
13485ac_save_IFS=$IFS; IFS='-'
13486set x $ac_cv_target
13487shift
13488target_cpu=$1
13489target_vendor=$2
13490shift; shift
13491# Remember, the first character of IFS is used to create $*,
13492# except with old shells:
13493target_os=$*
13494IFS=$ac_save_IFS
13495case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13496
13497
13498# The aliases save the names the user supplied, while $host etc.
13499# will get canonicalized.
13500test -n "$target_alias" &&
13501  test "$program_prefix$program_suffix$program_transform_name" = \
13502    NONENONEs,x,x, &&
13503  program_prefix=${target_alias}-
13504
13505  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13506  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13507  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13508  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13509  # to use the configure naming style.
13510
13511
13512
13513
13514
13515  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13516  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13517  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13518  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13519  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13520  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13521
13522
13523
13524  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13525
13526  case "$build_os" in
13527    *linux*)
13528      VAR_OS=linux
13529      VAR_OS_TYPE=unix
13530      ;;
13531    *solaris*)
13532      VAR_OS=solaris
13533      VAR_OS_TYPE=unix
13534      ;;
13535    *darwin*)
13536      VAR_OS=macosx
13537      VAR_OS_TYPE=unix
13538      ;;
13539    *bsd*)
13540      VAR_OS=bsd
13541      VAR_OS_TYPE=unix
13542      ;;
13543    *cygwin*)
13544      VAR_OS=windows
13545      VAR_OS_ENV=windows.cygwin
13546      ;;
13547    *mingw*)
13548      VAR_OS=windows
13549      VAR_OS_ENV=windows.msys
13550      ;;
13551    *aix*)
13552      VAR_OS=aix
13553      VAR_OS_TYPE=unix
13554      ;;
13555    *)
13556      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13557      ;;
13558  esac
13559
13560
13561  # First argument is the cpu name from the trip/quad
13562  case "$build_cpu" in
13563    x86_64)
13564      VAR_CPU=x86_64
13565      VAR_CPU_ARCH=x86
13566      VAR_CPU_BITS=64
13567      VAR_CPU_ENDIAN=little
13568      ;;
13569    i?86)
13570      VAR_CPU=x86
13571      VAR_CPU_ARCH=x86
13572      VAR_CPU_BITS=32
13573      VAR_CPU_ENDIAN=little
13574      ;;
13575    arm*)
13576      VAR_CPU=arm
13577      VAR_CPU_ARCH=arm
13578      VAR_CPU_BITS=32
13579      VAR_CPU_ENDIAN=little
13580      ;;
13581    aarch64)
13582      VAR_CPU=aarch64
13583      VAR_CPU_ARCH=aarch64
13584      VAR_CPU_BITS=64
13585      VAR_CPU_ENDIAN=little
13586      ;;
13587    powerpc)
13588      VAR_CPU=ppc
13589      VAR_CPU_ARCH=ppc
13590      VAR_CPU_BITS=32
13591      VAR_CPU_ENDIAN=big
13592      ;;
13593    powerpc64)
13594      VAR_CPU=ppc64
13595      VAR_CPU_ARCH=ppc
13596      VAR_CPU_BITS=64
13597      VAR_CPU_ENDIAN=big
13598      ;;
13599    powerpc64le)
13600      VAR_CPU=ppc64
13601      VAR_CPU_ARCH=ppc
13602      VAR_CPU_BITS=64
13603      VAR_CPU_ENDIAN=little
13604      ;;
13605    s390)
13606      VAR_CPU=s390
13607      VAR_CPU_ARCH=s390
13608      VAR_CPU_BITS=32
13609      VAR_CPU_ENDIAN=big
13610      ;;
13611    s390x)
13612      VAR_CPU=s390x
13613      VAR_CPU_ARCH=s390
13614      VAR_CPU_BITS=64
13615      VAR_CPU_ENDIAN=big
13616      ;;
13617    sparc)
13618      VAR_CPU=sparc
13619      VAR_CPU_ARCH=sparc
13620      VAR_CPU_BITS=32
13621      VAR_CPU_ENDIAN=big
13622      ;;
13623    sparcv9|sparc64)
13624      VAR_CPU=sparcv9
13625      VAR_CPU_ARCH=sparc
13626      VAR_CPU_BITS=64
13627      VAR_CPU_ENDIAN=big
13628      ;;
13629    *)
13630      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13631      ;;
13632  esac
13633
13634  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13635  OPENJDK_BUILD_OS="$VAR_OS"
13636  if test "x$VAR_OS_TYPE" != x; then
13637    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13638  else
13639    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13640  fi
13641  if test "x$VAR_OS_ENV" != x; then
13642    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13643  else
13644    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13645  fi
13646  OPENJDK_BUILD_CPU="$VAR_CPU"
13647  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13648  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13649  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13650
13651
13652
13653
13654
13655
13656
13657
13658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13659$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13661$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13662
13663  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13664
13665  case "$host_os" in
13666    *linux*)
13667      VAR_OS=linux
13668      VAR_OS_TYPE=unix
13669      ;;
13670    *solaris*)
13671      VAR_OS=solaris
13672      VAR_OS_TYPE=unix
13673      ;;
13674    *darwin*)
13675      VAR_OS=macosx
13676      VAR_OS_TYPE=unix
13677      ;;
13678    *bsd*)
13679      VAR_OS=bsd
13680      VAR_OS_TYPE=unix
13681      ;;
13682    *cygwin*)
13683      VAR_OS=windows
13684      VAR_OS_ENV=windows.cygwin
13685      ;;
13686    *mingw*)
13687      VAR_OS=windows
13688      VAR_OS_ENV=windows.msys
13689      ;;
13690    *aix*)
13691      VAR_OS=aix
13692      VAR_OS_TYPE=unix
13693      ;;
13694    *)
13695      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13696      ;;
13697  esac
13698
13699
13700  # First argument is the cpu name from the trip/quad
13701  case "$host_cpu" in
13702    x86_64)
13703      VAR_CPU=x86_64
13704      VAR_CPU_ARCH=x86
13705      VAR_CPU_BITS=64
13706      VAR_CPU_ENDIAN=little
13707      ;;
13708    i?86)
13709      VAR_CPU=x86
13710      VAR_CPU_ARCH=x86
13711      VAR_CPU_BITS=32
13712      VAR_CPU_ENDIAN=little
13713      ;;
13714    arm*)
13715      VAR_CPU=arm
13716      VAR_CPU_ARCH=arm
13717      VAR_CPU_BITS=32
13718      VAR_CPU_ENDIAN=little
13719      ;;
13720    aarch64)
13721      VAR_CPU=aarch64
13722      VAR_CPU_ARCH=aarch64
13723      VAR_CPU_BITS=64
13724      VAR_CPU_ENDIAN=little
13725      ;;
13726    powerpc)
13727      VAR_CPU=ppc
13728      VAR_CPU_ARCH=ppc
13729      VAR_CPU_BITS=32
13730      VAR_CPU_ENDIAN=big
13731      ;;
13732    powerpc64)
13733      VAR_CPU=ppc64
13734      VAR_CPU_ARCH=ppc
13735      VAR_CPU_BITS=64
13736      VAR_CPU_ENDIAN=big
13737      ;;
13738    powerpc64le)
13739      VAR_CPU=ppc64
13740      VAR_CPU_ARCH=ppc
13741      VAR_CPU_BITS=64
13742      VAR_CPU_ENDIAN=little
13743      ;;
13744    s390)
13745      VAR_CPU=s390
13746      VAR_CPU_ARCH=s390
13747      VAR_CPU_BITS=32
13748      VAR_CPU_ENDIAN=big
13749      ;;
13750    s390x)
13751      VAR_CPU=s390x
13752      VAR_CPU_ARCH=s390
13753      VAR_CPU_BITS=64
13754      VAR_CPU_ENDIAN=big
13755      ;;
13756    sparc)
13757      VAR_CPU=sparc
13758      VAR_CPU_ARCH=sparc
13759      VAR_CPU_BITS=32
13760      VAR_CPU_ENDIAN=big
13761      ;;
13762    sparcv9|sparc64)
13763      VAR_CPU=sparcv9
13764      VAR_CPU_ARCH=sparc
13765      VAR_CPU_BITS=64
13766      VAR_CPU_ENDIAN=big
13767      ;;
13768    *)
13769      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13770      ;;
13771  esac
13772
13773  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13774  OPENJDK_TARGET_OS="$VAR_OS"
13775  if test "x$VAR_OS_TYPE" != x; then
13776    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13777  else
13778    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13779  fi
13780  if test "x$VAR_OS_ENV" != x; then
13781    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13782  else
13783    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13784  fi
13785  OPENJDK_TARGET_CPU="$VAR_CPU"
13786  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13787  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13788  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13789
13790
13791
13792
13793
13794
13795
13796
13797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13798$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13800$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13801
13802
13803
13804# Check whether --with-target-bits was given.
13805if test "${with_target_bits+set}" = set; then :
13806  withval=$with_target_bits;
13807fi
13808
13809
13810  # We have three types of compiles:
13811  # native  == normal compilation, target system == build system
13812  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13813  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13814  #
13815  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13816    # We're doing a proper cross-compilation
13817    COMPILE_TYPE="cross"
13818  else
13819    COMPILE_TYPE="native"
13820  fi
13821
13822  if test "x$with_target_bits" != x; then
13823    if test "x$COMPILE_TYPE" = "xcross"; then
13824      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13825    fi
13826
13827    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13828      # A reduced build is requested
13829      COMPILE_TYPE="reduced"
13830      OPENJDK_TARGET_CPU_BITS=32
13831      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13832        OPENJDK_TARGET_CPU=x86
13833      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13834        OPENJDK_TARGET_CPU=sparc
13835      else
13836        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13837      fi
13838    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13839      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
13840    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13841      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13842$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13843    else
13844      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13845    fi
13846  fi
13847
13848
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13850$as_echo_n "checking compilation type... " >&6; }
13851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13852$as_echo "$COMPILE_TYPE" >&6; }
13853
13854
13855  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13856    REQUIRED_OS_NAME=SunOS
13857    REQUIRED_OS_VERSION=5.10
13858  fi
13859  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13860    REQUIRED_OS_NAME=Linux
13861    REQUIRED_OS_VERSION=2.6
13862  fi
13863  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13864    REQUIRED_OS_NAME=Windows
13865    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13866      REQUIRED_OS_VERSION=5.2
13867    else
13868      REQUIRED_OS_VERSION=5.1
13869    fi
13870  fi
13871  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13872    REQUIRED_OS_NAME=Darwin
13873    REQUIRED_OS_VERSION=11.2
13874  fi
13875
13876
13877
13878
13879
13880  # Also store the legacy naming of the cpu.
13881  # Ie i586 and amd64 instead of x86 and x86_64
13882  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13883  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13884    OPENJDK_TARGET_CPU_LEGACY="i586"
13885  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13886    # On all platforms except MacOSX replace x86_64 with amd64.
13887    OPENJDK_TARGET_CPU_LEGACY="amd64"
13888  fi
13889
13890
13891  # And the second legacy naming of the cpu.
13892  # Ie i386 and amd64 instead of x86 and x86_64.
13893  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13894  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13895    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13896  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13897    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13898  fi
13899
13900
13901  # This is the name of the cpu (but using i386 and amd64 instead of
13902  # x86 and x86_64, respectively), preceeded by a /, to be used when
13903  # locating libraries. On macosx, it's empty, though.
13904  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13905  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13906    OPENJDK_TARGET_CPU_LIBDIR=""
13907  fi
13908
13909
13910  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13911  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13912  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13913  OPENJDK_TARGET_CPU_ISADIR=""
13914  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13915    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13916      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13917    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13918      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13919    fi
13920  fi
13921
13922
13923  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13924  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13925  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13926    # On linux only, we replace x86 with i386.
13927    OPENJDK_TARGET_CPU_OSARCH="i386"
13928  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13929    # On all platforms except macosx, we replace x86_64 with amd64.
13930    OPENJDK_TARGET_CPU_OSARCH="amd64"
13931  fi
13932
13933
13934  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13935  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13936    OPENJDK_TARGET_CPU_JLI="i386"
13937  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13938    # On all platforms except macosx, we replace x86_64 with amd64.
13939    OPENJDK_TARGET_CPU_JLI="amd64"
13940  fi
13941  # Now setup the -D flags for building libjli.
13942  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13943  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13944    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13945      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13946    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13947      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13948    fi
13949  fi
13950
13951
13952  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13953      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13954  else
13955      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13956  fi
13957
13958
13959  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13960    A_LP64="LP64:="
13961    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13962    # unpack200.exe
13963    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13964      ADD_LP64="-D_LP64=1"
13965    fi
13966  fi
13967  LP64=$A_LP64
13968
13969
13970  if test "x$COMPILE_TYPE" = "xcross"; then
13971    # FIXME: ... or should this include reduced builds..?
13972    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13973  else
13974    DEFINE_CROSS_COMPILE_ARCH=""
13975  fi
13976
13977
13978  # ZERO_ARCHDEF is used to enable architecture-specific code
13979  case "${OPENJDK_TARGET_CPU}" in
13980    ppc*)    ZERO_ARCHDEF=PPC   ;;
13981    s390*)   ZERO_ARCHDEF=S390  ;;
13982    sparc*)  ZERO_ARCHDEF=SPARC ;;
13983    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13984    x86)     ZERO_ARCHDEF=IA32  ;;
13985    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13986  esac
13987
13988
13989
13990
13991# Continue setting up basic stuff. Most remaining code require fundamental tools.
13992
13993  # Save the current directory this script was started from
13994  CURDIR="$PWD"
13995
13996  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13997    PATH_SEP=";"
13998
13999  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14000  if test $SRC_ROOT_LENGTH -gt 100; then
14001    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14002  fi
14003
14004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14006$as_echo_n "checking cygwin release... " >&6; }
14007    CYGWIN_VERSION=`$UNAME -r`
14008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14009$as_echo "$CYGWIN_VERSION" >&6; }
14010    WINDOWS_ENV_VENDOR='cygwin'
14011    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14012
14013    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14014    if test "x$CYGWIN_VERSION_OK" = x; then
14015      { $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
14016$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;}
14017      as_fn_error $? "Cannot continue" "$LINENO" 5
14018    fi
14019    if test "x$CYGPATH" = x; then
14020      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14021    fi
14022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14023$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14024    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14025    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14026    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14027    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14029$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14030    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14031    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14032    if test "x$test_cygdrive_prefix" = x; then
14033      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14034    fi
14035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14037$as_echo_n "checking msys release... " >&6; }
14038    MSYS_VERSION=`$UNAME -r`
14039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14040$as_echo "$MSYS_VERSION" >&6; }
14041
14042    WINDOWS_ENV_VENDOR='msys'
14043    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14044
14045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14046$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14047    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14048    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14049
14050  windows_path="$MSYS_ROOT_PATH"
14051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14052    unix_path=`$CYGPATH -u "$windows_path"`
14053    MSYS_ROOT_PATH="$unix_path"
14054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14056    MSYS_ROOT_PATH="$unix_path"
14057  fi
14058
14059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14060$as_echo "$MSYS_ROOT_PATH" >&6; }
14061    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14062  else
14063    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14064  fi
14065
14066  # Test if windows or unix (cygwin/msys) find is first in path.
14067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14068$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14069  FIND_BINARY_OUTPUT=`find --version 2>&1`
14070  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14072$as_echo "unix style" >&6; }
14073  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14075$as_echo "Windows" >&6; }
14076    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14077$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14078    { $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
14079$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14080    as_fn_error $? "Cannot continue" "$LINENO" 5
14081  else
14082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14083$as_echo "unknown" >&6; }
14084    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14085$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14086  fi
14087
14088  else
14089    PATH_SEP=":"
14090  fi
14091
14092
14093  # We get the top-level directory from the supporting wrappers.
14094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14095$as_echo_n "checking for top-level directory... " >&6; }
14096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14097$as_echo "$TOPDIR" >&6; }
14098
14099
14100  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14101
14102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14103
14104  # Input might be given as Windows format, start by converting to
14105  # unix format.
14106  path="$CURDIR"
14107  new_path=`$CYGPATH -u "$path"`
14108
14109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14112  # "foo.exe" is OK but "foo" is an error.
14113  #
14114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14115  # It is also a way to make sure we got the proper file name for the real test later on.
14116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14117  if test "x$test_shortpath" = x; then
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14119$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14120    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14121  fi
14122
14123  # Call helper function which possibly converts this using DOS-style short mode.
14124  # If so, the updated path is stored in $new_path.
14125
14126  input_path="$new_path"
14127  # Check if we need to convert this using DOS-style short mode. If the path
14128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14129  # take no chances and rewrite it.
14130  # Note: m4 eats our [], so we need to use [ and ] instead.
14131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14132  if test "x$has_forbidden_chars" != x; then
14133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14137      # Going to short mode and back again did indeed matter. Since short mode is
14138      # case insensitive, let's make it lowercase to improve readability.
14139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14140      # Now convert it back to Unix-stile (cygpath)
14141      input_path=`$CYGPATH -u "$shortmode_path"`
14142      new_path="$input_path"
14143    fi
14144  fi
14145
14146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14147  if test "x$test_cygdrive_prefix" = x; then
14148    # As a simple fix, exclude /usr/bin since it's not a real path.
14149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14151      # a path prefixed by /cygdrive for fixpath to work.
14152      new_path="$CYGWIN_ROOT_PATH$input_path"
14153    fi
14154  fi
14155
14156
14157  if test "x$path" != "x$new_path"; then
14158    CURDIR="$new_path"
14159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14160$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14161  fi
14162
14163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14164
14165  path="$CURDIR"
14166  has_colon=`$ECHO $path | $GREP ^.:`
14167  new_path="$path"
14168  if test "x$has_colon" = x; then
14169    # Not in mixed or Windows style, start by that.
14170    new_path=`cmd //c echo $path`
14171  fi
14172
14173
14174  input_path="$new_path"
14175  # Check if we need to convert this using DOS-style short mode. If the path
14176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14177  # take no chances and rewrite it.
14178  # Note: m4 eats our [], so we need to use [ and ] instead.
14179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14180  if test "x$has_forbidden_chars" != x; then
14181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14183  fi
14184
14185
14186  windows_path="$new_path"
14187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14188    unix_path=`$CYGPATH -u "$windows_path"`
14189    new_path="$unix_path"
14190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14192    new_path="$unix_path"
14193  fi
14194
14195  if test "x$path" != "x$new_path"; then
14196    CURDIR="$new_path"
14197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14198$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14199  fi
14200
14201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14203
14204  else
14205    # We're on a unix platform. Hooray! :)
14206    path="$CURDIR"
14207    has_space=`$ECHO "$path" | $GREP " "`
14208    if test "x$has_space" != x; then
14209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14210$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14211      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14212    fi
14213
14214    # Use eval to expand a potential ~
14215    eval path="$path"
14216    if test ! -f "$path" && test ! -d "$path"; then
14217      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14218    fi
14219
14220    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14221  fi
14222
14223
14224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14225
14226  # Input might be given as Windows format, start by converting to
14227  # unix format.
14228  path="$TOPDIR"
14229  new_path=`$CYGPATH -u "$path"`
14230
14231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14234  # "foo.exe" is OK but "foo" is an error.
14235  #
14236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14237  # It is also a way to make sure we got the proper file name for the real test later on.
14238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14239  if test "x$test_shortpath" = x; then
14240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14241$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14242    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14243  fi
14244
14245  # Call helper function which possibly converts this using DOS-style short mode.
14246  # If so, the updated path is stored in $new_path.
14247
14248  input_path="$new_path"
14249  # Check if we need to convert this using DOS-style short mode. If the path
14250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14251  # take no chances and rewrite it.
14252  # Note: m4 eats our [], so we need to use [ and ] instead.
14253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14254  if test "x$has_forbidden_chars" != x; then
14255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14259      # Going to short mode and back again did indeed matter. Since short mode is
14260      # case insensitive, let's make it lowercase to improve readability.
14261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14262      # Now convert it back to Unix-stile (cygpath)
14263      input_path=`$CYGPATH -u "$shortmode_path"`
14264      new_path="$input_path"
14265    fi
14266  fi
14267
14268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14269  if test "x$test_cygdrive_prefix" = x; then
14270    # As a simple fix, exclude /usr/bin since it's not a real path.
14271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14273      # a path prefixed by /cygdrive for fixpath to work.
14274      new_path="$CYGWIN_ROOT_PATH$input_path"
14275    fi
14276  fi
14277
14278
14279  if test "x$path" != "x$new_path"; then
14280    TOPDIR="$new_path"
14281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14282$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14283  fi
14284
14285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14286
14287  path="$TOPDIR"
14288  has_colon=`$ECHO $path | $GREP ^.:`
14289  new_path="$path"
14290  if test "x$has_colon" = x; then
14291    # Not in mixed or Windows style, start by that.
14292    new_path=`cmd //c echo $path`
14293  fi
14294
14295
14296  input_path="$new_path"
14297  # Check if we need to convert this using DOS-style short mode. If the path
14298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14299  # take no chances and rewrite it.
14300  # Note: m4 eats our [], so we need to use [ and ] instead.
14301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14302  if test "x$has_forbidden_chars" != x; then
14303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14305  fi
14306
14307
14308  windows_path="$new_path"
14309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14310    unix_path=`$CYGPATH -u "$windows_path"`
14311    new_path="$unix_path"
14312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14314    new_path="$unix_path"
14315  fi
14316
14317  if test "x$path" != "x$new_path"; then
14318    TOPDIR="$new_path"
14319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14320$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14321  fi
14322
14323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14325
14326  else
14327    # We're on a unix platform. Hooray! :)
14328    path="$TOPDIR"
14329    has_space=`$ECHO "$path" | $GREP " "`
14330    if test "x$has_space" != x; then
14331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14332$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14333      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14334    fi
14335
14336    # Use eval to expand a potential ~
14337    eval path="$path"
14338    if test ! -f "$path" && test ! -d "$path"; then
14339      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14340    fi
14341
14342    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14343  fi
14344
14345  # SRC_ROOT is a traditional alias for TOPDIR.
14346  SRC_ROOT=$TOPDIR
14347
14348  # Locate the directory of this script.
14349  AUTOCONF_DIR=$TOPDIR/common/autoconf
14350
14351
14352  # Setup default logging of stdout and stderr to build.log in the output root.
14353  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14354  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14355  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14356
14357
14358
14359
14360
14361# Check if it's a pure open build or if custom sources are to be used.
14362
14363  # Check whether --enable-openjdk-only was given.
14364if test "${enable_openjdk_only+set}" = set; then :
14365  enableval=$enable_openjdk_only;
14366else
14367  enable_openjdk_only="no"
14368fi
14369
14370
14371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14372$as_echo_n "checking for presence of closed sources... " >&6; }
14373  if test -d "$SRC_ROOT/jdk/src/closed"; then
14374    CLOSED_SOURCE_PRESENT=yes
14375  else
14376    CLOSED_SOURCE_PRESENT=no
14377  fi
14378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14379$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14380
14381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14382$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14383  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14385$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14386
14387  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14388    OPENJDK=true
14389    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14390      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14391$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14392    fi
14393  else
14394    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14395      OPENJDK=true
14396    else
14397      OPENJDK=false
14398    fi
14399  fi
14400
14401  if test "x$OPENJDK" = "xtrue"; then
14402    SET_OPENJDK="OPENJDK=true"
14403  fi
14404
14405
14406
14407  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14408  # the IncludeCustomExtension macro.
14409
14410
14411# Check whether --with-custom-make-dir was given.
14412if test "${with_custom_make_dir+set}" = set; then :
14413  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
14414$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14415fi
14416
14417
14418
14419
14420# These are needed to be able to create a configuration name (and thus the output directory)
14421
14422  ###############################################################################
14423  #
14424  # Check which variant of the JDK that we want to build.
14425  # Currently we have:
14426  #    normal:   standard edition
14427  # but the custom make system may add other variants
14428  #
14429  # Effectively the JDK variant gives a name to a specific set of
14430  # modules to compile into the JDK. In the future, these modules
14431  # might even be Jigsaw modules.
14432  #
14433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14434$as_echo_n "checking which variant of the JDK to build... " >&6; }
14435
14436# Check whether --with-jdk-variant was given.
14437if test "${with_jdk_variant+set}" = set; then :
14438  withval=$with_jdk_variant;
14439fi
14440
14441
14442  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14443    JDK_VARIANT="normal"
14444  else
14445    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14446  fi
14447
14448
14449
14450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14451$as_echo "$JDK_VARIANT" >&6; }
14452
14453
14454###############################################################################
14455#
14456# Check which interpreter of the JVM we want to build.
14457# Currently we have:
14458#    template: Template interpreter (the default)
14459#    cpp     : C++ interpreter
14460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14461$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14462
14463# Check whether --with-jvm-interpreter was given.
14464if test "${with_jvm_interpreter+set}" = set; then :
14465  withval=$with_jvm_interpreter;
14466fi
14467
14468
14469if test "x$with_jvm_interpreter" = x; then
14470     with_jvm_interpreter="template"
14471fi
14472
14473JVM_INTERPRETER="$with_jvm_interpreter"
14474
14475if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14476   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14477fi
14478
14479
14480
14481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14482$as_echo "$with_jvm_interpreter" >&6; }
14483
14484
14485
14486  ###############################################################################
14487  #
14488  # Check which variants of the JVM that we want to build.
14489  # Currently we have:
14490  #    server: normal interpreter and a tiered C1/C2 compiler
14491  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14492  #    minimal1: reduced form of client with optional VM services and features stripped out
14493  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14494  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14495  #    zero: no machine code interpreter, no compiler
14496  #    zeroshark: zero interpreter and shark/llvm compiler backend
14497#    core: interpreter only, no compiler (only works on some platforms)
14498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14499$as_echo_n "checking which variants of the JVM to build... " >&6; }
14500
14501# Check whether --with-jvm-variants was given.
14502if test "${with_jvm_variants+set}" = set; then :
14503  withval=$with_jvm_variants;
14504fi
14505
14506
14507  if test "x$with_jvm_variants" = x; then
14508    with_jvm_variants="server"
14509  fi
14510
14511  JVM_VARIANTS=",$with_jvm_variants,"
14512  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,//'`
14513
14514  if test "x$TEST_VARIANTS" != "x,"; then
14515     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14516  fi
14517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14518$as_echo "$with_jvm_variants" >&6; }
14519
14520  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14521  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14522  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14523  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14524  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14525  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14526  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14527
14528  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14529    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14530      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14531    fi
14532  fi
14533  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14534    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14535      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14536    fi
14537  fi
14538  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14539    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14540      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14541    fi
14542  fi
14543
14544  # Replace the commas with AND for use in the build directory name.
14545  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14546  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/'`
14547  if test "x$COUNT_VARIANTS" != "x,1"; then
14548    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14549  else
14550    BUILDING_MULTIPLE_JVM_VARIANTS=no
14551  fi
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562  INCLUDE_SA=true
14563  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14564    INCLUDE_SA=false
14565  fi
14566  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14567    INCLUDE_SA=false
14568  fi
14569  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14570    INCLUDE_SA=false
14571  fi
14572  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14573    INCLUDE_SA=false
14574  fi
14575
14576
14577  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14578    MACOSX_UNIVERSAL="true"
14579  fi
14580
14581
14582
14583
14584  ###############################################################################
14585  #
14586  # Set the debug level
14587  #    release: no debug information, all optimizations, no asserts.
14588  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14589  #    fastdebug: debug information (-g), all optimizations, all asserts
14590  #    slowdebug: debug information (-g), no optimizations, all asserts
14591  #
14592  DEBUG_LEVEL="release"
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14594$as_echo_n "checking which debug level to use... " >&6; }
14595  # Check whether --enable-debug was given.
14596if test "${enable_debug+set}" = set; then :
14597  enableval=$enable_debug;
14598        ENABLE_DEBUG="${enableval}"
14599        DEBUG_LEVEL="fastdebug"
14600
14601else
14602  ENABLE_DEBUG="no"
14603fi
14604
14605
14606
14607# Check whether --with-debug-level was given.
14608if test "${with_debug_level+set}" = set; then :
14609  withval=$with_debug_level;
14610        DEBUG_LEVEL="${withval}"
14611        if test "x$ENABLE_DEBUG" = xyes; then
14612          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14613        fi
14614
14615fi
14616
14617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14618$as_echo "$DEBUG_LEVEL" >&6; }
14619
14620  if test "x$DEBUG_LEVEL" != xrelease && \
14621      test "x$DEBUG_LEVEL" != xoptimized && \
14622      test "x$DEBUG_LEVEL" != xfastdebug && \
14623      test "x$DEBUG_LEVEL" != xslowdebug; then
14624    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14625  fi
14626
14627
14628  ###############################################################################
14629  #
14630  # Setup legacy vars/targets and new vars to deal with different debug levels.
14631  #
14632
14633  case $DEBUG_LEVEL in
14634    release )
14635      VARIANT="OPT"
14636      FASTDEBUG="false"
14637      DEBUG_CLASSFILES="false"
14638      BUILD_VARIANT_RELEASE=""
14639      HOTSPOT_DEBUG_LEVEL="product"
14640      HOTSPOT_EXPORT="product"
14641      ;;
14642    fastdebug )
14643      VARIANT="DBG"
14644      FASTDEBUG="true"
14645      DEBUG_CLASSFILES="true"
14646      BUILD_VARIANT_RELEASE="-fastdebug"
14647      HOTSPOT_DEBUG_LEVEL="fastdebug"
14648      HOTSPOT_EXPORT="fastdebug"
14649      ;;
14650    slowdebug )
14651      VARIANT="DBG"
14652      FASTDEBUG="false"
14653      DEBUG_CLASSFILES="true"
14654      BUILD_VARIANT_RELEASE="-debug"
14655      HOTSPOT_DEBUG_LEVEL="debug"
14656      HOTSPOT_EXPORT="debug"
14657      ;;
14658    optimized )
14659      VARIANT="OPT"
14660      FASTDEBUG="false"
14661      DEBUG_CLASSFILES="false"
14662      BUILD_VARIANT_RELEASE="-optimized"
14663      HOTSPOT_DEBUG_LEVEL="optimized"
14664      HOTSPOT_EXPORT="optimized"
14665      ;;
14666  esac
14667
14668  # The debug level 'optimized' is a little special because it is currently only
14669  # applicable to the HotSpot build where it means to build a completely
14670  # optimized version of the VM without any debugging code (like for the
14671  # 'release' debug level which is called 'product' in the HotSpot build) but
14672  # with the exception that it can contain additional code which is otherwise
14673  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14674  # test new and/or experimental features which are not intended for customer
14675  # shipment. Because these new features need to be tested and benchmarked in
14676  # real world scenarios, we want to build the containing JDK at the 'release'
14677  # debug level.
14678  if test "x$DEBUG_LEVEL" = xoptimized; then
14679    DEBUG_LEVEL="release"
14680  fi
14681
14682  #####
14683  # Generate the legacy makefile targets for hotspot.
14684  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14685  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14686  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14687  # But until then ...
14688  HOTSPOT_TARGET=""
14689
14690  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14691    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14692  fi
14693
14694  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14695    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14696  fi
14697
14698  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14699    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14700  fi
14701
14702  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14703    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14704  fi
14705
14706  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14707    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14708  fi
14709
14710  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14711    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14712  fi
14713
14714  if test "x$JVM_VARIANT_CORE" = xtrue; then
14715    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14716  fi
14717
14718  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14719
14720  # On Macosx universal binaries are produced, but they only contain
14721  # 64 bit intel. This invalidates control of which jvms are built
14722  # from configure, but only server is valid anyway. Fix this
14723  # when hotspot makefiles are rewritten.
14724  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14725    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14726  fi
14727
14728  #####
14729
14730
14731
14732
14733
14734
14735
14736
14737# With basic setup done, call the custom early hook.
14738
14739
14740# Check if we have devkits, extra paths or sysroot set.
14741
14742
14743# Check whether --with-devkit was given.
14744if test "${with_devkit+set}" = set; then :
14745  withval=$with_devkit;
14746
14747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14748
14749  # Input might be given as Windows format, start by converting to
14750  # unix format.
14751  path="$with_devkit"
14752  new_path=`$CYGPATH -u "$path"`
14753
14754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14757  # "foo.exe" is OK but "foo" is an error.
14758  #
14759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14760  # It is also a way to make sure we got the proper file name for the real test later on.
14761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14762  if test "x$test_shortpath" = x; then
14763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14764$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14765    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14766  fi
14767
14768  # Call helper function which possibly converts this using DOS-style short mode.
14769  # If so, the updated path is stored in $new_path.
14770
14771  input_path="$new_path"
14772  # Check if we need to convert this using DOS-style short mode. If the path
14773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14774  # take no chances and rewrite it.
14775  # Note: m4 eats our [], so we need to use [ and ] instead.
14776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14777  if test "x$has_forbidden_chars" != x; then
14778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14782      # Going to short mode and back again did indeed matter. Since short mode is
14783      # case insensitive, let's make it lowercase to improve readability.
14784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14785      # Now convert it back to Unix-stile (cygpath)
14786      input_path=`$CYGPATH -u "$shortmode_path"`
14787      new_path="$input_path"
14788    fi
14789  fi
14790
14791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14792  if test "x$test_cygdrive_prefix" = x; then
14793    # As a simple fix, exclude /usr/bin since it's not a real path.
14794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14796      # a path prefixed by /cygdrive for fixpath to work.
14797      new_path="$CYGWIN_ROOT_PATH$input_path"
14798    fi
14799  fi
14800
14801
14802  if test "x$path" != "x$new_path"; then
14803    with_devkit="$new_path"
14804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14805$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14806  fi
14807
14808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14809
14810  path="$with_devkit"
14811  has_colon=`$ECHO $path | $GREP ^.:`
14812  new_path="$path"
14813  if test "x$has_colon" = x; then
14814    # Not in mixed or Windows style, start by that.
14815    new_path=`cmd //c echo $path`
14816  fi
14817
14818
14819  input_path="$new_path"
14820  # Check if we need to convert this using DOS-style short mode. If the path
14821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14822  # take no chances and rewrite it.
14823  # Note: m4 eats our [], so we need to use [ and ] instead.
14824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14825  if test "x$has_forbidden_chars" != x; then
14826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14828  fi
14829
14830
14831  windows_path="$new_path"
14832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14833    unix_path=`$CYGPATH -u "$windows_path"`
14834    new_path="$unix_path"
14835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14837    new_path="$unix_path"
14838  fi
14839
14840  if test "x$path" != "x$new_path"; then
14841    with_devkit="$new_path"
14842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14843$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14844  fi
14845
14846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14848
14849  else
14850    # We're on a unix platform. Hooray! :)
14851    path="$with_devkit"
14852    has_space=`$ECHO "$path" | $GREP " "`
14853    if test "x$has_space" != x; then
14854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14855$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14856      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14857    fi
14858
14859    # Use eval to expand a potential ~
14860    eval path="$path"
14861    if test ! -f "$path" && test ! -d "$path"; then
14862      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14863    fi
14864
14865    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14866  fi
14867
14868        DEVKIT_ROOT="$with_devkit"
14869        # Check for a meta data info file in the root of the devkit
14870        if test -f "$DEVKIT_ROOT/devkit.info"; then
14871          # This potentially sets the following:
14872          # DEVKIT_NAME: A descriptive name of the devkit
14873          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14874          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14875          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14876          . $DEVKIT_ROOT/devkit.info
14877        fi
14878
14879        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14880$as_echo_n "checking for devkit... " >&6; }
14881        if test "x$DEVKIT_NAME" != x; then
14882          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14883$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14884        else
14885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14886$as_echo "$DEVKIT_ROOT" >&6; }
14887        fi
14888
14889        if test "x$DEVKIT_EXTRA_PATH" != x; then
14890
14891  if test "x$DEVKIT_EXTRA_PATH" != x; then
14892    if test "x$EXTRA_PATH" = x; then
14893      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14894    else
14895      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14896    fi
14897  fi
14898
14899        fi
14900
14901        # Fallback default of just /bin if DEVKIT_PATH is not defined
14902        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14903          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14904        fi
14905
14906  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14907    if test "x$TOOLCHAIN_PATH" = x; then
14908      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14909    else
14910      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14911    fi
14912  fi
14913
14914
14915        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14916        # places for backwards compatiblity.
14917        if test "x$DEVKIT_SYSROOT" != x; then
14918          SYSROOT="$DEVKIT_SYSROOT"
14919        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14920          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14921        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14922          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14923        fi
14924
14925
14926fi
14927
14928
14929  # You can force the sysroot if the sysroot encoded into the compiler tools
14930  # is not correct.
14931
14932# Check whether --with-sys-root was given.
14933if test "${with_sys_root+set}" = set; then :
14934  withval=$with_sys_root; SYSROOT=$with_sys_root
14935
14936fi
14937
14938
14939
14940# Check whether --with-sysroot was given.
14941if test "${with_sysroot+set}" = set; then :
14942  withval=$with_sysroot; SYSROOT=$with_sysroot
14943
14944fi
14945
14946
14947
14948# Check whether --with-tools-dir was given.
14949if test "${with_tools_dir+set}" = set; then :
14950  withval=$with_tools_dir;
14951  if test "x$with_tools_dir" != x; then
14952    if test "x$TOOLCHAIN_PATH" = x; then
14953      TOOLCHAIN_PATH="$with_tools_dir"
14954    else
14955      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14956    fi
14957  fi
14958
14959
14960fi
14961
14962
14963
14964# Check whether --with-toolchain-path was given.
14965if test "${with_toolchain_path+set}" = set; then :
14966  withval=$with_toolchain_path;
14967  if test "x$with_toolchain_path" != x; then
14968    if test "x$TOOLCHAIN_PATH" = x; then
14969      TOOLCHAIN_PATH="$with_toolchain_path"
14970    else
14971      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14972    fi
14973  fi
14974
14975
14976fi
14977
14978
14979
14980# Check whether --with-extra-path was given.
14981if test "${with_extra_path+set}" = set; then :
14982  withval=$with_extra_path;
14983  if test "x$with_extra_path" != x; then
14984    if test "x$EXTRA_PATH" = x; then
14985      EXTRA_PATH="$with_extra_path"
14986    else
14987      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14988    fi
14989  fi
14990
14991
14992fi
14993
14994
14995  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14996    # detect if Xcode is installed by running xcodebuild -version
14997    # if no Xcode installed, xcodebuild exits with 1
14998    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14999    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15000      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15001      # fall back on the stub binary in /usr/bin/xcodebuild
15002      # Extract the first word of "xcodebuild", so it can be a program name with args.
15003set dummy xcodebuild; ac_word=$2
15004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15005$as_echo_n "checking for $ac_word... " >&6; }
15006if ${ac_cv_path_XCODEBUILD+:} false; then :
15007  $as_echo_n "(cached) " >&6
15008else
15009  case $XCODEBUILD in
15010  [\\/]* | ?:[\\/]*)
15011  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15012  ;;
15013  *)
15014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15015for as_dir in $TOOLCHAIN_PATH
15016do
15017  IFS=$as_save_IFS
15018  test -z "$as_dir" && as_dir=.
15019    for ac_exec_ext in '' $ac_executable_extensions; do
15020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15021    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15023    break 2
15024  fi
15025done
15026  done
15027IFS=$as_save_IFS
15028
15029  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15030  ;;
15031esac
15032fi
15033XCODEBUILD=$ac_cv_path_XCODEBUILD
15034if test -n "$XCODEBUILD"; then
15035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15036$as_echo "$XCODEBUILD" >&6; }
15037else
15038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15039$as_echo "no" >&6; }
15040fi
15041
15042
15043    else
15044      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15045      # when only the command line tools are installed there are no SDKs, so headers
15046      # are copied into the system frameworks
15047      XCODEBUILD=
15048
15049    fi
15050
15051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15052$as_echo_n "checking for sdk name... " >&6; }
15053
15054# Check whether --with-sdk-name was given.
15055if test "${with_sdk_name+set}" = set; then :
15056  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15057
15058fi
15059
15060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15061$as_echo "$SDKNAME" >&6; }
15062
15063    # if toolchain path is specified then don't rely on system headers, they may not compile
15064    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15065    test -z "$TOOLCHAIN_PATH" && \
15066      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15067
15068    if test -z "$SYSROOT"; then
15069      if test -n "$XCODEBUILD"; then
15070        # if we don't have system headers, use default SDK name (last resort)
15071        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15072          SDKNAME=${SDKNAME:-macosx}
15073        fi
15074
15075        if test -n "$SDKNAME"; then
15076          # Call xcodebuild to determine SYSROOT
15077          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15078        fi
15079      else
15080        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15081          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
15082        fi
15083      fi
15084    else
15085      # warn user if --with-sdk-name was also set
15086      if test -n "$with_sdk_name"; then
15087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15088$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15089      fi
15090    fi
15091
15092    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15093      # If no system framework headers, then SYSROOT must be set, or we won't build
15094      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
15095    fi
15096
15097    # Perform a basic sanity test
15098    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15099      if test -z "$SYSROOT"; then
15100        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
15101      else
15102        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15103      fi
15104    fi
15105
15106    # set SDKROOT too, Xcode tools will pick it up
15107    SDKROOT=$SYSROOT
15108
15109  fi
15110
15111  # Prepend the extra path to the global path
15112
15113  if test "x$EXTRA_PATH" != x; then
15114    if test "x$PATH" = x; then
15115      PATH="$EXTRA_PATH"
15116    else
15117      PATH="$EXTRA_PATH:$PATH"
15118    fi
15119  fi
15120
15121
15122  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15123    # Add extra search paths on solaris for utilities like ar and as etc...
15124    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15125  fi
15126
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15128$as_echo_n "checking for sysroot... " >&6; }
15129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15130$as_echo "$SYSROOT" >&6; }
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15132$as_echo_n "checking for toolchain path... " >&6; }
15133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15134$as_echo "$TOOLCHAIN_PATH" >&6; }
15135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15136$as_echo_n "checking for extra path... " >&6; }
15137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15138$as_echo "$EXTRA_PATH" >&6; }
15139
15140
15141# To properly create a configuration name, we need to have the OpenJDK target
15142# and options (variants and debug level) parsed.
15143
15144
15145
15146# Check whether --with-conf-name was given.
15147if test "${with_conf_name+set}" = set; then :
15148  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15149fi
15150
15151
15152  # Test from where we are running configure, in or outside of src root.
15153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15154$as_echo_n "checking where to store configuration... " >&6; }
15155  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15156      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15157      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15158    # We are running configure from the src root.
15159    # Create a default ./build/target-variant-debuglevel output root.
15160    if test "x${CONF_NAME}" = x; then
15161      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15162$as_echo "in default location" >&6; }
15163      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15164    else
15165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15166$as_echo "in build directory with custom name" >&6; }
15167    fi
15168    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15169    $MKDIR -p "$OUTPUT_ROOT"
15170    if test ! -d "$OUTPUT_ROOT"; then
15171      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15172    fi
15173  else
15174    # We are running configure from outside of the src dir.
15175    # Then use the current directory as output dir!
15176    # If configuration is situated in normal build directory, just use the build
15177    # directory name as configuration name, otherwise use the complete path.
15178    if test "x${CONF_NAME}" = x; then
15179      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15180    fi
15181    OUTPUT_ROOT="$CURDIR"
15182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15183$as_echo "in current directory" >&6; }
15184
15185    # WARNING: This might be a bad thing to do. You need to be sure you want to
15186    # have a configuration in this directory. Do some sanity checks!
15187
15188    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15189      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15190      # other files
15191      files_present=`$LS $OUTPUT_ROOT`
15192      # Configure has already touched config.log and confdefs.h in the current dir when this check
15193      # is performed.
15194      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15195      | $TR -d '\n'`
15196      if test "x$filtered_files" != x; then
15197        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15198$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15199        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15200$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15201        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15202$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15203        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15204$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15205        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15206$as_echo "$as_me: seriously mess up just about everything." >&6;}
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15208$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15210$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15211        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15212      fi
15213    fi
15214  fi
15215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15216$as_echo_n "checking what configuration name to use... " >&6; }
15217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15218$as_echo "$CONF_NAME" >&6; }
15219
15220
15221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15222
15223  # Input might be given as Windows format, start by converting to
15224  # unix format.
15225  path="$OUTPUT_ROOT"
15226  new_path=`$CYGPATH -u "$path"`
15227
15228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15231  # "foo.exe" is OK but "foo" is an error.
15232  #
15233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15234  # It is also a way to make sure we got the proper file name for the real test later on.
15235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15236  if test "x$test_shortpath" = x; then
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15238$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15239    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15240  fi
15241
15242  # Call helper function which possibly converts this using DOS-style short mode.
15243  # If so, the updated path is stored in $new_path.
15244
15245  input_path="$new_path"
15246  # Check if we need to convert this using DOS-style short mode. If the path
15247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15248  # take no chances and rewrite it.
15249  # Note: m4 eats our [], so we need to use [ and ] instead.
15250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15251  if test "x$has_forbidden_chars" != x; then
15252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15256      # Going to short mode and back again did indeed matter. Since short mode is
15257      # case insensitive, let's make it lowercase to improve readability.
15258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15259      # Now convert it back to Unix-stile (cygpath)
15260      input_path=`$CYGPATH -u "$shortmode_path"`
15261      new_path="$input_path"
15262    fi
15263  fi
15264
15265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15266  if test "x$test_cygdrive_prefix" = x; then
15267    # As a simple fix, exclude /usr/bin since it's not a real path.
15268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15270      # a path prefixed by /cygdrive for fixpath to work.
15271      new_path="$CYGWIN_ROOT_PATH$input_path"
15272    fi
15273  fi
15274
15275
15276  if test "x$path" != "x$new_path"; then
15277    OUTPUT_ROOT="$new_path"
15278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15279$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15280  fi
15281
15282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15283
15284  path="$OUTPUT_ROOT"
15285  has_colon=`$ECHO $path | $GREP ^.:`
15286  new_path="$path"
15287  if test "x$has_colon" = x; then
15288    # Not in mixed or Windows style, start by that.
15289    new_path=`cmd //c echo $path`
15290  fi
15291
15292
15293  input_path="$new_path"
15294  # Check if we need to convert this using DOS-style short mode. If the path
15295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15296  # take no chances and rewrite it.
15297  # Note: m4 eats our [], so we need to use [ and ] instead.
15298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15299  if test "x$has_forbidden_chars" != x; then
15300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15302  fi
15303
15304
15305  windows_path="$new_path"
15306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15307    unix_path=`$CYGPATH -u "$windows_path"`
15308    new_path="$unix_path"
15309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15311    new_path="$unix_path"
15312  fi
15313
15314  if test "x$path" != "x$new_path"; then
15315    OUTPUT_ROOT="$new_path"
15316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15317$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15318  fi
15319
15320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15322
15323  else
15324    # We're on a unix platform. Hooray! :)
15325    path="$OUTPUT_ROOT"
15326    has_space=`$ECHO "$path" | $GREP " "`
15327    if test "x$has_space" != x; then
15328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15329$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15330      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15331    fi
15332
15333    # Use eval to expand a potential ~
15334    eval path="$path"
15335    if test ! -f "$path" && test ! -d "$path"; then
15336      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15337    fi
15338
15339    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15340  fi
15341
15342
15343  SPEC=$OUTPUT_ROOT/spec.gmk
15344
15345  CONF_NAME=$CONF_NAME
15346
15347  OUTPUT_ROOT=$OUTPUT_ROOT
15348
15349
15350  # The spec.gmk file contains all variables for the make system.
15351  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15352
15353  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15354  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15355
15356  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15357  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15358
15359  # The compare.sh is used to compare the build output to other builds.
15360  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15361
15362  # The generated Makefile knows where the spec.gmk is and where the source is.
15363  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15364  # which will look for generated configurations
15365  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15366
15367
15368
15369# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15370
15371  for ac_prog in apt-get yum port pkgutil pkgadd
15372do
15373  # Extract the first word of "$ac_prog", so it can be a program name with args.
15374set dummy $ac_prog; ac_word=$2
15375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15376$as_echo_n "checking for $ac_word... " >&6; }
15377if ${ac_cv_prog_PKGHANDLER+:} false; then :
15378  $as_echo_n "(cached) " >&6
15379else
15380  if test -n "$PKGHANDLER"; then
15381  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15382else
15383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15384for as_dir in $PATH
15385do
15386  IFS=$as_save_IFS
15387  test -z "$as_dir" && as_dir=.
15388    for ac_exec_ext in '' $ac_executable_extensions; do
15389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15390    ac_cv_prog_PKGHANDLER="$ac_prog"
15391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15392    break 2
15393  fi
15394done
15395  done
15396IFS=$as_save_IFS
15397
15398fi
15399fi
15400PKGHANDLER=$ac_cv_prog_PKGHANDLER
15401if test -n "$PKGHANDLER"; then
15402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15403$as_echo "$PKGHANDLER" >&6; }
15404else
15405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15406$as_echo "no" >&6; }
15407fi
15408
15409
15410  test -n "$PKGHANDLER" && break
15411done
15412
15413
15414
15415# Setup tools that requires more complex handling, or that is not needed by the configure script.
15416
15417
15418  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15419  if test "x$MAKE" != x; then
15420    # User has supplied a make, test it.
15421    if test ! -f "$MAKE"; then
15422      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15423    fi
15424
15425  MAKE_CANDIDATE=""$MAKE""
15426  DESCRIPTION="user supplied MAKE=$MAKE"
15427  if test "x$MAKE_CANDIDATE" != x; then
15428    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15429$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15430    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15431    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15432    if test "x$IS_GNU_MAKE" = x; then
15433      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15434$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15435    else
15436      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15437      if test "x$IS_MODERN_MAKE" = x; then
15438        { $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
15439$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;}
15440      else
15441        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15442          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15443            MAKE_EXPECTED_ENV='cygwin'
15444          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15445            MAKE_EXPECTED_ENV='msys'
15446          else
15447            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15448          fi
15449          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15450          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15451        else
15452          # Not relevant for non-Windows
15453          IS_MAKE_CORRECT_ENV=true
15454        fi
15455        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15456          { $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
15457$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;}
15458        else
15459          FOUND_MAKE=$MAKE_CANDIDATE
15460
15461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15462
15463  # First separate the path from the arguments. This will split at the first
15464  # space.
15465  complete="$FOUND_MAKE"
15466  path="${complete%% *}"
15467  tmp="$complete EOL"
15468  arguments="${tmp#* }"
15469
15470  # Input might be given as Windows format, start by converting to
15471  # unix format.
15472  new_path=`$CYGPATH -u "$path"`
15473
15474  # Now try to locate executable using which
15475  new_path=`$WHICH "$new_path" 2> /dev/null`
15476  # bat and cmd files are not always considered executable in cygwin causing which
15477  # to not find them
15478  if test "x$new_path" = x \
15479      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15480      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15481    new_path=`$CYGPATH -u "$path"`
15482  fi
15483  if test "x$new_path" = x; then
15484    # Oops. Which didn't find the executable.
15485    # The splitting of arguments from the executable at a space might have been incorrect,
15486    # since paths with space are more likely in Windows. Give it another try with the whole
15487    # argument.
15488    path="$complete"
15489    arguments="EOL"
15490    new_path=`$CYGPATH -u "$path"`
15491    new_path=`$WHICH "$new_path" 2> /dev/null`
15492    # bat and cmd files are not always considered executable in cygwin causing which
15493    # to not find them
15494    if test "x$new_path" = x \
15495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15497      new_path=`$CYGPATH -u "$path"`
15498    fi
15499    if test "x$new_path" = x; then
15500      # It's still not found. Now this is an unrecoverable error.
15501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15502$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15503      has_space=`$ECHO "$complete" | $GREP " "`
15504      if test "x$has_space" != x; then
15505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15507      fi
15508      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15509    fi
15510  fi
15511
15512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15515  # "foo.exe" is OK but "foo" is an error.
15516  #
15517  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15518  # It is also a way to make sure we got the proper file name for the real test later on.
15519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15520  if test "x$test_shortpath" = x; then
15521    # Short path failed, file does not exist as specified.
15522    # Try adding .exe or .cmd
15523    if test -f "${new_path}.exe"; then
15524      input_to_shortpath="${new_path}.exe"
15525    elif test -f "${new_path}.cmd"; then
15526      input_to_shortpath="${new_path}.cmd"
15527    else
15528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15529$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15530      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15531$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15532      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15533    fi
15534  else
15535    input_to_shortpath="$new_path"
15536  fi
15537
15538  # Call helper function which possibly converts this using DOS-style short mode.
15539  # If so, the updated path is stored in $new_path.
15540  new_path="$input_to_shortpath"
15541
15542  input_path="$input_to_shortpath"
15543  # Check if we need to convert this using DOS-style short mode. If the path
15544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15545  # take no chances and rewrite it.
15546  # Note: m4 eats our [], so we need to use [ and ] instead.
15547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15548  if test "x$has_forbidden_chars" != x; then
15549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15553      # Going to short mode and back again did indeed matter. Since short mode is
15554      # case insensitive, let's make it lowercase to improve readability.
15555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15556      # Now convert it back to Unix-stile (cygpath)
15557      input_path=`$CYGPATH -u "$shortmode_path"`
15558      new_path="$input_path"
15559    fi
15560  fi
15561
15562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15563  if test "x$test_cygdrive_prefix" = x; then
15564    # As a simple fix, exclude /usr/bin since it's not a real path.
15565    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15567      # a path prefixed by /cygdrive for fixpath to work.
15568      new_path="$CYGWIN_ROOT_PATH$input_path"
15569    fi
15570  fi
15571
15572  # remove trailing .exe if any
15573  new_path="${new_path/%.exe/}"
15574
15575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15576
15577  # First separate the path from the arguments. This will split at the first
15578  # space.
15579  complete="$FOUND_MAKE"
15580  path="${complete%% *}"
15581  tmp="$complete EOL"
15582  arguments="${tmp#* }"
15583
15584  # Input might be given as Windows format, start by converting to
15585  # unix format.
15586  new_path="$path"
15587
15588  windows_path="$new_path"
15589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15590    unix_path=`$CYGPATH -u "$windows_path"`
15591    new_path="$unix_path"
15592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15594    new_path="$unix_path"
15595  fi
15596
15597
15598  # Now try to locate executable using which
15599  new_path=`$WHICH "$new_path" 2> /dev/null`
15600
15601  if test "x$new_path" = x; then
15602    # Oops. Which didn't find the executable.
15603    # The splitting of arguments from the executable at a space might have been incorrect,
15604    # since paths with space are more likely in Windows. Give it another try with the whole
15605    # argument.
15606    path="$complete"
15607    arguments="EOL"
15608    new_path="$path"
15609
15610  windows_path="$new_path"
15611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15612    unix_path=`$CYGPATH -u "$windows_path"`
15613    new_path="$unix_path"
15614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15616    new_path="$unix_path"
15617  fi
15618
15619
15620    new_path=`$WHICH "$new_path" 2> /dev/null`
15621    # bat and cmd files are not always considered executable in MSYS causing which
15622    # to not find them
15623    if test "x$new_path" = x \
15624        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15625        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15626      new_path="$path"
15627
15628  windows_path="$new_path"
15629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15630    unix_path=`$CYGPATH -u "$windows_path"`
15631    new_path="$unix_path"
15632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15634    new_path="$unix_path"
15635  fi
15636
15637    fi
15638
15639    if test "x$new_path" = x; then
15640      # It's still not found. Now this is an unrecoverable error.
15641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15642$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15643      has_space=`$ECHO "$complete" | $GREP " "`
15644      if test "x$has_space" != x; then
15645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15647      fi
15648      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15649    fi
15650  fi
15651
15652  # Now new_path has a complete unix path to the binary
15653  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15654    # Keep paths in /bin as-is, but remove trailing .exe if any
15655    new_path="${new_path/%.exe/}"
15656    # Do not save /bin paths to all_fixpath_prefixes!
15657  else
15658    # Not in mixed or Windows style, start by that.
15659    new_path=`cmd //c echo $new_path`
15660
15661  input_path="$new_path"
15662  # Check if we need to convert this using DOS-style short mode. If the path
15663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15664  # take no chances and rewrite it.
15665  # Note: m4 eats our [], so we need to use [ and ] instead.
15666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15667  if test "x$has_forbidden_chars" != x; then
15668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15670  fi
15671
15672    # Output is in $new_path
15673
15674  windows_path="$new_path"
15675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15676    unix_path=`$CYGPATH -u "$windows_path"`
15677    new_path="$unix_path"
15678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15680    new_path="$unix_path"
15681  fi
15682
15683    # remove trailing .exe if any
15684    new_path="${new_path/%.exe/}"
15685
15686    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15687    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15688  fi
15689
15690  else
15691    # We're on a unix platform. Hooray! :)
15692    # First separate the path from the arguments. This will split at the first
15693    # space.
15694    complete="$FOUND_MAKE"
15695    path="${complete%% *}"
15696    tmp="$complete EOL"
15697    arguments="${tmp#* }"
15698
15699    # Cannot rely on the command "which" here since it doesn't always work.
15700    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15701    if test -z "$is_absolute_path"; then
15702      # Path to executable is not absolute. Find it.
15703      IFS_save="$IFS"
15704      IFS=:
15705      for p in $PATH; do
15706        if test -f "$p/$path" && test -x "$p/$path"; then
15707          new_path="$p/$path"
15708          break
15709        fi
15710      done
15711      IFS="$IFS_save"
15712    else
15713      # This is an absolute path, we can use it without further modifications.
15714      new_path="$path"
15715    fi
15716
15717    if test "x$new_path" = x; then
15718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15719$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15720      has_space=`$ECHO "$complete" | $GREP " "`
15721      if test "x$has_space" != x; then
15722        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15723$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15724      fi
15725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15726    fi
15727  fi
15728
15729  # Now join together the path and the arguments once again
15730  if test "x$arguments" != xEOL; then
15731    new_complete="$new_path ${arguments% *}"
15732  else
15733    new_complete="$new_path"
15734  fi
15735
15736  if test "x$complete" != "x$new_complete"; then
15737    FOUND_MAKE="$new_complete"
15738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15739$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15740  fi
15741
15742        fi
15743      fi
15744    fi
15745  fi
15746
15747    if test "x$FOUND_MAKE" = x; then
15748      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15749    fi
15750  else
15751    # Try our hardest to locate a correct version of GNU make
15752    for ac_prog in gmake
15753do
15754  # Extract the first word of "$ac_prog", so it can be a program name with args.
15755set dummy $ac_prog; ac_word=$2
15756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15757$as_echo_n "checking for $ac_word... " >&6; }
15758if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15759  $as_echo_n "(cached) " >&6
15760else
15761  case $CHECK_GMAKE in
15762  [\\/]* | ?:[\\/]*)
15763  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15764  ;;
15765  *)
15766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15767for as_dir in $PATH
15768do
15769  IFS=$as_save_IFS
15770  test -z "$as_dir" && as_dir=.
15771    for ac_exec_ext in '' $ac_executable_extensions; do
15772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15773    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15775    break 2
15776  fi
15777done
15778  done
15779IFS=$as_save_IFS
15780
15781  ;;
15782esac
15783fi
15784CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15785if test -n "$CHECK_GMAKE"; then
15786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15787$as_echo "$CHECK_GMAKE" >&6; }
15788else
15789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15790$as_echo "no" >&6; }
15791fi
15792
15793
15794  test -n "$CHECK_GMAKE" && break
15795done
15796
15797
15798  MAKE_CANDIDATE=""$CHECK_GMAKE""
15799  DESCRIPTION="gmake in PATH"
15800  if test "x$MAKE_CANDIDATE" != x; then
15801    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15802$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15803    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15804    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15805    if test "x$IS_GNU_MAKE" = x; then
15806      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15807$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15808    else
15809      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15810      if test "x$IS_MODERN_MAKE" = x; then
15811        { $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
15812$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;}
15813      else
15814        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15815          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15816            MAKE_EXPECTED_ENV='cygwin'
15817          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15818            MAKE_EXPECTED_ENV='msys'
15819          else
15820            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15821          fi
15822          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15823          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15824        else
15825          # Not relevant for non-Windows
15826          IS_MAKE_CORRECT_ENV=true
15827        fi
15828        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15829          { $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
15830$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;}
15831        else
15832          FOUND_MAKE=$MAKE_CANDIDATE
15833
15834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15835
15836  # First separate the path from the arguments. This will split at the first
15837  # space.
15838  complete="$FOUND_MAKE"
15839  path="${complete%% *}"
15840  tmp="$complete EOL"
15841  arguments="${tmp#* }"
15842
15843  # Input might be given as Windows format, start by converting to
15844  # unix format.
15845  new_path=`$CYGPATH -u "$path"`
15846
15847  # Now try to locate executable using which
15848  new_path=`$WHICH "$new_path" 2> /dev/null`
15849  # bat and cmd files are not always considered executable in cygwin causing which
15850  # to not find them
15851  if test "x$new_path" = x \
15852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15854    new_path=`$CYGPATH -u "$path"`
15855  fi
15856  if test "x$new_path" = x; then
15857    # Oops. Which didn't find the executable.
15858    # The splitting of arguments from the executable at a space might have been incorrect,
15859    # since paths with space are more likely in Windows. Give it another try with the whole
15860    # argument.
15861    path="$complete"
15862    arguments="EOL"
15863    new_path=`$CYGPATH -u "$path"`
15864    new_path=`$WHICH "$new_path" 2> /dev/null`
15865    # bat and cmd files are not always considered executable in cygwin causing which
15866    # to not find them
15867    if test "x$new_path" = x \
15868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15870      new_path=`$CYGPATH -u "$path"`
15871    fi
15872    if test "x$new_path" = x; then
15873      # It's still not found. Now this is an unrecoverable error.
15874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15875$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15876      has_space=`$ECHO "$complete" | $GREP " "`
15877      if test "x$has_space" != x; then
15878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15880      fi
15881      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15882    fi
15883  fi
15884
15885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15888  # "foo.exe" is OK but "foo" is an error.
15889  #
15890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15891  # It is also a way to make sure we got the proper file name for the real test later on.
15892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15893  if test "x$test_shortpath" = x; then
15894    # Short path failed, file does not exist as specified.
15895    # Try adding .exe or .cmd
15896    if test -f "${new_path}.exe"; then
15897      input_to_shortpath="${new_path}.exe"
15898    elif test -f "${new_path}.cmd"; then
15899      input_to_shortpath="${new_path}.cmd"
15900    else
15901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15902$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15905      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15906    fi
15907  else
15908    input_to_shortpath="$new_path"
15909  fi
15910
15911  # Call helper function which possibly converts this using DOS-style short mode.
15912  # If so, the updated path is stored in $new_path.
15913  new_path="$input_to_shortpath"
15914
15915  input_path="$input_to_shortpath"
15916  # Check if we need to convert this using DOS-style short mode. If the path
15917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15918  # take no chances and rewrite it.
15919  # Note: m4 eats our [], so we need to use [ and ] instead.
15920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15921  if test "x$has_forbidden_chars" != x; then
15922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15926      # Going to short mode and back again did indeed matter. Since short mode is
15927      # case insensitive, let's make it lowercase to improve readability.
15928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15929      # Now convert it back to Unix-stile (cygpath)
15930      input_path=`$CYGPATH -u "$shortmode_path"`
15931      new_path="$input_path"
15932    fi
15933  fi
15934
15935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15936  if test "x$test_cygdrive_prefix" = x; then
15937    # As a simple fix, exclude /usr/bin since it's not a real path.
15938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15940      # a path prefixed by /cygdrive for fixpath to work.
15941      new_path="$CYGWIN_ROOT_PATH$input_path"
15942    fi
15943  fi
15944
15945  # remove trailing .exe if any
15946  new_path="${new_path/%.exe/}"
15947
15948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15949
15950  # First separate the path from the arguments. This will split at the first
15951  # space.
15952  complete="$FOUND_MAKE"
15953  path="${complete%% *}"
15954  tmp="$complete EOL"
15955  arguments="${tmp#* }"
15956
15957  # Input might be given as Windows format, start by converting to
15958  # unix format.
15959  new_path="$path"
15960
15961  windows_path="$new_path"
15962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15963    unix_path=`$CYGPATH -u "$windows_path"`
15964    new_path="$unix_path"
15965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15967    new_path="$unix_path"
15968  fi
15969
15970
15971  # Now try to locate executable using which
15972  new_path=`$WHICH "$new_path" 2> /dev/null`
15973
15974  if test "x$new_path" = x; then
15975    # Oops. Which didn't find the executable.
15976    # The splitting of arguments from the executable at a space might have been incorrect,
15977    # since paths with space are more likely in Windows. Give it another try with the whole
15978    # argument.
15979    path="$complete"
15980    arguments="EOL"
15981    new_path="$path"
15982
15983  windows_path="$new_path"
15984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15985    unix_path=`$CYGPATH -u "$windows_path"`
15986    new_path="$unix_path"
15987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15989    new_path="$unix_path"
15990  fi
15991
15992
15993    new_path=`$WHICH "$new_path" 2> /dev/null`
15994    # bat and cmd files are not always considered executable in MSYS causing which
15995    # to not find them
15996    if test "x$new_path" = x \
15997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15999      new_path="$path"
16000
16001  windows_path="$new_path"
16002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16003    unix_path=`$CYGPATH -u "$windows_path"`
16004    new_path="$unix_path"
16005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16007    new_path="$unix_path"
16008  fi
16009
16010    fi
16011
16012    if test "x$new_path" = x; then
16013      # It's still not found. Now this is an unrecoverable error.
16014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16015$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16016      has_space=`$ECHO "$complete" | $GREP " "`
16017      if test "x$has_space" != x; then
16018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16020      fi
16021      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16022    fi
16023  fi
16024
16025  # Now new_path has a complete unix path to the binary
16026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16027    # Keep paths in /bin as-is, but remove trailing .exe if any
16028    new_path="${new_path/%.exe/}"
16029    # Do not save /bin paths to all_fixpath_prefixes!
16030  else
16031    # Not in mixed or Windows style, start by that.
16032    new_path=`cmd //c echo $new_path`
16033
16034  input_path="$new_path"
16035  # Check if we need to convert this using DOS-style short mode. If the path
16036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16037  # take no chances and rewrite it.
16038  # Note: m4 eats our [], so we need to use [ and ] instead.
16039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16040  if test "x$has_forbidden_chars" != x; then
16041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16043  fi
16044
16045    # Output is in $new_path
16046
16047  windows_path="$new_path"
16048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16049    unix_path=`$CYGPATH -u "$windows_path"`
16050    new_path="$unix_path"
16051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16053    new_path="$unix_path"
16054  fi
16055
16056    # remove trailing .exe if any
16057    new_path="${new_path/%.exe/}"
16058
16059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16061  fi
16062
16063  else
16064    # We're on a unix platform. Hooray! :)
16065    # First separate the path from the arguments. This will split at the first
16066    # space.
16067    complete="$FOUND_MAKE"
16068    path="${complete%% *}"
16069    tmp="$complete EOL"
16070    arguments="${tmp#* }"
16071
16072    # Cannot rely on the command "which" here since it doesn't always work.
16073    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16074    if test -z "$is_absolute_path"; then
16075      # Path to executable is not absolute. Find it.
16076      IFS_save="$IFS"
16077      IFS=:
16078      for p in $PATH; do
16079        if test -f "$p/$path" && test -x "$p/$path"; then
16080          new_path="$p/$path"
16081          break
16082        fi
16083      done
16084      IFS="$IFS_save"
16085    else
16086      # This is an absolute path, we can use it without further modifications.
16087      new_path="$path"
16088    fi
16089
16090    if test "x$new_path" = x; then
16091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16092$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16093      has_space=`$ECHO "$complete" | $GREP " "`
16094      if test "x$has_space" != x; then
16095        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16097      fi
16098      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16099    fi
16100  fi
16101
16102  # Now join together the path and the arguments once again
16103  if test "x$arguments" != xEOL; then
16104    new_complete="$new_path ${arguments% *}"
16105  else
16106    new_complete="$new_path"
16107  fi
16108
16109  if test "x$complete" != "x$new_complete"; then
16110    FOUND_MAKE="$new_complete"
16111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16112$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16113  fi
16114
16115        fi
16116      fi
16117    fi
16118  fi
16119
16120
16121    if test "x$FOUND_MAKE" = x; then
16122      for ac_prog in make
16123do
16124  # Extract the first word of "$ac_prog", so it can be a program name with args.
16125set dummy $ac_prog; ac_word=$2
16126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16127$as_echo_n "checking for $ac_word... " >&6; }
16128if ${ac_cv_path_CHECK_MAKE+:} false; then :
16129  $as_echo_n "(cached) " >&6
16130else
16131  case $CHECK_MAKE in
16132  [\\/]* | ?:[\\/]*)
16133  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16134  ;;
16135  *)
16136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16137for as_dir in $PATH
16138do
16139  IFS=$as_save_IFS
16140  test -z "$as_dir" && as_dir=.
16141    for ac_exec_ext in '' $ac_executable_extensions; do
16142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16143    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16145    break 2
16146  fi
16147done
16148  done
16149IFS=$as_save_IFS
16150
16151  ;;
16152esac
16153fi
16154CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16155if test -n "$CHECK_MAKE"; then
16156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16157$as_echo "$CHECK_MAKE" >&6; }
16158else
16159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16160$as_echo "no" >&6; }
16161fi
16162
16163
16164  test -n "$CHECK_MAKE" && break
16165done
16166
16167
16168  MAKE_CANDIDATE=""$CHECK_MAKE""
16169  DESCRIPTION="make in PATH"
16170  if test "x$MAKE_CANDIDATE" != x; then
16171    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16172$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16173    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16174    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16175    if test "x$IS_GNU_MAKE" = x; then
16176      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16177$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16178    else
16179      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16180      if test "x$IS_MODERN_MAKE" = x; then
16181        { $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
16182$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;}
16183      else
16184        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16185          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16186            MAKE_EXPECTED_ENV='cygwin'
16187          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16188            MAKE_EXPECTED_ENV='msys'
16189          else
16190            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16191          fi
16192          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16193          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16194        else
16195          # Not relevant for non-Windows
16196          IS_MAKE_CORRECT_ENV=true
16197        fi
16198        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16199          { $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
16200$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;}
16201        else
16202          FOUND_MAKE=$MAKE_CANDIDATE
16203
16204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16205
16206  # First separate the path from the arguments. This will split at the first
16207  # space.
16208  complete="$FOUND_MAKE"
16209  path="${complete%% *}"
16210  tmp="$complete EOL"
16211  arguments="${tmp#* }"
16212
16213  # Input might be given as Windows format, start by converting to
16214  # unix format.
16215  new_path=`$CYGPATH -u "$path"`
16216
16217  # Now try to locate executable using which
16218  new_path=`$WHICH "$new_path" 2> /dev/null`
16219  # bat and cmd files are not always considered executable in cygwin causing which
16220  # to not find them
16221  if test "x$new_path" = x \
16222      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16223      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16224    new_path=`$CYGPATH -u "$path"`
16225  fi
16226  if test "x$new_path" = x; then
16227    # Oops. Which didn't find the executable.
16228    # The splitting of arguments from the executable at a space might have been incorrect,
16229    # since paths with space are more likely in Windows. Give it another try with the whole
16230    # argument.
16231    path="$complete"
16232    arguments="EOL"
16233    new_path=`$CYGPATH -u "$path"`
16234    new_path=`$WHICH "$new_path" 2> /dev/null`
16235    # bat and cmd files are not always considered executable in cygwin causing which
16236    # to not find them
16237    if test "x$new_path" = x \
16238        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16239        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16240      new_path=`$CYGPATH -u "$path"`
16241    fi
16242    if test "x$new_path" = x; then
16243      # It's still not found. Now this is an unrecoverable error.
16244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16245$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16246      has_space=`$ECHO "$complete" | $GREP " "`
16247      if test "x$has_space" != x; then
16248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16250      fi
16251      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16252    fi
16253  fi
16254
16255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16258  # "foo.exe" is OK but "foo" is an error.
16259  #
16260  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16261  # It is also a way to make sure we got the proper file name for the real test later on.
16262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16263  if test "x$test_shortpath" = x; then
16264    # Short path failed, file does not exist as specified.
16265    # Try adding .exe or .cmd
16266    if test -f "${new_path}.exe"; then
16267      input_to_shortpath="${new_path}.exe"
16268    elif test -f "${new_path}.cmd"; then
16269      input_to_shortpath="${new_path}.cmd"
16270    else
16271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16272$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16273      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16274$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16275      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16276    fi
16277  else
16278    input_to_shortpath="$new_path"
16279  fi
16280
16281  # Call helper function which possibly converts this using DOS-style short mode.
16282  # If so, the updated path is stored in $new_path.
16283  new_path="$input_to_shortpath"
16284
16285  input_path="$input_to_shortpath"
16286  # Check if we need to convert this using DOS-style short mode. If the path
16287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16288  # take no chances and rewrite it.
16289  # Note: m4 eats our [], so we need to use [ and ] instead.
16290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16291  if test "x$has_forbidden_chars" != x; then
16292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16296      # Going to short mode and back again did indeed matter. Since short mode is
16297      # case insensitive, let's make it lowercase to improve readability.
16298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16299      # Now convert it back to Unix-stile (cygpath)
16300      input_path=`$CYGPATH -u "$shortmode_path"`
16301      new_path="$input_path"
16302    fi
16303  fi
16304
16305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16306  if test "x$test_cygdrive_prefix" = x; then
16307    # As a simple fix, exclude /usr/bin since it's not a real path.
16308    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16310      # a path prefixed by /cygdrive for fixpath to work.
16311      new_path="$CYGWIN_ROOT_PATH$input_path"
16312    fi
16313  fi
16314
16315  # remove trailing .exe if any
16316  new_path="${new_path/%.exe/}"
16317
16318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16319
16320  # First separate the path from the arguments. This will split at the first
16321  # space.
16322  complete="$FOUND_MAKE"
16323  path="${complete%% *}"
16324  tmp="$complete EOL"
16325  arguments="${tmp#* }"
16326
16327  # Input might be given as Windows format, start by converting to
16328  # unix format.
16329  new_path="$path"
16330
16331  windows_path="$new_path"
16332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16333    unix_path=`$CYGPATH -u "$windows_path"`
16334    new_path="$unix_path"
16335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16337    new_path="$unix_path"
16338  fi
16339
16340
16341  # Now try to locate executable using which
16342  new_path=`$WHICH "$new_path" 2> /dev/null`
16343
16344  if test "x$new_path" = x; then
16345    # Oops. Which didn't find the executable.
16346    # The splitting of arguments from the executable at a space might have been incorrect,
16347    # since paths with space are more likely in Windows. Give it another try with the whole
16348    # argument.
16349    path="$complete"
16350    arguments="EOL"
16351    new_path="$path"
16352
16353  windows_path="$new_path"
16354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16355    unix_path=`$CYGPATH -u "$windows_path"`
16356    new_path="$unix_path"
16357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16359    new_path="$unix_path"
16360  fi
16361
16362
16363    new_path=`$WHICH "$new_path" 2> /dev/null`
16364    # bat and cmd files are not always considered executable in MSYS causing which
16365    # to not find them
16366    if test "x$new_path" = x \
16367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16369      new_path="$path"
16370
16371  windows_path="$new_path"
16372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16373    unix_path=`$CYGPATH -u "$windows_path"`
16374    new_path="$unix_path"
16375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16377    new_path="$unix_path"
16378  fi
16379
16380    fi
16381
16382    if test "x$new_path" = x; then
16383      # It's still not found. Now this is an unrecoverable error.
16384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16386      has_space=`$ECHO "$complete" | $GREP " "`
16387      if test "x$has_space" != x; then
16388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16390      fi
16391      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16392    fi
16393  fi
16394
16395  # Now new_path has a complete unix path to the binary
16396  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16397    # Keep paths in /bin as-is, but remove trailing .exe if any
16398    new_path="${new_path/%.exe/}"
16399    # Do not save /bin paths to all_fixpath_prefixes!
16400  else
16401    # Not in mixed or Windows style, start by that.
16402    new_path=`cmd //c echo $new_path`
16403
16404  input_path="$new_path"
16405  # Check if we need to convert this using DOS-style short mode. If the path
16406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16407  # take no chances and rewrite it.
16408  # Note: m4 eats our [], so we need to use [ and ] instead.
16409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16410  if test "x$has_forbidden_chars" != x; then
16411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16413  fi
16414
16415    # Output is in $new_path
16416
16417  windows_path="$new_path"
16418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16419    unix_path=`$CYGPATH -u "$windows_path"`
16420    new_path="$unix_path"
16421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16423    new_path="$unix_path"
16424  fi
16425
16426    # remove trailing .exe if any
16427    new_path="${new_path/%.exe/}"
16428
16429    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16430    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16431  fi
16432
16433  else
16434    # We're on a unix platform. Hooray! :)
16435    # First separate the path from the arguments. This will split at the first
16436    # space.
16437    complete="$FOUND_MAKE"
16438    path="${complete%% *}"
16439    tmp="$complete EOL"
16440    arguments="${tmp#* }"
16441
16442    # Cannot rely on the command "which" here since it doesn't always work.
16443    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16444    if test -z "$is_absolute_path"; then
16445      # Path to executable is not absolute. Find it.
16446      IFS_save="$IFS"
16447      IFS=:
16448      for p in $PATH; do
16449        if test -f "$p/$path" && test -x "$p/$path"; then
16450          new_path="$p/$path"
16451          break
16452        fi
16453      done
16454      IFS="$IFS_save"
16455    else
16456      # This is an absolute path, we can use it without further modifications.
16457      new_path="$path"
16458    fi
16459
16460    if test "x$new_path" = x; then
16461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16462$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16463      has_space=`$ECHO "$complete" | $GREP " "`
16464      if test "x$has_space" != x; then
16465        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16466$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16467      fi
16468      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16469    fi
16470  fi
16471
16472  # Now join together the path and the arguments once again
16473  if test "x$arguments" != xEOL; then
16474    new_complete="$new_path ${arguments% *}"
16475  else
16476    new_complete="$new_path"
16477  fi
16478
16479  if test "x$complete" != "x$new_complete"; then
16480    FOUND_MAKE="$new_complete"
16481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16482$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16483  fi
16484
16485        fi
16486      fi
16487    fi
16488  fi
16489
16490    fi
16491
16492    if test "x$FOUND_MAKE" = x; then
16493      if test "x$TOOLCHAIN_PATH" != x; then
16494        # We have a toolchain path, check that as well before giving up.
16495        OLD_PATH=$PATH
16496        PATH=$TOOLCHAIN_PATH:$PATH
16497        for ac_prog in gmake
16498do
16499  # Extract the first word of "$ac_prog", so it can be a program name with args.
16500set dummy $ac_prog; ac_word=$2
16501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16502$as_echo_n "checking for $ac_word... " >&6; }
16503if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16504  $as_echo_n "(cached) " >&6
16505else
16506  case $CHECK_TOOLSDIR_GMAKE in
16507  [\\/]* | ?:[\\/]*)
16508  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16509  ;;
16510  *)
16511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16512for as_dir in $PATH
16513do
16514  IFS=$as_save_IFS
16515  test -z "$as_dir" && as_dir=.
16516    for ac_exec_ext in '' $ac_executable_extensions; do
16517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16518    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16520    break 2
16521  fi
16522done
16523  done
16524IFS=$as_save_IFS
16525
16526  ;;
16527esac
16528fi
16529CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16530if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16532$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16533else
16534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16535$as_echo "no" >&6; }
16536fi
16537
16538
16539  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16540done
16541
16542
16543  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16544  DESCRIPTION="gmake in tools-dir"
16545  if test "x$MAKE_CANDIDATE" != x; then
16546    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16547$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16548    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16549    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16550    if test "x$IS_GNU_MAKE" = x; then
16551      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16552$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16553    else
16554      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16555      if test "x$IS_MODERN_MAKE" = x; then
16556        { $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
16557$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;}
16558      else
16559        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16560          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16561            MAKE_EXPECTED_ENV='cygwin'
16562          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16563            MAKE_EXPECTED_ENV='msys'
16564          else
16565            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16566          fi
16567          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16568          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16569        else
16570          # Not relevant for non-Windows
16571          IS_MAKE_CORRECT_ENV=true
16572        fi
16573        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16574          { $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
16575$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;}
16576        else
16577          FOUND_MAKE=$MAKE_CANDIDATE
16578
16579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16580
16581  # First separate the path from the arguments. This will split at the first
16582  # space.
16583  complete="$FOUND_MAKE"
16584  path="${complete%% *}"
16585  tmp="$complete EOL"
16586  arguments="${tmp#* }"
16587
16588  # Input might be given as Windows format, start by converting to
16589  # unix format.
16590  new_path=`$CYGPATH -u "$path"`
16591
16592  # Now try to locate executable using which
16593  new_path=`$WHICH "$new_path" 2> /dev/null`
16594  # bat and cmd files are not always considered executable in cygwin causing which
16595  # to not find them
16596  if test "x$new_path" = x \
16597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16599    new_path=`$CYGPATH -u "$path"`
16600  fi
16601  if test "x$new_path" = x; then
16602    # Oops. Which didn't find the executable.
16603    # The splitting of arguments from the executable at a space might have been incorrect,
16604    # since paths with space are more likely in Windows. Give it another try with the whole
16605    # argument.
16606    path="$complete"
16607    arguments="EOL"
16608    new_path=`$CYGPATH -u "$path"`
16609    new_path=`$WHICH "$new_path" 2> /dev/null`
16610    # bat and cmd files are not always considered executable in cygwin causing which
16611    # to not find them
16612    if test "x$new_path" = x \
16613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16615      new_path=`$CYGPATH -u "$path"`
16616    fi
16617    if test "x$new_path" = x; then
16618      # It's still not found. Now this is an unrecoverable error.
16619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16621      has_space=`$ECHO "$complete" | $GREP " "`
16622      if test "x$has_space" != x; then
16623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16625      fi
16626      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16627    fi
16628  fi
16629
16630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16633  # "foo.exe" is OK but "foo" is an error.
16634  #
16635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16636  # It is also a way to make sure we got the proper file name for the real test later on.
16637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16638  if test "x$test_shortpath" = x; then
16639    # Short path failed, file does not exist as specified.
16640    # Try adding .exe or .cmd
16641    if test -f "${new_path}.exe"; then
16642      input_to_shortpath="${new_path}.exe"
16643    elif test -f "${new_path}.cmd"; then
16644      input_to_shortpath="${new_path}.cmd"
16645    else
16646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16650      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16651    fi
16652  else
16653    input_to_shortpath="$new_path"
16654  fi
16655
16656  # Call helper function which possibly converts this using DOS-style short mode.
16657  # If so, the updated path is stored in $new_path.
16658  new_path="$input_to_shortpath"
16659
16660  input_path="$input_to_shortpath"
16661  # Check if we need to convert this using DOS-style short mode. If the path
16662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16663  # take no chances and rewrite it.
16664  # Note: m4 eats our [], so we need to use [ and ] instead.
16665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16666  if test "x$has_forbidden_chars" != x; then
16667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16671      # Going to short mode and back again did indeed matter. Since short mode is
16672      # case insensitive, let's make it lowercase to improve readability.
16673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16674      # Now convert it back to Unix-stile (cygpath)
16675      input_path=`$CYGPATH -u "$shortmode_path"`
16676      new_path="$input_path"
16677    fi
16678  fi
16679
16680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16681  if test "x$test_cygdrive_prefix" = x; then
16682    # As a simple fix, exclude /usr/bin since it's not a real path.
16683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16685      # a path prefixed by /cygdrive for fixpath to work.
16686      new_path="$CYGWIN_ROOT_PATH$input_path"
16687    fi
16688  fi
16689
16690  # remove trailing .exe if any
16691  new_path="${new_path/%.exe/}"
16692
16693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16694
16695  # First separate the path from the arguments. This will split at the first
16696  # space.
16697  complete="$FOUND_MAKE"
16698  path="${complete%% *}"
16699  tmp="$complete EOL"
16700  arguments="${tmp#* }"
16701
16702  # Input might be given as Windows format, start by converting to
16703  # unix format.
16704  new_path="$path"
16705
16706  windows_path="$new_path"
16707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16708    unix_path=`$CYGPATH -u "$windows_path"`
16709    new_path="$unix_path"
16710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16712    new_path="$unix_path"
16713  fi
16714
16715
16716  # Now try to locate executable using which
16717  new_path=`$WHICH "$new_path" 2> /dev/null`
16718
16719  if test "x$new_path" = x; then
16720    # Oops. Which didn't find the executable.
16721    # The splitting of arguments from the executable at a space might have been incorrect,
16722    # since paths with space are more likely in Windows. Give it another try with the whole
16723    # argument.
16724    path="$complete"
16725    arguments="EOL"
16726    new_path="$path"
16727
16728  windows_path="$new_path"
16729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16730    unix_path=`$CYGPATH -u "$windows_path"`
16731    new_path="$unix_path"
16732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16734    new_path="$unix_path"
16735  fi
16736
16737
16738    new_path=`$WHICH "$new_path" 2> /dev/null`
16739    # bat and cmd files are not always considered executable in MSYS causing which
16740    # to not find them
16741    if test "x$new_path" = x \
16742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16744      new_path="$path"
16745
16746  windows_path="$new_path"
16747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16748    unix_path=`$CYGPATH -u "$windows_path"`
16749    new_path="$unix_path"
16750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16752    new_path="$unix_path"
16753  fi
16754
16755    fi
16756
16757    if test "x$new_path" = x; then
16758      # It's still not found. Now this is an unrecoverable error.
16759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16760$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16761      has_space=`$ECHO "$complete" | $GREP " "`
16762      if test "x$has_space" != x; then
16763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16765      fi
16766      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16767    fi
16768  fi
16769
16770  # Now new_path has a complete unix path to the binary
16771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16772    # Keep paths in /bin as-is, but remove trailing .exe if any
16773    new_path="${new_path/%.exe/}"
16774    # Do not save /bin paths to all_fixpath_prefixes!
16775  else
16776    # Not in mixed or Windows style, start by that.
16777    new_path=`cmd //c echo $new_path`
16778
16779  input_path="$new_path"
16780  # Check if we need to convert this using DOS-style short mode. If the path
16781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16782  # take no chances and rewrite it.
16783  # Note: m4 eats our [], so we need to use [ and ] instead.
16784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16785  if test "x$has_forbidden_chars" != x; then
16786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16788  fi
16789
16790    # Output is in $new_path
16791
16792  windows_path="$new_path"
16793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16794    unix_path=`$CYGPATH -u "$windows_path"`
16795    new_path="$unix_path"
16796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16798    new_path="$unix_path"
16799  fi
16800
16801    # remove trailing .exe if any
16802    new_path="${new_path/%.exe/}"
16803
16804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16806  fi
16807
16808  else
16809    # We're on a unix platform. Hooray! :)
16810    # First separate the path from the arguments. This will split at the first
16811    # space.
16812    complete="$FOUND_MAKE"
16813    path="${complete%% *}"
16814    tmp="$complete EOL"
16815    arguments="${tmp#* }"
16816
16817    # Cannot rely on the command "which" here since it doesn't always work.
16818    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16819    if test -z "$is_absolute_path"; then
16820      # Path to executable is not absolute. Find it.
16821      IFS_save="$IFS"
16822      IFS=:
16823      for p in $PATH; do
16824        if test -f "$p/$path" && test -x "$p/$path"; then
16825          new_path="$p/$path"
16826          break
16827        fi
16828      done
16829      IFS="$IFS_save"
16830    else
16831      # This is an absolute path, we can use it without further modifications.
16832      new_path="$path"
16833    fi
16834
16835    if test "x$new_path" = x; then
16836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16837$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16838      has_space=`$ECHO "$complete" | $GREP " "`
16839      if test "x$has_space" != x; then
16840        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16842      fi
16843      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16844    fi
16845  fi
16846
16847  # Now join together the path and the arguments once again
16848  if test "x$arguments" != xEOL; then
16849    new_complete="$new_path ${arguments% *}"
16850  else
16851    new_complete="$new_path"
16852  fi
16853
16854  if test "x$complete" != "x$new_complete"; then
16855    FOUND_MAKE="$new_complete"
16856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16857$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16858  fi
16859
16860        fi
16861      fi
16862    fi
16863  fi
16864
16865        if test "x$FOUND_MAKE" = x; then
16866          for ac_prog in make
16867do
16868  # Extract the first word of "$ac_prog", so it can be a program name with args.
16869set dummy $ac_prog; ac_word=$2
16870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16871$as_echo_n "checking for $ac_word... " >&6; }
16872if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16873  $as_echo_n "(cached) " >&6
16874else
16875  case $CHECK_TOOLSDIR_MAKE in
16876  [\\/]* | ?:[\\/]*)
16877  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16878  ;;
16879  *)
16880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16881for as_dir in $PATH
16882do
16883  IFS=$as_save_IFS
16884  test -z "$as_dir" && as_dir=.
16885    for ac_exec_ext in '' $ac_executable_extensions; do
16886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16887    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16889    break 2
16890  fi
16891done
16892  done
16893IFS=$as_save_IFS
16894
16895  ;;
16896esac
16897fi
16898CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16899if test -n "$CHECK_TOOLSDIR_MAKE"; then
16900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16901$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16902else
16903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16904$as_echo "no" >&6; }
16905fi
16906
16907
16908  test -n "$CHECK_TOOLSDIR_MAKE" && break
16909done
16910
16911
16912  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16913  DESCRIPTION="make in tools-dir"
16914  if test "x$MAKE_CANDIDATE" != x; then
16915    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16916$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16917    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16918    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16919    if test "x$IS_GNU_MAKE" = x; then
16920      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16921$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16922    else
16923      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16924      if test "x$IS_MODERN_MAKE" = x; then
16925        { $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
16926$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;}
16927      else
16928        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16929          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16930            MAKE_EXPECTED_ENV='cygwin'
16931          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16932            MAKE_EXPECTED_ENV='msys'
16933          else
16934            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16935          fi
16936          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16937          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16938        else
16939          # Not relevant for non-Windows
16940          IS_MAKE_CORRECT_ENV=true
16941        fi
16942        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16943          { $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
16944$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;}
16945        else
16946          FOUND_MAKE=$MAKE_CANDIDATE
16947
16948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16949
16950  # First separate the path from the arguments. This will split at the first
16951  # space.
16952  complete="$FOUND_MAKE"
16953  path="${complete%% *}"
16954  tmp="$complete EOL"
16955  arguments="${tmp#* }"
16956
16957  # Input might be given as Windows format, start by converting to
16958  # unix format.
16959  new_path=`$CYGPATH -u "$path"`
16960
16961  # Now try to locate executable using which
16962  new_path=`$WHICH "$new_path" 2> /dev/null`
16963  # bat and cmd files are not always considered executable in cygwin causing which
16964  # to not find them
16965  if test "x$new_path" = x \
16966      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16967      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16968    new_path=`$CYGPATH -u "$path"`
16969  fi
16970  if test "x$new_path" = x; then
16971    # Oops. Which didn't find the executable.
16972    # The splitting of arguments from the executable at a space might have been incorrect,
16973    # since paths with space are more likely in Windows. Give it another try with the whole
16974    # argument.
16975    path="$complete"
16976    arguments="EOL"
16977    new_path=`$CYGPATH -u "$path"`
16978    new_path=`$WHICH "$new_path" 2> /dev/null`
16979    # bat and cmd files are not always considered executable in cygwin causing which
16980    # to not find them
16981    if test "x$new_path" = x \
16982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16984      new_path=`$CYGPATH -u "$path"`
16985    fi
16986    if test "x$new_path" = x; then
16987      # It's still not found. Now this is an unrecoverable error.
16988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16989$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16990      has_space=`$ECHO "$complete" | $GREP " "`
16991      if test "x$has_space" != x; then
16992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16994      fi
16995      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16996    fi
16997  fi
16998
16999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17002  # "foo.exe" is OK but "foo" is an error.
17003  #
17004  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17005  # It is also a way to make sure we got the proper file name for the real test later on.
17006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17007  if test "x$test_shortpath" = x; then
17008    # Short path failed, file does not exist as specified.
17009    # Try adding .exe or .cmd
17010    if test -f "${new_path}.exe"; then
17011      input_to_shortpath="${new_path}.exe"
17012    elif test -f "${new_path}.cmd"; then
17013      input_to_shortpath="${new_path}.cmd"
17014    else
17015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17016$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17017      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17018$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17019      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17020    fi
17021  else
17022    input_to_shortpath="$new_path"
17023  fi
17024
17025  # Call helper function which possibly converts this using DOS-style short mode.
17026  # If so, the updated path is stored in $new_path.
17027  new_path="$input_to_shortpath"
17028
17029  input_path="$input_to_shortpath"
17030  # Check if we need to convert this using DOS-style short mode. If the path
17031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17032  # take no chances and rewrite it.
17033  # Note: m4 eats our [], so we need to use [ and ] instead.
17034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17035  if test "x$has_forbidden_chars" != x; then
17036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17040      # Going to short mode and back again did indeed matter. Since short mode is
17041      # case insensitive, let's make it lowercase to improve readability.
17042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17043      # Now convert it back to Unix-stile (cygpath)
17044      input_path=`$CYGPATH -u "$shortmode_path"`
17045      new_path="$input_path"
17046    fi
17047  fi
17048
17049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17050  if test "x$test_cygdrive_prefix" = x; then
17051    # As a simple fix, exclude /usr/bin since it's not a real path.
17052    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17054      # a path prefixed by /cygdrive for fixpath to work.
17055      new_path="$CYGWIN_ROOT_PATH$input_path"
17056    fi
17057  fi
17058
17059  # remove trailing .exe if any
17060  new_path="${new_path/%.exe/}"
17061
17062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17063
17064  # First separate the path from the arguments. This will split at the first
17065  # space.
17066  complete="$FOUND_MAKE"
17067  path="${complete%% *}"
17068  tmp="$complete EOL"
17069  arguments="${tmp#* }"
17070
17071  # Input might be given as Windows format, start by converting to
17072  # unix format.
17073  new_path="$path"
17074
17075  windows_path="$new_path"
17076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17077    unix_path=`$CYGPATH -u "$windows_path"`
17078    new_path="$unix_path"
17079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17081    new_path="$unix_path"
17082  fi
17083
17084
17085  # Now try to locate executable using which
17086  new_path=`$WHICH "$new_path" 2> /dev/null`
17087
17088  if test "x$new_path" = x; then
17089    # Oops. Which didn't find the executable.
17090    # The splitting of arguments from the executable at a space might have been incorrect,
17091    # since paths with space are more likely in Windows. Give it another try with the whole
17092    # argument.
17093    path="$complete"
17094    arguments="EOL"
17095    new_path="$path"
17096
17097  windows_path="$new_path"
17098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17099    unix_path=`$CYGPATH -u "$windows_path"`
17100    new_path="$unix_path"
17101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17103    new_path="$unix_path"
17104  fi
17105
17106
17107    new_path=`$WHICH "$new_path" 2> /dev/null`
17108    # bat and cmd files are not always considered executable in MSYS causing which
17109    # to not find them
17110    if test "x$new_path" = x \
17111        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17112        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17113      new_path="$path"
17114
17115  windows_path="$new_path"
17116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17117    unix_path=`$CYGPATH -u "$windows_path"`
17118    new_path="$unix_path"
17119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17121    new_path="$unix_path"
17122  fi
17123
17124    fi
17125
17126    if test "x$new_path" = x; then
17127      # It's still not found. Now this is an unrecoverable error.
17128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17129$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17130      has_space=`$ECHO "$complete" | $GREP " "`
17131      if test "x$has_space" != x; then
17132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17134      fi
17135      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17136    fi
17137  fi
17138
17139  # Now new_path has a complete unix path to the binary
17140  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17141    # Keep paths in /bin as-is, but remove trailing .exe if any
17142    new_path="${new_path/%.exe/}"
17143    # Do not save /bin paths to all_fixpath_prefixes!
17144  else
17145    # Not in mixed or Windows style, start by that.
17146    new_path=`cmd //c echo $new_path`
17147
17148  input_path="$new_path"
17149  # Check if we need to convert this using DOS-style short mode. If the path
17150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17151  # take no chances and rewrite it.
17152  # Note: m4 eats our [], so we need to use [ and ] instead.
17153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17154  if test "x$has_forbidden_chars" != x; then
17155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17157  fi
17158
17159    # Output is in $new_path
17160
17161  windows_path="$new_path"
17162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17163    unix_path=`$CYGPATH -u "$windows_path"`
17164    new_path="$unix_path"
17165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17167    new_path="$unix_path"
17168  fi
17169
17170    # remove trailing .exe if any
17171    new_path="${new_path/%.exe/}"
17172
17173    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17174    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17175  fi
17176
17177  else
17178    # We're on a unix platform. Hooray! :)
17179    # First separate the path from the arguments. This will split at the first
17180    # space.
17181    complete="$FOUND_MAKE"
17182    path="${complete%% *}"
17183    tmp="$complete EOL"
17184    arguments="${tmp#* }"
17185
17186    # Cannot rely on the command "which" here since it doesn't always work.
17187    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17188    if test -z "$is_absolute_path"; then
17189      # Path to executable is not absolute. Find it.
17190      IFS_save="$IFS"
17191      IFS=:
17192      for p in $PATH; do
17193        if test -f "$p/$path" && test -x "$p/$path"; then
17194          new_path="$p/$path"
17195          break
17196        fi
17197      done
17198      IFS="$IFS_save"
17199    else
17200      # This is an absolute path, we can use it without further modifications.
17201      new_path="$path"
17202    fi
17203
17204    if test "x$new_path" = x; then
17205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17206$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17207      has_space=`$ECHO "$complete" | $GREP " "`
17208      if test "x$has_space" != x; then
17209        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17210$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17211      fi
17212      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17213    fi
17214  fi
17215
17216  # Now join together the path and the arguments once again
17217  if test "x$arguments" != xEOL; then
17218    new_complete="$new_path ${arguments% *}"
17219  else
17220    new_complete="$new_path"
17221  fi
17222
17223  if test "x$complete" != "x$new_complete"; then
17224    FOUND_MAKE="$new_complete"
17225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17226$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17227  fi
17228
17229        fi
17230      fi
17231    fi
17232  fi
17233
17234        fi
17235        PATH=$OLD_PATH
17236      fi
17237    fi
17238
17239    if test "x$FOUND_MAKE" = x; then
17240      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
17241    fi
17242  fi
17243
17244  MAKE=$FOUND_MAKE
17245
17246  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17247$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17248
17249
17250  # Check if make supports the output sync option and if so, setup using it.
17251  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17252$as_echo_n "checking if make --output-sync is supported... " >&6; }
17253  if $MAKE --version -O > /dev/null 2>&1; then
17254    OUTPUT_SYNC_SUPPORTED=true
17255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17256$as_echo "yes" >&6; }
17257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17258$as_echo_n "checking for output-sync value... " >&6; }
17259
17260# Check whether --with-output-sync was given.
17261if test "${with_output_sync+set}" = set; then :
17262  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17263fi
17264
17265    if test "x$OUTPUT_SYNC" = "x"; then
17266      OUTPUT_SYNC=none
17267    fi
17268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17269$as_echo "$OUTPUT_SYNC" >&6; }
17270    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17271      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17272    fi
17273  else
17274    OUTPUT_SYNC_SUPPORTED=false
17275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17276$as_echo "no" >&6; }
17277  fi
17278
17279
17280
17281
17282
17283
17284  # Test if find supports -delete
17285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17286$as_echo_n "checking if find supports -delete... " >&6; }
17287  FIND_DELETE="-delete"
17288
17289  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17290
17291  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17292
17293  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17294  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17295    # No, it does not.
17296    rm $DELETEDIR/TestIfFindSupportsDelete
17297    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17298      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17299      FIND_DELETE="-print | xargs rm"
17300    else
17301      FIND_DELETE="-exec rm \{\} \+"
17302    fi
17303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17304$as_echo "no" >&6; }
17305  else
17306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17307$as_echo "yes" >&6; }
17308  fi
17309  rmdir $DELETEDIR
17310
17311
17312
17313  # These tools might not be installed by default,
17314  # need hint on how to install them.
17315
17316
17317
17318  # Publish this variable in the help.
17319
17320
17321  if test "x$UNZIP" = x; then
17322    # The variable is not set by user, try to locate tool using the code snippet
17323    for ac_prog in unzip
17324do
17325  # Extract the first word of "$ac_prog", so it can be a program name with args.
17326set dummy $ac_prog; ac_word=$2
17327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17328$as_echo_n "checking for $ac_word... " >&6; }
17329if ${ac_cv_path_UNZIP+:} false; then :
17330  $as_echo_n "(cached) " >&6
17331else
17332  case $UNZIP in
17333  [\\/]* | ?:[\\/]*)
17334  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17335  ;;
17336  *)
17337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17338for as_dir in $PATH
17339do
17340  IFS=$as_save_IFS
17341  test -z "$as_dir" && as_dir=.
17342    for ac_exec_ext in '' $ac_executable_extensions; do
17343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17344    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17346    break 2
17347  fi
17348done
17349  done
17350IFS=$as_save_IFS
17351
17352  ;;
17353esac
17354fi
17355UNZIP=$ac_cv_path_UNZIP
17356if test -n "$UNZIP"; then
17357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17358$as_echo "$UNZIP" >&6; }
17359else
17360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17361$as_echo "no" >&6; }
17362fi
17363
17364
17365  test -n "$UNZIP" && break
17366done
17367
17368  else
17369    # The variable is set, but is it from the command line or the environment?
17370
17371    # Try to remove the string !UNZIP! from our list.
17372    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17373    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17374      # If it failed, the variable was not from the command line. Ignore it,
17375      # but warn the user (except for BASH, which is always set by the calling BASH).
17376      if test "xUNZIP" != xBASH; then
17377        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17378$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17379      fi
17380      # Try to locate tool using the code snippet
17381      for ac_prog in unzip
17382do
17383  # Extract the first word of "$ac_prog", so it can be a program name with args.
17384set dummy $ac_prog; ac_word=$2
17385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17386$as_echo_n "checking for $ac_word... " >&6; }
17387if ${ac_cv_path_UNZIP+:} false; then :
17388  $as_echo_n "(cached) " >&6
17389else
17390  case $UNZIP in
17391  [\\/]* | ?:[\\/]*)
17392  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17393  ;;
17394  *)
17395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17396for as_dir in $PATH
17397do
17398  IFS=$as_save_IFS
17399  test -z "$as_dir" && as_dir=.
17400    for ac_exec_ext in '' $ac_executable_extensions; do
17401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17402    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17404    break 2
17405  fi
17406done
17407  done
17408IFS=$as_save_IFS
17409
17410  ;;
17411esac
17412fi
17413UNZIP=$ac_cv_path_UNZIP
17414if test -n "$UNZIP"; then
17415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17416$as_echo "$UNZIP" >&6; }
17417else
17418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17419$as_echo "no" >&6; }
17420fi
17421
17422
17423  test -n "$UNZIP" && break
17424done
17425
17426    else
17427      # If it succeeded, then it was overridden by the user. We will use it
17428      # for the tool.
17429
17430      # First remove it from the list of overridden variables, so we can test
17431      # for unknown variables in the end.
17432      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17433
17434      # Check if the provided tool contains a complete path.
17435      tool_specified="$UNZIP"
17436      tool_basename="${tool_specified##*/}"
17437      if test "x$tool_basename" = "x$tool_specified"; then
17438        # A command without a complete path is provided, search $PATH.
17439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17440$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17441        # Extract the first word of "$tool_basename", so it can be a program name with args.
17442set dummy $tool_basename; ac_word=$2
17443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17444$as_echo_n "checking for $ac_word... " >&6; }
17445if ${ac_cv_path_UNZIP+:} false; then :
17446  $as_echo_n "(cached) " >&6
17447else
17448  case $UNZIP in
17449  [\\/]* | ?:[\\/]*)
17450  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17451  ;;
17452  *)
17453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17454for as_dir in $PATH
17455do
17456  IFS=$as_save_IFS
17457  test -z "$as_dir" && as_dir=.
17458    for ac_exec_ext in '' $ac_executable_extensions; do
17459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17460    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17462    break 2
17463  fi
17464done
17465  done
17466IFS=$as_save_IFS
17467
17468  ;;
17469esac
17470fi
17471UNZIP=$ac_cv_path_UNZIP
17472if test -n "$UNZIP"; then
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17474$as_echo "$UNZIP" >&6; }
17475else
17476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17477$as_echo "no" >&6; }
17478fi
17479
17480
17481        if test "x$UNZIP" = x; then
17482          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17483        fi
17484      else
17485        # Otherwise we believe it is a complete path. Use it as it is.
17486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17487$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17489$as_echo_n "checking for UNZIP... " >&6; }
17490        if test ! -x "$tool_specified"; then
17491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17492$as_echo "not found" >&6; }
17493          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17494        fi
17495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17496$as_echo "$tool_specified" >&6; }
17497      fi
17498    fi
17499  fi
17500
17501
17502
17503  if test "x$UNZIP" = x; then
17504    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17505  fi
17506
17507
17508
17509
17510
17511  # Publish this variable in the help.
17512
17513
17514  if test "x$ZIP" = x; then
17515    # The variable is not set by user, try to locate tool using the code snippet
17516    for ac_prog in zip
17517do
17518  # Extract the first word of "$ac_prog", so it can be a program name with args.
17519set dummy $ac_prog; ac_word=$2
17520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17521$as_echo_n "checking for $ac_word... " >&6; }
17522if ${ac_cv_path_ZIP+:} false; then :
17523  $as_echo_n "(cached) " >&6
17524else
17525  case $ZIP in
17526  [\\/]* | ?:[\\/]*)
17527  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17528  ;;
17529  *)
17530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17531for as_dir in $PATH
17532do
17533  IFS=$as_save_IFS
17534  test -z "$as_dir" && as_dir=.
17535    for ac_exec_ext in '' $ac_executable_extensions; do
17536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17537    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17539    break 2
17540  fi
17541done
17542  done
17543IFS=$as_save_IFS
17544
17545  ;;
17546esac
17547fi
17548ZIP=$ac_cv_path_ZIP
17549if test -n "$ZIP"; then
17550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17551$as_echo "$ZIP" >&6; }
17552else
17553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17554$as_echo "no" >&6; }
17555fi
17556
17557
17558  test -n "$ZIP" && break
17559done
17560
17561  else
17562    # The variable is set, but is it from the command line or the environment?
17563
17564    # Try to remove the string !ZIP! from our list.
17565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17567      # If it failed, the variable was not from the command line. Ignore it,
17568      # but warn the user (except for BASH, which is always set by the calling BASH).
17569      if test "xZIP" != xBASH; then
17570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17571$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17572      fi
17573      # Try to locate tool using the code snippet
17574      for ac_prog in zip
17575do
17576  # Extract the first word of "$ac_prog", so it can be a program name with args.
17577set dummy $ac_prog; ac_word=$2
17578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17579$as_echo_n "checking for $ac_word... " >&6; }
17580if ${ac_cv_path_ZIP+:} false; then :
17581  $as_echo_n "(cached) " >&6
17582else
17583  case $ZIP in
17584  [\\/]* | ?:[\\/]*)
17585  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17586  ;;
17587  *)
17588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17589for as_dir in $PATH
17590do
17591  IFS=$as_save_IFS
17592  test -z "$as_dir" && as_dir=.
17593    for ac_exec_ext in '' $ac_executable_extensions; do
17594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17595    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17597    break 2
17598  fi
17599done
17600  done
17601IFS=$as_save_IFS
17602
17603  ;;
17604esac
17605fi
17606ZIP=$ac_cv_path_ZIP
17607if test -n "$ZIP"; then
17608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17609$as_echo "$ZIP" >&6; }
17610else
17611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17612$as_echo "no" >&6; }
17613fi
17614
17615
17616  test -n "$ZIP" && break
17617done
17618
17619    else
17620      # If it succeeded, then it was overridden by the user. We will use it
17621      # for the tool.
17622
17623      # First remove it from the list of overridden variables, so we can test
17624      # for unknown variables in the end.
17625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17626
17627      # Check if the provided tool contains a complete path.
17628      tool_specified="$ZIP"
17629      tool_basename="${tool_specified##*/}"
17630      if test "x$tool_basename" = "x$tool_specified"; then
17631        # A command without a complete path is provided, search $PATH.
17632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17633$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17634        # Extract the first word of "$tool_basename", so it can be a program name with args.
17635set dummy $tool_basename; ac_word=$2
17636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17637$as_echo_n "checking for $ac_word... " >&6; }
17638if ${ac_cv_path_ZIP+:} false; then :
17639  $as_echo_n "(cached) " >&6
17640else
17641  case $ZIP in
17642  [\\/]* | ?:[\\/]*)
17643  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17644  ;;
17645  *)
17646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17647for as_dir in $PATH
17648do
17649  IFS=$as_save_IFS
17650  test -z "$as_dir" && as_dir=.
17651    for ac_exec_ext in '' $ac_executable_extensions; do
17652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17653    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17655    break 2
17656  fi
17657done
17658  done
17659IFS=$as_save_IFS
17660
17661  ;;
17662esac
17663fi
17664ZIP=$ac_cv_path_ZIP
17665if test -n "$ZIP"; then
17666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17667$as_echo "$ZIP" >&6; }
17668else
17669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17670$as_echo "no" >&6; }
17671fi
17672
17673
17674        if test "x$ZIP" = x; then
17675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17676        fi
17677      else
17678        # Otherwise we believe it is a complete path. Use it as it is.
17679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17680$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17682$as_echo_n "checking for ZIP... " >&6; }
17683        if test ! -x "$tool_specified"; then
17684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17685$as_echo "not found" >&6; }
17686          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17687        fi
17688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17689$as_echo "$tool_specified" >&6; }
17690      fi
17691    fi
17692  fi
17693
17694
17695
17696  if test "x$ZIP" = x; then
17697    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17698  fi
17699
17700
17701
17702  # Non-required basic tools
17703
17704
17705
17706  # Publish this variable in the help.
17707
17708
17709  if test "x$LDD" = x; then
17710    # The variable is not set by user, try to locate tool using the code snippet
17711    for ac_prog in ldd
17712do
17713  # Extract the first word of "$ac_prog", so it can be a program name with args.
17714set dummy $ac_prog; ac_word=$2
17715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17716$as_echo_n "checking for $ac_word... " >&6; }
17717if ${ac_cv_path_LDD+:} false; then :
17718  $as_echo_n "(cached) " >&6
17719else
17720  case $LDD in
17721  [\\/]* | ?:[\\/]*)
17722  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17723  ;;
17724  *)
17725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17726for as_dir in $PATH
17727do
17728  IFS=$as_save_IFS
17729  test -z "$as_dir" && as_dir=.
17730    for ac_exec_ext in '' $ac_executable_extensions; do
17731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17732    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17734    break 2
17735  fi
17736done
17737  done
17738IFS=$as_save_IFS
17739
17740  ;;
17741esac
17742fi
17743LDD=$ac_cv_path_LDD
17744if test -n "$LDD"; then
17745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17746$as_echo "$LDD" >&6; }
17747else
17748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17749$as_echo "no" >&6; }
17750fi
17751
17752
17753  test -n "$LDD" && break
17754done
17755
17756  else
17757    # The variable is set, but is it from the command line or the environment?
17758
17759    # Try to remove the string !LDD! from our list.
17760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17762      # If it failed, the variable was not from the command line. Ignore it,
17763      # but warn the user (except for BASH, which is always set by the calling BASH).
17764      if test "xLDD" != xBASH; then
17765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17766$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17767      fi
17768      # Try to locate tool using the code snippet
17769      for ac_prog in ldd
17770do
17771  # Extract the first word of "$ac_prog", so it can be a program name with args.
17772set dummy $ac_prog; ac_word=$2
17773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17774$as_echo_n "checking for $ac_word... " >&6; }
17775if ${ac_cv_path_LDD+:} false; then :
17776  $as_echo_n "(cached) " >&6
17777else
17778  case $LDD in
17779  [\\/]* | ?:[\\/]*)
17780  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17781  ;;
17782  *)
17783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17784for as_dir in $PATH
17785do
17786  IFS=$as_save_IFS
17787  test -z "$as_dir" && as_dir=.
17788    for ac_exec_ext in '' $ac_executable_extensions; do
17789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17790    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17792    break 2
17793  fi
17794done
17795  done
17796IFS=$as_save_IFS
17797
17798  ;;
17799esac
17800fi
17801LDD=$ac_cv_path_LDD
17802if test -n "$LDD"; then
17803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17804$as_echo "$LDD" >&6; }
17805else
17806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17807$as_echo "no" >&6; }
17808fi
17809
17810
17811  test -n "$LDD" && break
17812done
17813
17814    else
17815      # If it succeeded, then it was overridden by the user. We will use it
17816      # for the tool.
17817
17818      # First remove it from the list of overridden variables, so we can test
17819      # for unknown variables in the end.
17820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17821
17822      # Check if the provided tool contains a complete path.
17823      tool_specified="$LDD"
17824      tool_basename="${tool_specified##*/}"
17825      if test "x$tool_basename" = "x$tool_specified"; then
17826        # A command without a complete path is provided, search $PATH.
17827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17828$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17829        # Extract the first word of "$tool_basename", so it can be a program name with args.
17830set dummy $tool_basename; ac_word=$2
17831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17832$as_echo_n "checking for $ac_word... " >&6; }
17833if ${ac_cv_path_LDD+:} false; then :
17834  $as_echo_n "(cached) " >&6
17835else
17836  case $LDD in
17837  [\\/]* | ?:[\\/]*)
17838  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17839  ;;
17840  *)
17841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17842for as_dir in $PATH
17843do
17844  IFS=$as_save_IFS
17845  test -z "$as_dir" && as_dir=.
17846    for ac_exec_ext in '' $ac_executable_extensions; do
17847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17848    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17850    break 2
17851  fi
17852done
17853  done
17854IFS=$as_save_IFS
17855
17856  ;;
17857esac
17858fi
17859LDD=$ac_cv_path_LDD
17860if test -n "$LDD"; then
17861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17862$as_echo "$LDD" >&6; }
17863else
17864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17865$as_echo "no" >&6; }
17866fi
17867
17868
17869        if test "x$LDD" = x; then
17870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17871        fi
17872      else
17873        # Otherwise we believe it is a complete path. Use it as it is.
17874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17875$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17877$as_echo_n "checking for LDD... " >&6; }
17878        if test ! -x "$tool_specified"; then
17879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17880$as_echo "not found" >&6; }
17881          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17882        fi
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17884$as_echo "$tool_specified" >&6; }
17885      fi
17886    fi
17887  fi
17888
17889
17890  if test "x$LDD" = "x"; then
17891    # List shared lib dependencies is used for
17892    # debug output and checking for forbidden dependencies.
17893    # We can build without it.
17894    LDD="true"
17895  fi
17896
17897
17898  # Publish this variable in the help.
17899
17900
17901  if test "x$OTOOL" = x; then
17902    # The variable is not set by user, try to locate tool using the code snippet
17903    for ac_prog in otool
17904do
17905  # Extract the first word of "$ac_prog", so it can be a program name with args.
17906set dummy $ac_prog; ac_word=$2
17907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17908$as_echo_n "checking for $ac_word... " >&6; }
17909if ${ac_cv_path_OTOOL+:} false; then :
17910  $as_echo_n "(cached) " >&6
17911else
17912  case $OTOOL in
17913  [\\/]* | ?:[\\/]*)
17914  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17915  ;;
17916  *)
17917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17918for as_dir in $PATH
17919do
17920  IFS=$as_save_IFS
17921  test -z "$as_dir" && as_dir=.
17922    for ac_exec_ext in '' $ac_executable_extensions; do
17923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17924    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17926    break 2
17927  fi
17928done
17929  done
17930IFS=$as_save_IFS
17931
17932  ;;
17933esac
17934fi
17935OTOOL=$ac_cv_path_OTOOL
17936if test -n "$OTOOL"; then
17937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17938$as_echo "$OTOOL" >&6; }
17939else
17940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17941$as_echo "no" >&6; }
17942fi
17943
17944
17945  test -n "$OTOOL" && break
17946done
17947
17948  else
17949    # The variable is set, but is it from the command line or the environment?
17950
17951    # Try to remove the string !OTOOL! from our list.
17952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17954      # If it failed, the variable was not from the command line. Ignore it,
17955      # but warn the user (except for BASH, which is always set by the calling BASH).
17956      if test "xOTOOL" != xBASH; then
17957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17958$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17959      fi
17960      # Try to locate tool using the code snippet
17961      for ac_prog in otool
17962do
17963  # Extract the first word of "$ac_prog", so it can be a program name with args.
17964set dummy $ac_prog; ac_word=$2
17965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17966$as_echo_n "checking for $ac_word... " >&6; }
17967if ${ac_cv_path_OTOOL+:} false; then :
17968  $as_echo_n "(cached) " >&6
17969else
17970  case $OTOOL in
17971  [\\/]* | ?:[\\/]*)
17972  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17973  ;;
17974  *)
17975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17976for as_dir in $PATH
17977do
17978  IFS=$as_save_IFS
17979  test -z "$as_dir" && as_dir=.
17980    for ac_exec_ext in '' $ac_executable_extensions; do
17981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17982    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17984    break 2
17985  fi
17986done
17987  done
17988IFS=$as_save_IFS
17989
17990  ;;
17991esac
17992fi
17993OTOOL=$ac_cv_path_OTOOL
17994if test -n "$OTOOL"; then
17995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17996$as_echo "$OTOOL" >&6; }
17997else
17998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17999$as_echo "no" >&6; }
18000fi
18001
18002
18003  test -n "$OTOOL" && break
18004done
18005
18006    else
18007      # If it succeeded, then it was overridden by the user. We will use it
18008      # for the tool.
18009
18010      # First remove it from the list of overridden variables, so we can test
18011      # for unknown variables in the end.
18012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18013
18014      # Check if the provided tool contains a complete path.
18015      tool_specified="$OTOOL"
18016      tool_basename="${tool_specified##*/}"
18017      if test "x$tool_basename" = "x$tool_specified"; then
18018        # A command without a complete path is provided, search $PATH.
18019        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18020$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18021        # Extract the first word of "$tool_basename", so it can be a program name with args.
18022set dummy $tool_basename; ac_word=$2
18023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18024$as_echo_n "checking for $ac_word... " >&6; }
18025if ${ac_cv_path_OTOOL+:} false; then :
18026  $as_echo_n "(cached) " >&6
18027else
18028  case $OTOOL in
18029  [\\/]* | ?:[\\/]*)
18030  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18031  ;;
18032  *)
18033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18034for as_dir in $PATH
18035do
18036  IFS=$as_save_IFS
18037  test -z "$as_dir" && as_dir=.
18038    for ac_exec_ext in '' $ac_executable_extensions; do
18039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18040    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18042    break 2
18043  fi
18044done
18045  done
18046IFS=$as_save_IFS
18047
18048  ;;
18049esac
18050fi
18051OTOOL=$ac_cv_path_OTOOL
18052if test -n "$OTOOL"; then
18053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18054$as_echo "$OTOOL" >&6; }
18055else
18056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18057$as_echo "no" >&6; }
18058fi
18059
18060
18061        if test "x$OTOOL" = x; then
18062          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18063        fi
18064      else
18065        # Otherwise we believe it is a complete path. Use it as it is.
18066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18067$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18069$as_echo_n "checking for OTOOL... " >&6; }
18070        if test ! -x "$tool_specified"; then
18071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18072$as_echo "not found" >&6; }
18073          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18074        fi
18075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18076$as_echo "$tool_specified" >&6; }
18077      fi
18078    fi
18079  fi
18080
18081
18082  if test "x$OTOOL" = "x"; then
18083    OTOOL="true"
18084  fi
18085
18086
18087  # Publish this variable in the help.
18088
18089
18090  if test "x$READELF" = x; then
18091    # The variable is not set by user, try to locate tool using the code snippet
18092    for ac_prog in greadelf readelf
18093do
18094  # Extract the first word of "$ac_prog", so it can be a program name with args.
18095set dummy $ac_prog; ac_word=$2
18096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18097$as_echo_n "checking for $ac_word... " >&6; }
18098if ${ac_cv_path_READELF+:} false; then :
18099  $as_echo_n "(cached) " >&6
18100else
18101  case $READELF in
18102  [\\/]* | ?:[\\/]*)
18103  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18104  ;;
18105  *)
18106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18107for as_dir in $PATH
18108do
18109  IFS=$as_save_IFS
18110  test -z "$as_dir" && as_dir=.
18111    for ac_exec_ext in '' $ac_executable_extensions; do
18112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18113    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18115    break 2
18116  fi
18117done
18118  done
18119IFS=$as_save_IFS
18120
18121  ;;
18122esac
18123fi
18124READELF=$ac_cv_path_READELF
18125if test -n "$READELF"; then
18126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18127$as_echo "$READELF" >&6; }
18128else
18129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18130$as_echo "no" >&6; }
18131fi
18132
18133
18134  test -n "$READELF" && break
18135done
18136
18137  else
18138    # The variable is set, but is it from the command line or the environment?
18139
18140    # Try to remove the string !READELF! from our list.
18141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18143      # If it failed, the variable was not from the command line. Ignore it,
18144      # but warn the user (except for BASH, which is always set by the calling BASH).
18145      if test "xREADELF" != xBASH; then
18146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18147$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18148      fi
18149      # Try to locate tool using the code snippet
18150      for ac_prog in greadelf readelf
18151do
18152  # Extract the first word of "$ac_prog", so it can be a program name with args.
18153set dummy $ac_prog; ac_word=$2
18154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18155$as_echo_n "checking for $ac_word... " >&6; }
18156if ${ac_cv_path_READELF+:} false; then :
18157  $as_echo_n "(cached) " >&6
18158else
18159  case $READELF in
18160  [\\/]* | ?:[\\/]*)
18161  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18162  ;;
18163  *)
18164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18165for as_dir in $PATH
18166do
18167  IFS=$as_save_IFS
18168  test -z "$as_dir" && as_dir=.
18169    for ac_exec_ext in '' $ac_executable_extensions; do
18170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18171    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18173    break 2
18174  fi
18175done
18176  done
18177IFS=$as_save_IFS
18178
18179  ;;
18180esac
18181fi
18182READELF=$ac_cv_path_READELF
18183if test -n "$READELF"; then
18184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18185$as_echo "$READELF" >&6; }
18186else
18187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18188$as_echo "no" >&6; }
18189fi
18190
18191
18192  test -n "$READELF" && break
18193done
18194
18195    else
18196      # If it succeeded, then it was overridden by the user. We will use it
18197      # for the tool.
18198
18199      # First remove it from the list of overridden variables, so we can test
18200      # for unknown variables in the end.
18201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18202
18203      # Check if the provided tool contains a complete path.
18204      tool_specified="$READELF"
18205      tool_basename="${tool_specified##*/}"
18206      if test "x$tool_basename" = "x$tool_specified"; then
18207        # A command without a complete path is provided, search $PATH.
18208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18209$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18210        # Extract the first word of "$tool_basename", so it can be a program name with args.
18211set dummy $tool_basename; ac_word=$2
18212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18213$as_echo_n "checking for $ac_word... " >&6; }
18214if ${ac_cv_path_READELF+:} false; then :
18215  $as_echo_n "(cached) " >&6
18216else
18217  case $READELF in
18218  [\\/]* | ?:[\\/]*)
18219  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18220  ;;
18221  *)
18222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18223for as_dir in $PATH
18224do
18225  IFS=$as_save_IFS
18226  test -z "$as_dir" && as_dir=.
18227    for ac_exec_ext in '' $ac_executable_extensions; do
18228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18229    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18231    break 2
18232  fi
18233done
18234  done
18235IFS=$as_save_IFS
18236
18237  ;;
18238esac
18239fi
18240READELF=$ac_cv_path_READELF
18241if test -n "$READELF"; then
18242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18243$as_echo "$READELF" >&6; }
18244else
18245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18246$as_echo "no" >&6; }
18247fi
18248
18249
18250        if test "x$READELF" = x; then
18251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18252        fi
18253      else
18254        # Otherwise we believe it is a complete path. Use it as it is.
18255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18256$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18258$as_echo_n "checking for READELF... " >&6; }
18259        if test ! -x "$tool_specified"; then
18260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18261$as_echo "not found" >&6; }
18262          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18263        fi
18264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18265$as_echo "$tool_specified" >&6; }
18266      fi
18267    fi
18268  fi
18269
18270
18271
18272
18273  # Publish this variable in the help.
18274
18275
18276  if test "x$HG" = x; then
18277    # The variable is not set by user, try to locate tool using the code snippet
18278    for ac_prog in hg
18279do
18280  # Extract the first word of "$ac_prog", so it can be a program name with args.
18281set dummy $ac_prog; ac_word=$2
18282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18283$as_echo_n "checking for $ac_word... " >&6; }
18284if ${ac_cv_path_HG+:} false; then :
18285  $as_echo_n "(cached) " >&6
18286else
18287  case $HG in
18288  [\\/]* | ?:[\\/]*)
18289  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18290  ;;
18291  *)
18292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18293for as_dir in $PATH
18294do
18295  IFS=$as_save_IFS
18296  test -z "$as_dir" && as_dir=.
18297    for ac_exec_ext in '' $ac_executable_extensions; do
18298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18299    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18301    break 2
18302  fi
18303done
18304  done
18305IFS=$as_save_IFS
18306
18307  ;;
18308esac
18309fi
18310HG=$ac_cv_path_HG
18311if test -n "$HG"; then
18312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18313$as_echo "$HG" >&6; }
18314else
18315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18316$as_echo "no" >&6; }
18317fi
18318
18319
18320  test -n "$HG" && break
18321done
18322
18323  else
18324    # The variable is set, but is it from the command line or the environment?
18325
18326    # Try to remove the string !HG! from our list.
18327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18329      # If it failed, the variable was not from the command line. Ignore it,
18330      # but warn the user (except for BASH, which is always set by the calling BASH).
18331      if test "xHG" != xBASH; then
18332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18333$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18334      fi
18335      # Try to locate tool using the code snippet
18336      for ac_prog in hg
18337do
18338  # Extract the first word of "$ac_prog", so it can be a program name with args.
18339set dummy $ac_prog; ac_word=$2
18340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18341$as_echo_n "checking for $ac_word... " >&6; }
18342if ${ac_cv_path_HG+:} false; then :
18343  $as_echo_n "(cached) " >&6
18344else
18345  case $HG in
18346  [\\/]* | ?:[\\/]*)
18347  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18348  ;;
18349  *)
18350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18351for as_dir in $PATH
18352do
18353  IFS=$as_save_IFS
18354  test -z "$as_dir" && as_dir=.
18355    for ac_exec_ext in '' $ac_executable_extensions; do
18356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18357    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18359    break 2
18360  fi
18361done
18362  done
18363IFS=$as_save_IFS
18364
18365  ;;
18366esac
18367fi
18368HG=$ac_cv_path_HG
18369if test -n "$HG"; then
18370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18371$as_echo "$HG" >&6; }
18372else
18373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18374$as_echo "no" >&6; }
18375fi
18376
18377
18378  test -n "$HG" && break
18379done
18380
18381    else
18382      # If it succeeded, then it was overridden by the user. We will use it
18383      # for the tool.
18384
18385      # First remove it from the list of overridden variables, so we can test
18386      # for unknown variables in the end.
18387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18388
18389      # Check if the provided tool contains a complete path.
18390      tool_specified="$HG"
18391      tool_basename="${tool_specified##*/}"
18392      if test "x$tool_basename" = "x$tool_specified"; then
18393        # A command without a complete path is provided, search $PATH.
18394        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18395$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18396        # Extract the first word of "$tool_basename", so it can be a program name with args.
18397set dummy $tool_basename; ac_word=$2
18398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18399$as_echo_n "checking for $ac_word... " >&6; }
18400if ${ac_cv_path_HG+:} false; then :
18401  $as_echo_n "(cached) " >&6
18402else
18403  case $HG in
18404  [\\/]* | ?:[\\/]*)
18405  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18406  ;;
18407  *)
18408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18409for as_dir in $PATH
18410do
18411  IFS=$as_save_IFS
18412  test -z "$as_dir" && as_dir=.
18413    for ac_exec_ext in '' $ac_executable_extensions; do
18414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18415    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18417    break 2
18418  fi
18419done
18420  done
18421IFS=$as_save_IFS
18422
18423  ;;
18424esac
18425fi
18426HG=$ac_cv_path_HG
18427if test -n "$HG"; then
18428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18429$as_echo "$HG" >&6; }
18430else
18431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18432$as_echo "no" >&6; }
18433fi
18434
18435
18436        if test "x$HG" = x; then
18437          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18438        fi
18439      else
18440        # Otherwise we believe it is a complete path. Use it as it is.
18441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18442$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18444$as_echo_n "checking for HG... " >&6; }
18445        if test ! -x "$tool_specified"; then
18446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18447$as_echo "not found" >&6; }
18448          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18449        fi
18450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18451$as_echo "$tool_specified" >&6; }
18452      fi
18453    fi
18454  fi
18455
18456
18457
18458
18459  # Publish this variable in the help.
18460
18461
18462  if test "x$STAT" = x; then
18463    # The variable is not set by user, try to locate tool using the code snippet
18464    for ac_prog in stat
18465do
18466  # Extract the first word of "$ac_prog", so it can be a program name with args.
18467set dummy $ac_prog; ac_word=$2
18468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18469$as_echo_n "checking for $ac_word... " >&6; }
18470if ${ac_cv_path_STAT+:} false; then :
18471  $as_echo_n "(cached) " >&6
18472else
18473  case $STAT in
18474  [\\/]* | ?:[\\/]*)
18475  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18476  ;;
18477  *)
18478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18479for as_dir in $PATH
18480do
18481  IFS=$as_save_IFS
18482  test -z "$as_dir" && as_dir=.
18483    for ac_exec_ext in '' $ac_executable_extensions; do
18484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18485    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18487    break 2
18488  fi
18489done
18490  done
18491IFS=$as_save_IFS
18492
18493  ;;
18494esac
18495fi
18496STAT=$ac_cv_path_STAT
18497if test -n "$STAT"; then
18498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18499$as_echo "$STAT" >&6; }
18500else
18501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18502$as_echo "no" >&6; }
18503fi
18504
18505
18506  test -n "$STAT" && break
18507done
18508
18509  else
18510    # The variable is set, but is it from the command line or the environment?
18511
18512    # Try to remove the string !STAT! from our list.
18513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18515      # If it failed, the variable was not from the command line. Ignore it,
18516      # but warn the user (except for BASH, which is always set by the calling BASH).
18517      if test "xSTAT" != xBASH; then
18518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18519$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18520      fi
18521      # Try to locate tool using the code snippet
18522      for ac_prog in stat
18523do
18524  # Extract the first word of "$ac_prog", so it can be a program name with args.
18525set dummy $ac_prog; ac_word=$2
18526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18527$as_echo_n "checking for $ac_word... " >&6; }
18528if ${ac_cv_path_STAT+:} false; then :
18529  $as_echo_n "(cached) " >&6
18530else
18531  case $STAT in
18532  [\\/]* | ?:[\\/]*)
18533  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18534  ;;
18535  *)
18536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18537for as_dir in $PATH
18538do
18539  IFS=$as_save_IFS
18540  test -z "$as_dir" && as_dir=.
18541    for ac_exec_ext in '' $ac_executable_extensions; do
18542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18543    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18545    break 2
18546  fi
18547done
18548  done
18549IFS=$as_save_IFS
18550
18551  ;;
18552esac
18553fi
18554STAT=$ac_cv_path_STAT
18555if test -n "$STAT"; then
18556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18557$as_echo "$STAT" >&6; }
18558else
18559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18560$as_echo "no" >&6; }
18561fi
18562
18563
18564  test -n "$STAT" && break
18565done
18566
18567    else
18568      # If it succeeded, then it was overridden by the user. We will use it
18569      # for the tool.
18570
18571      # First remove it from the list of overridden variables, so we can test
18572      # for unknown variables in the end.
18573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18574
18575      # Check if the provided tool contains a complete path.
18576      tool_specified="$STAT"
18577      tool_basename="${tool_specified##*/}"
18578      if test "x$tool_basename" = "x$tool_specified"; then
18579        # A command without a complete path is provided, search $PATH.
18580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18581$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18582        # Extract the first word of "$tool_basename", so it can be a program name with args.
18583set dummy $tool_basename; ac_word=$2
18584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18585$as_echo_n "checking for $ac_word... " >&6; }
18586if ${ac_cv_path_STAT+:} false; then :
18587  $as_echo_n "(cached) " >&6
18588else
18589  case $STAT in
18590  [\\/]* | ?:[\\/]*)
18591  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18592  ;;
18593  *)
18594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18595for as_dir in $PATH
18596do
18597  IFS=$as_save_IFS
18598  test -z "$as_dir" && as_dir=.
18599    for ac_exec_ext in '' $ac_executable_extensions; do
18600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18601    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18603    break 2
18604  fi
18605done
18606  done
18607IFS=$as_save_IFS
18608
18609  ;;
18610esac
18611fi
18612STAT=$ac_cv_path_STAT
18613if test -n "$STAT"; then
18614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18615$as_echo "$STAT" >&6; }
18616else
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18618$as_echo "no" >&6; }
18619fi
18620
18621
18622        if test "x$STAT" = x; then
18623          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18624        fi
18625      else
18626        # Otherwise we believe it is a complete path. Use it as it is.
18627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18628$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18630$as_echo_n "checking for STAT... " >&6; }
18631        if test ! -x "$tool_specified"; then
18632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18633$as_echo "not found" >&6; }
18634          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18635        fi
18636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18637$as_echo "$tool_specified" >&6; }
18638      fi
18639    fi
18640  fi
18641
18642
18643
18644
18645  # Publish this variable in the help.
18646
18647
18648  if test "x$TIME" = x; then
18649    # The variable is not set by user, try to locate tool using the code snippet
18650    for ac_prog in time
18651do
18652  # Extract the first word of "$ac_prog", so it can be a program name with args.
18653set dummy $ac_prog; ac_word=$2
18654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18655$as_echo_n "checking for $ac_word... " >&6; }
18656if ${ac_cv_path_TIME+:} false; then :
18657  $as_echo_n "(cached) " >&6
18658else
18659  case $TIME in
18660  [\\/]* | ?:[\\/]*)
18661  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18662  ;;
18663  *)
18664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18665for as_dir in $PATH
18666do
18667  IFS=$as_save_IFS
18668  test -z "$as_dir" && as_dir=.
18669    for ac_exec_ext in '' $ac_executable_extensions; do
18670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18671    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18673    break 2
18674  fi
18675done
18676  done
18677IFS=$as_save_IFS
18678
18679  ;;
18680esac
18681fi
18682TIME=$ac_cv_path_TIME
18683if test -n "$TIME"; then
18684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18685$as_echo "$TIME" >&6; }
18686else
18687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18688$as_echo "no" >&6; }
18689fi
18690
18691
18692  test -n "$TIME" && break
18693done
18694
18695  else
18696    # The variable is set, but is it from the command line or the environment?
18697
18698    # Try to remove the string !TIME! from our list.
18699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18701      # If it failed, the variable was not from the command line. Ignore it,
18702      # but warn the user (except for BASH, which is always set by the calling BASH).
18703      if test "xTIME" != xBASH; then
18704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18705$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18706      fi
18707      # Try to locate tool using the code snippet
18708      for ac_prog in time
18709do
18710  # Extract the first word of "$ac_prog", so it can be a program name with args.
18711set dummy $ac_prog; ac_word=$2
18712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18713$as_echo_n "checking for $ac_word... " >&6; }
18714if ${ac_cv_path_TIME+:} false; then :
18715  $as_echo_n "(cached) " >&6
18716else
18717  case $TIME in
18718  [\\/]* | ?:[\\/]*)
18719  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18720  ;;
18721  *)
18722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18723for as_dir in $PATH
18724do
18725  IFS=$as_save_IFS
18726  test -z "$as_dir" && as_dir=.
18727    for ac_exec_ext in '' $ac_executable_extensions; do
18728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18729    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18731    break 2
18732  fi
18733done
18734  done
18735IFS=$as_save_IFS
18736
18737  ;;
18738esac
18739fi
18740TIME=$ac_cv_path_TIME
18741if test -n "$TIME"; then
18742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18743$as_echo "$TIME" >&6; }
18744else
18745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18746$as_echo "no" >&6; }
18747fi
18748
18749
18750  test -n "$TIME" && break
18751done
18752
18753    else
18754      # If it succeeded, then it was overridden by the user. We will use it
18755      # for the tool.
18756
18757      # First remove it from the list of overridden variables, so we can test
18758      # for unknown variables in the end.
18759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18760
18761      # Check if the provided tool contains a complete path.
18762      tool_specified="$TIME"
18763      tool_basename="${tool_specified##*/}"
18764      if test "x$tool_basename" = "x$tool_specified"; then
18765        # A command without a complete path is provided, search $PATH.
18766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18767$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18768        # Extract the first word of "$tool_basename", so it can be a program name with args.
18769set dummy $tool_basename; ac_word=$2
18770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18771$as_echo_n "checking for $ac_word... " >&6; }
18772if ${ac_cv_path_TIME+:} false; then :
18773  $as_echo_n "(cached) " >&6
18774else
18775  case $TIME in
18776  [\\/]* | ?:[\\/]*)
18777  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18778  ;;
18779  *)
18780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18781for as_dir in $PATH
18782do
18783  IFS=$as_save_IFS
18784  test -z "$as_dir" && as_dir=.
18785    for ac_exec_ext in '' $ac_executable_extensions; do
18786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18787    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18789    break 2
18790  fi
18791done
18792  done
18793IFS=$as_save_IFS
18794
18795  ;;
18796esac
18797fi
18798TIME=$ac_cv_path_TIME
18799if test -n "$TIME"; then
18800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18801$as_echo "$TIME" >&6; }
18802else
18803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18804$as_echo "no" >&6; }
18805fi
18806
18807
18808        if test "x$TIME" = x; then
18809          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18810        fi
18811      else
18812        # Otherwise we believe it is a complete path. Use it as it is.
18813        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18814$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18816$as_echo_n "checking for TIME... " >&6; }
18817        if test ! -x "$tool_specified"; then
18818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18819$as_echo "not found" >&6; }
18820          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18821        fi
18822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18823$as_echo "$tool_specified" >&6; }
18824      fi
18825    fi
18826  fi
18827
18828
18829  # Check if it's GNU time
18830  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18831  if test "x$IS_GNU_TIME" != x; then
18832    IS_GNU_TIME=yes
18833  else
18834    IS_GNU_TIME=no
18835  fi
18836
18837
18838  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18839
18840
18841
18842  # Publish this variable in the help.
18843
18844
18845  if test "x$COMM" = x; then
18846    # The variable is not set by user, try to locate tool using the code snippet
18847    for ac_prog in comm
18848do
18849  # Extract the first word of "$ac_prog", so it can be a program name with args.
18850set dummy $ac_prog; ac_word=$2
18851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18852$as_echo_n "checking for $ac_word... " >&6; }
18853if ${ac_cv_path_COMM+:} false; then :
18854  $as_echo_n "(cached) " >&6
18855else
18856  case $COMM in
18857  [\\/]* | ?:[\\/]*)
18858  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18859  ;;
18860  *)
18861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18862for as_dir in $PATH
18863do
18864  IFS=$as_save_IFS
18865  test -z "$as_dir" && as_dir=.
18866    for ac_exec_ext in '' $ac_executable_extensions; do
18867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18868    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18870    break 2
18871  fi
18872done
18873  done
18874IFS=$as_save_IFS
18875
18876  ;;
18877esac
18878fi
18879COMM=$ac_cv_path_COMM
18880if test -n "$COMM"; then
18881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18882$as_echo "$COMM" >&6; }
18883else
18884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18885$as_echo "no" >&6; }
18886fi
18887
18888
18889  test -n "$COMM" && break
18890done
18891
18892  else
18893    # The variable is set, but is it from the command line or the environment?
18894
18895    # Try to remove the string !COMM! from our list.
18896    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18897    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18898      # If it failed, the variable was not from the command line. Ignore it,
18899      # but warn the user (except for BASH, which is always set by the calling BASH).
18900      if test "xCOMM" != xBASH; then
18901        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18902$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18903      fi
18904      # Try to locate tool using the code snippet
18905      for ac_prog in comm
18906do
18907  # Extract the first word of "$ac_prog", so it can be a program name with args.
18908set dummy $ac_prog; ac_word=$2
18909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18910$as_echo_n "checking for $ac_word... " >&6; }
18911if ${ac_cv_path_COMM+:} false; then :
18912  $as_echo_n "(cached) " >&6
18913else
18914  case $COMM in
18915  [\\/]* | ?:[\\/]*)
18916  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18917  ;;
18918  *)
18919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18920for as_dir in $PATH
18921do
18922  IFS=$as_save_IFS
18923  test -z "$as_dir" && as_dir=.
18924    for ac_exec_ext in '' $ac_executable_extensions; do
18925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18926    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18928    break 2
18929  fi
18930done
18931  done
18932IFS=$as_save_IFS
18933
18934  ;;
18935esac
18936fi
18937COMM=$ac_cv_path_COMM
18938if test -n "$COMM"; then
18939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18940$as_echo "$COMM" >&6; }
18941else
18942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18943$as_echo "no" >&6; }
18944fi
18945
18946
18947  test -n "$COMM" && break
18948done
18949
18950    else
18951      # If it succeeded, then it was overridden by the user. We will use it
18952      # for the tool.
18953
18954      # First remove it from the list of overridden variables, so we can test
18955      # for unknown variables in the end.
18956      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18957
18958      # Check if the provided tool contains a complete path.
18959      tool_specified="$COMM"
18960      tool_basename="${tool_specified##*/}"
18961      if test "x$tool_basename" = "x$tool_specified"; then
18962        # A command without a complete path is provided, search $PATH.
18963        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18964$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18965        # Extract the first word of "$tool_basename", so it can be a program name with args.
18966set dummy $tool_basename; ac_word=$2
18967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18968$as_echo_n "checking for $ac_word... " >&6; }
18969if ${ac_cv_path_COMM+:} false; then :
18970  $as_echo_n "(cached) " >&6
18971else
18972  case $COMM in
18973  [\\/]* | ?:[\\/]*)
18974  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18975  ;;
18976  *)
18977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18978for as_dir in $PATH
18979do
18980  IFS=$as_save_IFS
18981  test -z "$as_dir" && as_dir=.
18982    for ac_exec_ext in '' $ac_executable_extensions; do
18983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18984    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18986    break 2
18987  fi
18988done
18989  done
18990IFS=$as_save_IFS
18991
18992  ;;
18993esac
18994fi
18995COMM=$ac_cv_path_COMM
18996if test -n "$COMM"; then
18997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18998$as_echo "$COMM" >&6; }
18999else
19000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19001$as_echo "no" >&6; }
19002fi
19003
19004
19005        if test "x$COMM" = x; then
19006          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19007        fi
19008      else
19009        # Otherwise we believe it is a complete path. Use it as it is.
19010        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19011$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19012        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19013$as_echo_n "checking for COMM... " >&6; }
19014        if test ! -x "$tool_specified"; then
19015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19016$as_echo "not found" >&6; }
19017          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19018        fi
19019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19020$as_echo "$tool_specified" >&6; }
19021      fi
19022    fi
19023  fi
19024
19025
19026
19027  if test "x$COMM" = x; then
19028    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19029  fi
19030
19031
19032  fi
19033
19034  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19035
19036
19037
19038  # Publish this variable in the help.
19039
19040
19041  if test "x$DSYMUTIL" = x; then
19042    # The variable is not set by user, try to locate tool using the code snippet
19043    for ac_prog in dsymutil
19044do
19045  # Extract the first word of "$ac_prog", so it can be a program name with args.
19046set dummy $ac_prog; ac_word=$2
19047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19048$as_echo_n "checking for $ac_word... " >&6; }
19049if ${ac_cv_path_DSYMUTIL+:} false; then :
19050  $as_echo_n "(cached) " >&6
19051else
19052  case $DSYMUTIL in
19053  [\\/]* | ?:[\\/]*)
19054  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19055  ;;
19056  *)
19057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19058for as_dir in $PATH
19059do
19060  IFS=$as_save_IFS
19061  test -z "$as_dir" && as_dir=.
19062    for ac_exec_ext in '' $ac_executable_extensions; do
19063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19064    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19066    break 2
19067  fi
19068done
19069  done
19070IFS=$as_save_IFS
19071
19072  ;;
19073esac
19074fi
19075DSYMUTIL=$ac_cv_path_DSYMUTIL
19076if test -n "$DSYMUTIL"; then
19077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19078$as_echo "$DSYMUTIL" >&6; }
19079else
19080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19081$as_echo "no" >&6; }
19082fi
19083
19084
19085  test -n "$DSYMUTIL" && break
19086done
19087
19088  else
19089    # The variable is set, but is it from the command line or the environment?
19090
19091    # Try to remove the string !DSYMUTIL! from our list.
19092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19094      # If it failed, the variable was not from the command line. Ignore it,
19095      # but warn the user (except for BASH, which is always set by the calling BASH).
19096      if test "xDSYMUTIL" != xBASH; then
19097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19098$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19099      fi
19100      # Try to locate tool using the code snippet
19101      for ac_prog in dsymutil
19102do
19103  # Extract the first word of "$ac_prog", so it can be a program name with args.
19104set dummy $ac_prog; ac_word=$2
19105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19106$as_echo_n "checking for $ac_word... " >&6; }
19107if ${ac_cv_path_DSYMUTIL+:} false; then :
19108  $as_echo_n "(cached) " >&6
19109else
19110  case $DSYMUTIL in
19111  [\\/]* | ?:[\\/]*)
19112  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19113  ;;
19114  *)
19115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19116for as_dir in $PATH
19117do
19118  IFS=$as_save_IFS
19119  test -z "$as_dir" && as_dir=.
19120    for ac_exec_ext in '' $ac_executable_extensions; do
19121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19122    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19124    break 2
19125  fi
19126done
19127  done
19128IFS=$as_save_IFS
19129
19130  ;;
19131esac
19132fi
19133DSYMUTIL=$ac_cv_path_DSYMUTIL
19134if test -n "$DSYMUTIL"; then
19135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19136$as_echo "$DSYMUTIL" >&6; }
19137else
19138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19139$as_echo "no" >&6; }
19140fi
19141
19142
19143  test -n "$DSYMUTIL" && break
19144done
19145
19146    else
19147      # If it succeeded, then it was overridden by the user. We will use it
19148      # for the tool.
19149
19150      # First remove it from the list of overridden variables, so we can test
19151      # for unknown variables in the end.
19152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19153
19154      # Check if the provided tool contains a complete path.
19155      tool_specified="$DSYMUTIL"
19156      tool_basename="${tool_specified##*/}"
19157      if test "x$tool_basename" = "x$tool_specified"; then
19158        # A command without a complete path is provided, search $PATH.
19159        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19160$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19161        # Extract the first word of "$tool_basename", so it can be a program name with args.
19162set dummy $tool_basename; ac_word=$2
19163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19164$as_echo_n "checking for $ac_word... " >&6; }
19165if ${ac_cv_path_DSYMUTIL+:} false; then :
19166  $as_echo_n "(cached) " >&6
19167else
19168  case $DSYMUTIL in
19169  [\\/]* | ?:[\\/]*)
19170  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19171  ;;
19172  *)
19173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19174for as_dir in $PATH
19175do
19176  IFS=$as_save_IFS
19177  test -z "$as_dir" && as_dir=.
19178    for ac_exec_ext in '' $ac_executable_extensions; do
19179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19180    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19182    break 2
19183  fi
19184done
19185  done
19186IFS=$as_save_IFS
19187
19188  ;;
19189esac
19190fi
19191DSYMUTIL=$ac_cv_path_DSYMUTIL
19192if test -n "$DSYMUTIL"; then
19193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19194$as_echo "$DSYMUTIL" >&6; }
19195else
19196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19197$as_echo "no" >&6; }
19198fi
19199
19200
19201        if test "x$DSYMUTIL" = x; then
19202          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19203        fi
19204      else
19205        # Otherwise we believe it is a complete path. Use it as it is.
19206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19207$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19209$as_echo_n "checking for DSYMUTIL... " >&6; }
19210        if test ! -x "$tool_specified"; then
19211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19212$as_echo "not found" >&6; }
19213          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19214        fi
19215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19216$as_echo "$tool_specified" >&6; }
19217      fi
19218    fi
19219  fi
19220
19221
19222
19223  if test "x$DSYMUTIL" = x; then
19224    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19225  fi
19226
19227
19228
19229
19230
19231  # Publish this variable in the help.
19232
19233
19234  if test "x$XATTR" = x; then
19235    # The variable is not set by user, try to locate tool using the code snippet
19236    for ac_prog in xattr
19237do
19238  # Extract the first word of "$ac_prog", so it can be a program name with args.
19239set dummy $ac_prog; ac_word=$2
19240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19241$as_echo_n "checking for $ac_word... " >&6; }
19242if ${ac_cv_path_XATTR+:} false; then :
19243  $as_echo_n "(cached) " >&6
19244else
19245  case $XATTR in
19246  [\\/]* | ?:[\\/]*)
19247  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19248  ;;
19249  *)
19250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19251for as_dir in $PATH
19252do
19253  IFS=$as_save_IFS
19254  test -z "$as_dir" && as_dir=.
19255    for ac_exec_ext in '' $ac_executable_extensions; do
19256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19257    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19259    break 2
19260  fi
19261done
19262  done
19263IFS=$as_save_IFS
19264
19265  ;;
19266esac
19267fi
19268XATTR=$ac_cv_path_XATTR
19269if test -n "$XATTR"; then
19270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19271$as_echo "$XATTR" >&6; }
19272else
19273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19274$as_echo "no" >&6; }
19275fi
19276
19277
19278  test -n "$XATTR" && break
19279done
19280
19281  else
19282    # The variable is set, but is it from the command line or the environment?
19283
19284    # Try to remove the string !XATTR! from our list.
19285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19287      # If it failed, the variable was not from the command line. Ignore it,
19288      # but warn the user (except for BASH, which is always set by the calling BASH).
19289      if test "xXATTR" != xBASH; then
19290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19291$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19292      fi
19293      # Try to locate tool using the code snippet
19294      for ac_prog in xattr
19295do
19296  # Extract the first word of "$ac_prog", so it can be a program name with args.
19297set dummy $ac_prog; ac_word=$2
19298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19299$as_echo_n "checking for $ac_word... " >&6; }
19300if ${ac_cv_path_XATTR+:} false; then :
19301  $as_echo_n "(cached) " >&6
19302else
19303  case $XATTR in
19304  [\\/]* | ?:[\\/]*)
19305  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19306  ;;
19307  *)
19308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19309for as_dir in $PATH
19310do
19311  IFS=$as_save_IFS
19312  test -z "$as_dir" && as_dir=.
19313    for ac_exec_ext in '' $ac_executable_extensions; do
19314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19315    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19317    break 2
19318  fi
19319done
19320  done
19321IFS=$as_save_IFS
19322
19323  ;;
19324esac
19325fi
19326XATTR=$ac_cv_path_XATTR
19327if test -n "$XATTR"; then
19328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19329$as_echo "$XATTR" >&6; }
19330else
19331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19332$as_echo "no" >&6; }
19333fi
19334
19335
19336  test -n "$XATTR" && break
19337done
19338
19339    else
19340      # If it succeeded, then it was overridden by the user. We will use it
19341      # for the tool.
19342
19343      # First remove it from the list of overridden variables, so we can test
19344      # for unknown variables in the end.
19345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19346
19347      # Check if the provided tool contains a complete path.
19348      tool_specified="$XATTR"
19349      tool_basename="${tool_specified##*/}"
19350      if test "x$tool_basename" = "x$tool_specified"; then
19351        # A command without a complete path is provided, search $PATH.
19352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19353$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19354        # Extract the first word of "$tool_basename", so it can be a program name with args.
19355set dummy $tool_basename; ac_word=$2
19356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19357$as_echo_n "checking for $ac_word... " >&6; }
19358if ${ac_cv_path_XATTR+:} false; then :
19359  $as_echo_n "(cached) " >&6
19360else
19361  case $XATTR in
19362  [\\/]* | ?:[\\/]*)
19363  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19364  ;;
19365  *)
19366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19367for as_dir in $PATH
19368do
19369  IFS=$as_save_IFS
19370  test -z "$as_dir" && as_dir=.
19371    for ac_exec_ext in '' $ac_executable_extensions; do
19372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19373    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19375    break 2
19376  fi
19377done
19378  done
19379IFS=$as_save_IFS
19380
19381  ;;
19382esac
19383fi
19384XATTR=$ac_cv_path_XATTR
19385if test -n "$XATTR"; then
19386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19387$as_echo "$XATTR" >&6; }
19388else
19389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19390$as_echo "no" >&6; }
19391fi
19392
19393
19394        if test "x$XATTR" = x; then
19395          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19396        fi
19397      else
19398        # Otherwise we believe it is a complete path. Use it as it is.
19399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19400$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19402$as_echo_n "checking for XATTR... " >&6; }
19403        if test ! -x "$tool_specified"; then
19404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19405$as_echo "not found" >&6; }
19406          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19407        fi
19408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19409$as_echo "$tool_specified" >&6; }
19410      fi
19411    fi
19412  fi
19413
19414
19415
19416  if test "x$XATTR" = x; then
19417    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19418  fi
19419
19420
19421
19422
19423  # Publish this variable in the help.
19424
19425
19426  if test "x$CODESIGN" = x; then
19427    # The variable is not set by user, try to locate tool using the code snippet
19428    for ac_prog in codesign
19429do
19430  # Extract the first word of "$ac_prog", so it can be a program name with args.
19431set dummy $ac_prog; ac_word=$2
19432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19433$as_echo_n "checking for $ac_word... " >&6; }
19434if ${ac_cv_path_CODESIGN+:} false; then :
19435  $as_echo_n "(cached) " >&6
19436else
19437  case $CODESIGN in
19438  [\\/]* | ?:[\\/]*)
19439  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19440  ;;
19441  *)
19442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19443for as_dir in $PATH
19444do
19445  IFS=$as_save_IFS
19446  test -z "$as_dir" && as_dir=.
19447    for ac_exec_ext in '' $ac_executable_extensions; do
19448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19449    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19451    break 2
19452  fi
19453done
19454  done
19455IFS=$as_save_IFS
19456
19457  ;;
19458esac
19459fi
19460CODESIGN=$ac_cv_path_CODESIGN
19461if test -n "$CODESIGN"; then
19462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19463$as_echo "$CODESIGN" >&6; }
19464else
19465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19466$as_echo "no" >&6; }
19467fi
19468
19469
19470  test -n "$CODESIGN" && break
19471done
19472
19473  else
19474    # The variable is set, but is it from the command line or the environment?
19475
19476    # Try to remove the string !CODESIGN! from our list.
19477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19479      # If it failed, the variable was not from the command line. Ignore it,
19480      # but warn the user (except for BASH, which is always set by the calling BASH).
19481      if test "xCODESIGN" != xBASH; then
19482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19483$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19484      fi
19485      # Try to locate tool using the code snippet
19486      for ac_prog in codesign
19487do
19488  # Extract the first word of "$ac_prog", so it can be a program name with args.
19489set dummy $ac_prog; ac_word=$2
19490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19491$as_echo_n "checking for $ac_word... " >&6; }
19492if ${ac_cv_path_CODESIGN+:} false; then :
19493  $as_echo_n "(cached) " >&6
19494else
19495  case $CODESIGN in
19496  [\\/]* | ?:[\\/]*)
19497  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19498  ;;
19499  *)
19500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19501for as_dir in $PATH
19502do
19503  IFS=$as_save_IFS
19504  test -z "$as_dir" && as_dir=.
19505    for ac_exec_ext in '' $ac_executable_extensions; do
19506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19507    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19509    break 2
19510  fi
19511done
19512  done
19513IFS=$as_save_IFS
19514
19515  ;;
19516esac
19517fi
19518CODESIGN=$ac_cv_path_CODESIGN
19519if test -n "$CODESIGN"; then
19520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19521$as_echo "$CODESIGN" >&6; }
19522else
19523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19524$as_echo "no" >&6; }
19525fi
19526
19527
19528  test -n "$CODESIGN" && break
19529done
19530
19531    else
19532      # If it succeeded, then it was overridden by the user. We will use it
19533      # for the tool.
19534
19535      # First remove it from the list of overridden variables, so we can test
19536      # for unknown variables in the end.
19537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19538
19539      # Check if the provided tool contains a complete path.
19540      tool_specified="$CODESIGN"
19541      tool_basename="${tool_specified##*/}"
19542      if test "x$tool_basename" = "x$tool_specified"; then
19543        # A command without a complete path is provided, search $PATH.
19544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19545$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19546        # Extract the first word of "$tool_basename", so it can be a program name with args.
19547set dummy $tool_basename; ac_word=$2
19548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19549$as_echo_n "checking for $ac_word... " >&6; }
19550if ${ac_cv_path_CODESIGN+:} false; then :
19551  $as_echo_n "(cached) " >&6
19552else
19553  case $CODESIGN in
19554  [\\/]* | ?:[\\/]*)
19555  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19556  ;;
19557  *)
19558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19559for as_dir in $PATH
19560do
19561  IFS=$as_save_IFS
19562  test -z "$as_dir" && as_dir=.
19563    for ac_exec_ext in '' $ac_executable_extensions; do
19564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19565    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19567    break 2
19568  fi
19569done
19570  done
19571IFS=$as_save_IFS
19572
19573  ;;
19574esac
19575fi
19576CODESIGN=$ac_cv_path_CODESIGN
19577if test -n "$CODESIGN"; then
19578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19579$as_echo "$CODESIGN" >&6; }
19580else
19581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19582$as_echo "no" >&6; }
19583fi
19584
19585
19586        if test "x$CODESIGN" = x; then
19587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19588        fi
19589      else
19590        # Otherwise we believe it is a complete path. Use it as it is.
19591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19592$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19594$as_echo_n "checking for CODESIGN... " >&6; }
19595        if test ! -x "$tool_specified"; then
19596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19597$as_echo "not found" >&6; }
19598          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19599        fi
19600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19601$as_echo "$tool_specified" >&6; }
19602      fi
19603    fi
19604  fi
19605
19606
19607    if test "x$CODESIGN" != "x"; then
19608      # Verify that the openjdk_codesign certificate is present
19609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19610$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19611      rm -f codesign-testfile
19612      touch codesign-testfile
19613      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19614      rm -f codesign-testfile
19615      if test "x$CODESIGN" = x; then
19616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19617$as_echo "no" >&6; }
19618      else
19619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19620$as_echo "yes" >&6; }
19621      fi
19622    fi
19623  fi
19624
19625
19626# Check if pkg-config is available.
19627
19628
19629if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19630	if test -n "$ac_tool_prefix"; then
19631  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19632set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19634$as_echo_n "checking for $ac_word... " >&6; }
19635if ${ac_cv_path_PKG_CONFIG+:} false; then :
19636  $as_echo_n "(cached) " >&6
19637else
19638  case $PKG_CONFIG in
19639  [\\/]* | ?:[\\/]*)
19640  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19641  ;;
19642  *)
19643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19644for as_dir in $PATH
19645do
19646  IFS=$as_save_IFS
19647  test -z "$as_dir" && as_dir=.
19648    for ac_exec_ext in '' $ac_executable_extensions; do
19649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19650    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19652    break 2
19653  fi
19654done
19655  done
19656IFS=$as_save_IFS
19657
19658  ;;
19659esac
19660fi
19661PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19662if test -n "$PKG_CONFIG"; then
19663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19664$as_echo "$PKG_CONFIG" >&6; }
19665else
19666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19667$as_echo "no" >&6; }
19668fi
19669
19670
19671fi
19672if test -z "$ac_cv_path_PKG_CONFIG"; then
19673  ac_pt_PKG_CONFIG=$PKG_CONFIG
19674  # Extract the first word of "pkg-config", so it can be a program name with args.
19675set dummy pkg-config; ac_word=$2
19676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19677$as_echo_n "checking for $ac_word... " >&6; }
19678if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19679  $as_echo_n "(cached) " >&6
19680else
19681  case $ac_pt_PKG_CONFIG in
19682  [\\/]* | ?:[\\/]*)
19683  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19684  ;;
19685  *)
19686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19687for as_dir in $PATH
19688do
19689  IFS=$as_save_IFS
19690  test -z "$as_dir" && as_dir=.
19691    for ac_exec_ext in '' $ac_executable_extensions; do
19692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19693    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19695    break 2
19696  fi
19697done
19698  done
19699IFS=$as_save_IFS
19700
19701  ;;
19702esac
19703fi
19704ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19705if test -n "$ac_pt_PKG_CONFIG"; then
19706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19707$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19708else
19709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19710$as_echo "no" >&6; }
19711fi
19712
19713  if test "x$ac_pt_PKG_CONFIG" = x; then
19714    PKG_CONFIG=""
19715  else
19716    case $cross_compiling:$ac_tool_warned in
19717yes:)
19718{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19719$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19720ac_tool_warned=yes ;;
19721esac
19722    PKG_CONFIG=$ac_pt_PKG_CONFIG
19723  fi
19724else
19725  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19726fi
19727
19728fi
19729if test -n "$PKG_CONFIG"; then
19730	_pkg_min_version=0.9.0
19731	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19732$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19733	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19734		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19735$as_echo "yes" >&6; }
19736	else
19737		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19738$as_echo "no" >&6; }
19739		PKG_CONFIG=""
19740	fi
19741
19742fi
19743
19744# After basic tools have been setup, we can check build os specific details.
19745
19746  ###############################################################################
19747
19748  # Note that this is the build platform OS version!
19749
19750  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19751  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19752  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19753  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19754
19755
19756
19757
19758
19759# Setup builddeps, for automatic downloading of tools we need.
19760# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19761# boot-jdk setup, but we need to have basic tools setup first.
19762
19763
19764# Check whether --with-builddeps-conf was given.
19765if test "${with_builddeps_conf+set}" = set; then :
19766  withval=$with_builddeps_conf;
19767fi
19768
19769
19770
19771# Check whether --with-builddeps-server was given.
19772if test "${with_builddeps_server+set}" = set; then :
19773  withval=$with_builddeps_server;
19774fi
19775
19776
19777
19778# Check whether --with-builddeps-dir was given.
19779if test "${with_builddeps_dir+set}" = set; then :
19780  withval=$with_builddeps_dir;
19781else
19782  with_builddeps_dir=/localhome/builddeps
19783fi
19784
19785
19786
19787# Check whether --with-builddeps-group was given.
19788if test "${with_builddeps_group+set}" = set; then :
19789  withval=$with_builddeps_group;
19790fi
19791
19792
19793
19794
19795  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19796    if test "x$with_builddeps_conf" != x; then
19797      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19798$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19799      builddepsfile=$with_builddeps_conf
19800      if test -s $builddepsfile; then
19801        . $builddepsfile
19802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19803$as_echo "loaded!" >&6; }
19804      else
19805        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19806      fi
19807    else
19808      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19809$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19810      builddepsfile=`mktemp`
19811      touch $builddepsfile
19812      # Put all found confs into a single file.
19813      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19814      # Source the file to acquire the variables
19815      if test -s $builddepsfile; then
19816        . $builddepsfile
19817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19818$as_echo "found at least one!" >&6; }
19819      else
19820        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19821      fi
19822    fi
19823    # Create build and target names that use _ instead of "-" and ".".
19824    # This is necessary to use them in variable names.
19825    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19826    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19827    # Extract rewrite information for build and target
19828    eval rewritten_build=\${REWRITE_${build_var}}
19829    if test "x$rewritten_build" = x; then
19830      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19831      echo Build stays the same $rewritten_build
19832    else
19833      echo Rewriting build for builddeps into $rewritten_build
19834    fi
19835    eval rewritten_target=\${REWRITE_${target_var}}
19836    if test "x$rewritten_target" = x; then
19837      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19838      echo Target stays the same $rewritten_target
19839    else
19840      echo Rewriting target for builddeps into $rewritten_target
19841    fi
19842    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19843    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19844  fi
19845  for ac_prog in 7z unzip
19846do
19847  # Extract the first word of "$ac_prog", so it can be a program name with args.
19848set dummy $ac_prog; ac_word=$2
19849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19850$as_echo_n "checking for $ac_word... " >&6; }
19851if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19852  $as_echo_n "(cached) " >&6
19853else
19854  if test -n "$BDEPS_UNZIP"; then
19855  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19856else
19857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19858for as_dir in $PATH
19859do
19860  IFS=$as_save_IFS
19861  test -z "$as_dir" && as_dir=.
19862    for ac_exec_ext in '' $ac_executable_extensions; do
19863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19864    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19866    break 2
19867  fi
19868done
19869  done
19870IFS=$as_save_IFS
19871
19872fi
19873fi
19874BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19875if test -n "$BDEPS_UNZIP"; then
19876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19877$as_echo "$BDEPS_UNZIP" >&6; }
19878else
19879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19880$as_echo "no" >&6; }
19881fi
19882
19883
19884  test -n "$BDEPS_UNZIP" && break
19885done
19886
19887  if test "x$BDEPS_UNZIP" = x7z; then
19888    BDEPS_UNZIP="7z x"
19889  fi
19890
19891  for ac_prog in wget lftp ftp
19892do
19893  # Extract the first word of "$ac_prog", so it can be a program name with args.
19894set dummy $ac_prog; ac_word=$2
19895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19896$as_echo_n "checking for $ac_word... " >&6; }
19897if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19898  $as_echo_n "(cached) " >&6
19899else
19900  if test -n "$BDEPS_FTP"; then
19901  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19902else
19903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19904for as_dir in $PATH
19905do
19906  IFS=$as_save_IFS
19907  test -z "$as_dir" && as_dir=.
19908    for ac_exec_ext in '' $ac_executable_extensions; do
19909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19910    ac_cv_prog_BDEPS_FTP="$ac_prog"
19911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19912    break 2
19913  fi
19914done
19915  done
19916IFS=$as_save_IFS
19917
19918fi
19919fi
19920BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19921if test -n "$BDEPS_FTP"; then
19922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19923$as_echo "$BDEPS_FTP" >&6; }
19924else
19925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19926$as_echo "no" >&6; }
19927fi
19928
19929
19930  test -n "$BDEPS_FTP" && break
19931done
19932
19933
19934
19935###############################################################################
19936#
19937# Determine OpenJDK variants, options and version numbers.
19938#
19939###############################################################################
19940
19941# We need build & target for this.
19942
19943
19944  ###############################################################################
19945  #
19946  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19947  # We always build headless support.
19948  #
19949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19950$as_echo_n "checking headful support... " >&6; }
19951  # Check whether --enable-headful was given.
19952if test "${enable_headful+set}" = set; then :
19953  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19954else
19955  SUPPORT_HEADFUL=yes
19956fi
19957
19958
19959  SUPPORT_HEADLESS=yes
19960  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19961
19962  if test "x$SUPPORT_HEADFUL" = xyes; then
19963    # We are building both headful and headless.
19964    headful_msg="include support for both headful and headless"
19965  fi
19966
19967  if test "x$SUPPORT_HEADFUL" = xno; then
19968    # Thus we are building headless only.
19969    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19970    headful_msg="headless only"
19971  fi
19972
19973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19974$as_echo "$headful_msg" >&6; }
19975
19976
19977
19978
19979
19980  # Control wether Hotspot runs Queens test after build.
19981  # Check whether --enable-hotspot-test-in-build was given.
19982if test "${enable_hotspot_test_in_build+set}" = set; then :
19983  enableval=$enable_hotspot_test_in_build;
19984else
19985  enable_hotspot_test_in_build=no
19986fi
19987
19988  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19989    TEST_IN_BUILD=true
19990  else
19991    TEST_IN_BUILD=false
19992  fi
19993
19994
19995  ###############################################################################
19996  #
19997  # Choose cacerts source file
19998  #
19999
20000# Check whether --with-cacerts-file was given.
20001if test "${with_cacerts_file+set}" = set; then :
20002  withval=$with_cacerts_file;
20003fi
20004
20005  if test "x$with_cacerts_file" != x; then
20006    CACERTS_FILE=$with_cacerts_file
20007  fi
20008
20009
20010  ###############################################################################
20011  #
20012  # Enable or disable unlimited crypto
20013  #
20014  # Check whether --enable-unlimited-crypto was given.
20015if test "${enable_unlimited_crypto+set}" = set; then :
20016  enableval=$enable_unlimited_crypto;
20017else
20018  enable_unlimited_crypto=no
20019fi
20020
20021  if test "x$enable_unlimited_crypto" = "xyes"; then
20022    UNLIMITED_CRYPTO=true
20023  else
20024    UNLIMITED_CRYPTO=false
20025  fi
20026
20027
20028  ###############################################################################
20029  #
20030  # Enable or disable the elliptic curve crypto implementation
20031  #
20032
20033
20034  ###############################################################################
20035  #
20036  # --enable-rmiconnector-iiop
20037  #
20038  # Check whether --enable-rmiconnector-iiop was given.
20039if test "${enable_rmiconnector_iiop+set}" = set; then :
20040  enableval=$enable_rmiconnector_iiop;
20041fi
20042
20043  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20044    RMICONNECTOR_IIOP=true
20045  else
20046    RMICONNECTOR_IIOP=false
20047  fi
20048
20049
20050  ###############################################################################
20051  #
20052  # Compress jars
20053  #
20054  COMPRESS_JARS=false
20055
20056
20057
20058
20059  # Source the version numbers
20060  . $AUTOCONF_DIR/version-numbers
20061
20062  # Get the settings from parameters
20063
20064# Check whether --with-milestone was given.
20065if test "${with_milestone+set}" = set; then :
20066  withval=$with_milestone;
20067fi
20068
20069  if test "x$with_milestone" = xyes; then
20070    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20071  elif test "x$with_milestone" != x; then
20072    MILESTONE="$with_milestone"
20073  fi
20074  if test "x$MILESTONE" = x; then
20075    MILESTONE=internal
20076  fi
20077
20078
20079# Check whether --with-update-version was given.
20080if test "${with_update_version+set}" = set; then :
20081  withval=$with_update_version;
20082fi
20083
20084  if test "x$with_update_version" = xyes; then
20085    as_fn_error $? "Update version must have a value" "$LINENO" 5
20086  elif test "x$with_update_version" != x; then
20087    JDK_UPDATE_VERSION="$with_update_version"
20088    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20089    # to a bug in expr (which reduces it to just X). To work around this, we
20090    # always add a 0 to one digit update versions.
20091    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20092      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20093    fi
20094  fi
20095
20096
20097# Check whether --with-user-release-suffix was given.
20098if test "${with_user_release_suffix+set}" = set; then :
20099  withval=$with_user_release_suffix;
20100fi
20101
20102  if test "x$with_user_release_suffix" = xyes; then
20103    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20104  elif test "x$with_user_release_suffix" != x; then
20105    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20106  fi
20107
20108
20109# Check whether --with-build-number was given.
20110if test "${with_build_number+set}" = set; then :
20111  withval=$with_build_number;
20112fi
20113
20114  if test "x$with_build_number" = xyes; then
20115    as_fn_error $? "Build number must have a value" "$LINENO" 5
20116  elif test "x$with_build_number" != x; then
20117    JDK_BUILD_NUMBER="$with_build_number"
20118  fi
20119  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20120  if test "x$JDK_BUILD_NUMBER" = x; then
20121    JDK_BUILD_NUMBER=b00
20122    if test "x$USER_RELEASE_SUFFIX" = x; then
20123      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20124      # Avoid [:alnum:] since it depends on the locale.
20125      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20126      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20127    fi
20128  fi
20129
20130  # Now set the JDK version, milestone, build number etc.
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147# Check whether --with-copyright-year was given.
20148if test "${with_copyright_year+set}" = set; then :
20149  withval=$with_copyright_year;
20150fi
20151
20152  if test "x$with_copyright_year" = xyes; then
20153    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20154  elif test "x$with_copyright_year" != x; then
20155    COPYRIGHT_YEAR="$with_copyright_year"
20156  else
20157    COPYRIGHT_YEAR=`date +'%Y'`
20158  fi
20159
20160
20161  if test "x$JDK_UPDATE_VERSION" != x; then
20162    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20163  else
20164    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20165  fi
20166
20167
20168  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20169
20170
20171
20172###############################################################################
20173#
20174# Setup BootJDK, used to bootstrap the build.
20175#
20176###############################################################################
20177
20178
20179  BOOT_JDK_FOUND=no
20180
20181# Check whether --with-boot-jdk was given.
20182if test "${with_boot_jdk+set}" = set; then :
20183  withval=$with_boot_jdk;
20184fi
20185
20186
20187  # We look for the Boot JDK through various means, going from more certain to
20188  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20189  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20190  # must check if this is indeed valid; otherwise we'll continue looking.
20191
20192  # Test: Is bootjdk explicitely set by command line arguments?
20193
20194  if test "x$BOOT_JDK_FOUND" = xno; then
20195    # Now execute the test
20196
20197  if test "x$with_boot_jdk" != x; then
20198    BOOT_JDK=$with_boot_jdk
20199    BOOT_JDK_FOUND=maybe
20200    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20201$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20202  fi
20203
20204
20205    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20206    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20207      # Do we have a bin/java?
20208      if test ! -x "$BOOT_JDK/bin/java"; then
20209        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20211        BOOT_JDK_FOUND=no
20212      else
20213        # Do we have a bin/javac?
20214        if test ! -x "$BOOT_JDK/bin/javac"; then
20215          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20217          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20218$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20219          BOOT_JDK_FOUND=no
20220        else
20221          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20222          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20223
20224          # Extra M4 quote needed to protect [] in grep expression.
20225          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20226          if test "x$FOUND_CORRECT_VERSION" = x; then
20227            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20229            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20230$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20231            BOOT_JDK_FOUND=no
20232          else
20233            # We're done! :-)
20234            BOOT_JDK_FOUND=yes
20235
20236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20237
20238  # Input might be given as Windows format, start by converting to
20239  # unix format.
20240  path="$BOOT_JDK"
20241  new_path=`$CYGPATH -u "$path"`
20242
20243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20246  # "foo.exe" is OK but "foo" is an error.
20247  #
20248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20249  # It is also a way to make sure we got the proper file name for the real test later on.
20250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20251  if test "x$test_shortpath" = x; then
20252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20253$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20254    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20255  fi
20256
20257  # Call helper function which possibly converts this using DOS-style short mode.
20258  # If so, the updated path is stored in $new_path.
20259
20260  input_path="$new_path"
20261  # Check if we need to convert this using DOS-style short mode. If the path
20262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20263  # take no chances and rewrite it.
20264  # Note: m4 eats our [], so we need to use [ and ] instead.
20265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20266  if test "x$has_forbidden_chars" != x; then
20267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20271      # Going to short mode and back again did indeed matter. Since short mode is
20272      # case insensitive, let's make it lowercase to improve readability.
20273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20274      # Now convert it back to Unix-stile (cygpath)
20275      input_path=`$CYGPATH -u "$shortmode_path"`
20276      new_path="$input_path"
20277    fi
20278  fi
20279
20280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20281  if test "x$test_cygdrive_prefix" = x; then
20282    # As a simple fix, exclude /usr/bin since it's not a real path.
20283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20285      # a path prefixed by /cygdrive for fixpath to work.
20286      new_path="$CYGWIN_ROOT_PATH$input_path"
20287    fi
20288  fi
20289
20290
20291  if test "x$path" != "x$new_path"; then
20292    BOOT_JDK="$new_path"
20293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20295  fi
20296
20297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20298
20299  path="$BOOT_JDK"
20300  has_colon=`$ECHO $path | $GREP ^.:`
20301  new_path="$path"
20302  if test "x$has_colon" = x; then
20303    # Not in mixed or Windows style, start by that.
20304    new_path=`cmd //c echo $path`
20305  fi
20306
20307
20308  input_path="$new_path"
20309  # Check if we need to convert this using DOS-style short mode. If the path
20310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20311  # take no chances and rewrite it.
20312  # Note: m4 eats our [], so we need to use [ and ] instead.
20313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20314  if test "x$has_forbidden_chars" != x; then
20315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20317  fi
20318
20319
20320  windows_path="$new_path"
20321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20322    unix_path=`$CYGPATH -u "$windows_path"`
20323    new_path="$unix_path"
20324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20326    new_path="$unix_path"
20327  fi
20328
20329  if test "x$path" != "x$new_path"; then
20330    BOOT_JDK="$new_path"
20331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20333  fi
20334
20335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20337
20338  else
20339    # We're on a unix platform. Hooray! :)
20340    path="$BOOT_JDK"
20341    has_space=`$ECHO "$path" | $GREP " "`
20342    if test "x$has_space" != x; then
20343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20344$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20345      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20346    fi
20347
20348    # Use eval to expand a potential ~
20349    eval path="$path"
20350    if test ! -f "$path" && test ! -d "$path"; then
20351      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20352    fi
20353
20354    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20355  fi
20356
20357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20358$as_echo_n "checking for Boot JDK... " >&6; }
20359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20360$as_echo "$BOOT_JDK" >&6; }
20361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20362$as_echo_n "checking Boot JDK version... " >&6; }
20363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20365$as_echo "$BOOT_JDK_VERSION" >&6; }
20366          fi # end check jdk version
20367        fi # end check javac
20368      fi # end check java
20369    fi # end check boot jdk found
20370  fi
20371
20372  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20373    # Having specified an argument which is incorrect will produce an instant failure;
20374    # we should not go on looking
20375    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20376  fi
20377
20378  # Test: Is bootjdk available from builddeps?
20379
20380  if test "x$BOOT_JDK_FOUND" = xno; then
20381    # Now execute the test
20382
20383
20384
20385  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20386    # Source the builddeps file again, to make sure it uses the latest variables!
20387    . $builddepsfile
20388    # Look for a target and build machine specific resource!
20389    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20390    if test "x$resource" = x; then
20391      # Ok, lets instead look for a target specific resource
20392      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20393    fi
20394    if test "x$resource" = x; then
20395      # Ok, lets instead look for a build specific resource
20396      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20397    fi
20398    if test "x$resource" = x; then
20399      # Ok, lets instead look for a generic resource
20400      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20401      resource=${builddep_bootjdk}
20402    fi
20403    if test "x$resource" != x; then
20404      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20405$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20406      # If the resource in the builddeps.conf file is an existing directory,
20407      # for example /java/linux/cups
20408      if test -d ${resource}; then
20409        depdir=${resource}
20410      else
20411
20412  # bootjdk is for example mymodule
20413  # $resource is for example libs/general/libmymod_1_2_3.zip
20414  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20415  # $with_builddeps_dir is for example /localhome/builddeps
20416  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20417  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20418  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20419  filename=`basename $resource`
20420  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20421  filebase=${filename%%.*}
20422  extension=${filename#*.}
20423  installdir=$with_builddeps_dir/$filebase
20424  if test ! -f $installdir/$filename.unpacked; then
20425    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20426$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20427    if test ! -d $installdir; then
20428      mkdir -p $installdir
20429    fi
20430    if test ! -d $installdir; then
20431      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20432    fi
20433    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20434    touch $tmpfile
20435    if test ! -f $tmpfile; then
20436      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20437    fi
20438
20439  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20440  # $tmpfile is the local file name for the downloaded file.
20441  VALID_TOOL=no
20442  if test "x$BDEPS_FTP" = xwget; then
20443    VALID_TOOL=yes
20444    wget -O $tmpfile $with_builddeps_server/$resource
20445  fi
20446  if test "x$BDEPS_FTP" = xlftp; then
20447    VALID_TOOL=yes
20448    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20449  fi
20450  if test "x$BDEPS_FTP" = xftp; then
20451    VALID_TOOL=yes
20452    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20453    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20454    FTPUSERPWD=${FTPSERVER%%@*}
20455    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20456      FTPUSER=${userpwd%%:*}
20457      FTPPWD=${userpwd#*@}
20458      FTPSERVER=${FTPSERVER#*@}
20459    else
20460      FTPUSER=ftp
20461      FTPPWD=ftp
20462    fi
20463    # the "pass" command does not work on some
20464    # ftp clients (read ftp.exe) but if it works,
20465    # passive mode is better!
20466    ( \
20467        echo "user $FTPUSER $FTPPWD"        ; \
20468        echo "pass"                         ; \
20469        echo "bin"                          ; \
20470        echo "get $FTPPATH $tmpfile"              ; \
20471    ) | ftp -in $FTPSERVER
20472  fi
20473  if test "x$VALID_TOOL" != xyes; then
20474    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20475  fi
20476
20477    mv $tmpfile $installdir/$filename
20478    if test ! -s $installdir/$filename; then
20479      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20480    fi
20481    case "$extension" in
20482      zip)  echo "Unzipping $installdir/$filename..."
20483        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20484        ;;
20485      tar.gz) echo "Untaring $installdir/$filename..."
20486        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20487        ;;
20488      tgz) echo "Untaring $installdir/$filename..."
20489        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20490        ;;
20491      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20492        ;;
20493    esac
20494  fi
20495  if test -f $installdir/$filename.unpacked; then
20496    depdir=$installdir
20497  fi
20498
20499      fi
20500      # Source the builddeps file again, because in the previous command, the depdir
20501      # was updated to point at the current build dependency install directory.
20502      . $builddepsfile
20503      # Now extract variables from the builddeps.conf files.
20504      theroot=${builddep_bootjdk_ROOT}
20505      thecflags=${builddep_bootjdk_CFLAGS}
20506      thelibs=${builddep_bootjdk_LIBS}
20507      if test "x$depdir" = x; then
20508        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20509      fi
20510      BOOT_JDK=$depdir
20511      if test "x$theroot" != x; then
20512        BOOT_JDK="$theroot"
20513      fi
20514      if test "x$thecflags" != x; then
20515        BOOT_JDK_CFLAGS="$thecflags"
20516      fi
20517      if test "x$thelibs" != x; then
20518        BOOT_JDK_LIBS="$thelibs"
20519      fi
20520      BOOT_JDK_FOUND=maybe
20521      else BOOT_JDK_FOUND=no
20522
20523    fi
20524    else BOOT_JDK_FOUND=no
20525
20526  fi
20527
20528
20529
20530    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20531    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20532      # Do we have a bin/java?
20533      if test ! -x "$BOOT_JDK/bin/java"; then
20534        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20536        BOOT_JDK_FOUND=no
20537      else
20538        # Do we have a bin/javac?
20539        if test ! -x "$BOOT_JDK/bin/javac"; then
20540          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20542          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20543$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20544          BOOT_JDK_FOUND=no
20545        else
20546          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20547          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20548
20549          # Extra M4 quote needed to protect [] in grep expression.
20550          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20551          if test "x$FOUND_CORRECT_VERSION" = x; then
20552            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20554            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20555$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20556            BOOT_JDK_FOUND=no
20557          else
20558            # We're done! :-)
20559            BOOT_JDK_FOUND=yes
20560
20561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20562
20563  # Input might be given as Windows format, start by converting to
20564  # unix format.
20565  path="$BOOT_JDK"
20566  new_path=`$CYGPATH -u "$path"`
20567
20568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20571  # "foo.exe" is OK but "foo" is an error.
20572  #
20573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20574  # It is also a way to make sure we got the proper file name for the real test later on.
20575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20576  if test "x$test_shortpath" = x; then
20577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20580  fi
20581
20582  # Call helper function which possibly converts this using DOS-style short mode.
20583  # If so, the updated path is stored in $new_path.
20584
20585  input_path="$new_path"
20586  # Check if we need to convert this using DOS-style short mode. If the path
20587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20588  # take no chances and rewrite it.
20589  # Note: m4 eats our [], so we need to use [ and ] instead.
20590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20591  if test "x$has_forbidden_chars" != x; then
20592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20596      # Going to short mode and back again did indeed matter. Since short mode is
20597      # case insensitive, let's make it lowercase to improve readability.
20598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20599      # Now convert it back to Unix-stile (cygpath)
20600      input_path=`$CYGPATH -u "$shortmode_path"`
20601      new_path="$input_path"
20602    fi
20603  fi
20604
20605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20606  if test "x$test_cygdrive_prefix" = x; then
20607    # As a simple fix, exclude /usr/bin since it's not a real path.
20608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20610      # a path prefixed by /cygdrive for fixpath to work.
20611      new_path="$CYGWIN_ROOT_PATH$input_path"
20612    fi
20613  fi
20614
20615
20616  if test "x$path" != "x$new_path"; then
20617    BOOT_JDK="$new_path"
20618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20620  fi
20621
20622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20623
20624  path="$BOOT_JDK"
20625  has_colon=`$ECHO $path | $GREP ^.:`
20626  new_path="$path"
20627  if test "x$has_colon" = x; then
20628    # Not in mixed or Windows style, start by that.
20629    new_path=`cmd //c echo $path`
20630  fi
20631
20632
20633  input_path="$new_path"
20634  # Check if we need to convert this using DOS-style short mode. If the path
20635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20636  # take no chances and rewrite it.
20637  # Note: m4 eats our [], so we need to use [ and ] instead.
20638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20639  if test "x$has_forbidden_chars" != x; then
20640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20642  fi
20643
20644
20645  windows_path="$new_path"
20646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20647    unix_path=`$CYGPATH -u "$windows_path"`
20648    new_path="$unix_path"
20649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20651    new_path="$unix_path"
20652  fi
20653
20654  if test "x$path" != "x$new_path"; then
20655    BOOT_JDK="$new_path"
20656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20658  fi
20659
20660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20662
20663  else
20664    # We're on a unix platform. Hooray! :)
20665    path="$BOOT_JDK"
20666    has_space=`$ECHO "$path" | $GREP " "`
20667    if test "x$has_space" != x; then
20668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20670      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20671    fi
20672
20673    # Use eval to expand a potential ~
20674    eval path="$path"
20675    if test ! -f "$path" && test ! -d "$path"; then
20676      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20677    fi
20678
20679    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20680  fi
20681
20682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20683$as_echo_n "checking for Boot JDK... " >&6; }
20684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20685$as_echo "$BOOT_JDK" >&6; }
20686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20687$as_echo_n "checking Boot JDK version... " >&6; }
20688            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20690$as_echo "$BOOT_JDK_VERSION" >&6; }
20691          fi # end check jdk version
20692        fi # end check javac
20693      fi # end check java
20694    fi # end check boot jdk found
20695  fi
20696
20697
20698  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20699
20700  if test "x$BOOT_JDK_FOUND" = xno; then
20701    # Now execute the test
20702
20703  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20704    # First check at user selected default
20705
20706  if test "x$BOOT_JDK_FOUND" = xno; then
20707    # Now execute the test
20708
20709  if test -x /usr/libexec/java_home; then
20710    BOOT_JDK=`/usr/libexec/java_home `
20711    BOOT_JDK_FOUND=maybe
20712    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20713$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20714  fi
20715
20716
20717    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20718    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20719      # Do we have a bin/java?
20720      if test ! -x "$BOOT_JDK/bin/java"; then
20721        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20723        BOOT_JDK_FOUND=no
20724      else
20725        # Do we have a bin/javac?
20726        if test ! -x "$BOOT_JDK/bin/javac"; then
20727          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20729          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20730$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20731          BOOT_JDK_FOUND=no
20732        else
20733          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20734          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20735
20736          # Extra M4 quote needed to protect [] in grep expression.
20737          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20738          if test "x$FOUND_CORRECT_VERSION" = x; then
20739            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20741            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20742$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20743            BOOT_JDK_FOUND=no
20744          else
20745            # We're done! :-)
20746            BOOT_JDK_FOUND=yes
20747
20748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20749
20750  # Input might be given as Windows format, start by converting to
20751  # unix format.
20752  path="$BOOT_JDK"
20753  new_path=`$CYGPATH -u "$path"`
20754
20755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20758  # "foo.exe" is OK but "foo" is an error.
20759  #
20760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20761  # It is also a way to make sure we got the proper file name for the real test later on.
20762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20763  if test "x$test_shortpath" = x; then
20764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20765$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20766    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20767  fi
20768
20769  # Call helper function which possibly converts this using DOS-style short mode.
20770  # If so, the updated path is stored in $new_path.
20771
20772  input_path="$new_path"
20773  # Check if we need to convert this using DOS-style short mode. If the path
20774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20775  # take no chances and rewrite it.
20776  # Note: m4 eats our [], so we need to use [ and ] instead.
20777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20778  if test "x$has_forbidden_chars" != x; then
20779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20783      # Going to short mode and back again did indeed matter. Since short mode is
20784      # case insensitive, let's make it lowercase to improve readability.
20785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20786      # Now convert it back to Unix-stile (cygpath)
20787      input_path=`$CYGPATH -u "$shortmode_path"`
20788      new_path="$input_path"
20789    fi
20790  fi
20791
20792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20793  if test "x$test_cygdrive_prefix" = x; then
20794    # As a simple fix, exclude /usr/bin since it's not a real path.
20795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20797      # a path prefixed by /cygdrive for fixpath to work.
20798      new_path="$CYGWIN_ROOT_PATH$input_path"
20799    fi
20800  fi
20801
20802
20803  if test "x$path" != "x$new_path"; then
20804    BOOT_JDK="$new_path"
20805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20807  fi
20808
20809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20810
20811  path="$BOOT_JDK"
20812  has_colon=`$ECHO $path | $GREP ^.:`
20813  new_path="$path"
20814  if test "x$has_colon" = x; then
20815    # Not in mixed or Windows style, start by that.
20816    new_path=`cmd //c echo $path`
20817  fi
20818
20819
20820  input_path="$new_path"
20821  # Check if we need to convert this using DOS-style short mode. If the path
20822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20823  # take no chances and rewrite it.
20824  # Note: m4 eats our [], so we need to use [ and ] instead.
20825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20826  if test "x$has_forbidden_chars" != x; then
20827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20829  fi
20830
20831
20832  windows_path="$new_path"
20833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20834    unix_path=`$CYGPATH -u "$windows_path"`
20835    new_path="$unix_path"
20836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20838    new_path="$unix_path"
20839  fi
20840
20841  if test "x$path" != "x$new_path"; then
20842    BOOT_JDK="$new_path"
20843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20844$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20845  fi
20846
20847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20849
20850  else
20851    # We're on a unix platform. Hooray! :)
20852    path="$BOOT_JDK"
20853    has_space=`$ECHO "$path" | $GREP " "`
20854    if test "x$has_space" != x; then
20855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20858    fi
20859
20860    # Use eval to expand a potential ~
20861    eval path="$path"
20862    if test ! -f "$path" && test ! -d "$path"; then
20863      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20864    fi
20865
20866    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20867  fi
20868
20869            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20870$as_echo_n "checking for Boot JDK... " >&6; }
20871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20872$as_echo "$BOOT_JDK" >&6; }
20873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20874$as_echo_n "checking Boot JDK version... " >&6; }
20875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20877$as_echo "$BOOT_JDK_VERSION" >&6; }
20878          fi # end check jdk version
20879        fi # end check javac
20880      fi # end check java
20881    fi # end check boot jdk found
20882  fi
20883
20884    # If that did not work out (e.g. too old), try explicit versions instead
20885
20886  if test "x$BOOT_JDK_FOUND" = xno; then
20887    # Now execute the test
20888
20889  if test -x /usr/libexec/java_home; then
20890    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20891    BOOT_JDK_FOUND=maybe
20892    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20893$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20894  fi
20895
20896
20897    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20898    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20899      # Do we have a bin/java?
20900      if test ! -x "$BOOT_JDK/bin/java"; then
20901        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20903        BOOT_JDK_FOUND=no
20904      else
20905        # Do we have a bin/javac?
20906        if test ! -x "$BOOT_JDK/bin/javac"; then
20907          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20909          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20910$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20911          BOOT_JDK_FOUND=no
20912        else
20913          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20914          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20915
20916          # Extra M4 quote needed to protect [] in grep expression.
20917          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20918          if test "x$FOUND_CORRECT_VERSION" = x; then
20919            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20920$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20921            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20922$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20923            BOOT_JDK_FOUND=no
20924          else
20925            # We're done! :-)
20926            BOOT_JDK_FOUND=yes
20927
20928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20929
20930  # Input might be given as Windows format, start by converting to
20931  # unix format.
20932  path="$BOOT_JDK"
20933  new_path=`$CYGPATH -u "$path"`
20934
20935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20938  # "foo.exe" is OK but "foo" is an error.
20939  #
20940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20941  # It is also a way to make sure we got the proper file name for the real test later on.
20942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20943  if test "x$test_shortpath" = x; then
20944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20946    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20947  fi
20948
20949  # Call helper function which possibly converts this using DOS-style short mode.
20950  # If so, the updated path is stored in $new_path.
20951
20952  input_path="$new_path"
20953  # Check if we need to convert this using DOS-style short mode. If the path
20954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20955  # take no chances and rewrite it.
20956  # Note: m4 eats our [], so we need to use [ and ] instead.
20957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20958  if test "x$has_forbidden_chars" != x; then
20959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20963      # Going to short mode and back again did indeed matter. Since short mode is
20964      # case insensitive, let's make it lowercase to improve readability.
20965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20966      # Now convert it back to Unix-stile (cygpath)
20967      input_path=`$CYGPATH -u "$shortmode_path"`
20968      new_path="$input_path"
20969    fi
20970  fi
20971
20972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20973  if test "x$test_cygdrive_prefix" = x; then
20974    # As a simple fix, exclude /usr/bin since it's not a real path.
20975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20977      # a path prefixed by /cygdrive for fixpath to work.
20978      new_path="$CYGWIN_ROOT_PATH$input_path"
20979    fi
20980  fi
20981
20982
20983  if test "x$path" != "x$new_path"; then
20984    BOOT_JDK="$new_path"
20985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20987  fi
20988
20989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20990
20991  path="$BOOT_JDK"
20992  has_colon=`$ECHO $path | $GREP ^.:`
20993  new_path="$path"
20994  if test "x$has_colon" = x; then
20995    # Not in mixed or Windows style, start by that.
20996    new_path=`cmd //c echo $path`
20997  fi
20998
20999
21000  input_path="$new_path"
21001  # Check if we need to convert this using DOS-style short mode. If the path
21002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21003  # take no chances and rewrite it.
21004  # Note: m4 eats our [], so we need to use [ and ] instead.
21005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21006  if test "x$has_forbidden_chars" != x; then
21007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21009  fi
21010
21011
21012  windows_path="$new_path"
21013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21014    unix_path=`$CYGPATH -u "$windows_path"`
21015    new_path="$unix_path"
21016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21018    new_path="$unix_path"
21019  fi
21020
21021  if test "x$path" != "x$new_path"; then
21022    BOOT_JDK="$new_path"
21023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21025  fi
21026
21027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21029
21030  else
21031    # We're on a unix platform. Hooray! :)
21032    path="$BOOT_JDK"
21033    has_space=`$ECHO "$path" | $GREP " "`
21034    if test "x$has_space" != x; then
21035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21037      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21038    fi
21039
21040    # Use eval to expand a potential ~
21041    eval path="$path"
21042    if test ! -f "$path" && test ! -d "$path"; then
21043      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21044    fi
21045
21046    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21047  fi
21048
21049            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21050$as_echo_n "checking for Boot JDK... " >&6; }
21051            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21052$as_echo "$BOOT_JDK" >&6; }
21053            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21054$as_echo_n "checking Boot JDK version... " >&6; }
21055            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21056            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21057$as_echo "$BOOT_JDK_VERSION" >&6; }
21058          fi # end check jdk version
21059        fi # end check javac
21060      fi # end check java
21061    fi # end check boot jdk found
21062  fi
21063
21064
21065  if test "x$BOOT_JDK_FOUND" = xno; then
21066    # Now execute the test
21067
21068  if test -x /usr/libexec/java_home; then
21069    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21070    BOOT_JDK_FOUND=maybe
21071    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21072$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21073  fi
21074
21075
21076    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21077    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21078      # Do we have a bin/java?
21079      if test ! -x "$BOOT_JDK/bin/java"; then
21080        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21082        BOOT_JDK_FOUND=no
21083      else
21084        # Do we have a bin/javac?
21085        if test ! -x "$BOOT_JDK/bin/javac"; then
21086          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21088          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21089$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21090          BOOT_JDK_FOUND=no
21091        else
21092          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21093          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21094
21095          # Extra M4 quote needed to protect [] in grep expression.
21096          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21097          if test "x$FOUND_CORRECT_VERSION" = x; then
21098            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21100            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21101$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21102            BOOT_JDK_FOUND=no
21103          else
21104            # We're done! :-)
21105            BOOT_JDK_FOUND=yes
21106
21107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21108
21109  # Input might be given as Windows format, start by converting to
21110  # unix format.
21111  path="$BOOT_JDK"
21112  new_path=`$CYGPATH -u "$path"`
21113
21114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21117  # "foo.exe" is OK but "foo" is an error.
21118  #
21119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21120  # It is also a way to make sure we got the proper file name for the real test later on.
21121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21122  if test "x$test_shortpath" = x; then
21123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21125    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21126  fi
21127
21128  # Call helper function which possibly converts this using DOS-style short mode.
21129  # If so, the updated path is stored in $new_path.
21130
21131  input_path="$new_path"
21132  # Check if we need to convert this using DOS-style short mode. If the path
21133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21134  # take no chances and rewrite it.
21135  # Note: m4 eats our [], so we need to use [ and ] instead.
21136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21137  if test "x$has_forbidden_chars" != x; then
21138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21142      # Going to short mode and back again did indeed matter. Since short mode is
21143      # case insensitive, let's make it lowercase to improve readability.
21144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21145      # Now convert it back to Unix-stile (cygpath)
21146      input_path=`$CYGPATH -u "$shortmode_path"`
21147      new_path="$input_path"
21148    fi
21149  fi
21150
21151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21152  if test "x$test_cygdrive_prefix" = x; then
21153    # As a simple fix, exclude /usr/bin since it's not a real path.
21154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21156      # a path prefixed by /cygdrive for fixpath to work.
21157      new_path="$CYGWIN_ROOT_PATH$input_path"
21158    fi
21159  fi
21160
21161
21162  if test "x$path" != "x$new_path"; then
21163    BOOT_JDK="$new_path"
21164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21166  fi
21167
21168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21169
21170  path="$BOOT_JDK"
21171  has_colon=`$ECHO $path | $GREP ^.:`
21172  new_path="$path"
21173  if test "x$has_colon" = x; then
21174    # Not in mixed or Windows style, start by that.
21175    new_path=`cmd //c echo $path`
21176  fi
21177
21178
21179  input_path="$new_path"
21180  # Check if we need to convert this using DOS-style short mode. If the path
21181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21182  # take no chances and rewrite it.
21183  # Note: m4 eats our [], so we need to use [ and ] instead.
21184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21185  if test "x$has_forbidden_chars" != x; then
21186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21188  fi
21189
21190
21191  windows_path="$new_path"
21192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21193    unix_path=`$CYGPATH -u "$windows_path"`
21194    new_path="$unix_path"
21195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21197    new_path="$unix_path"
21198  fi
21199
21200  if test "x$path" != "x$new_path"; then
21201    BOOT_JDK="$new_path"
21202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21203$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21204  fi
21205
21206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21208
21209  else
21210    # We're on a unix platform. Hooray! :)
21211    path="$BOOT_JDK"
21212    has_space=`$ECHO "$path" | $GREP " "`
21213    if test "x$has_space" != x; then
21214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21216      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21217    fi
21218
21219    # Use eval to expand a potential ~
21220    eval path="$path"
21221    if test ! -f "$path" && test ! -d "$path"; then
21222      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21223    fi
21224
21225    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21226  fi
21227
21228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21229$as_echo_n "checking for Boot JDK... " >&6; }
21230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21231$as_echo "$BOOT_JDK" >&6; }
21232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21233$as_echo_n "checking Boot JDK version... " >&6; }
21234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21236$as_echo "$BOOT_JDK_VERSION" >&6; }
21237          fi # end check jdk version
21238        fi # end check javac
21239      fi # end check java
21240    fi # end check boot jdk found
21241  fi
21242
21243
21244  if test "x$BOOT_JDK_FOUND" = xno; then
21245    # Now execute the test
21246
21247  if test -x /usr/libexec/java_home; then
21248    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21249    BOOT_JDK_FOUND=maybe
21250    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21251$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21252  fi
21253
21254
21255    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21256    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21257      # Do we have a bin/java?
21258      if test ! -x "$BOOT_JDK/bin/java"; then
21259        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21261        BOOT_JDK_FOUND=no
21262      else
21263        # Do we have a bin/javac?
21264        if test ! -x "$BOOT_JDK/bin/javac"; then
21265          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21267          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21268$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21269          BOOT_JDK_FOUND=no
21270        else
21271          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21272          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21273
21274          # Extra M4 quote needed to protect [] in grep expression.
21275          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21276          if test "x$FOUND_CORRECT_VERSION" = x; then
21277            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21279            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21280$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21281            BOOT_JDK_FOUND=no
21282          else
21283            # We're done! :-)
21284            BOOT_JDK_FOUND=yes
21285
21286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21287
21288  # Input might be given as Windows format, start by converting to
21289  # unix format.
21290  path="$BOOT_JDK"
21291  new_path=`$CYGPATH -u "$path"`
21292
21293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21296  # "foo.exe" is OK but "foo" is an error.
21297  #
21298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21299  # It is also a way to make sure we got the proper file name for the real test later on.
21300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21301  if test "x$test_shortpath" = x; then
21302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21304    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21305  fi
21306
21307  # Call helper function which possibly converts this using DOS-style short mode.
21308  # If so, the updated path is stored in $new_path.
21309
21310  input_path="$new_path"
21311  # Check if we need to convert this using DOS-style short mode. If the path
21312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21313  # take no chances and rewrite it.
21314  # Note: m4 eats our [], so we need to use [ and ] instead.
21315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21316  if test "x$has_forbidden_chars" != x; then
21317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21321      # Going to short mode and back again did indeed matter. Since short mode is
21322      # case insensitive, let's make it lowercase to improve readability.
21323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21324      # Now convert it back to Unix-stile (cygpath)
21325      input_path=`$CYGPATH -u "$shortmode_path"`
21326      new_path="$input_path"
21327    fi
21328  fi
21329
21330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21331  if test "x$test_cygdrive_prefix" = x; then
21332    # As a simple fix, exclude /usr/bin since it's not a real path.
21333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21335      # a path prefixed by /cygdrive for fixpath to work.
21336      new_path="$CYGWIN_ROOT_PATH$input_path"
21337    fi
21338  fi
21339
21340
21341  if test "x$path" != "x$new_path"; then
21342    BOOT_JDK="$new_path"
21343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21345  fi
21346
21347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21348
21349  path="$BOOT_JDK"
21350  has_colon=`$ECHO $path | $GREP ^.:`
21351  new_path="$path"
21352  if test "x$has_colon" = x; then
21353    # Not in mixed or Windows style, start by that.
21354    new_path=`cmd //c echo $path`
21355  fi
21356
21357
21358  input_path="$new_path"
21359  # Check if we need to convert this using DOS-style short mode. If the path
21360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21361  # take no chances and rewrite it.
21362  # Note: m4 eats our [], so we need to use [ and ] instead.
21363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21364  if test "x$has_forbidden_chars" != x; then
21365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21367  fi
21368
21369
21370  windows_path="$new_path"
21371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21372    unix_path=`$CYGPATH -u "$windows_path"`
21373    new_path="$unix_path"
21374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21376    new_path="$unix_path"
21377  fi
21378
21379  if test "x$path" != "x$new_path"; then
21380    BOOT_JDK="$new_path"
21381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21382$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21383  fi
21384
21385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21387
21388  else
21389    # We're on a unix platform. Hooray! :)
21390    path="$BOOT_JDK"
21391    has_space=`$ECHO "$path" | $GREP " "`
21392    if test "x$has_space" != x; then
21393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21395      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21396    fi
21397
21398    # Use eval to expand a potential ~
21399    eval path="$path"
21400    if test ! -f "$path" && test ! -d "$path"; then
21401      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21402    fi
21403
21404    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21405  fi
21406
21407            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21408$as_echo_n "checking for Boot JDK... " >&6; }
21409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21410$as_echo "$BOOT_JDK" >&6; }
21411            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21412$as_echo_n "checking Boot JDK version... " >&6; }
21413            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21415$as_echo "$BOOT_JDK_VERSION" >&6; }
21416          fi # end check jdk version
21417        fi # end check javac
21418      fi # end check java
21419    fi # end check boot jdk found
21420  fi
21421
21422  fi
21423
21424
21425    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21426    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21427      # Do we have a bin/java?
21428      if test ! -x "$BOOT_JDK/bin/java"; then
21429        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21431        BOOT_JDK_FOUND=no
21432      else
21433        # Do we have a bin/javac?
21434        if test ! -x "$BOOT_JDK/bin/javac"; then
21435          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21437          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21438$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21439          BOOT_JDK_FOUND=no
21440        else
21441          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21442          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21443
21444          # Extra M4 quote needed to protect [] in grep expression.
21445          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21446          if test "x$FOUND_CORRECT_VERSION" = x; then
21447            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21449            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21450$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21451            BOOT_JDK_FOUND=no
21452          else
21453            # We're done! :-)
21454            BOOT_JDK_FOUND=yes
21455
21456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21457
21458  # Input might be given as Windows format, start by converting to
21459  # unix format.
21460  path="$BOOT_JDK"
21461  new_path=`$CYGPATH -u "$path"`
21462
21463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21466  # "foo.exe" is OK but "foo" is an error.
21467  #
21468  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21469  # It is also a way to make sure we got the proper file name for the real test later on.
21470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21471  if test "x$test_shortpath" = x; then
21472    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21473$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21474    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21475  fi
21476
21477  # Call helper function which possibly converts this using DOS-style short mode.
21478  # If so, the updated path is stored in $new_path.
21479
21480  input_path="$new_path"
21481  # Check if we need to convert this using DOS-style short mode. If the path
21482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21483  # take no chances and rewrite it.
21484  # Note: m4 eats our [], so we need to use [ and ] instead.
21485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21486  if test "x$has_forbidden_chars" != x; then
21487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21491      # Going to short mode and back again did indeed matter. Since short mode is
21492      # case insensitive, let's make it lowercase to improve readability.
21493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21494      # Now convert it back to Unix-stile (cygpath)
21495      input_path=`$CYGPATH -u "$shortmode_path"`
21496      new_path="$input_path"
21497    fi
21498  fi
21499
21500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21501  if test "x$test_cygdrive_prefix" = x; then
21502    # As a simple fix, exclude /usr/bin since it's not a real path.
21503    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21505      # a path prefixed by /cygdrive for fixpath to work.
21506      new_path="$CYGWIN_ROOT_PATH$input_path"
21507    fi
21508  fi
21509
21510
21511  if test "x$path" != "x$new_path"; then
21512    BOOT_JDK="$new_path"
21513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21515  fi
21516
21517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21518
21519  path="$BOOT_JDK"
21520  has_colon=`$ECHO $path | $GREP ^.:`
21521  new_path="$path"
21522  if test "x$has_colon" = x; then
21523    # Not in mixed or Windows style, start by that.
21524    new_path=`cmd //c echo $path`
21525  fi
21526
21527
21528  input_path="$new_path"
21529  # Check if we need to convert this using DOS-style short mode. If the path
21530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21531  # take no chances and rewrite it.
21532  # Note: m4 eats our [], so we need to use [ and ] instead.
21533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21534  if test "x$has_forbidden_chars" != x; then
21535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21537  fi
21538
21539
21540  windows_path="$new_path"
21541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21542    unix_path=`$CYGPATH -u "$windows_path"`
21543    new_path="$unix_path"
21544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21546    new_path="$unix_path"
21547  fi
21548
21549  if test "x$path" != "x$new_path"; then
21550    BOOT_JDK="$new_path"
21551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21553  fi
21554
21555  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21556  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21557
21558  else
21559    # We're on a unix platform. Hooray! :)
21560    path="$BOOT_JDK"
21561    has_space=`$ECHO "$path" | $GREP " "`
21562    if test "x$has_space" != x; then
21563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21564$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21565      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21566    fi
21567
21568    # Use eval to expand a potential ~
21569    eval path="$path"
21570    if test ! -f "$path" && test ! -d "$path"; then
21571      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21572    fi
21573
21574    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21575  fi
21576
21577            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21578$as_echo_n "checking for Boot JDK... " >&6; }
21579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21580$as_echo "$BOOT_JDK" >&6; }
21581            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21582$as_echo_n "checking Boot JDK version... " >&6; }
21583            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21585$as_echo "$BOOT_JDK_VERSION" >&6; }
21586          fi # end check jdk version
21587        fi # end check javac
21588      fi # end check java
21589    fi # end check boot jdk found
21590  fi
21591
21592
21593  # Test: Is $JAVA_HOME set?
21594
21595  if test "x$BOOT_JDK_FOUND" = xno; then
21596    # Now execute the test
21597
21598  if test "x$JAVA_HOME" != x; then
21599    JAVA_HOME_PROCESSED="$JAVA_HOME"
21600
21601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21602
21603  # Input might be given as Windows format, start by converting to
21604  # unix format.
21605  path="$JAVA_HOME_PROCESSED"
21606  new_path=`$CYGPATH -u "$path"`
21607
21608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21611  # "foo.exe" is OK but "foo" is an error.
21612  #
21613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21614  # It is also a way to make sure we got the proper file name for the real test later on.
21615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21616  if test "x$test_shortpath" = x; then
21617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21618$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21619    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21620  fi
21621
21622  # Call helper function which possibly converts this using DOS-style short mode.
21623  # If so, the updated path is stored in $new_path.
21624
21625  input_path="$new_path"
21626  # Check if we need to convert this using DOS-style short mode. If the path
21627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21628  # take no chances and rewrite it.
21629  # Note: m4 eats our [], so we need to use [ and ] instead.
21630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21631  if test "x$has_forbidden_chars" != x; then
21632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21636      # Going to short mode and back again did indeed matter. Since short mode is
21637      # case insensitive, let's make it lowercase to improve readability.
21638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21639      # Now convert it back to Unix-stile (cygpath)
21640      input_path=`$CYGPATH -u "$shortmode_path"`
21641      new_path="$input_path"
21642    fi
21643  fi
21644
21645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21646  if test "x$test_cygdrive_prefix" = x; then
21647    # As a simple fix, exclude /usr/bin since it's not a real path.
21648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21650      # a path prefixed by /cygdrive for fixpath to work.
21651      new_path="$CYGWIN_ROOT_PATH$input_path"
21652    fi
21653  fi
21654
21655
21656  if test "x$path" != "x$new_path"; then
21657    JAVA_HOME_PROCESSED="$new_path"
21658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21659$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21660  fi
21661
21662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21663
21664  path="$JAVA_HOME_PROCESSED"
21665  has_colon=`$ECHO $path | $GREP ^.:`
21666  new_path="$path"
21667  if test "x$has_colon" = x; then
21668    # Not in mixed or Windows style, start by that.
21669    new_path=`cmd //c echo $path`
21670  fi
21671
21672
21673  input_path="$new_path"
21674  # Check if we need to convert this using DOS-style short mode. If the path
21675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21676  # take no chances and rewrite it.
21677  # Note: m4 eats our [], so we need to use [ and ] instead.
21678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21679  if test "x$has_forbidden_chars" != x; then
21680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21682  fi
21683
21684
21685  windows_path="$new_path"
21686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21687    unix_path=`$CYGPATH -u "$windows_path"`
21688    new_path="$unix_path"
21689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21691    new_path="$unix_path"
21692  fi
21693
21694  if test "x$path" != "x$new_path"; then
21695    JAVA_HOME_PROCESSED="$new_path"
21696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21697$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21698  fi
21699
21700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21702
21703  else
21704    # We're on a unix platform. Hooray! :)
21705    path="$JAVA_HOME_PROCESSED"
21706    has_space=`$ECHO "$path" | $GREP " "`
21707    if test "x$has_space" != x; then
21708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21709$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21710      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21711    fi
21712
21713    # Use eval to expand a potential ~
21714    eval path="$path"
21715    if test ! -f "$path" && test ! -d "$path"; then
21716      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21717    fi
21718
21719    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21720  fi
21721
21722    if test ! -d "$JAVA_HOME_PROCESSED"; then
21723      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21724$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21725    else
21726      # Aha, the user has set a JAVA_HOME
21727      # let us use that as the Boot JDK.
21728      BOOT_JDK="$JAVA_HOME_PROCESSED"
21729      BOOT_JDK_FOUND=maybe
21730      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21731$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21732    fi
21733  fi
21734
21735
21736    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21737    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21738      # Do we have a bin/java?
21739      if test ! -x "$BOOT_JDK/bin/java"; then
21740        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21742        BOOT_JDK_FOUND=no
21743      else
21744        # Do we have a bin/javac?
21745        if test ! -x "$BOOT_JDK/bin/javac"; then
21746          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21748          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21749$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21750          BOOT_JDK_FOUND=no
21751        else
21752          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21753          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21754
21755          # Extra M4 quote needed to protect [] in grep expression.
21756          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21757          if test "x$FOUND_CORRECT_VERSION" = x; then
21758            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21760            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21761$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21762            BOOT_JDK_FOUND=no
21763          else
21764            # We're done! :-)
21765            BOOT_JDK_FOUND=yes
21766
21767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21768
21769  # Input might be given as Windows format, start by converting to
21770  # unix format.
21771  path="$BOOT_JDK"
21772  new_path=`$CYGPATH -u "$path"`
21773
21774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21777  # "foo.exe" is OK but "foo" is an error.
21778  #
21779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21780  # It is also a way to make sure we got the proper file name for the real test later on.
21781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21782  if test "x$test_shortpath" = x; then
21783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21785    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21786  fi
21787
21788  # Call helper function which possibly converts this using DOS-style short mode.
21789  # If so, the updated path is stored in $new_path.
21790
21791  input_path="$new_path"
21792  # Check if we need to convert this using DOS-style short mode. If the path
21793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21794  # take no chances and rewrite it.
21795  # Note: m4 eats our [], so we need to use [ and ] instead.
21796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21797  if test "x$has_forbidden_chars" != x; then
21798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21802      # Going to short mode and back again did indeed matter. Since short mode is
21803      # case insensitive, let's make it lowercase to improve readability.
21804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21805      # Now convert it back to Unix-stile (cygpath)
21806      input_path=`$CYGPATH -u "$shortmode_path"`
21807      new_path="$input_path"
21808    fi
21809  fi
21810
21811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21812  if test "x$test_cygdrive_prefix" = x; then
21813    # As a simple fix, exclude /usr/bin since it's not a real path.
21814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21816      # a path prefixed by /cygdrive for fixpath to work.
21817      new_path="$CYGWIN_ROOT_PATH$input_path"
21818    fi
21819  fi
21820
21821
21822  if test "x$path" != "x$new_path"; then
21823    BOOT_JDK="$new_path"
21824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21826  fi
21827
21828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21829
21830  path="$BOOT_JDK"
21831  has_colon=`$ECHO $path | $GREP ^.:`
21832  new_path="$path"
21833  if test "x$has_colon" = x; then
21834    # Not in mixed or Windows style, start by that.
21835    new_path=`cmd //c echo $path`
21836  fi
21837
21838
21839  input_path="$new_path"
21840  # Check if we need to convert this using DOS-style short mode. If the path
21841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21842  # take no chances and rewrite it.
21843  # Note: m4 eats our [], so we need to use [ and ] instead.
21844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21845  if test "x$has_forbidden_chars" != x; then
21846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21848  fi
21849
21850
21851  windows_path="$new_path"
21852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21853    unix_path=`$CYGPATH -u "$windows_path"`
21854    new_path="$unix_path"
21855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21857    new_path="$unix_path"
21858  fi
21859
21860  if test "x$path" != "x$new_path"; then
21861    BOOT_JDK="$new_path"
21862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21864  fi
21865
21866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21868
21869  else
21870    # We're on a unix platform. Hooray! :)
21871    path="$BOOT_JDK"
21872    has_space=`$ECHO "$path" | $GREP " "`
21873    if test "x$has_space" != x; then
21874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21876      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21877    fi
21878
21879    # Use eval to expand a potential ~
21880    eval path="$path"
21881    if test ! -f "$path" && test ! -d "$path"; then
21882      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21883    fi
21884
21885    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21886  fi
21887
21888            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21889$as_echo_n "checking for Boot JDK... " >&6; }
21890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21891$as_echo "$BOOT_JDK" >&6; }
21892            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21893$as_echo_n "checking Boot JDK version... " >&6; }
21894            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21896$as_echo "$BOOT_JDK_VERSION" >&6; }
21897          fi # end check jdk version
21898        fi # end check javac
21899      fi # end check java
21900    fi # end check boot jdk found
21901  fi
21902
21903
21904  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21905
21906  if test "x$BOOT_JDK_FOUND" = xno; then
21907    # Now execute the test
21908
21909  # Extract the first word of "javac", so it can be a program name with args.
21910set dummy javac; ac_word=$2
21911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21912$as_echo_n "checking for $ac_word... " >&6; }
21913if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21914  $as_echo_n "(cached) " >&6
21915else
21916  case $JAVAC_CHECK in
21917  [\\/]* | ?:[\\/]*)
21918  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21919  ;;
21920  *)
21921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21922for as_dir in $PATH
21923do
21924  IFS=$as_save_IFS
21925  test -z "$as_dir" && as_dir=.
21926    for ac_exec_ext in '' $ac_executable_extensions; do
21927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21928    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21930    break 2
21931  fi
21932done
21933  done
21934IFS=$as_save_IFS
21935
21936  ;;
21937esac
21938fi
21939JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21940if test -n "$JAVAC_CHECK"; then
21941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21942$as_echo "$JAVAC_CHECK" >&6; }
21943else
21944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21945$as_echo "no" >&6; }
21946fi
21947
21948
21949  # Extract the first word of "java", so it can be a program name with args.
21950set dummy java; ac_word=$2
21951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21952$as_echo_n "checking for $ac_word... " >&6; }
21953if ${ac_cv_path_JAVA_CHECK+:} false; then :
21954  $as_echo_n "(cached) " >&6
21955else
21956  case $JAVA_CHECK in
21957  [\\/]* | ?:[\\/]*)
21958  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21959  ;;
21960  *)
21961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21962for as_dir in $PATH
21963do
21964  IFS=$as_save_IFS
21965  test -z "$as_dir" && as_dir=.
21966    for ac_exec_ext in '' $ac_executable_extensions; do
21967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21968    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21970    break 2
21971  fi
21972done
21973  done
21974IFS=$as_save_IFS
21975
21976  ;;
21977esac
21978fi
21979JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21980if test -n "$JAVA_CHECK"; then
21981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21982$as_echo "$JAVA_CHECK" >&6; }
21983else
21984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21985$as_echo "no" >&6; }
21986fi
21987
21988
21989  BINARY="$JAVAC_CHECK"
21990  if test "x$JAVAC_CHECK" = x; then
21991    BINARY="$JAVA_CHECK"
21992  fi
21993  if test "x$BINARY" != x; then
21994    # So there is a java(c) binary, it might be part of a JDK.
21995    # Lets find the JDK/JRE directory by following symbolic links.
21996    # Linux/GNU systems often have links from /usr/bin/java to
21997    # /etc/alternatives/java to the real JDK binary.
21998
21999  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22000    # Follow a chain of symbolic links. Use readlink
22001    # where it exists, else fall back to horribly
22002    # complicated shell code.
22003    if test "x$READLINK_TESTED" != yes; then
22004      # On MacOSX there is a readlink tool with a different
22005      # purpose than the GNU readlink tool. Check the found readlink.
22006      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22007      if test "x$ISGNU" = x; then
22008        # A readlink that we do not know how to use.
22009        # Are there other non-GNU readlinks out there?
22010        READLINK_TESTED=yes
22011        READLINK=
22012      fi
22013    fi
22014
22015    if test "x$READLINK" != x; then
22016      BINARY=`$READLINK -f $BINARY`
22017    else
22018      # Save the current directory for restoring afterwards
22019      STARTDIR=$PWD
22020      COUNTER=0
22021      sym_link_dir=`$DIRNAME $BINARY`
22022      sym_link_file=`$BASENAME $BINARY`
22023      cd $sym_link_dir
22024      # Use -P flag to resolve symlinks in directories.
22025      cd `$THEPWDCMD -P`
22026      sym_link_dir=`$THEPWDCMD -P`
22027      # Resolve file symlinks
22028      while test $COUNTER -lt 20; do
22029        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22030        if test "x$ISLINK" == x; then
22031          # This is not a symbolic link! We are done!
22032          break
22033        fi
22034        # Again resolve directory symlinks since the target of the just found
22035        # link could be in a different directory
22036        cd `$DIRNAME $ISLINK`
22037        sym_link_dir=`$THEPWDCMD -P`
22038        sym_link_file=`$BASENAME $ISLINK`
22039        let COUNTER=COUNTER+1
22040      done
22041      cd $STARTDIR
22042      BINARY=$sym_link_dir/$sym_link_file
22043    fi
22044  fi
22045
22046    BOOT_JDK=`dirname "$BINARY"`
22047    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22048    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22049      # Looks like we found ourselves an JDK
22050      BOOT_JDK_FOUND=maybe
22051      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22052$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22053    fi
22054  fi
22055
22056
22057    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22058    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22059      # Do we have a bin/java?
22060      if test ! -x "$BOOT_JDK/bin/java"; then
22061        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22063        BOOT_JDK_FOUND=no
22064      else
22065        # Do we have a bin/javac?
22066        if test ! -x "$BOOT_JDK/bin/javac"; then
22067          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22069          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22070$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22071          BOOT_JDK_FOUND=no
22072        else
22073          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22074          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22075
22076          # Extra M4 quote needed to protect [] in grep expression.
22077          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22078          if test "x$FOUND_CORRECT_VERSION" = x; then
22079            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22081            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22082$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22083            BOOT_JDK_FOUND=no
22084          else
22085            # We're done! :-)
22086            BOOT_JDK_FOUND=yes
22087
22088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22089
22090  # Input might be given as Windows format, start by converting to
22091  # unix format.
22092  path="$BOOT_JDK"
22093  new_path=`$CYGPATH -u "$path"`
22094
22095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22098  # "foo.exe" is OK but "foo" is an error.
22099  #
22100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22101  # It is also a way to make sure we got the proper file name for the real test later on.
22102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22103  if test "x$test_shortpath" = x; then
22104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22106    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22107  fi
22108
22109  # Call helper function which possibly converts this using DOS-style short mode.
22110  # If so, the updated path is stored in $new_path.
22111
22112  input_path="$new_path"
22113  # Check if we need to convert this using DOS-style short mode. If the path
22114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22115  # take no chances and rewrite it.
22116  # Note: m4 eats our [], so we need to use [ and ] instead.
22117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22118  if test "x$has_forbidden_chars" != x; then
22119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22123      # Going to short mode and back again did indeed matter. Since short mode is
22124      # case insensitive, let's make it lowercase to improve readability.
22125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22126      # Now convert it back to Unix-stile (cygpath)
22127      input_path=`$CYGPATH -u "$shortmode_path"`
22128      new_path="$input_path"
22129    fi
22130  fi
22131
22132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22133  if test "x$test_cygdrive_prefix" = x; then
22134    # As a simple fix, exclude /usr/bin since it's not a real path.
22135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22137      # a path prefixed by /cygdrive for fixpath to work.
22138      new_path="$CYGWIN_ROOT_PATH$input_path"
22139    fi
22140  fi
22141
22142
22143  if test "x$path" != "x$new_path"; then
22144    BOOT_JDK="$new_path"
22145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22147  fi
22148
22149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22150
22151  path="$BOOT_JDK"
22152  has_colon=`$ECHO $path | $GREP ^.:`
22153  new_path="$path"
22154  if test "x$has_colon" = x; then
22155    # Not in mixed or Windows style, start by that.
22156    new_path=`cmd //c echo $path`
22157  fi
22158
22159
22160  input_path="$new_path"
22161  # Check if we need to convert this using DOS-style short mode. If the path
22162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22163  # take no chances and rewrite it.
22164  # Note: m4 eats our [], so we need to use [ and ] instead.
22165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22166  if test "x$has_forbidden_chars" != x; then
22167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22169  fi
22170
22171
22172  windows_path="$new_path"
22173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22174    unix_path=`$CYGPATH -u "$windows_path"`
22175    new_path="$unix_path"
22176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22178    new_path="$unix_path"
22179  fi
22180
22181  if test "x$path" != "x$new_path"; then
22182    BOOT_JDK="$new_path"
22183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22185  fi
22186
22187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22189
22190  else
22191    # We're on a unix platform. Hooray! :)
22192    path="$BOOT_JDK"
22193    has_space=`$ECHO "$path" | $GREP " "`
22194    if test "x$has_space" != x; then
22195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22197      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22198    fi
22199
22200    # Use eval to expand a potential ~
22201    eval path="$path"
22202    if test ! -f "$path" && test ! -d "$path"; then
22203      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22204    fi
22205
22206    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22207  fi
22208
22209            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22210$as_echo_n "checking for Boot JDK... " >&6; }
22211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22212$as_echo "$BOOT_JDK" >&6; }
22213            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22214$as_echo_n "checking Boot JDK version... " >&6; }
22215            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22217$as_echo "$BOOT_JDK_VERSION" >&6; }
22218          fi # end check jdk version
22219        fi # end check javac
22220      fi # end check java
22221    fi # end check boot jdk found
22222  fi
22223
22224
22225  # Test: Is there a JDK installed in default, well-known locations?
22226
22227  if test "x$BOOT_JDK_FOUND" = xno; then
22228    # Now execute the test
22229
22230  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22231
22232  if test "x$BOOT_JDK_FOUND" = xno; then
22233    # Now execute the test
22234
22235  if test "x$ProgramW6432" != x; then
22236    VIRTUAL_DIR="$ProgramW6432/Java"
22237
22238  windows_path="$VIRTUAL_DIR"
22239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22240    unix_path=`$CYGPATH -u "$windows_path"`
22241    VIRTUAL_DIR="$unix_path"
22242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22244    VIRTUAL_DIR="$unix_path"
22245  fi
22246
22247
22248  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22249  BOOT_JDK_SUFFIX=""
22250  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22251  if test "x$ALL_JDKS_FOUND" != x; then
22252    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22253
22254  if test "x$BOOT_JDK_FOUND" = xno; then
22255    # Now execute the test
22256
22257        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22258        if test -d "$BOOT_JDK"; then
22259          BOOT_JDK_FOUND=maybe
22260          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22261$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22262        fi
22263
22264
22265    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22266    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22267      # Do we have a bin/java?
22268      if test ! -x "$BOOT_JDK/bin/java"; then
22269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22271        BOOT_JDK_FOUND=no
22272      else
22273        # Do we have a bin/javac?
22274        if test ! -x "$BOOT_JDK/bin/javac"; then
22275          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22277          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22278$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22279          BOOT_JDK_FOUND=no
22280        else
22281          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22282          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22283
22284          # Extra M4 quote needed to protect [] in grep expression.
22285          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22286          if test "x$FOUND_CORRECT_VERSION" = x; then
22287            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22289            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22290$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22291            BOOT_JDK_FOUND=no
22292          else
22293            # We're done! :-)
22294            BOOT_JDK_FOUND=yes
22295
22296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22297
22298  # Input might be given as Windows format, start by converting to
22299  # unix format.
22300  path="$BOOT_JDK"
22301  new_path=`$CYGPATH -u "$path"`
22302
22303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22306  # "foo.exe" is OK but "foo" is an error.
22307  #
22308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22309  # It is also a way to make sure we got the proper file name for the real test later on.
22310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22311  if test "x$test_shortpath" = x; then
22312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22314    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22315  fi
22316
22317  # Call helper function which possibly converts this using DOS-style short mode.
22318  # If so, the updated path is stored in $new_path.
22319
22320  input_path="$new_path"
22321  # Check if we need to convert this using DOS-style short mode. If the path
22322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22323  # take no chances and rewrite it.
22324  # Note: m4 eats our [], so we need to use [ and ] instead.
22325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22326  if test "x$has_forbidden_chars" != x; then
22327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22331      # Going to short mode and back again did indeed matter. Since short mode is
22332      # case insensitive, let's make it lowercase to improve readability.
22333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22334      # Now convert it back to Unix-stile (cygpath)
22335      input_path=`$CYGPATH -u "$shortmode_path"`
22336      new_path="$input_path"
22337    fi
22338  fi
22339
22340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22341  if test "x$test_cygdrive_prefix" = x; then
22342    # As a simple fix, exclude /usr/bin since it's not a real path.
22343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22345      # a path prefixed by /cygdrive for fixpath to work.
22346      new_path="$CYGWIN_ROOT_PATH$input_path"
22347    fi
22348  fi
22349
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  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22358
22359  path="$BOOT_JDK"
22360  has_colon=`$ECHO $path | $GREP ^.:`
22361  new_path="$path"
22362  if test "x$has_colon" = x; then
22363    # Not in mixed or Windows style, start by that.
22364    new_path=`cmd //c echo $path`
22365  fi
22366
22367
22368  input_path="$new_path"
22369  # Check if we need to convert this using DOS-style short mode. If the path
22370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22371  # take no chances and rewrite it.
22372  # Note: m4 eats our [], so we need to use [ and ] instead.
22373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22374  if test "x$has_forbidden_chars" != x; then
22375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22377  fi
22378
22379
22380  windows_path="$new_path"
22381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22382    unix_path=`$CYGPATH -u "$windows_path"`
22383    new_path="$unix_path"
22384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22386    new_path="$unix_path"
22387  fi
22388
22389  if test "x$path" != "x$new_path"; then
22390    BOOT_JDK="$new_path"
22391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22393  fi
22394
22395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22397
22398  else
22399    # We're on a unix platform. Hooray! :)
22400    path="$BOOT_JDK"
22401    has_space=`$ECHO "$path" | $GREP " "`
22402    if test "x$has_space" != x; then
22403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22405      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22406    fi
22407
22408    # Use eval to expand a potential ~
22409    eval path="$path"
22410    if test ! -f "$path" && test ! -d "$path"; then
22411      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22412    fi
22413
22414    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22415  fi
22416
22417            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22418$as_echo_n "checking for Boot JDK... " >&6; }
22419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22420$as_echo "$BOOT_JDK" >&6; }
22421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22422$as_echo_n "checking Boot JDK version... " >&6; }
22423            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22425$as_echo "$BOOT_JDK_VERSION" >&6; }
22426          fi # end check jdk version
22427        fi # end check javac
22428      fi # end check java
22429    fi # end check boot jdk found
22430  fi
22431
22432    done
22433  fi
22434
22435  fi
22436
22437
22438    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22439    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22440      # Do we have a bin/java?
22441      if test ! -x "$BOOT_JDK/bin/java"; then
22442        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22444        BOOT_JDK_FOUND=no
22445      else
22446        # Do we have a bin/javac?
22447        if test ! -x "$BOOT_JDK/bin/javac"; then
22448          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22450          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22451$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22452          BOOT_JDK_FOUND=no
22453        else
22454          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22455          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22456
22457          # Extra M4 quote needed to protect [] in grep expression.
22458          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22459          if test "x$FOUND_CORRECT_VERSION" = x; then
22460            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22462            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22463$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22464            BOOT_JDK_FOUND=no
22465          else
22466            # We're done! :-)
22467            BOOT_JDK_FOUND=yes
22468
22469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22470
22471  # Input might be given as Windows format, start by converting to
22472  # unix format.
22473  path="$BOOT_JDK"
22474  new_path=`$CYGPATH -u "$path"`
22475
22476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22479  # "foo.exe" is OK but "foo" is an error.
22480  #
22481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22482  # It is also a way to make sure we got the proper file name for the real test later on.
22483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22484  if test "x$test_shortpath" = x; then
22485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22488  fi
22489
22490  # Call helper function which possibly converts this using DOS-style short mode.
22491  # If so, the updated path is stored in $new_path.
22492
22493  input_path="$new_path"
22494  # Check if we need to convert this using DOS-style short mode. If the path
22495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22496  # take no chances and rewrite it.
22497  # Note: m4 eats our [], so we need to use [ and ] instead.
22498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22499  if test "x$has_forbidden_chars" != x; then
22500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22504      # Going to short mode and back again did indeed matter. Since short mode is
22505      # case insensitive, let's make it lowercase to improve readability.
22506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22507      # Now convert it back to Unix-stile (cygpath)
22508      input_path=`$CYGPATH -u "$shortmode_path"`
22509      new_path="$input_path"
22510    fi
22511  fi
22512
22513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22514  if test "x$test_cygdrive_prefix" = x; then
22515    # As a simple fix, exclude /usr/bin since it's not a real path.
22516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22518      # a path prefixed by /cygdrive for fixpath to work.
22519      new_path="$CYGWIN_ROOT_PATH$input_path"
22520    fi
22521  fi
22522
22523
22524  if test "x$path" != "x$new_path"; then
22525    BOOT_JDK="$new_path"
22526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22528  fi
22529
22530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22531
22532  path="$BOOT_JDK"
22533  has_colon=`$ECHO $path | $GREP ^.:`
22534  new_path="$path"
22535  if test "x$has_colon" = x; then
22536    # Not in mixed or Windows style, start by that.
22537    new_path=`cmd //c echo $path`
22538  fi
22539
22540
22541  input_path="$new_path"
22542  # Check if we need to convert this using DOS-style short mode. If the path
22543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22544  # take no chances and rewrite it.
22545  # Note: m4 eats our [], so we need to use [ and ] instead.
22546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22547  if test "x$has_forbidden_chars" != x; then
22548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22550  fi
22551
22552
22553  windows_path="$new_path"
22554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22555    unix_path=`$CYGPATH -u "$windows_path"`
22556    new_path="$unix_path"
22557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22559    new_path="$unix_path"
22560  fi
22561
22562  if test "x$path" != "x$new_path"; then
22563    BOOT_JDK="$new_path"
22564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22566  fi
22567
22568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22570
22571  else
22572    # We're on a unix platform. Hooray! :)
22573    path="$BOOT_JDK"
22574    has_space=`$ECHO "$path" | $GREP " "`
22575    if test "x$has_space" != x; then
22576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22578      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22579    fi
22580
22581    # Use eval to expand a potential ~
22582    eval path="$path"
22583    if test ! -f "$path" && test ! -d "$path"; then
22584      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22585    fi
22586
22587    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22588  fi
22589
22590            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22591$as_echo_n "checking for Boot JDK... " >&6; }
22592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22593$as_echo "$BOOT_JDK" >&6; }
22594            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22595$as_echo_n "checking Boot JDK version... " >&6; }
22596            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22597            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22598$as_echo "$BOOT_JDK_VERSION" >&6; }
22599          fi # end check jdk version
22600        fi # end check javac
22601      fi # end check java
22602    fi # end check boot jdk found
22603  fi
22604
22605
22606  if test "x$BOOT_JDK_FOUND" = xno; then
22607    # Now execute the test
22608
22609  if test "x$PROGRAMW6432" != x; then
22610    VIRTUAL_DIR="$PROGRAMW6432/Java"
22611
22612  windows_path="$VIRTUAL_DIR"
22613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22614    unix_path=`$CYGPATH -u "$windows_path"`
22615    VIRTUAL_DIR="$unix_path"
22616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22618    VIRTUAL_DIR="$unix_path"
22619  fi
22620
22621
22622  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22623  BOOT_JDK_SUFFIX=""
22624  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22625  if test "x$ALL_JDKS_FOUND" != x; then
22626    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22627
22628  if test "x$BOOT_JDK_FOUND" = xno; then
22629    # Now execute the test
22630
22631        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22632        if test -d "$BOOT_JDK"; then
22633          BOOT_JDK_FOUND=maybe
22634          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22635$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22636        fi
22637
22638
22639    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22640    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22641      # Do we have a bin/java?
22642      if test ! -x "$BOOT_JDK/bin/java"; then
22643        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22645        BOOT_JDK_FOUND=no
22646      else
22647        # Do we have a bin/javac?
22648        if test ! -x "$BOOT_JDK/bin/javac"; then
22649          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22651          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22652$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22653          BOOT_JDK_FOUND=no
22654        else
22655          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22656          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22657
22658          # Extra M4 quote needed to protect [] in grep expression.
22659          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22660          if test "x$FOUND_CORRECT_VERSION" = x; then
22661            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22663            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22664$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22665            BOOT_JDK_FOUND=no
22666          else
22667            # We're done! :-)
22668            BOOT_JDK_FOUND=yes
22669
22670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22671
22672  # Input might be given as Windows format, start by converting to
22673  # unix format.
22674  path="$BOOT_JDK"
22675  new_path=`$CYGPATH -u "$path"`
22676
22677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22680  # "foo.exe" is OK but "foo" is an error.
22681  #
22682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22683  # It is also a way to make sure we got the proper file name for the real test later on.
22684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22685  if test "x$test_shortpath" = x; then
22686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22688    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22689  fi
22690
22691  # Call helper function which possibly converts this using DOS-style short mode.
22692  # If so, the updated path is stored in $new_path.
22693
22694  input_path="$new_path"
22695  # Check if we need to convert this using DOS-style short mode. If the path
22696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22697  # take no chances and rewrite it.
22698  # Note: m4 eats our [], so we need to use [ and ] instead.
22699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22700  if test "x$has_forbidden_chars" != x; then
22701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22705      # Going to short mode and back again did indeed matter. Since short mode is
22706      # case insensitive, let's make it lowercase to improve readability.
22707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22708      # Now convert it back to Unix-stile (cygpath)
22709      input_path=`$CYGPATH -u "$shortmode_path"`
22710      new_path="$input_path"
22711    fi
22712  fi
22713
22714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22715  if test "x$test_cygdrive_prefix" = x; then
22716    # As a simple fix, exclude /usr/bin since it's not a real path.
22717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22719      # a path prefixed by /cygdrive for fixpath to work.
22720      new_path="$CYGWIN_ROOT_PATH$input_path"
22721    fi
22722  fi
22723
22724
22725  if test "x$path" != "x$new_path"; then
22726    BOOT_JDK="$new_path"
22727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22729  fi
22730
22731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22732
22733  path="$BOOT_JDK"
22734  has_colon=`$ECHO $path | $GREP ^.:`
22735  new_path="$path"
22736  if test "x$has_colon" = x; then
22737    # Not in mixed or Windows style, start by that.
22738    new_path=`cmd //c echo $path`
22739  fi
22740
22741
22742  input_path="$new_path"
22743  # Check if we need to convert this using DOS-style short mode. If the path
22744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22745  # take no chances and rewrite it.
22746  # Note: m4 eats our [], so we need to use [ and ] instead.
22747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22748  if test "x$has_forbidden_chars" != x; then
22749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22751  fi
22752
22753
22754  windows_path="$new_path"
22755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22756    unix_path=`$CYGPATH -u "$windows_path"`
22757    new_path="$unix_path"
22758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22760    new_path="$unix_path"
22761  fi
22762
22763  if test "x$path" != "x$new_path"; then
22764    BOOT_JDK="$new_path"
22765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22767  fi
22768
22769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22771
22772  else
22773    # We're on a unix platform. Hooray! :)
22774    path="$BOOT_JDK"
22775    has_space=`$ECHO "$path" | $GREP " "`
22776    if test "x$has_space" != x; then
22777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22779      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22780    fi
22781
22782    # Use eval to expand a potential ~
22783    eval path="$path"
22784    if test ! -f "$path" && test ! -d "$path"; then
22785      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22786    fi
22787
22788    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22789  fi
22790
22791            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22792$as_echo_n "checking for Boot JDK... " >&6; }
22793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22794$as_echo "$BOOT_JDK" >&6; }
22795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22796$as_echo_n "checking Boot JDK version... " >&6; }
22797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22799$as_echo "$BOOT_JDK_VERSION" >&6; }
22800          fi # end check jdk version
22801        fi # end check javac
22802      fi # end check java
22803    fi # end check boot jdk found
22804  fi
22805
22806    done
22807  fi
22808
22809  fi
22810
22811
22812    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22813    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22814      # Do we have a bin/java?
22815      if test ! -x "$BOOT_JDK/bin/java"; then
22816        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22818        BOOT_JDK_FOUND=no
22819      else
22820        # Do we have a bin/javac?
22821        if test ! -x "$BOOT_JDK/bin/javac"; then
22822          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22824          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22825$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22826          BOOT_JDK_FOUND=no
22827        else
22828          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22829          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22830
22831          # Extra M4 quote needed to protect [] in grep expression.
22832          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22833          if test "x$FOUND_CORRECT_VERSION" = x; then
22834            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22836            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22837$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22838            BOOT_JDK_FOUND=no
22839          else
22840            # We're done! :-)
22841            BOOT_JDK_FOUND=yes
22842
22843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22844
22845  # Input might be given as Windows format, start by converting to
22846  # unix format.
22847  path="$BOOT_JDK"
22848  new_path=`$CYGPATH -u "$path"`
22849
22850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22853  # "foo.exe" is OK but "foo" is an error.
22854  #
22855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22856  # It is also a way to make sure we got the proper file name for the real test later on.
22857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22858  if test "x$test_shortpath" = x; then
22859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22861    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22862  fi
22863
22864  # Call helper function which possibly converts this using DOS-style short mode.
22865  # If so, the updated path is stored in $new_path.
22866
22867  input_path="$new_path"
22868  # Check if we need to convert this using DOS-style short mode. If the path
22869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22870  # take no chances and rewrite it.
22871  # Note: m4 eats our [], so we need to use [ and ] instead.
22872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22873  if test "x$has_forbidden_chars" != x; then
22874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22878      # Going to short mode and back again did indeed matter. Since short mode is
22879      # case insensitive, let's make it lowercase to improve readability.
22880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22881      # Now convert it back to Unix-stile (cygpath)
22882      input_path=`$CYGPATH -u "$shortmode_path"`
22883      new_path="$input_path"
22884    fi
22885  fi
22886
22887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22888  if test "x$test_cygdrive_prefix" = x; then
22889    # As a simple fix, exclude /usr/bin since it's not a real path.
22890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22892      # a path prefixed by /cygdrive for fixpath to work.
22893      new_path="$CYGWIN_ROOT_PATH$input_path"
22894    fi
22895  fi
22896
22897
22898  if test "x$path" != "x$new_path"; then
22899    BOOT_JDK="$new_path"
22900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22902  fi
22903
22904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22905
22906  path="$BOOT_JDK"
22907  has_colon=`$ECHO $path | $GREP ^.:`
22908  new_path="$path"
22909  if test "x$has_colon" = x; then
22910    # Not in mixed or Windows style, start by that.
22911    new_path=`cmd //c echo $path`
22912  fi
22913
22914
22915  input_path="$new_path"
22916  # Check if we need to convert this using DOS-style short mode. If the path
22917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22918  # take no chances and rewrite it.
22919  # Note: m4 eats our [], so we need to use [ and ] instead.
22920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22921  if test "x$has_forbidden_chars" != x; then
22922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22924  fi
22925
22926
22927  windows_path="$new_path"
22928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22929    unix_path=`$CYGPATH -u "$windows_path"`
22930    new_path="$unix_path"
22931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22933    new_path="$unix_path"
22934  fi
22935
22936  if test "x$path" != "x$new_path"; then
22937    BOOT_JDK="$new_path"
22938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22940  fi
22941
22942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22944
22945  else
22946    # We're on a unix platform. Hooray! :)
22947    path="$BOOT_JDK"
22948    has_space=`$ECHO "$path" | $GREP " "`
22949    if test "x$has_space" != x; then
22950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22952      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22953    fi
22954
22955    # Use eval to expand a potential ~
22956    eval path="$path"
22957    if test ! -f "$path" && test ! -d "$path"; then
22958      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22959    fi
22960
22961    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22962  fi
22963
22964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22965$as_echo_n "checking for Boot JDK... " >&6; }
22966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22967$as_echo "$BOOT_JDK" >&6; }
22968            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22969$as_echo_n "checking Boot JDK version... " >&6; }
22970            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22972$as_echo "$BOOT_JDK_VERSION" >&6; }
22973          fi # end check jdk version
22974        fi # end check javac
22975      fi # end check java
22976    fi # end check boot jdk found
22977  fi
22978
22979
22980  if test "x$BOOT_JDK_FOUND" = xno; then
22981    # Now execute the test
22982
22983  if test "x$PROGRAMFILES" != x; then
22984    VIRTUAL_DIR="$PROGRAMFILES/Java"
22985
22986  windows_path="$VIRTUAL_DIR"
22987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22988    unix_path=`$CYGPATH -u "$windows_path"`
22989    VIRTUAL_DIR="$unix_path"
22990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22992    VIRTUAL_DIR="$unix_path"
22993  fi
22994
22995
22996  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22997  BOOT_JDK_SUFFIX=""
22998  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22999  if test "x$ALL_JDKS_FOUND" != x; then
23000    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23001
23002  if test "x$BOOT_JDK_FOUND" = xno; then
23003    # Now execute the test
23004
23005        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23006        if test -d "$BOOT_JDK"; then
23007          BOOT_JDK_FOUND=maybe
23008          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23009$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23010        fi
23011
23012
23013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23015      # Do we have a bin/java?
23016      if test ! -x "$BOOT_JDK/bin/java"; then
23017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23019        BOOT_JDK_FOUND=no
23020      else
23021        # Do we have a bin/javac?
23022        if test ! -x "$BOOT_JDK/bin/javac"; then
23023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23027          BOOT_JDK_FOUND=no
23028        else
23029          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23030          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23031
23032          # Extra M4 quote needed to protect [] in grep expression.
23033          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23034          if test "x$FOUND_CORRECT_VERSION" = x; then
23035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23037            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23038$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23039            BOOT_JDK_FOUND=no
23040          else
23041            # We're done! :-)
23042            BOOT_JDK_FOUND=yes
23043
23044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23045
23046  # Input might be given as Windows format, start by converting to
23047  # unix format.
23048  path="$BOOT_JDK"
23049  new_path=`$CYGPATH -u "$path"`
23050
23051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23054  # "foo.exe" is OK but "foo" is an error.
23055  #
23056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23057  # It is also a way to make sure we got the proper file name for the real test later on.
23058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23059  if test "x$test_shortpath" = x; then
23060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23062    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23063  fi
23064
23065  # Call helper function which possibly converts this using DOS-style short mode.
23066  # If so, the updated path is stored in $new_path.
23067
23068  input_path="$new_path"
23069  # Check if we need to convert this using DOS-style short mode. If the path
23070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23071  # take no chances and rewrite it.
23072  # Note: m4 eats our [], so we need to use [ and ] instead.
23073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23074  if test "x$has_forbidden_chars" != x; then
23075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23079      # Going to short mode and back again did indeed matter. Since short mode is
23080      # case insensitive, let's make it lowercase to improve readability.
23081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23082      # Now convert it back to Unix-stile (cygpath)
23083      input_path=`$CYGPATH -u "$shortmode_path"`
23084      new_path="$input_path"
23085    fi
23086  fi
23087
23088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23089  if test "x$test_cygdrive_prefix" = x; then
23090    # As a simple fix, exclude /usr/bin since it's not a real path.
23091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23093      # a path prefixed by /cygdrive for fixpath to work.
23094      new_path="$CYGWIN_ROOT_PATH$input_path"
23095    fi
23096  fi
23097
23098
23099  if test "x$path" != "x$new_path"; then
23100    BOOT_JDK="$new_path"
23101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23103  fi
23104
23105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23106
23107  path="$BOOT_JDK"
23108  has_colon=`$ECHO $path | $GREP ^.:`
23109  new_path="$path"
23110  if test "x$has_colon" = x; then
23111    # Not in mixed or Windows style, start by that.
23112    new_path=`cmd //c echo $path`
23113  fi
23114
23115
23116  input_path="$new_path"
23117  # Check if we need to convert this using DOS-style short mode. If the path
23118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23119  # take no chances and rewrite it.
23120  # Note: m4 eats our [], so we need to use [ and ] instead.
23121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23122  if test "x$has_forbidden_chars" != x; then
23123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23125  fi
23126
23127
23128  windows_path="$new_path"
23129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23130    unix_path=`$CYGPATH -u "$windows_path"`
23131    new_path="$unix_path"
23132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23134    new_path="$unix_path"
23135  fi
23136
23137  if test "x$path" != "x$new_path"; then
23138    BOOT_JDK="$new_path"
23139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23141  fi
23142
23143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23145
23146  else
23147    # We're on a unix platform. Hooray! :)
23148    path="$BOOT_JDK"
23149    has_space=`$ECHO "$path" | $GREP " "`
23150    if test "x$has_space" != x; then
23151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23154    fi
23155
23156    # Use eval to expand a potential ~
23157    eval path="$path"
23158    if test ! -f "$path" && test ! -d "$path"; then
23159      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23160    fi
23161
23162    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23163  fi
23164
23165            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23166$as_echo_n "checking for Boot JDK... " >&6; }
23167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23168$as_echo "$BOOT_JDK" >&6; }
23169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23170$as_echo_n "checking Boot JDK version... " >&6; }
23171            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23173$as_echo "$BOOT_JDK_VERSION" >&6; }
23174          fi # end check jdk version
23175        fi # end check javac
23176      fi # end check java
23177    fi # end check boot jdk found
23178  fi
23179
23180    done
23181  fi
23182
23183  fi
23184
23185
23186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23188      # Do we have a bin/java?
23189      if test ! -x "$BOOT_JDK/bin/java"; then
23190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23192        BOOT_JDK_FOUND=no
23193      else
23194        # Do we have a bin/javac?
23195        if test ! -x "$BOOT_JDK/bin/javac"; then
23196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23200          BOOT_JDK_FOUND=no
23201        else
23202          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23203          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23204
23205          # Extra M4 quote needed to protect [] in grep expression.
23206          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23207          if test "x$FOUND_CORRECT_VERSION" = x; then
23208            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23210            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23211$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23212            BOOT_JDK_FOUND=no
23213          else
23214            # We're done! :-)
23215            BOOT_JDK_FOUND=yes
23216
23217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23218
23219  # Input might be given as Windows format, start by converting to
23220  # unix format.
23221  path="$BOOT_JDK"
23222  new_path=`$CYGPATH -u "$path"`
23223
23224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23227  # "foo.exe" is OK but "foo" is an error.
23228  #
23229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23230  # It is also a way to make sure we got the proper file name for the real test later on.
23231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23232  if test "x$test_shortpath" = x; then
23233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23235    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23236  fi
23237
23238  # Call helper function which possibly converts this using DOS-style short mode.
23239  # If so, the updated path is stored in $new_path.
23240
23241  input_path="$new_path"
23242  # Check if we need to convert this using DOS-style short mode. If the path
23243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23244  # take no chances and rewrite it.
23245  # Note: m4 eats our [], so we need to use [ and ] instead.
23246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23247  if test "x$has_forbidden_chars" != x; then
23248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23252      # Going to short mode and back again did indeed matter. Since short mode is
23253      # case insensitive, let's make it lowercase to improve readability.
23254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23255      # Now convert it back to Unix-stile (cygpath)
23256      input_path=`$CYGPATH -u "$shortmode_path"`
23257      new_path="$input_path"
23258    fi
23259  fi
23260
23261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23262  if test "x$test_cygdrive_prefix" = x; then
23263    # As a simple fix, exclude /usr/bin since it's not a real path.
23264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23266      # a path prefixed by /cygdrive for fixpath to work.
23267      new_path="$CYGWIN_ROOT_PATH$input_path"
23268    fi
23269  fi
23270
23271
23272  if test "x$path" != "x$new_path"; then
23273    BOOT_JDK="$new_path"
23274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23276  fi
23277
23278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23279
23280  path="$BOOT_JDK"
23281  has_colon=`$ECHO $path | $GREP ^.:`
23282  new_path="$path"
23283  if test "x$has_colon" = x; then
23284    # Not in mixed or Windows style, start by that.
23285    new_path=`cmd //c echo $path`
23286  fi
23287
23288
23289  input_path="$new_path"
23290  # Check if we need to convert this using DOS-style short mode. If the path
23291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23292  # take no chances and rewrite it.
23293  # Note: m4 eats our [], so we need to use [ and ] instead.
23294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23295  if test "x$has_forbidden_chars" != x; then
23296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23298  fi
23299
23300
23301  windows_path="$new_path"
23302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23303    unix_path=`$CYGPATH -u "$windows_path"`
23304    new_path="$unix_path"
23305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23307    new_path="$unix_path"
23308  fi
23309
23310  if test "x$path" != "x$new_path"; then
23311    BOOT_JDK="$new_path"
23312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23314  fi
23315
23316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23318
23319  else
23320    # We're on a unix platform. Hooray! :)
23321    path="$BOOT_JDK"
23322    has_space=`$ECHO "$path" | $GREP " "`
23323    if test "x$has_space" != x; then
23324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23326      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23327    fi
23328
23329    # Use eval to expand a potential ~
23330    eval path="$path"
23331    if test ! -f "$path" && test ! -d "$path"; then
23332      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23333    fi
23334
23335    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23336  fi
23337
23338            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23339$as_echo_n "checking for Boot JDK... " >&6; }
23340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23341$as_echo "$BOOT_JDK" >&6; }
23342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23343$as_echo_n "checking Boot JDK version... " >&6; }
23344            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23346$as_echo "$BOOT_JDK_VERSION" >&6; }
23347          fi # end check jdk version
23348        fi # end check javac
23349      fi # end check java
23350    fi # end check boot jdk found
23351  fi
23352
23353
23354  if test "x$BOOT_JDK_FOUND" = xno; then
23355    # Now execute the test
23356
23357  if test "x$ProgramFiles" != x; then
23358    VIRTUAL_DIR="$ProgramFiles/Java"
23359
23360  windows_path="$VIRTUAL_DIR"
23361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23362    unix_path=`$CYGPATH -u "$windows_path"`
23363    VIRTUAL_DIR="$unix_path"
23364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23366    VIRTUAL_DIR="$unix_path"
23367  fi
23368
23369
23370  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23371  BOOT_JDK_SUFFIX=""
23372  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23373  if test "x$ALL_JDKS_FOUND" != x; then
23374    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23375
23376  if test "x$BOOT_JDK_FOUND" = xno; then
23377    # Now execute the test
23378
23379        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23380        if test -d "$BOOT_JDK"; then
23381          BOOT_JDK_FOUND=maybe
23382          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23383$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23384        fi
23385
23386
23387    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23388    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23389      # Do we have a bin/java?
23390      if test ! -x "$BOOT_JDK/bin/java"; then
23391        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23393        BOOT_JDK_FOUND=no
23394      else
23395        # Do we have a bin/javac?
23396        if test ! -x "$BOOT_JDK/bin/javac"; then
23397          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23399          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23400$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23401          BOOT_JDK_FOUND=no
23402        else
23403          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23404          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23405
23406          # Extra M4 quote needed to protect [] in grep expression.
23407          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23408          if test "x$FOUND_CORRECT_VERSION" = x; then
23409            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23411            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23412$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23413            BOOT_JDK_FOUND=no
23414          else
23415            # We're done! :-)
23416            BOOT_JDK_FOUND=yes
23417
23418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23419
23420  # Input might be given as Windows format, start by converting to
23421  # unix format.
23422  path="$BOOT_JDK"
23423  new_path=`$CYGPATH -u "$path"`
23424
23425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23428  # "foo.exe" is OK but "foo" is an error.
23429  #
23430  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23431  # It is also a way to make sure we got the proper file name for the real test later on.
23432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23433  if test "x$test_shortpath" = x; then
23434    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23435$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23436    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23437  fi
23438
23439  # Call helper function which possibly converts this using DOS-style short mode.
23440  # If so, the updated path is stored in $new_path.
23441
23442  input_path="$new_path"
23443  # Check if we need to convert this using DOS-style short mode. If the path
23444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23445  # take no chances and rewrite it.
23446  # Note: m4 eats our [], so we need to use [ and ] instead.
23447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23448  if test "x$has_forbidden_chars" != x; then
23449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23453      # Going to short mode and back again did indeed matter. Since short mode is
23454      # case insensitive, let's make it lowercase to improve readability.
23455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23456      # Now convert it back to Unix-stile (cygpath)
23457      input_path=`$CYGPATH -u "$shortmode_path"`
23458      new_path="$input_path"
23459    fi
23460  fi
23461
23462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23463  if test "x$test_cygdrive_prefix" = x; then
23464    # As a simple fix, exclude /usr/bin since it's not a real path.
23465    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23467      # a path prefixed by /cygdrive for fixpath to work.
23468      new_path="$CYGWIN_ROOT_PATH$input_path"
23469    fi
23470  fi
23471
23472
23473  if test "x$path" != "x$new_path"; then
23474    BOOT_JDK="$new_path"
23475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23476$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23477  fi
23478
23479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23480
23481  path="$BOOT_JDK"
23482  has_colon=`$ECHO $path | $GREP ^.:`
23483  new_path="$path"
23484  if test "x$has_colon" = x; then
23485    # Not in mixed or Windows style, start by that.
23486    new_path=`cmd //c echo $path`
23487  fi
23488
23489
23490  input_path="$new_path"
23491  # Check if we need to convert this using DOS-style short mode. If the path
23492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23493  # take no chances and rewrite it.
23494  # Note: m4 eats our [], so we need to use [ and ] instead.
23495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23496  if test "x$has_forbidden_chars" != x; then
23497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23499  fi
23500
23501
23502  windows_path="$new_path"
23503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23504    unix_path=`$CYGPATH -u "$windows_path"`
23505    new_path="$unix_path"
23506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23508    new_path="$unix_path"
23509  fi
23510
23511  if test "x$path" != "x$new_path"; then
23512    BOOT_JDK="$new_path"
23513    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23514$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23515  fi
23516
23517  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23518  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23519
23520  else
23521    # We're on a unix platform. Hooray! :)
23522    path="$BOOT_JDK"
23523    has_space=`$ECHO "$path" | $GREP " "`
23524    if test "x$has_space" != x; then
23525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23526$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23527      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23528    fi
23529
23530    # Use eval to expand a potential ~
23531    eval path="$path"
23532    if test ! -f "$path" && test ! -d "$path"; then
23533      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23534    fi
23535
23536    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23537  fi
23538
23539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23540$as_echo_n "checking for Boot JDK... " >&6; }
23541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23542$as_echo "$BOOT_JDK" >&6; }
23543            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23544$as_echo_n "checking Boot JDK version... " >&6; }
23545            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23547$as_echo "$BOOT_JDK_VERSION" >&6; }
23548          fi # end check jdk version
23549        fi # end check javac
23550      fi # end check java
23551    fi # end check boot jdk found
23552  fi
23553
23554    done
23555  fi
23556
23557  fi
23558
23559
23560    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23561    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23562      # Do we have a bin/java?
23563      if test ! -x "$BOOT_JDK/bin/java"; then
23564        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23566        BOOT_JDK_FOUND=no
23567      else
23568        # Do we have a bin/javac?
23569        if test ! -x "$BOOT_JDK/bin/javac"; then
23570          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23572          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23573$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23574          BOOT_JDK_FOUND=no
23575        else
23576          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23577          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23578
23579          # Extra M4 quote needed to protect [] in grep expression.
23580          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23581          if test "x$FOUND_CORRECT_VERSION" = x; then
23582            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23584            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23585$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23586            BOOT_JDK_FOUND=no
23587          else
23588            # We're done! :-)
23589            BOOT_JDK_FOUND=yes
23590
23591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23592
23593  # Input might be given as Windows format, start by converting to
23594  # unix format.
23595  path="$BOOT_JDK"
23596  new_path=`$CYGPATH -u "$path"`
23597
23598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23601  # "foo.exe" is OK but "foo" is an error.
23602  #
23603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23604  # It is also a way to make sure we got the proper file name for the real test later on.
23605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23606  if test "x$test_shortpath" = x; then
23607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23609    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23610  fi
23611
23612  # Call helper function which possibly converts this using DOS-style short mode.
23613  # If so, the updated path is stored in $new_path.
23614
23615  input_path="$new_path"
23616  # Check if we need to convert this using DOS-style short mode. If the path
23617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23618  # take no chances and rewrite it.
23619  # Note: m4 eats our [], so we need to use [ and ] instead.
23620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23621  if test "x$has_forbidden_chars" != x; then
23622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23626      # Going to short mode and back again did indeed matter. Since short mode is
23627      # case insensitive, let's make it lowercase to improve readability.
23628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23629      # Now convert it back to Unix-stile (cygpath)
23630      input_path=`$CYGPATH -u "$shortmode_path"`
23631      new_path="$input_path"
23632    fi
23633  fi
23634
23635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23636  if test "x$test_cygdrive_prefix" = x; then
23637    # As a simple fix, exclude /usr/bin since it's not a real path.
23638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23640      # a path prefixed by /cygdrive for fixpath to work.
23641      new_path="$CYGWIN_ROOT_PATH$input_path"
23642    fi
23643  fi
23644
23645
23646  if test "x$path" != "x$new_path"; then
23647    BOOT_JDK="$new_path"
23648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23649$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23650  fi
23651
23652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23653
23654  path="$BOOT_JDK"
23655  has_colon=`$ECHO $path | $GREP ^.:`
23656  new_path="$path"
23657  if test "x$has_colon" = x; then
23658    # Not in mixed or Windows style, start by that.
23659    new_path=`cmd //c echo $path`
23660  fi
23661
23662
23663  input_path="$new_path"
23664  # Check if we need to convert this using DOS-style short mode. If the path
23665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23666  # take no chances and rewrite it.
23667  # Note: m4 eats our [], so we need to use [ and ] instead.
23668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23669  if test "x$has_forbidden_chars" != x; then
23670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23672  fi
23673
23674
23675  windows_path="$new_path"
23676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23677    unix_path=`$CYGPATH -u "$windows_path"`
23678    new_path="$unix_path"
23679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23681    new_path="$unix_path"
23682  fi
23683
23684  if test "x$path" != "x$new_path"; then
23685    BOOT_JDK="$new_path"
23686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23688  fi
23689
23690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23692
23693  else
23694    # We're on a unix platform. Hooray! :)
23695    path="$BOOT_JDK"
23696    has_space=`$ECHO "$path" | $GREP " "`
23697    if test "x$has_space" != x; then
23698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23700      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23701    fi
23702
23703    # Use eval to expand a potential ~
23704    eval path="$path"
23705    if test ! -f "$path" && test ! -d "$path"; then
23706      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23707    fi
23708
23709    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23710  fi
23711
23712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23713$as_echo_n "checking for Boot JDK... " >&6; }
23714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23715$as_echo "$BOOT_JDK" >&6; }
23716            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23717$as_echo_n "checking Boot JDK version... " >&6; }
23718            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23720$as_echo "$BOOT_JDK_VERSION" >&6; }
23721          fi # end check jdk version
23722        fi # end check javac
23723      fi # end check java
23724    fi # end check boot jdk found
23725  fi
23726
23727
23728  if test "x$BOOT_JDK_FOUND" = xno; then
23729    # Now execute the test
23730
23731  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23732  BOOT_JDK_SUFFIX=""
23733  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23734  if test "x$ALL_JDKS_FOUND" != x; then
23735    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23736
23737  if test "x$BOOT_JDK_FOUND" = xno; then
23738    # Now execute the test
23739
23740        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23741        if test -d "$BOOT_JDK"; then
23742          BOOT_JDK_FOUND=maybe
23743          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23744$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23745        fi
23746
23747
23748    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23749    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23750      # Do we have a bin/java?
23751      if test ! -x "$BOOT_JDK/bin/java"; then
23752        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23754        BOOT_JDK_FOUND=no
23755      else
23756        # Do we have a bin/javac?
23757        if test ! -x "$BOOT_JDK/bin/javac"; then
23758          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23760          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23761$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23762          BOOT_JDK_FOUND=no
23763        else
23764          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23765          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23766
23767          # Extra M4 quote needed to protect [] in grep expression.
23768          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23769          if test "x$FOUND_CORRECT_VERSION" = x; then
23770            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23772            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23773$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23774            BOOT_JDK_FOUND=no
23775          else
23776            # We're done! :-)
23777            BOOT_JDK_FOUND=yes
23778
23779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23780
23781  # Input might be given as Windows format, start by converting to
23782  # unix format.
23783  path="$BOOT_JDK"
23784  new_path=`$CYGPATH -u "$path"`
23785
23786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23789  # "foo.exe" is OK but "foo" is an error.
23790  #
23791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23792  # It is also a way to make sure we got the proper file name for the real test later on.
23793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23794  if test "x$test_shortpath" = x; then
23795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23797    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23798  fi
23799
23800  # Call helper function which possibly converts this using DOS-style short mode.
23801  # If so, the updated path is stored in $new_path.
23802
23803  input_path="$new_path"
23804  # Check if we need to convert this using DOS-style short mode. If the path
23805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23806  # take no chances and rewrite it.
23807  # Note: m4 eats our [], so we need to use [ and ] instead.
23808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23809  if test "x$has_forbidden_chars" != x; then
23810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23814      # Going to short mode and back again did indeed matter. Since short mode is
23815      # case insensitive, let's make it lowercase to improve readability.
23816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23817      # Now convert it back to Unix-stile (cygpath)
23818      input_path=`$CYGPATH -u "$shortmode_path"`
23819      new_path="$input_path"
23820    fi
23821  fi
23822
23823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23824  if test "x$test_cygdrive_prefix" = x; then
23825    # As a simple fix, exclude /usr/bin since it's not a real path.
23826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23828      # a path prefixed by /cygdrive for fixpath to work.
23829      new_path="$CYGWIN_ROOT_PATH$input_path"
23830    fi
23831  fi
23832
23833
23834  if test "x$path" != "x$new_path"; then
23835    BOOT_JDK="$new_path"
23836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23838  fi
23839
23840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23841
23842  path="$BOOT_JDK"
23843  has_colon=`$ECHO $path | $GREP ^.:`
23844  new_path="$path"
23845  if test "x$has_colon" = x; then
23846    # Not in mixed or Windows style, start by that.
23847    new_path=`cmd //c echo $path`
23848  fi
23849
23850
23851  input_path="$new_path"
23852  # Check if we need to convert this using DOS-style short mode. If the path
23853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23854  # take no chances and rewrite it.
23855  # Note: m4 eats our [], so we need to use [ and ] instead.
23856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23857  if test "x$has_forbidden_chars" != x; then
23858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23860  fi
23861
23862
23863  windows_path="$new_path"
23864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23865    unix_path=`$CYGPATH -u "$windows_path"`
23866    new_path="$unix_path"
23867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23869    new_path="$unix_path"
23870  fi
23871
23872  if test "x$path" != "x$new_path"; then
23873    BOOT_JDK="$new_path"
23874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23876  fi
23877
23878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23880
23881  else
23882    # We're on a unix platform. Hooray! :)
23883    path="$BOOT_JDK"
23884    has_space=`$ECHO "$path" | $GREP " "`
23885    if test "x$has_space" != x; then
23886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23887$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23888      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23889    fi
23890
23891    # Use eval to expand a potential ~
23892    eval path="$path"
23893    if test ! -f "$path" && test ! -d "$path"; then
23894      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23895    fi
23896
23897    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23898  fi
23899
23900            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23901$as_echo_n "checking for Boot JDK... " >&6; }
23902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23903$as_echo "$BOOT_JDK" >&6; }
23904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23905$as_echo_n "checking Boot JDK version... " >&6; }
23906            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23908$as_echo "$BOOT_JDK_VERSION" >&6; }
23909          fi # end check jdk version
23910        fi # end check javac
23911      fi # end check java
23912    fi # end check boot jdk found
23913  fi
23914
23915    done
23916  fi
23917
23918
23919    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23920    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23921      # Do we have a bin/java?
23922      if test ! -x "$BOOT_JDK/bin/java"; then
23923        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23925        BOOT_JDK_FOUND=no
23926      else
23927        # Do we have a bin/javac?
23928        if test ! -x "$BOOT_JDK/bin/javac"; then
23929          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23931          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23932$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23933          BOOT_JDK_FOUND=no
23934        else
23935          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23936          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23937
23938          # Extra M4 quote needed to protect [] in grep expression.
23939          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23940          if test "x$FOUND_CORRECT_VERSION" = x; then
23941            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23943            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23944$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23945            BOOT_JDK_FOUND=no
23946          else
23947            # We're done! :-)
23948            BOOT_JDK_FOUND=yes
23949
23950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23951
23952  # Input might be given as Windows format, start by converting to
23953  # unix format.
23954  path="$BOOT_JDK"
23955  new_path=`$CYGPATH -u "$path"`
23956
23957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23960  # "foo.exe" is OK but "foo" is an error.
23961  #
23962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23963  # It is also a way to make sure we got the proper file name for the real test later on.
23964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23965  if test "x$test_shortpath" = x; then
23966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23968    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23969  fi
23970
23971  # Call helper function which possibly converts this using DOS-style short mode.
23972  # If so, the updated path is stored in $new_path.
23973
23974  input_path="$new_path"
23975  # Check if we need to convert this using DOS-style short mode. If the path
23976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23977  # take no chances and rewrite it.
23978  # Note: m4 eats our [], so we need to use [ and ] instead.
23979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23980  if test "x$has_forbidden_chars" != x; then
23981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23985      # Going to short mode and back again did indeed matter. Since short mode is
23986      # case insensitive, let's make it lowercase to improve readability.
23987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23988      # Now convert it back to Unix-stile (cygpath)
23989      input_path=`$CYGPATH -u "$shortmode_path"`
23990      new_path="$input_path"
23991    fi
23992  fi
23993
23994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23995  if test "x$test_cygdrive_prefix" = x; then
23996    # As a simple fix, exclude /usr/bin since it's not a real path.
23997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23999      # a path prefixed by /cygdrive for fixpath to work.
24000      new_path="$CYGWIN_ROOT_PATH$input_path"
24001    fi
24002  fi
24003
24004
24005  if test "x$path" != "x$new_path"; then
24006    BOOT_JDK="$new_path"
24007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24008$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24009  fi
24010
24011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24012
24013  path="$BOOT_JDK"
24014  has_colon=`$ECHO $path | $GREP ^.:`
24015  new_path="$path"
24016  if test "x$has_colon" = x; then
24017    # Not in mixed or Windows style, start by that.
24018    new_path=`cmd //c echo $path`
24019  fi
24020
24021
24022  input_path="$new_path"
24023  # Check if we need to convert this using DOS-style short mode. If the path
24024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24025  # take no chances and rewrite it.
24026  # Note: m4 eats our [], so we need to use [ and ] instead.
24027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24028  if test "x$has_forbidden_chars" != x; then
24029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24031  fi
24032
24033
24034  windows_path="$new_path"
24035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24036    unix_path=`$CYGPATH -u "$windows_path"`
24037    new_path="$unix_path"
24038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24040    new_path="$unix_path"
24041  fi
24042
24043  if test "x$path" != "x$new_path"; then
24044    BOOT_JDK="$new_path"
24045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24046$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24047  fi
24048
24049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24051
24052  else
24053    # We're on a unix platform. Hooray! :)
24054    path="$BOOT_JDK"
24055    has_space=`$ECHO "$path" | $GREP " "`
24056    if test "x$has_space" != x; then
24057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24059      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24060    fi
24061
24062    # Use eval to expand a potential ~
24063    eval path="$path"
24064    if test ! -f "$path" && test ! -d "$path"; then
24065      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24066    fi
24067
24068    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24069  fi
24070
24071            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24072$as_echo_n "checking for Boot JDK... " >&6; }
24073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24074$as_echo "$BOOT_JDK" >&6; }
24075            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24076$as_echo_n "checking Boot JDK version... " >&6; }
24077            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24079$as_echo "$BOOT_JDK_VERSION" >&6; }
24080          fi # end check jdk version
24081        fi # end check javac
24082      fi # end check java
24083    fi # end check boot jdk found
24084  fi
24085
24086  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24087
24088  if test "x$BOOT_JDK_FOUND" = xno; then
24089    # Now execute the test
24090
24091  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24092  BOOT_JDK_SUFFIX="/Contents/Home"
24093  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24094  if test "x$ALL_JDKS_FOUND" != x; then
24095    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24096
24097  if test "x$BOOT_JDK_FOUND" = xno; then
24098    # Now execute the test
24099
24100        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24101        if test -d "$BOOT_JDK"; then
24102          BOOT_JDK_FOUND=maybe
24103          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24104$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24105        fi
24106
24107
24108    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24109    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24110      # Do we have a bin/java?
24111      if test ! -x "$BOOT_JDK/bin/java"; then
24112        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24114        BOOT_JDK_FOUND=no
24115      else
24116        # Do we have a bin/javac?
24117        if test ! -x "$BOOT_JDK/bin/javac"; then
24118          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24120          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24121$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24122          BOOT_JDK_FOUND=no
24123        else
24124          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24125          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24126
24127          # Extra M4 quote needed to protect [] in grep expression.
24128          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24129          if test "x$FOUND_CORRECT_VERSION" = x; then
24130            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24132            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24133$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24134            BOOT_JDK_FOUND=no
24135          else
24136            # We're done! :-)
24137            BOOT_JDK_FOUND=yes
24138
24139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24140
24141  # Input might be given as Windows format, start by converting to
24142  # unix format.
24143  path="$BOOT_JDK"
24144  new_path=`$CYGPATH -u "$path"`
24145
24146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24149  # "foo.exe" is OK but "foo" is an error.
24150  #
24151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24152  # It is also a way to make sure we got the proper file name for the real test later on.
24153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24154  if test "x$test_shortpath" = x; then
24155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24157    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24158  fi
24159
24160  # Call helper function which possibly converts this using DOS-style short mode.
24161  # If so, the updated path is stored in $new_path.
24162
24163  input_path="$new_path"
24164  # Check if we need to convert this using DOS-style short mode. If the path
24165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24166  # take no chances and rewrite it.
24167  # Note: m4 eats our [], so we need to use [ and ] instead.
24168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24169  if test "x$has_forbidden_chars" != x; then
24170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24174      # Going to short mode and back again did indeed matter. Since short mode is
24175      # case insensitive, let's make it lowercase to improve readability.
24176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24177      # Now convert it back to Unix-stile (cygpath)
24178      input_path=`$CYGPATH -u "$shortmode_path"`
24179      new_path="$input_path"
24180    fi
24181  fi
24182
24183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24184  if test "x$test_cygdrive_prefix" = x; then
24185    # As a simple fix, exclude /usr/bin since it's not a real path.
24186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24188      # a path prefixed by /cygdrive for fixpath to work.
24189      new_path="$CYGWIN_ROOT_PATH$input_path"
24190    fi
24191  fi
24192
24193
24194  if test "x$path" != "x$new_path"; then
24195    BOOT_JDK="$new_path"
24196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24198  fi
24199
24200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24201
24202  path="$BOOT_JDK"
24203  has_colon=`$ECHO $path | $GREP ^.:`
24204  new_path="$path"
24205  if test "x$has_colon" = x; then
24206    # Not in mixed or Windows style, start by that.
24207    new_path=`cmd //c echo $path`
24208  fi
24209
24210
24211  input_path="$new_path"
24212  # Check if we need to convert this using DOS-style short mode. If the path
24213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24214  # take no chances and rewrite it.
24215  # Note: m4 eats our [], so we need to use [ and ] instead.
24216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24217  if test "x$has_forbidden_chars" != x; then
24218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24220  fi
24221
24222
24223  windows_path="$new_path"
24224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24225    unix_path=`$CYGPATH -u "$windows_path"`
24226    new_path="$unix_path"
24227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24229    new_path="$unix_path"
24230  fi
24231
24232  if test "x$path" != "x$new_path"; then
24233    BOOT_JDK="$new_path"
24234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24236  fi
24237
24238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24240
24241  else
24242    # We're on a unix platform. Hooray! :)
24243    path="$BOOT_JDK"
24244    has_space=`$ECHO "$path" | $GREP " "`
24245    if test "x$has_space" != x; then
24246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24248      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24249    fi
24250
24251    # Use eval to expand a potential ~
24252    eval path="$path"
24253    if test ! -f "$path" && test ! -d "$path"; then
24254      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24255    fi
24256
24257    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24258  fi
24259
24260            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24261$as_echo_n "checking for Boot JDK... " >&6; }
24262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24263$as_echo "$BOOT_JDK" >&6; }
24264            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24265$as_echo_n "checking Boot JDK version... " >&6; }
24266            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24268$as_echo "$BOOT_JDK_VERSION" >&6; }
24269          fi # end check jdk version
24270        fi # end check javac
24271      fi # end check java
24272    fi # end check boot jdk found
24273  fi
24274
24275    done
24276  fi
24277
24278
24279    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24280    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24281      # Do we have a bin/java?
24282      if test ! -x "$BOOT_JDK/bin/java"; then
24283        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24285        BOOT_JDK_FOUND=no
24286      else
24287        # Do we have a bin/javac?
24288        if test ! -x "$BOOT_JDK/bin/javac"; then
24289          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24291          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24292$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24293          BOOT_JDK_FOUND=no
24294        else
24295          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24296          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24297
24298          # Extra M4 quote needed to protect [] in grep expression.
24299          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24300          if test "x$FOUND_CORRECT_VERSION" = x; then
24301            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24303            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24304$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24305            BOOT_JDK_FOUND=no
24306          else
24307            # We're done! :-)
24308            BOOT_JDK_FOUND=yes
24309
24310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24311
24312  # Input might be given as Windows format, start by converting to
24313  # unix format.
24314  path="$BOOT_JDK"
24315  new_path=`$CYGPATH -u "$path"`
24316
24317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24320  # "foo.exe" is OK but "foo" is an error.
24321  #
24322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24323  # It is also a way to make sure we got the proper file name for the real test later on.
24324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24325  if test "x$test_shortpath" = x; then
24326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24328    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24329  fi
24330
24331  # Call helper function which possibly converts this using DOS-style short mode.
24332  # If so, the updated path is stored in $new_path.
24333
24334  input_path="$new_path"
24335  # Check if we need to convert this using DOS-style short mode. If the path
24336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24337  # take no chances and rewrite it.
24338  # Note: m4 eats our [], so we need to use [ and ] instead.
24339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24340  if test "x$has_forbidden_chars" != x; then
24341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24345      # Going to short mode and back again did indeed matter. Since short mode is
24346      # case insensitive, let's make it lowercase to improve readability.
24347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24348      # Now convert it back to Unix-stile (cygpath)
24349      input_path=`$CYGPATH -u "$shortmode_path"`
24350      new_path="$input_path"
24351    fi
24352  fi
24353
24354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24355  if test "x$test_cygdrive_prefix" = x; then
24356    # As a simple fix, exclude /usr/bin since it's not a real path.
24357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24359      # a path prefixed by /cygdrive for fixpath to work.
24360      new_path="$CYGWIN_ROOT_PATH$input_path"
24361    fi
24362  fi
24363
24364
24365  if test "x$path" != "x$new_path"; then
24366    BOOT_JDK="$new_path"
24367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24369  fi
24370
24371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24372
24373  path="$BOOT_JDK"
24374  has_colon=`$ECHO $path | $GREP ^.:`
24375  new_path="$path"
24376  if test "x$has_colon" = x; then
24377    # Not in mixed or Windows style, start by that.
24378    new_path=`cmd //c echo $path`
24379  fi
24380
24381
24382  input_path="$new_path"
24383  # Check if we need to convert this using DOS-style short mode. If the path
24384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24385  # take no chances and rewrite it.
24386  # Note: m4 eats our [], so we need to use [ and ] instead.
24387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24388  if test "x$has_forbidden_chars" != x; then
24389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24391  fi
24392
24393
24394  windows_path="$new_path"
24395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24396    unix_path=`$CYGPATH -u "$windows_path"`
24397    new_path="$unix_path"
24398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24400    new_path="$unix_path"
24401  fi
24402
24403  if test "x$path" != "x$new_path"; then
24404    BOOT_JDK="$new_path"
24405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24407  fi
24408
24409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24411
24412  else
24413    # We're on a unix platform. Hooray! :)
24414    path="$BOOT_JDK"
24415    has_space=`$ECHO "$path" | $GREP " "`
24416    if test "x$has_space" != x; then
24417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24419      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24420    fi
24421
24422    # Use eval to expand a potential ~
24423    eval path="$path"
24424    if test ! -f "$path" && test ! -d "$path"; then
24425      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24426    fi
24427
24428    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24429  fi
24430
24431            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24432$as_echo_n "checking for Boot JDK... " >&6; }
24433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24434$as_echo "$BOOT_JDK" >&6; }
24435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24436$as_echo_n "checking Boot JDK version... " >&6; }
24437            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24439$as_echo "$BOOT_JDK_VERSION" >&6; }
24440          fi # end check jdk version
24441        fi # end check javac
24442      fi # end check java
24443    fi # end check boot jdk found
24444  fi
24445
24446
24447  if test "x$BOOT_JDK_FOUND" = xno; then
24448    # Now execute the test
24449
24450  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24451  BOOT_JDK_SUFFIX="/Contents/Home"
24452  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24453  if test "x$ALL_JDKS_FOUND" != x; then
24454    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24455
24456  if test "x$BOOT_JDK_FOUND" = xno; then
24457    # Now execute the test
24458
24459        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24460        if test -d "$BOOT_JDK"; then
24461          BOOT_JDK_FOUND=maybe
24462          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24463$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24464        fi
24465
24466
24467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24469      # Do we have a bin/java?
24470      if test ! -x "$BOOT_JDK/bin/java"; then
24471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24473        BOOT_JDK_FOUND=no
24474      else
24475        # Do we have a bin/javac?
24476        if test ! -x "$BOOT_JDK/bin/javac"; then
24477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24481          BOOT_JDK_FOUND=no
24482        else
24483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24485
24486          # Extra M4 quote needed to protect [] in grep expression.
24487          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24488          if test "x$FOUND_CORRECT_VERSION" = x; then
24489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24493            BOOT_JDK_FOUND=no
24494          else
24495            # We're done! :-)
24496            BOOT_JDK_FOUND=yes
24497
24498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24499
24500  # Input might be given as Windows format, start by converting to
24501  # unix format.
24502  path="$BOOT_JDK"
24503  new_path=`$CYGPATH -u "$path"`
24504
24505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24508  # "foo.exe" is OK but "foo" is an error.
24509  #
24510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24511  # It is also a way to make sure we got the proper file name for the real test later on.
24512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24513  if test "x$test_shortpath" = x; then
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24516    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24517  fi
24518
24519  # Call helper function which possibly converts this using DOS-style short mode.
24520  # If so, the updated path is stored in $new_path.
24521
24522  input_path="$new_path"
24523  # Check if we need to convert this using DOS-style short mode. If the path
24524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24525  # take no chances and rewrite it.
24526  # Note: m4 eats our [], so we need to use [ and ] instead.
24527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24528  if test "x$has_forbidden_chars" != x; then
24529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24533      # Going to short mode and back again did indeed matter. Since short mode is
24534      # case insensitive, let's make it lowercase to improve readability.
24535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24536      # Now convert it back to Unix-stile (cygpath)
24537      input_path=`$CYGPATH -u "$shortmode_path"`
24538      new_path="$input_path"
24539    fi
24540  fi
24541
24542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24543  if test "x$test_cygdrive_prefix" = x; then
24544    # As a simple fix, exclude /usr/bin since it's not a real path.
24545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24547      # a path prefixed by /cygdrive for fixpath to work.
24548      new_path="$CYGWIN_ROOT_PATH$input_path"
24549    fi
24550  fi
24551
24552
24553  if test "x$path" != "x$new_path"; then
24554    BOOT_JDK="$new_path"
24555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24556$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24557  fi
24558
24559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24560
24561  path="$BOOT_JDK"
24562  has_colon=`$ECHO $path | $GREP ^.:`
24563  new_path="$path"
24564  if test "x$has_colon" = x; then
24565    # Not in mixed or Windows style, start by that.
24566    new_path=`cmd //c echo $path`
24567  fi
24568
24569
24570  input_path="$new_path"
24571  # Check if we need to convert this using DOS-style short mode. If the path
24572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24573  # take no chances and rewrite it.
24574  # Note: m4 eats our [], so we need to use [ and ] instead.
24575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24576  if test "x$has_forbidden_chars" != x; then
24577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24579  fi
24580
24581
24582  windows_path="$new_path"
24583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24584    unix_path=`$CYGPATH -u "$windows_path"`
24585    new_path="$unix_path"
24586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24588    new_path="$unix_path"
24589  fi
24590
24591  if test "x$path" != "x$new_path"; then
24592    BOOT_JDK="$new_path"
24593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24594$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24595  fi
24596
24597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24599
24600  else
24601    # We're on a unix platform. Hooray! :)
24602    path="$BOOT_JDK"
24603    has_space=`$ECHO "$path" | $GREP " "`
24604    if test "x$has_space" != x; then
24605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24607      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24608    fi
24609
24610    # Use eval to expand a potential ~
24611    eval path="$path"
24612    if test ! -f "$path" && test ! -d "$path"; then
24613      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24614    fi
24615
24616    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24617  fi
24618
24619            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24620$as_echo_n "checking for Boot JDK... " >&6; }
24621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24622$as_echo "$BOOT_JDK" >&6; }
24623            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24624$as_echo_n "checking Boot JDK version... " >&6; }
24625            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24627$as_echo "$BOOT_JDK_VERSION" >&6; }
24628          fi # end check jdk version
24629        fi # end check javac
24630      fi # end check java
24631    fi # end check boot jdk found
24632  fi
24633
24634    done
24635  fi
24636
24637
24638    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24639    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24640      # Do we have a bin/java?
24641      if test ! -x "$BOOT_JDK/bin/java"; then
24642        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24644        BOOT_JDK_FOUND=no
24645      else
24646        # Do we have a bin/javac?
24647        if test ! -x "$BOOT_JDK/bin/javac"; then
24648          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24650          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24651$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24652          BOOT_JDK_FOUND=no
24653        else
24654          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24655          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24656
24657          # Extra M4 quote needed to protect [] in grep expression.
24658          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24659          if test "x$FOUND_CORRECT_VERSION" = x; then
24660            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24662            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24663$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24664            BOOT_JDK_FOUND=no
24665          else
24666            # We're done! :-)
24667            BOOT_JDK_FOUND=yes
24668
24669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24670
24671  # Input might be given as Windows format, start by converting to
24672  # unix format.
24673  path="$BOOT_JDK"
24674  new_path=`$CYGPATH -u "$path"`
24675
24676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24679  # "foo.exe" is OK but "foo" is an error.
24680  #
24681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24682  # It is also a way to make sure we got the proper file name for the real test later on.
24683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24684  if test "x$test_shortpath" = x; then
24685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24687    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24688  fi
24689
24690  # Call helper function which possibly converts this using DOS-style short mode.
24691  # If so, the updated path is stored in $new_path.
24692
24693  input_path="$new_path"
24694  # Check if we need to convert this using DOS-style short mode. If the path
24695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24696  # take no chances and rewrite it.
24697  # Note: m4 eats our [], so we need to use [ and ] instead.
24698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24699  if test "x$has_forbidden_chars" != x; then
24700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24704      # Going to short mode and back again did indeed matter. Since short mode is
24705      # case insensitive, let's make it lowercase to improve readability.
24706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24707      # Now convert it back to Unix-stile (cygpath)
24708      input_path=`$CYGPATH -u "$shortmode_path"`
24709      new_path="$input_path"
24710    fi
24711  fi
24712
24713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24714  if test "x$test_cygdrive_prefix" = x; then
24715    # As a simple fix, exclude /usr/bin since it's not a real path.
24716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24718      # a path prefixed by /cygdrive for fixpath to work.
24719      new_path="$CYGWIN_ROOT_PATH$input_path"
24720    fi
24721  fi
24722
24723
24724  if test "x$path" != "x$new_path"; then
24725    BOOT_JDK="$new_path"
24726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24728  fi
24729
24730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24731
24732  path="$BOOT_JDK"
24733  has_colon=`$ECHO $path | $GREP ^.:`
24734  new_path="$path"
24735  if test "x$has_colon" = x; then
24736    # Not in mixed or Windows style, start by that.
24737    new_path=`cmd //c echo $path`
24738  fi
24739
24740
24741  input_path="$new_path"
24742  # Check if we need to convert this using DOS-style short mode. If the path
24743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24744  # take no chances and rewrite it.
24745  # Note: m4 eats our [], so we need to use [ and ] instead.
24746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24747  if test "x$has_forbidden_chars" != x; then
24748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24750  fi
24751
24752
24753  windows_path="$new_path"
24754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24755    unix_path=`$CYGPATH -u "$windows_path"`
24756    new_path="$unix_path"
24757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24759    new_path="$unix_path"
24760  fi
24761
24762  if test "x$path" != "x$new_path"; then
24763    BOOT_JDK="$new_path"
24764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24766  fi
24767
24768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24770
24771  else
24772    # We're on a unix platform. Hooray! :)
24773    path="$BOOT_JDK"
24774    has_space=`$ECHO "$path" | $GREP " "`
24775    if test "x$has_space" != x; then
24776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24778      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24779    fi
24780
24781    # Use eval to expand a potential ~
24782    eval path="$path"
24783    if test ! -f "$path" && test ! -d "$path"; then
24784      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24785    fi
24786
24787    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24788  fi
24789
24790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24791$as_echo_n "checking for Boot JDK... " >&6; }
24792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24793$as_echo "$BOOT_JDK" >&6; }
24794            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24795$as_echo_n "checking Boot JDK version... " >&6; }
24796            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24798$as_echo "$BOOT_JDK_VERSION" >&6; }
24799          fi # end check jdk version
24800        fi # end check javac
24801      fi # end check java
24802    fi # end check boot jdk found
24803  fi
24804
24805  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24806
24807  if test "x$BOOT_JDK_FOUND" = xno; then
24808    # Now execute the test
24809
24810  BOOT_JDK_PREFIX="/usr/lib/jvm"
24811  BOOT_JDK_SUFFIX=""
24812  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24813  if test "x$ALL_JDKS_FOUND" != x; then
24814    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24815
24816  if test "x$BOOT_JDK_FOUND" = xno; then
24817    # Now execute the test
24818
24819        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24820        if test -d "$BOOT_JDK"; then
24821          BOOT_JDK_FOUND=maybe
24822          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24823$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24824        fi
24825
24826
24827    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24828    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24829      # Do we have a bin/java?
24830      if test ! -x "$BOOT_JDK/bin/java"; then
24831        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24833        BOOT_JDK_FOUND=no
24834      else
24835        # Do we have a bin/javac?
24836        if test ! -x "$BOOT_JDK/bin/javac"; then
24837          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24839          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24840$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24841          BOOT_JDK_FOUND=no
24842        else
24843          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24844          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24845
24846          # Extra M4 quote needed to protect [] in grep expression.
24847          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24848          if test "x$FOUND_CORRECT_VERSION" = x; then
24849            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24851            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24852$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24853            BOOT_JDK_FOUND=no
24854          else
24855            # We're done! :-)
24856            BOOT_JDK_FOUND=yes
24857
24858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24859
24860  # Input might be given as Windows format, start by converting to
24861  # unix format.
24862  path="$BOOT_JDK"
24863  new_path=`$CYGPATH -u "$path"`
24864
24865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24868  # "foo.exe" is OK but "foo" is an error.
24869  #
24870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24871  # It is also a way to make sure we got the proper file name for the real test later on.
24872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24873  if test "x$test_shortpath" = x; then
24874    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24876    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24877  fi
24878
24879  # Call helper function which possibly converts this using DOS-style short mode.
24880  # If so, the updated path is stored in $new_path.
24881
24882  input_path="$new_path"
24883  # Check if we need to convert this using DOS-style short mode. If the path
24884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24885  # take no chances and rewrite it.
24886  # Note: m4 eats our [], so we need to use [ and ] instead.
24887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24888  if test "x$has_forbidden_chars" != x; then
24889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24893      # Going to short mode and back again did indeed matter. Since short mode is
24894      # case insensitive, let's make it lowercase to improve readability.
24895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24896      # Now convert it back to Unix-stile (cygpath)
24897      input_path=`$CYGPATH -u "$shortmode_path"`
24898      new_path="$input_path"
24899    fi
24900  fi
24901
24902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24903  if test "x$test_cygdrive_prefix" = x; then
24904    # As a simple fix, exclude /usr/bin since it's not a real path.
24905    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24907      # a path prefixed by /cygdrive for fixpath to work.
24908      new_path="$CYGWIN_ROOT_PATH$input_path"
24909    fi
24910  fi
24911
24912
24913  if test "x$path" != "x$new_path"; then
24914    BOOT_JDK="$new_path"
24915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24917  fi
24918
24919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24920
24921  path="$BOOT_JDK"
24922  has_colon=`$ECHO $path | $GREP ^.:`
24923  new_path="$path"
24924  if test "x$has_colon" = x; then
24925    # Not in mixed or Windows style, start by that.
24926    new_path=`cmd //c echo $path`
24927  fi
24928
24929
24930  input_path="$new_path"
24931  # Check if we need to convert this using DOS-style short mode. If the path
24932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24933  # take no chances and rewrite it.
24934  # Note: m4 eats our [], so we need to use [ and ] instead.
24935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24936  if test "x$has_forbidden_chars" != x; then
24937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24939  fi
24940
24941
24942  windows_path="$new_path"
24943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24944    unix_path=`$CYGPATH -u "$windows_path"`
24945    new_path="$unix_path"
24946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24948    new_path="$unix_path"
24949  fi
24950
24951  if test "x$path" != "x$new_path"; then
24952    BOOT_JDK="$new_path"
24953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24955  fi
24956
24957  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24958  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24959
24960  else
24961    # We're on a unix platform. Hooray! :)
24962    path="$BOOT_JDK"
24963    has_space=`$ECHO "$path" | $GREP " "`
24964    if test "x$has_space" != x; then
24965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24966$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24967      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24968    fi
24969
24970    # Use eval to expand a potential ~
24971    eval path="$path"
24972    if test ! -f "$path" && test ! -d "$path"; then
24973      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24974    fi
24975
24976    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24977  fi
24978
24979            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24980$as_echo_n "checking for Boot JDK... " >&6; }
24981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24982$as_echo "$BOOT_JDK" >&6; }
24983            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24984$as_echo_n "checking Boot JDK version... " >&6; }
24985            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24987$as_echo "$BOOT_JDK_VERSION" >&6; }
24988          fi # end check jdk version
24989        fi # end check javac
24990      fi # end check java
24991    fi # end check boot jdk found
24992  fi
24993
24994    done
24995  fi
24996
24997
24998    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24999    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25000      # Do we have a bin/java?
25001      if test ! -x "$BOOT_JDK/bin/java"; then
25002        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25004        BOOT_JDK_FOUND=no
25005      else
25006        # Do we have a bin/javac?
25007        if test ! -x "$BOOT_JDK/bin/javac"; then
25008          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25010          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25011$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25012          BOOT_JDK_FOUND=no
25013        else
25014          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25015          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25016
25017          # Extra M4 quote needed to protect [] in grep expression.
25018          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25019          if test "x$FOUND_CORRECT_VERSION" = x; then
25020            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25022            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25023$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25024            BOOT_JDK_FOUND=no
25025          else
25026            # We're done! :-)
25027            BOOT_JDK_FOUND=yes
25028
25029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25030
25031  # Input might be given as Windows format, start by converting to
25032  # unix format.
25033  path="$BOOT_JDK"
25034  new_path=`$CYGPATH -u "$path"`
25035
25036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25039  # "foo.exe" is OK but "foo" is an error.
25040  #
25041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25042  # It is also a way to make sure we got the proper file name for the real test later on.
25043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25044  if test "x$test_shortpath" = x; then
25045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25047    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25048  fi
25049
25050  # Call helper function which possibly converts this using DOS-style short mode.
25051  # If so, the updated path is stored in $new_path.
25052
25053  input_path="$new_path"
25054  # Check if we need to convert this using DOS-style short mode. If the path
25055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25056  # take no chances and rewrite it.
25057  # Note: m4 eats our [], so we need to use [ and ] instead.
25058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25059  if test "x$has_forbidden_chars" != x; then
25060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25064      # Going to short mode and back again did indeed matter. Since short mode is
25065      # case insensitive, let's make it lowercase to improve readability.
25066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25067      # Now convert it back to Unix-stile (cygpath)
25068      input_path=`$CYGPATH -u "$shortmode_path"`
25069      new_path="$input_path"
25070    fi
25071  fi
25072
25073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25074  if test "x$test_cygdrive_prefix" = x; then
25075    # As a simple fix, exclude /usr/bin since it's not a real path.
25076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25078      # a path prefixed by /cygdrive for fixpath to work.
25079      new_path="$CYGWIN_ROOT_PATH$input_path"
25080    fi
25081  fi
25082
25083
25084  if test "x$path" != "x$new_path"; then
25085    BOOT_JDK="$new_path"
25086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25088  fi
25089
25090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25091
25092  path="$BOOT_JDK"
25093  has_colon=`$ECHO $path | $GREP ^.:`
25094  new_path="$path"
25095  if test "x$has_colon" = x; then
25096    # Not in mixed or Windows style, start by that.
25097    new_path=`cmd //c echo $path`
25098  fi
25099
25100
25101  input_path="$new_path"
25102  # Check if we need to convert this using DOS-style short mode. If the path
25103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25104  # take no chances and rewrite it.
25105  # Note: m4 eats our [], so we need to use [ and ] instead.
25106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25107  if test "x$has_forbidden_chars" != x; then
25108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25110  fi
25111
25112
25113  windows_path="$new_path"
25114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25115    unix_path=`$CYGPATH -u "$windows_path"`
25116    new_path="$unix_path"
25117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25119    new_path="$unix_path"
25120  fi
25121
25122  if test "x$path" != "x$new_path"; then
25123    BOOT_JDK="$new_path"
25124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25126  fi
25127
25128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25130
25131  else
25132    # We're on a unix platform. Hooray! :)
25133    path="$BOOT_JDK"
25134    has_space=`$ECHO "$path" | $GREP " "`
25135    if test "x$has_space" != x; then
25136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25137$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25138      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25139    fi
25140
25141    # Use eval to expand a potential ~
25142    eval path="$path"
25143    if test ! -f "$path" && test ! -d "$path"; then
25144      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25145    fi
25146
25147    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25148  fi
25149
25150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25151$as_echo_n "checking for Boot JDK... " >&6; }
25152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25153$as_echo "$BOOT_JDK" >&6; }
25154            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25155$as_echo_n "checking Boot JDK version... " >&6; }
25156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25158$as_echo "$BOOT_JDK_VERSION" >&6; }
25159          fi # end check jdk version
25160        fi # end check javac
25161      fi # end check java
25162    fi # end check boot jdk found
25163  fi
25164
25165  fi
25166
25167
25168    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25169    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25170      # Do we have a bin/java?
25171      if test ! -x "$BOOT_JDK/bin/java"; then
25172        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25174        BOOT_JDK_FOUND=no
25175      else
25176        # Do we have a bin/javac?
25177        if test ! -x "$BOOT_JDK/bin/javac"; then
25178          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25180          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25181$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25182          BOOT_JDK_FOUND=no
25183        else
25184          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25185          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25186
25187          # Extra M4 quote needed to protect [] in grep expression.
25188          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25189          if test "x$FOUND_CORRECT_VERSION" = x; then
25190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25192            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25193$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25194            BOOT_JDK_FOUND=no
25195          else
25196            # We're done! :-)
25197            BOOT_JDK_FOUND=yes
25198
25199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25200
25201  # Input might be given as Windows format, start by converting to
25202  # unix format.
25203  path="$BOOT_JDK"
25204  new_path=`$CYGPATH -u "$path"`
25205
25206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25209  # "foo.exe" is OK but "foo" is an error.
25210  #
25211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25212  # It is also a way to make sure we got the proper file name for the real test later on.
25213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25214  if test "x$test_shortpath" = x; then
25215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25218  fi
25219
25220  # Call helper function which possibly converts this using DOS-style short mode.
25221  # If so, the updated path is stored in $new_path.
25222
25223  input_path="$new_path"
25224  # Check if we need to convert this using DOS-style short mode. If the path
25225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25226  # take no chances and rewrite it.
25227  # Note: m4 eats our [], so we need to use [ and ] instead.
25228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25229  if test "x$has_forbidden_chars" != x; then
25230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25234      # Going to short mode and back again did indeed matter. Since short mode is
25235      # case insensitive, let's make it lowercase to improve readability.
25236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25237      # Now convert it back to Unix-stile (cygpath)
25238      input_path=`$CYGPATH -u "$shortmode_path"`
25239      new_path="$input_path"
25240    fi
25241  fi
25242
25243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25244  if test "x$test_cygdrive_prefix" = x; then
25245    # As a simple fix, exclude /usr/bin since it's not a real path.
25246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25248      # a path prefixed by /cygdrive for fixpath to work.
25249      new_path="$CYGWIN_ROOT_PATH$input_path"
25250    fi
25251  fi
25252
25253
25254  if test "x$path" != "x$new_path"; then
25255    BOOT_JDK="$new_path"
25256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25258  fi
25259
25260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25261
25262  path="$BOOT_JDK"
25263  has_colon=`$ECHO $path | $GREP ^.:`
25264  new_path="$path"
25265  if test "x$has_colon" = x; then
25266    # Not in mixed or Windows style, start by that.
25267    new_path=`cmd //c echo $path`
25268  fi
25269
25270
25271  input_path="$new_path"
25272  # Check if we need to convert this using DOS-style short mode. If the path
25273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25274  # take no chances and rewrite it.
25275  # Note: m4 eats our [], so we need to use [ and ] instead.
25276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25277  if test "x$has_forbidden_chars" != x; then
25278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25280  fi
25281
25282
25283  windows_path="$new_path"
25284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25285    unix_path=`$CYGPATH -u "$windows_path"`
25286    new_path="$unix_path"
25287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25289    new_path="$unix_path"
25290  fi
25291
25292  if test "x$path" != "x$new_path"; then
25293    BOOT_JDK="$new_path"
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25296  fi
25297
25298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25300
25301  else
25302    # We're on a unix platform. Hooray! :)
25303    path="$BOOT_JDK"
25304    has_space=`$ECHO "$path" | $GREP " "`
25305    if test "x$has_space" != x; then
25306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25308      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25309    fi
25310
25311    # Use eval to expand a potential ~
25312    eval path="$path"
25313    if test ! -f "$path" && test ! -d "$path"; then
25314      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25315    fi
25316
25317    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25318  fi
25319
25320            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25321$as_echo_n "checking for Boot JDK... " >&6; }
25322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25323$as_echo "$BOOT_JDK" >&6; }
25324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25325$as_echo_n "checking Boot JDK version... " >&6; }
25326            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25328$as_echo "$BOOT_JDK_VERSION" >&6; }
25329          fi # end check jdk version
25330        fi # end check javac
25331      fi # end check java
25332    fi # end check boot jdk found
25333  fi
25334
25335
25336  # If we haven't found anything yet, we've truly lost. Give up.
25337  if test "x$BOOT_JDK_FOUND" = xno; then
25338
25339  # Print a helpful message on how to acquire the necessary build dependency.
25340  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25341  MISSING_DEPENDENCY=openjdk
25342
25343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25344    cygwin_help $MISSING_DEPENDENCY
25345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25346    msys_help $MISSING_DEPENDENCY
25347  else
25348    PKGHANDLER_COMMAND=
25349
25350    case $PKGHANDLER in
25351      apt-get)
25352        apt_help     $MISSING_DEPENDENCY ;;
25353      yum)
25354        yum_help     $MISSING_DEPENDENCY ;;
25355      port)
25356        port_help    $MISSING_DEPENDENCY ;;
25357      pkgutil)
25358        pkgutil_help $MISSING_DEPENDENCY ;;
25359      pkgadd)
25360        pkgadd_help  $MISSING_DEPENDENCY ;;
25361    esac
25362
25363    if test "x$PKGHANDLER_COMMAND" != x; then
25364      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25365    fi
25366  fi
25367
25368    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25369$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25370    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25371$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25372    as_fn_error $? "Cannot continue" "$LINENO" 5
25373  fi
25374
25375
25376
25377  # Setup tools from the Boot JDK.
25378
25379  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25380
25381  # Publish this variable in the help.
25382
25383
25384  if test "x$JAVA" = x; then
25385    # The variable is not set by user, try to locate tool using the code snippet
25386
25387      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25388$as_echo_n "checking for java in Boot JDK... " >&6; }
25389      JAVA=$BOOT_JDK/bin/java
25390      if test ! -x $JAVA; then
25391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25392$as_echo "not found" >&6; }
25393        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25394$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25395        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25396      fi
25397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25398$as_echo "ok" >&6; }
25399
25400
25401  else
25402    # The variable is set, but is it from the command line or the environment?
25403
25404    # Try to remove the string !JAVA! from our list.
25405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25407      # If it failed, the variable was not from the command line. Ignore it,
25408      # but warn the user (except for BASH, which is always set by the calling BASH).
25409      if test "xJAVA" != xBASH; then
25410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25411$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25412      fi
25413      # Try to locate tool using the code snippet
25414
25415      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25416$as_echo_n "checking for java in Boot JDK... " >&6; }
25417      JAVA=$BOOT_JDK/bin/java
25418      if test ! -x $JAVA; then
25419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25420$as_echo "not found" >&6; }
25421        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25422$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25423        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25424      fi
25425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25426$as_echo "ok" >&6; }
25427
25428
25429    else
25430      # If it succeeded, then it was overridden by the user. We will use it
25431      # for the tool.
25432
25433      # First remove it from the list of overridden variables, so we can test
25434      # for unknown variables in the end.
25435      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25436
25437      # Check if the provided tool contains a complete path.
25438      tool_specified="$JAVA"
25439      tool_basename="${tool_specified##*/}"
25440      if test "x$tool_basename" = "x$tool_specified"; then
25441        # A command without a complete path is provided, search $PATH.
25442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25443$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25444        # Extract the first word of "$tool_basename", so it can be a program name with args.
25445set dummy $tool_basename; ac_word=$2
25446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25447$as_echo_n "checking for $ac_word... " >&6; }
25448if ${ac_cv_path_JAVA+:} false; then :
25449  $as_echo_n "(cached) " >&6
25450else
25451  case $JAVA in
25452  [\\/]* | ?:[\\/]*)
25453  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25454  ;;
25455  *)
25456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25457for as_dir in $PATH
25458do
25459  IFS=$as_save_IFS
25460  test -z "$as_dir" && as_dir=.
25461    for ac_exec_ext in '' $ac_executable_extensions; do
25462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25463    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25465    break 2
25466  fi
25467done
25468  done
25469IFS=$as_save_IFS
25470
25471  ;;
25472esac
25473fi
25474JAVA=$ac_cv_path_JAVA
25475if test -n "$JAVA"; then
25476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25477$as_echo "$JAVA" >&6; }
25478else
25479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25480$as_echo "no" >&6; }
25481fi
25482
25483
25484        if test "x$JAVA" = x; then
25485          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25486        fi
25487      else
25488        # Otherwise we believe it is a complete path. Use it as it is.
25489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25490$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25492$as_echo_n "checking for JAVA... " >&6; }
25493        if test ! -x "$tool_specified"; then
25494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25495$as_echo "not found" >&6; }
25496          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25497        fi
25498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25499$as_echo "$tool_specified" >&6; }
25500      fi
25501    fi
25502  fi
25503
25504
25505
25506  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25507
25508  # Publish this variable in the help.
25509
25510
25511  if test "x$JAVAC" = x; then
25512    # The variable is not set by user, try to locate tool using the code snippet
25513
25514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25515$as_echo_n "checking for javac in Boot JDK... " >&6; }
25516      JAVAC=$BOOT_JDK/bin/javac
25517      if test ! -x $JAVAC; then
25518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25519$as_echo "not found" >&6; }
25520        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25521$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25522        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25523      fi
25524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25525$as_echo "ok" >&6; }
25526
25527
25528  else
25529    # The variable is set, but is it from the command line or the environment?
25530
25531    # Try to remove the string !JAVAC! from our list.
25532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25534      # If it failed, the variable was not from the command line. Ignore it,
25535      # but warn the user (except for BASH, which is always set by the calling BASH).
25536      if test "xJAVAC" != xBASH; then
25537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25538$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25539      fi
25540      # Try to locate tool using the code snippet
25541
25542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25543$as_echo_n "checking for javac in Boot JDK... " >&6; }
25544      JAVAC=$BOOT_JDK/bin/javac
25545      if test ! -x $JAVAC; then
25546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25547$as_echo "not found" >&6; }
25548        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25549$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25550        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25551      fi
25552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25553$as_echo "ok" >&6; }
25554
25555
25556    else
25557      # If it succeeded, then it was overridden by the user. We will use it
25558      # for the tool.
25559
25560      # First remove it from the list of overridden variables, so we can test
25561      # for unknown variables in the end.
25562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25563
25564      # Check if the provided tool contains a complete path.
25565      tool_specified="$JAVAC"
25566      tool_basename="${tool_specified##*/}"
25567      if test "x$tool_basename" = "x$tool_specified"; then
25568        # A command without a complete path is provided, search $PATH.
25569        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25570$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25571        # Extract the first word of "$tool_basename", so it can be a program name with args.
25572set dummy $tool_basename; ac_word=$2
25573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25574$as_echo_n "checking for $ac_word... " >&6; }
25575if ${ac_cv_path_JAVAC+:} false; then :
25576  $as_echo_n "(cached) " >&6
25577else
25578  case $JAVAC in
25579  [\\/]* | ?:[\\/]*)
25580  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25581  ;;
25582  *)
25583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25584for as_dir in $PATH
25585do
25586  IFS=$as_save_IFS
25587  test -z "$as_dir" && as_dir=.
25588    for ac_exec_ext in '' $ac_executable_extensions; do
25589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25590    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25592    break 2
25593  fi
25594done
25595  done
25596IFS=$as_save_IFS
25597
25598  ;;
25599esac
25600fi
25601JAVAC=$ac_cv_path_JAVAC
25602if test -n "$JAVAC"; then
25603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25604$as_echo "$JAVAC" >&6; }
25605else
25606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25607$as_echo "no" >&6; }
25608fi
25609
25610
25611        if test "x$JAVAC" = x; then
25612          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25613        fi
25614      else
25615        # Otherwise we believe it is a complete path. Use it as it is.
25616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25617$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25619$as_echo_n "checking for JAVAC... " >&6; }
25620        if test ! -x "$tool_specified"; then
25621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25622$as_echo "not found" >&6; }
25623          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25624        fi
25625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25626$as_echo "$tool_specified" >&6; }
25627      fi
25628    fi
25629  fi
25630
25631
25632
25633  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25634
25635  # Publish this variable in the help.
25636
25637
25638  if test "x$JAVAH" = x; then
25639    # The variable is not set by user, try to locate tool using the code snippet
25640
25641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25642$as_echo_n "checking for javah in Boot JDK... " >&6; }
25643      JAVAH=$BOOT_JDK/bin/javah
25644      if test ! -x $JAVAH; then
25645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25646$as_echo "not found" >&6; }
25647        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25648$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25649        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25650      fi
25651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25652$as_echo "ok" >&6; }
25653
25654
25655  else
25656    # The variable is set, but is it from the command line or the environment?
25657
25658    # Try to remove the string !JAVAH! from our list.
25659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25661      # If it failed, the variable was not from the command line. Ignore it,
25662      # but warn the user (except for BASH, which is always set by the calling BASH).
25663      if test "xJAVAH" != xBASH; then
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25665$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25666      fi
25667      # Try to locate tool using the code snippet
25668
25669      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25670$as_echo_n "checking for javah in Boot JDK... " >&6; }
25671      JAVAH=$BOOT_JDK/bin/javah
25672      if test ! -x $JAVAH; then
25673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25674$as_echo "not found" >&6; }
25675        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25676$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25677        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25678      fi
25679      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25680$as_echo "ok" >&6; }
25681
25682
25683    else
25684      # If it succeeded, then it was overridden by the user. We will use it
25685      # for the tool.
25686
25687      # First remove it from the list of overridden variables, so we can test
25688      # for unknown variables in the end.
25689      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25690
25691      # Check if the provided tool contains a complete path.
25692      tool_specified="$JAVAH"
25693      tool_basename="${tool_specified##*/}"
25694      if test "x$tool_basename" = "x$tool_specified"; then
25695        # A command without a complete path is provided, search $PATH.
25696        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25697$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25698        # Extract the first word of "$tool_basename", so it can be a program name with args.
25699set dummy $tool_basename; ac_word=$2
25700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25701$as_echo_n "checking for $ac_word... " >&6; }
25702if ${ac_cv_path_JAVAH+:} false; then :
25703  $as_echo_n "(cached) " >&6
25704else
25705  case $JAVAH in
25706  [\\/]* | ?:[\\/]*)
25707  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25708  ;;
25709  *)
25710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25711for as_dir in $PATH
25712do
25713  IFS=$as_save_IFS
25714  test -z "$as_dir" && as_dir=.
25715    for ac_exec_ext in '' $ac_executable_extensions; do
25716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25717    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25719    break 2
25720  fi
25721done
25722  done
25723IFS=$as_save_IFS
25724
25725  ;;
25726esac
25727fi
25728JAVAH=$ac_cv_path_JAVAH
25729if test -n "$JAVAH"; then
25730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25731$as_echo "$JAVAH" >&6; }
25732else
25733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25734$as_echo "no" >&6; }
25735fi
25736
25737
25738        if test "x$JAVAH" = x; then
25739          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25740        fi
25741      else
25742        # Otherwise we believe it is a complete path. Use it as it is.
25743        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25744$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25746$as_echo_n "checking for JAVAH... " >&6; }
25747        if test ! -x "$tool_specified"; then
25748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25749$as_echo "not found" >&6; }
25750          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25751        fi
25752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25753$as_echo "$tool_specified" >&6; }
25754      fi
25755    fi
25756  fi
25757
25758
25759
25760  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25761
25762  # Publish this variable in the help.
25763
25764
25765  if test "x$JAR" = x; then
25766    # The variable is not set by user, try to locate tool using the code snippet
25767
25768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25769$as_echo_n "checking for jar in Boot JDK... " >&6; }
25770      JAR=$BOOT_JDK/bin/jar
25771      if test ! -x $JAR; then
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25773$as_echo "not found" >&6; }
25774        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25775$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25776        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25777      fi
25778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25779$as_echo "ok" >&6; }
25780
25781
25782  else
25783    # The variable is set, but is it from the command line or the environment?
25784
25785    # Try to remove the string !JAR! from our list.
25786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25788      # If it failed, the variable was not from the command line. Ignore it,
25789      # but warn the user (except for BASH, which is always set by the calling BASH).
25790      if test "xJAR" != xBASH; then
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25792$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25793      fi
25794      # Try to locate tool using the code snippet
25795
25796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25797$as_echo_n "checking for jar in Boot JDK... " >&6; }
25798      JAR=$BOOT_JDK/bin/jar
25799      if test ! -x $JAR; then
25800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25801$as_echo "not found" >&6; }
25802        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25803$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25804        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25805      fi
25806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25807$as_echo "ok" >&6; }
25808
25809
25810    else
25811      # If it succeeded, then it was overridden by the user. We will use it
25812      # for the tool.
25813
25814      # First remove it from the list of overridden variables, so we can test
25815      # for unknown variables in the end.
25816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25817
25818      # Check if the provided tool contains a complete path.
25819      tool_specified="$JAR"
25820      tool_basename="${tool_specified##*/}"
25821      if test "x$tool_basename" = "x$tool_specified"; then
25822        # A command without a complete path is provided, search $PATH.
25823        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25824$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25825        # Extract the first word of "$tool_basename", so it can be a program name with args.
25826set dummy $tool_basename; ac_word=$2
25827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25828$as_echo_n "checking for $ac_word... " >&6; }
25829if ${ac_cv_path_JAR+:} false; then :
25830  $as_echo_n "(cached) " >&6
25831else
25832  case $JAR in
25833  [\\/]* | ?:[\\/]*)
25834  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25835  ;;
25836  *)
25837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25838for as_dir in $PATH
25839do
25840  IFS=$as_save_IFS
25841  test -z "$as_dir" && as_dir=.
25842    for ac_exec_ext in '' $ac_executable_extensions; do
25843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25844    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25846    break 2
25847  fi
25848done
25849  done
25850IFS=$as_save_IFS
25851
25852  ;;
25853esac
25854fi
25855JAR=$ac_cv_path_JAR
25856if test -n "$JAR"; then
25857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25858$as_echo "$JAR" >&6; }
25859else
25860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25861$as_echo "no" >&6; }
25862fi
25863
25864
25865        if test "x$JAR" = x; then
25866          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25867        fi
25868      else
25869        # Otherwise we believe it is a complete path. Use it as it is.
25870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25871$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25873$as_echo_n "checking for JAR... " >&6; }
25874        if test ! -x "$tool_specified"; then
25875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25876$as_echo "not found" >&6; }
25877          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25878        fi
25879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25880$as_echo "$tool_specified" >&6; }
25881      fi
25882    fi
25883  fi
25884
25885
25886
25887  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25888
25889  # Publish this variable in the help.
25890
25891
25892  if test "x$NATIVE2ASCII" = x; then
25893    # The variable is not set by user, try to locate tool using the code snippet
25894
25895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25896$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25897      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25898      if test ! -x $NATIVE2ASCII; then
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25900$as_echo "not found" >&6; }
25901        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25902$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25903        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25904      fi
25905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25906$as_echo "ok" >&6; }
25907
25908
25909  else
25910    # The variable is set, but is it from the command line or the environment?
25911
25912    # Try to remove the string !NATIVE2ASCII! from our list.
25913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25915      # If it failed, the variable was not from the command line. Ignore it,
25916      # but warn the user (except for BASH, which is always set by the calling BASH).
25917      if test "xNATIVE2ASCII" != xBASH; then
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25919$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25920      fi
25921      # Try to locate tool using the code snippet
25922
25923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25924$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25925      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25926      if test ! -x $NATIVE2ASCII; then
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25928$as_echo "not found" >&6; }
25929        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25930$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25931        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25932      fi
25933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25934$as_echo "ok" >&6; }
25935
25936
25937    else
25938      # If it succeeded, then it was overridden by the user. We will use it
25939      # for the tool.
25940
25941      # First remove it from the list of overridden variables, so we can test
25942      # for unknown variables in the end.
25943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25944
25945      # Check if the provided tool contains a complete path.
25946      tool_specified="$NATIVE2ASCII"
25947      tool_basename="${tool_specified##*/}"
25948      if test "x$tool_basename" = "x$tool_specified"; then
25949        # A command without a complete path is provided, search $PATH.
25950        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25951$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25952        # Extract the first word of "$tool_basename", so it can be a program name with args.
25953set dummy $tool_basename; ac_word=$2
25954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25955$as_echo_n "checking for $ac_word... " >&6; }
25956if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25957  $as_echo_n "(cached) " >&6
25958else
25959  case $NATIVE2ASCII in
25960  [\\/]* | ?:[\\/]*)
25961  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25962  ;;
25963  *)
25964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25965for as_dir in $PATH
25966do
25967  IFS=$as_save_IFS
25968  test -z "$as_dir" && as_dir=.
25969    for ac_exec_ext in '' $ac_executable_extensions; do
25970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25971    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25973    break 2
25974  fi
25975done
25976  done
25977IFS=$as_save_IFS
25978
25979  ;;
25980esac
25981fi
25982NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25983if test -n "$NATIVE2ASCII"; then
25984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25985$as_echo "$NATIVE2ASCII" >&6; }
25986else
25987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25988$as_echo "no" >&6; }
25989fi
25990
25991
25992        if test "x$NATIVE2ASCII" = x; then
25993          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25994        fi
25995      else
25996        # Otherwise we believe it is a complete path. Use it as it is.
25997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25998$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26000$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26001        if test ! -x "$tool_specified"; then
26002          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26003$as_echo "not found" >&6; }
26004          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26005        fi
26006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26007$as_echo "$tool_specified" >&6; }
26008      fi
26009    fi
26010  fi
26011
26012
26013
26014  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26015
26016  # Publish this variable in the help.
26017
26018
26019  if test "x$JARSIGNER" = x; then
26020    # The variable is not set by user, try to locate tool using the code snippet
26021
26022      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26023$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26024      JARSIGNER=$BOOT_JDK/bin/jarsigner
26025      if test ! -x $JARSIGNER; then
26026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26027$as_echo "not found" >&6; }
26028        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26029$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26030        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26031      fi
26032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26033$as_echo "ok" >&6; }
26034
26035
26036  else
26037    # The variable is set, but is it from the command line or the environment?
26038
26039    # Try to remove the string !JARSIGNER! from our list.
26040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26042      # If it failed, the variable was not from the command line. Ignore it,
26043      # but warn the user (except for BASH, which is always set by the calling BASH).
26044      if test "xJARSIGNER" != xBASH; then
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26046$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26047      fi
26048      # Try to locate tool using the code snippet
26049
26050      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26051$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26052      JARSIGNER=$BOOT_JDK/bin/jarsigner
26053      if test ! -x $JARSIGNER; then
26054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26055$as_echo "not found" >&6; }
26056        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26057$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26058        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26059      fi
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26061$as_echo "ok" >&6; }
26062
26063
26064    else
26065      # If it succeeded, then it was overridden by the user. We will use it
26066      # for the tool.
26067
26068      # First remove it from the list of overridden variables, so we can test
26069      # for unknown variables in the end.
26070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26071
26072      # Check if the provided tool contains a complete path.
26073      tool_specified="$JARSIGNER"
26074      tool_basename="${tool_specified##*/}"
26075      if test "x$tool_basename" = "x$tool_specified"; then
26076        # A command without a complete path is provided, search $PATH.
26077        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26078$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26079        # Extract the first word of "$tool_basename", so it can be a program name with args.
26080set dummy $tool_basename; ac_word=$2
26081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26082$as_echo_n "checking for $ac_word... " >&6; }
26083if ${ac_cv_path_JARSIGNER+:} false; then :
26084  $as_echo_n "(cached) " >&6
26085else
26086  case $JARSIGNER in
26087  [\\/]* | ?:[\\/]*)
26088  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26089  ;;
26090  *)
26091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26092for as_dir in $PATH
26093do
26094  IFS=$as_save_IFS
26095  test -z "$as_dir" && as_dir=.
26096    for ac_exec_ext in '' $ac_executable_extensions; do
26097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26098    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26100    break 2
26101  fi
26102done
26103  done
26104IFS=$as_save_IFS
26105
26106  ;;
26107esac
26108fi
26109JARSIGNER=$ac_cv_path_JARSIGNER
26110if test -n "$JARSIGNER"; then
26111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26112$as_echo "$JARSIGNER" >&6; }
26113else
26114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26115$as_echo "no" >&6; }
26116fi
26117
26118
26119        if test "x$JARSIGNER" = x; then
26120          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26121        fi
26122      else
26123        # Otherwise we believe it is a complete path. Use it as it is.
26124        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26125$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26127$as_echo_n "checking for JARSIGNER... " >&6; }
26128        if test ! -x "$tool_specified"; then
26129          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26130$as_echo "not found" >&6; }
26131          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26132        fi
26133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26134$as_echo "$tool_specified" >&6; }
26135      fi
26136    fi
26137  fi
26138
26139
26140
26141  # Finally, set some other options...
26142
26143  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26144  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26145
26146
26147
26148
26149###############################################################################
26150#
26151# Configure the sources to use. We can add or override individual directories.
26152#
26153###############################################################################
26154
26155
26156  # Where are the sources. Any of these can be overridden
26157  # using --with-override-corba and the likes.
26158  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26159  CORBA_TOPDIR="$SRC_ROOT/corba"
26160  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26161  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26162  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26163  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26164  JDK_TOPDIR="$SRC_ROOT/jdk"
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175  ###############################################################################
26176  #
26177  # Pickup additional source for a component from outside of the source root
26178  # or override source for a component.
26179  #
26180
26181# Check whether --with-add-source-root was given.
26182if test "${with_add_source_root+set}" = set; then :
26183  withval=$with_add_source_root;
26184fi
26185
26186
26187
26188# Check whether --with-override-source-root was given.
26189if test "${with_override_source_root+set}" = set; then :
26190  withval=$with_override_source_root;
26191fi
26192
26193
26194
26195# Check whether --with-adds-and-overrides was given.
26196if test "${with_adds_and_overrides+set}" = set; then :
26197  withval=$with_adds_and_overrides;
26198fi
26199
26200
26201  if test "x$with_adds_and_overrides" != x; then
26202    with_add_source_root="$with_adds_and_overrides/adds"
26203    with_override_source_root="$with_adds_and_overrides/overrides"
26204  fi
26205
26206  if test "x$with_add_source_root" != x; then
26207    if ! test -d $with_add_source_root; then
26208      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26209    fi
26210    CURDIR="$PWD"
26211    cd "$with_add_source_root"
26212    ADD_SRC_ROOT="`pwd`"
26213    cd "$CURDIR"
26214    # Verify that the addon source root does not have any root makefiles.
26215    # If it does, then it is usually an error, prevent this.
26216    if test -f $with_add_source_root/langtools/make/Makefile; then
26217      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
26218    fi
26219    if test -f $with_add_source_root/corba/make/Makefile; then
26220      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
26221    fi
26222    if test -f $with_add_source_root/jaxp/make/Makefile; then
26223      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
26224    fi
26225    if test -f $with_add_source_root/jaxws/make/Makefile; then
26226      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
26227    fi
26228    if test -f $with_add_source_root/hotspot/make/Makefile; then
26229      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
26230    fi
26231    if test -f $with_add_source_root/nashorn/make/Makefile; then
26232      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
26233    fi
26234    if test -f $with_add_source_root/jdk/make/Makefile; then
26235      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
26236    fi
26237  fi
26238
26239
26240  if test "x$with_override_source_root" != x; then
26241    if ! test -d $with_override_source_root; then
26242      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26243    fi
26244    CURDIR="$PWD"
26245    cd "$with_override_source_root"
26246    OVERRIDE_SRC_ROOT="`pwd`"
26247    cd "$CURDIR"
26248    if test -f $with_override_source_root/langtools/make/Makefile; then
26249      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
26250    fi
26251    if test -f $with_override_source_root/corba/make/Makefile; then
26252      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
26253    fi
26254    if test -f $with_override_source_root/jaxp/make/Makefile; then
26255      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
26256    fi
26257    if test -f $with_override_source_root/jaxws/make/Makefile; then
26258      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
26259    fi
26260    if test -f $with_override_source_root/hotspot/make/Makefile; then
26261      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
26262    fi
26263    if test -f $with_override_source_root/nashorn/make/Makefile; then
26264      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
26265    fi
26266    if test -f $with_override_source_root/jdk/make/Makefile; then
26267      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
26268    fi
26269  fi
26270
26271
26272  ###############################################################################
26273  #
26274  # Override a repo completely, this is used for example when you have 3 small
26275  # development sandboxes of the langtools sources and want to avoid having 3 full
26276  # OpenJDK sources checked out on disk.
26277  #
26278  # Assuming that the 3 langtools sandboxes are located here:
26279  # /home/fredrik/sandbox1/langtools
26280  # /home/fredrik/sandbox2/langtools
26281  # /home/fredrik/sandbox3/langtools
26282  #
26283  # From the source root you create build subdirs manually:
26284  #     mkdir -p build1 build2 build3
26285  # in each build directory run:
26286  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26287  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26288  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26289  #
26290
26291
26292# Check whether --with-override-langtools was given.
26293if test "${with_override_langtools+set}" = set; then :
26294  withval=$with_override_langtools;
26295fi
26296
26297
26298
26299# Check whether --with-override-corba was given.
26300if test "${with_override_corba+set}" = set; then :
26301  withval=$with_override_corba;
26302fi
26303
26304
26305
26306# Check whether --with-override-jaxp was given.
26307if test "${with_override_jaxp+set}" = set; then :
26308  withval=$with_override_jaxp;
26309fi
26310
26311
26312
26313# Check whether --with-override-jaxws was given.
26314if test "${with_override_jaxws+set}" = set; then :
26315  withval=$with_override_jaxws;
26316fi
26317
26318
26319
26320# Check whether --with-override-hotspot was given.
26321if test "${with_override_hotspot+set}" = set; then :
26322  withval=$with_override_hotspot;
26323fi
26324
26325
26326
26327# Check whether --with-override-nashorn was given.
26328if test "${with_override_nashorn+set}" = set; then :
26329  withval=$with_override_nashorn;
26330fi
26331
26332
26333
26334# Check whether --with-override-jdk was given.
26335if test "${with_override_jdk+set}" = set; then :
26336  withval=$with_override_jdk;
26337fi
26338
26339
26340  if test "x$with_override_langtools" != x; then
26341    CURDIR="$PWD"
26342    cd "$with_override_langtools"
26343    LANGTOOLS_TOPDIR="`pwd`"
26344    cd "$CURDIR"
26345    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26346      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26347    fi
26348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26349$as_echo_n "checking if langtools should be overridden... " >&6; }
26350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26351$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26352  fi
26353  if test "x$with_override_corba" != x; then
26354    CURDIR="$PWD"
26355    cd "$with_override_corba"
26356    CORBA_TOPDIR="`pwd`"
26357    cd "$CURDIR"
26358    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26359      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26360    fi
26361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26362$as_echo_n "checking if corba should be overridden... " >&6; }
26363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26364$as_echo "yes with $CORBA_TOPDIR" >&6; }
26365  fi
26366  if test "x$with_override_jaxp" != x; then
26367    CURDIR="$PWD"
26368    cd "$with_override_jaxp"
26369    JAXP_TOPDIR="`pwd`"
26370    cd "$CURDIR"
26371    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26372      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26373    fi
26374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26375$as_echo_n "checking if jaxp should be overridden... " >&6; }
26376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26377$as_echo "yes with $JAXP_TOPDIR" >&6; }
26378  fi
26379  if test "x$with_override_jaxws" != x; then
26380    CURDIR="$PWD"
26381    cd "$with_override_jaxws"
26382    JAXWS_TOPDIR="`pwd`"
26383    cd "$CURDIR"
26384    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26385      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26386    fi
26387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26388$as_echo_n "checking if jaxws should be overridden... " >&6; }
26389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26390$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26391  fi
26392  if test "x$with_override_hotspot" != x; then
26393    CURDIR="$PWD"
26394    cd "$with_override_hotspot"
26395    HOTSPOT_TOPDIR="`pwd`"
26396    cd "$CURDIR"
26397    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26398      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26399    fi
26400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26401$as_echo_n "checking if hotspot should be overridden... " >&6; }
26402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26403$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26404  fi
26405  if test "x$with_override_nashorn" != x; then
26406    CURDIR="$PWD"
26407    cd "$with_override_nashorn"
26408    NASHORN_TOPDIR="`pwd`"
26409    cd "$CURDIR"
26410    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26411      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26412    fi
26413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26414$as_echo_n "checking if nashorn should be overridden... " >&6; }
26415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26416$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26417  fi
26418  if test "x$with_override_jdk" != x; then
26419    CURDIR="$PWD"
26420    cd "$with_override_jdk"
26421    JDK_TOPDIR="`pwd`"
26422    cd "$CURDIR"
26423    if ! test -f $JDK_TOPDIR/make/Makefile; then
26424      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26425    fi
26426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26427$as_echo_n "checking if JDK should be overridden... " >&6; }
26428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26429$as_echo "yes with $JDK_TOPDIR" >&6; }
26430  fi
26431
26432
26433  BUILD_OUTPUT="$OUTPUT_ROOT"
26434
26435
26436  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26437  BUILD_HOTSPOT=true
26438
26439
26440
26441# Check whether --with-import-hotspot was given.
26442if test "${with_import_hotspot+set}" = set; then :
26443  withval=$with_import_hotspot;
26444fi
26445
26446  if test "x$with_import_hotspot" != x; then
26447    CURDIR="$PWD"
26448    cd "$with_import_hotspot"
26449    HOTSPOT_DIST="`pwd`"
26450    cd "$CURDIR"
26451    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26452      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26453    fi
26454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26455$as_echo_n "checking if hotspot should be imported... " >&6; }
26456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26457$as_echo "yes from $HOTSPOT_DIST" >&6; }
26458    BUILD_HOTSPOT=false
26459  fi
26460
26461  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26462
26463
26464###############################################################################
26465#
26466# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26467# native code.
26468#
26469###############################################################################
26470
26471# First determine the toolchain type (compiler family)
26472
26473
26474# Check whether --with-toolchain-type was given.
26475if test "${with_toolchain_type+set}" = set; then :
26476  withval=$with_toolchain_type;
26477fi
26478
26479
26480  # Use indirect variable referencing
26481  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26482  VALID_TOOLCHAINS=${!toolchain_var_name}
26483
26484  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26485    if test -n "$XCODEBUILD"; then
26486      # On Mac OS X, default toolchain to clang after Xcode 5
26487      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26488      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26489      if test $? -ne 0; then
26490        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26491      fi
26492      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26493          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26494          $CUT -f 1 -d .`
26495      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26496$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26497      if test $XCODE_MAJOR_VERSION -ge 5; then
26498          DEFAULT_TOOLCHAIN="clang"
26499      else
26500          DEFAULT_TOOLCHAIN="gcc"
26501      fi
26502    else
26503      # If Xcode is not installed, but the command line tools are
26504      # then we can't run xcodebuild. On these systems we should
26505      # default to clang
26506      DEFAULT_TOOLCHAIN="clang"
26507    fi
26508  else
26509    # First toolchain type in the list is the default
26510    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26511  fi
26512
26513  if test "x$with_toolchain_type" = xlist; then
26514    # List all toolchains
26515    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26516$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26517    for toolchain in $VALID_TOOLCHAINS; do
26518      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26519      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26520      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26521    done
26522
26523    exit 0
26524  elif test "x$with_toolchain_type" != x; then
26525    # User override; check that it is valid
26526    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26527      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26528$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26529      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26530$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26531      as_fn_error $? "Cannot continue." "$LINENO" 5
26532    fi
26533    TOOLCHAIN_TYPE=$with_toolchain_type
26534  else
26535    # No flag given, use default
26536    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26537  fi
26538
26539
26540  TOOLCHAIN_CC_BINARY_clang="clang"
26541  TOOLCHAIN_CC_BINARY_gcc="gcc"
26542  TOOLCHAIN_CC_BINARY_microsoft="cl"
26543  TOOLCHAIN_CC_BINARY_solstudio="cc"
26544  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26545
26546  TOOLCHAIN_CXX_BINARY_clang="clang++"
26547  TOOLCHAIN_CXX_BINARY_gcc="g++"
26548  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26549  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26550  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26551
26552  # Use indirect variable referencing
26553  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26554  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26555  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26556  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26557  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26558  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26559
26560
26561  # Define filename patterns
26562  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26563    LIBRARY_PREFIX=
26564    SHARED_LIBRARY_SUFFIX='.dll'
26565    STATIC_LIBRARY_SUFFIX='.lib'
26566    SHARED_LIBRARY='$1.dll'
26567    STATIC_LIBRARY='$1.lib'
26568    OBJ_SUFFIX='.obj'
26569    EXE_SUFFIX='.exe'
26570  else
26571    LIBRARY_PREFIX=lib
26572    SHARED_LIBRARY_SUFFIX='.so'
26573    STATIC_LIBRARY_SUFFIX='.a'
26574    SHARED_LIBRARY='lib$1.so'
26575    STATIC_LIBRARY='lib$1.a'
26576    OBJ_SUFFIX='.o'
26577    EXE_SUFFIX=''
26578    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26579      SHARED_LIBRARY='lib$1.dylib'
26580      SHARED_LIBRARY_SUFFIX='.dylib'
26581    fi
26582  fi
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26594    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26595$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26596  else
26597    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26598$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26599  fi
26600
26601
26602# Then detect the actual binaries needed
26603
26604  # FIXME: Is this needed?
26605  ac_ext=cpp
26606ac_cpp='$CXXCPP $CPPFLAGS'
26607ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26608ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26609ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26610
26611
26612  # Store the CFLAGS etc passed to the configure script.
26613  ORG_CFLAGS="$CFLAGS"
26614  ORG_CXXFLAGS="$CXXFLAGS"
26615  ORG_OBJCFLAGS="$OBJCFLAGS"
26616
26617  # On Windows, we need to detect the visual studio installation first.
26618  # This will change the PATH, but we need to keep that new PATH even
26619  # after toolchain detection is done, since the compiler (on x86) uses
26620  # it for DLL resolution in runtime.
26621  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26622
26623  # Store path to cygwin link.exe to help excluding it when searching for
26624  # VS linker. This must be done before changing the PATH when looking for VS.
26625  # Extract the first word of "link", so it can be a program name with args.
26626set dummy link; ac_word=$2
26627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26628$as_echo_n "checking for $ac_word... " >&6; }
26629if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26630  $as_echo_n "(cached) " >&6
26631else
26632  case $CYGWIN_LINK in
26633  [\\/]* | ?:[\\/]*)
26634  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26635  ;;
26636  *)
26637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26638for as_dir in $PATH
26639do
26640  IFS=$as_save_IFS
26641  test -z "$as_dir" && as_dir=.
26642    for ac_exec_ext in '' $ac_executable_extensions; do
26643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26644    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26646    break 2
26647  fi
26648done
26649  done
26650IFS=$as_save_IFS
26651
26652  ;;
26653esac
26654fi
26655CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26656if test -n "$CYGWIN_LINK"; then
26657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26658$as_echo "$CYGWIN_LINK" >&6; }
26659else
26660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26661$as_echo "no" >&6; }
26662fi
26663
26664
26665  if test "x$CYGWIN_LINK" != x; then
26666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26667$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26668    "$CYGWIN_LINK" --version > /dev/null
26669    if test $? -eq 0 ; then
26670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26671$as_echo "yes" >&6; }
26672    else
26673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26674$as_echo "no" >&6; }
26675      # This might be the VS linker. Don't exclude it later on.
26676      CYGWIN_LINK=""
26677    fi
26678  fi
26679
26680  # First-hand choice is to locate and run the vsvars bat file.
26681
26682  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26683    VCVARSFILE="vc/bin/vcvars32.bat"
26684  else
26685    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26686  fi
26687
26688  VS_ENV_CMD=""
26689  VS_ENV_ARGS=""
26690  if test "x$with_toolsdir" != x; then
26691
26692  if test "x$VS_ENV_CMD" = x; then
26693    VS100BASE="$with_toolsdir/../.."
26694    METHOD="--with-tools-dir"
26695
26696  windows_path="$VS100BASE"
26697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26698    unix_path=`$CYGPATH -u "$windows_path"`
26699    VS100BASE="$unix_path"
26700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26702    VS100BASE="$unix_path"
26703  fi
26704
26705    if test -d "$VS100BASE"; then
26706      if test -f "$VS100BASE/$VCVARSFILE"; then
26707        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26708$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26709        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26710        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26711        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26712        # TODO: improve detection for other versions of VS
26713        PLATFORM_TOOLSET="v100"
26714      else
26715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26716$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26717        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26718$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26719      fi
26720    fi
26721  fi
26722
26723  fi
26724
26725  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26726    # Having specified an argument which is incorrect will produce an instant failure;
26727    # we should not go on looking
26728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26729$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26730    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26731$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26732    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26733  fi
26734
26735  if test "x$VS100COMNTOOLS" != x; then
26736
26737  if test "x$VS_ENV_CMD" = x; then
26738    VS100BASE="$VS100COMNTOOLS/../.."
26739    METHOD="VS100COMNTOOLS variable"
26740
26741  windows_path="$VS100BASE"
26742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26743    unix_path=`$CYGPATH -u "$windows_path"`
26744    VS100BASE="$unix_path"
26745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26747    VS100BASE="$unix_path"
26748  fi
26749
26750    if test -d "$VS100BASE"; then
26751      if test -f "$VS100BASE/$VCVARSFILE"; then
26752        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26753$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26754        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26755        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26756        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26757        # TODO: improve detection for other versions of VS
26758        PLATFORM_TOOLSET="v100"
26759      else
26760        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26761$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26762        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26763$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26764      fi
26765    fi
26766  fi
26767
26768  fi
26769  if test "x$PROGRAMFILES" != x; then
26770
26771  if test "x$VS_ENV_CMD" = x; then
26772    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26773    METHOD="well-known name"
26774
26775  windows_path="$VS100BASE"
26776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26777    unix_path=`$CYGPATH -u "$windows_path"`
26778    VS100BASE="$unix_path"
26779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26781    VS100BASE="$unix_path"
26782  fi
26783
26784    if test -d "$VS100BASE"; then
26785      if test -f "$VS100BASE/$VCVARSFILE"; then
26786        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26787$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26788        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26789        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26790        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26791        # TODO: improve detection for other versions of VS
26792        PLATFORM_TOOLSET="v100"
26793      else
26794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26795$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26796        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26797$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26798      fi
26799    fi
26800  fi
26801
26802  fi
26803
26804  if test "x$VS_ENV_CMD" = x; then
26805    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26806    METHOD="well-known name"
26807
26808  windows_path="$VS100BASE"
26809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26810    unix_path=`$CYGPATH -u "$windows_path"`
26811    VS100BASE="$unix_path"
26812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26814    VS100BASE="$unix_path"
26815  fi
26816
26817    if test -d "$VS100BASE"; then
26818      if test -f "$VS100BASE/$VCVARSFILE"; then
26819        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26820$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26821        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26822        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26823        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26824        # TODO: improve detection for other versions of VS
26825        PLATFORM_TOOLSET="v100"
26826      else
26827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26828$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26829        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26830$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26831      fi
26832    fi
26833  fi
26834
26835
26836  if test "x$VS_ENV_CMD" = x; then
26837    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26838    METHOD="well-known name"
26839
26840  windows_path="$VS100BASE"
26841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26842    unix_path=`$CYGPATH -u "$windows_path"`
26843    VS100BASE="$unix_path"
26844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26846    VS100BASE="$unix_path"
26847  fi
26848
26849    if test -d "$VS100BASE"; then
26850      if test -f "$VS100BASE/$VCVARSFILE"; then
26851        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26852$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26853        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26854        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26855        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26856        # TODO: improve detection for other versions of VS
26857        PLATFORM_TOOLSET="v100"
26858      else
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26860$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26861        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26862$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26863      fi
26864    fi
26865  fi
26866
26867
26868  if test "x$ProgramW6432" != x; then
26869
26870  if test "x$VS_ENV_CMD" = x; then
26871    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26872    METHOD="well-known name"
26873
26874  windows_path="$WIN_SDK_BASE"
26875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26876    unix_path=`$CYGPATH -u "$windows_path"`
26877    WIN_SDK_BASE="$unix_path"
26878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26880    WIN_SDK_BASE="$unix_path"
26881  fi
26882
26883    if test -d "$WIN_SDK_BASE"; then
26884      # There have been cases of partial or broken SDK installations. A missing
26885      # lib dir is not going to work.
26886      if test ! -d "$WIN_SDK_BASE/../lib"; then
26887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26888$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26890$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26891      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26893$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26894        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26895        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26896          VS_ENV_ARGS="/x86"
26897        else
26898          VS_ENV_ARGS="/x64"
26899        fi
26900        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26901        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26902        # TODO: improve detection for other versions of SDK
26903        PLATFORM_TOOLSET="Windows7.1SDK"
26904      else
26905        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26906$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26907        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26908$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26909      fi
26910    fi
26911  fi
26912
26913  fi
26914  if test "x$PROGRAMW6432" != x; then
26915
26916  if test "x$VS_ENV_CMD" = x; then
26917    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26918    METHOD="well-known name"
26919
26920  windows_path="$WIN_SDK_BASE"
26921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26922    unix_path=`$CYGPATH -u "$windows_path"`
26923    WIN_SDK_BASE="$unix_path"
26924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26926    WIN_SDK_BASE="$unix_path"
26927  fi
26928
26929    if test -d "$WIN_SDK_BASE"; then
26930      # There have been cases of partial or broken SDK installations. A missing
26931      # lib dir is not going to work.
26932      if test ! -d "$WIN_SDK_BASE/../lib"; then
26933        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26934$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26935        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26936$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26937      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26938        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26939$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26940        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26941        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26942          VS_ENV_ARGS="/x86"
26943        else
26944          VS_ENV_ARGS="/x64"
26945        fi
26946        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26947        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26948        # TODO: improve detection for other versions of SDK
26949        PLATFORM_TOOLSET="Windows7.1SDK"
26950      else
26951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26952$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26954$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26955      fi
26956    fi
26957  fi
26958
26959  fi
26960  if test "x$PROGRAMFILES" != x; then
26961
26962  if test "x$VS_ENV_CMD" = x; then
26963    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26964    METHOD="well-known name"
26965
26966  windows_path="$WIN_SDK_BASE"
26967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968    unix_path=`$CYGPATH -u "$windows_path"`
26969    WIN_SDK_BASE="$unix_path"
26970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26972    WIN_SDK_BASE="$unix_path"
26973  fi
26974
26975    if test -d "$WIN_SDK_BASE"; then
26976      # There have been cases of partial or broken SDK installations. A missing
26977      # lib dir is not going to work.
26978      if test ! -d "$WIN_SDK_BASE/../lib"; then
26979        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26980$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26981        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26982$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26983      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26985$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26986        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26987        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26988          VS_ENV_ARGS="/x86"
26989        else
26990          VS_ENV_ARGS="/x64"
26991        fi
26992        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26993        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26994        # TODO: improve detection for other versions of SDK
26995        PLATFORM_TOOLSET="Windows7.1SDK"
26996      else
26997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26999        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27000$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27001      fi
27002    fi
27003  fi
27004
27005  fi
27006
27007  if test "x$VS_ENV_CMD" = x; then
27008    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27009    METHOD="well-known name"
27010
27011  windows_path="$WIN_SDK_BASE"
27012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27013    unix_path=`$CYGPATH -u "$windows_path"`
27014    WIN_SDK_BASE="$unix_path"
27015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27017    WIN_SDK_BASE="$unix_path"
27018  fi
27019
27020    if test -d "$WIN_SDK_BASE"; then
27021      # There have been cases of partial or broken SDK installations. A missing
27022      # lib dir is not going to work.
27023      if test ! -d "$WIN_SDK_BASE/../lib"; then
27024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27025$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27026        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27027$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27028      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27030$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27031        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27032        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27033          VS_ENV_ARGS="/x86"
27034        else
27035          VS_ENV_ARGS="/x64"
27036        fi
27037        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27038        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27039        # TODO: improve detection for other versions of SDK
27040        PLATFORM_TOOLSET="Windows7.1SDK"
27041      else
27042        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27043$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27044        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27045$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27046      fi
27047    fi
27048  fi
27049
27050
27051  if test "x$VS_ENV_CMD" = x; then
27052    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27053    METHOD="well-known name"
27054
27055  windows_path="$WIN_SDK_BASE"
27056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27057    unix_path=`$CYGPATH -u "$windows_path"`
27058    WIN_SDK_BASE="$unix_path"
27059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27061    WIN_SDK_BASE="$unix_path"
27062  fi
27063
27064    if test -d "$WIN_SDK_BASE"; then
27065      # There have been cases of partial or broken SDK installations. A missing
27066      # lib dir is not going to work.
27067      if test ! -d "$WIN_SDK_BASE/../lib"; then
27068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27069$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27070        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27071$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27072      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27073        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27074$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27075        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27076        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27077          VS_ENV_ARGS="/x86"
27078        else
27079          VS_ENV_ARGS="/x64"
27080        fi
27081        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27082        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27083        # TODO: improve detection for other versions of SDK
27084        PLATFORM_TOOLSET="Windows7.1SDK"
27085      else
27086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27087$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27088        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27089$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27090      fi
27091    fi
27092  fi
27093
27094
27095  if test "x$VS_ENV_CMD" != x; then
27096    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27097
27098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27099
27100  # First separate the path from the arguments. This will split at the first
27101  # space.
27102  complete="$VS_ENV_CMD"
27103  path="${complete%% *}"
27104  tmp="$complete EOL"
27105  arguments="${tmp#* }"
27106
27107  # Input might be given as Windows format, start by converting to
27108  # unix format.
27109  new_path=`$CYGPATH -u "$path"`
27110
27111  # Now try to locate executable using which
27112  new_path=`$WHICH "$new_path" 2> /dev/null`
27113  # bat and cmd files are not always considered executable in cygwin causing which
27114  # to not find them
27115  if test "x$new_path" = x \
27116      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27117      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27118    new_path=`$CYGPATH -u "$path"`
27119  fi
27120  if test "x$new_path" = x; then
27121    # Oops. Which didn't find the executable.
27122    # The splitting of arguments from the executable at a space might have been incorrect,
27123    # since paths with space are more likely in Windows. Give it another try with the whole
27124    # argument.
27125    path="$complete"
27126    arguments="EOL"
27127    new_path=`$CYGPATH -u "$path"`
27128    new_path=`$WHICH "$new_path" 2> /dev/null`
27129    # bat and cmd files are not always considered executable in cygwin causing which
27130    # to not find them
27131    if test "x$new_path" = x \
27132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27134      new_path=`$CYGPATH -u "$path"`
27135    fi
27136    if test "x$new_path" = x; then
27137      # It's still not found. Now this is an unrecoverable error.
27138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27139$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27140      has_space=`$ECHO "$complete" | $GREP " "`
27141      if test "x$has_space" != x; then
27142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27144      fi
27145      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27146    fi
27147  fi
27148
27149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27152  # "foo.exe" is OK but "foo" is an error.
27153  #
27154  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27155  # It is also a way to make sure we got the proper file name for the real test later on.
27156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27157  if test "x$test_shortpath" = x; then
27158    # Short path failed, file does not exist as specified.
27159    # Try adding .exe or .cmd
27160    if test -f "${new_path}.exe"; then
27161      input_to_shortpath="${new_path}.exe"
27162    elif test -f "${new_path}.cmd"; then
27163      input_to_shortpath="${new_path}.cmd"
27164    else
27165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27166$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27167      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27168$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27169      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27170    fi
27171  else
27172    input_to_shortpath="$new_path"
27173  fi
27174
27175  # Call helper function which possibly converts this using DOS-style short mode.
27176  # If so, the updated path is stored in $new_path.
27177  new_path="$input_to_shortpath"
27178
27179  input_path="$input_to_shortpath"
27180  # Check if we need to convert this using DOS-style short mode. If the path
27181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27182  # take no chances and rewrite it.
27183  # Note: m4 eats our [], so we need to use [ and ] instead.
27184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27185  if test "x$has_forbidden_chars" != x; then
27186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27190      # Going to short mode and back again did indeed matter. Since short mode is
27191      # case insensitive, let's make it lowercase to improve readability.
27192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27193      # Now convert it back to Unix-stile (cygpath)
27194      input_path=`$CYGPATH -u "$shortmode_path"`
27195      new_path="$input_path"
27196    fi
27197  fi
27198
27199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27200  if test "x$test_cygdrive_prefix" = x; then
27201    # As a simple fix, exclude /usr/bin since it's not a real path.
27202    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27204      # a path prefixed by /cygdrive for fixpath to work.
27205      new_path="$CYGWIN_ROOT_PATH$input_path"
27206    fi
27207  fi
27208
27209  # remove trailing .exe if any
27210  new_path="${new_path/%.exe/}"
27211
27212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27213
27214  # First separate the path from the arguments. This will split at the first
27215  # space.
27216  complete="$VS_ENV_CMD"
27217  path="${complete%% *}"
27218  tmp="$complete EOL"
27219  arguments="${tmp#* }"
27220
27221  # Input might be given as Windows format, start by converting to
27222  # unix format.
27223  new_path="$path"
27224
27225  windows_path="$new_path"
27226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27227    unix_path=`$CYGPATH -u "$windows_path"`
27228    new_path="$unix_path"
27229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27231    new_path="$unix_path"
27232  fi
27233
27234
27235  # Now try to locate executable using which
27236  new_path=`$WHICH "$new_path" 2> /dev/null`
27237
27238  if test "x$new_path" = x; then
27239    # Oops. Which didn't find the executable.
27240    # The splitting of arguments from the executable at a space might have been incorrect,
27241    # since paths with space are more likely in Windows. Give it another try with the whole
27242    # argument.
27243    path="$complete"
27244    arguments="EOL"
27245    new_path="$path"
27246
27247  windows_path="$new_path"
27248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27249    unix_path=`$CYGPATH -u "$windows_path"`
27250    new_path="$unix_path"
27251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27253    new_path="$unix_path"
27254  fi
27255
27256
27257    new_path=`$WHICH "$new_path" 2> /dev/null`
27258    # bat and cmd files are not always considered executable in MSYS causing which
27259    # to not find them
27260    if test "x$new_path" = x \
27261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27263      new_path="$path"
27264
27265  windows_path="$new_path"
27266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27267    unix_path=`$CYGPATH -u "$windows_path"`
27268    new_path="$unix_path"
27269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27271    new_path="$unix_path"
27272  fi
27273
27274    fi
27275
27276    if test "x$new_path" = x; then
27277      # It's still not found. Now this is an unrecoverable error.
27278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27279$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27280      has_space=`$ECHO "$complete" | $GREP " "`
27281      if test "x$has_space" != x; then
27282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27284      fi
27285      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27286    fi
27287  fi
27288
27289  # Now new_path has a complete unix path to the binary
27290  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27291    # Keep paths in /bin as-is, but remove trailing .exe if any
27292    new_path="${new_path/%.exe/}"
27293    # Do not save /bin paths to all_fixpath_prefixes!
27294  else
27295    # Not in mixed or Windows style, start by that.
27296    new_path=`cmd //c echo $new_path`
27297
27298  input_path="$new_path"
27299  # Check if we need to convert this using DOS-style short mode. If the path
27300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27301  # take no chances and rewrite it.
27302  # Note: m4 eats our [], so we need to use [ and ] instead.
27303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27304  if test "x$has_forbidden_chars" != x; then
27305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27307  fi
27308
27309    # Output is in $new_path
27310
27311  windows_path="$new_path"
27312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27313    unix_path=`$CYGPATH -u "$windows_path"`
27314    new_path="$unix_path"
27315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27317    new_path="$unix_path"
27318  fi
27319
27320    # remove trailing .exe if any
27321    new_path="${new_path/%.exe/}"
27322
27323    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27324    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27325  fi
27326
27327  else
27328    # We're on a unix platform. Hooray! :)
27329    # First separate the path from the arguments. This will split at the first
27330    # space.
27331    complete="$VS_ENV_CMD"
27332    path="${complete%% *}"
27333    tmp="$complete EOL"
27334    arguments="${tmp#* }"
27335
27336    # Cannot rely on the command "which" here since it doesn't always work.
27337    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27338    if test -z "$is_absolute_path"; then
27339      # Path to executable is not absolute. Find it.
27340      IFS_save="$IFS"
27341      IFS=:
27342      for p in $PATH; do
27343        if test -f "$p/$path" && test -x "$p/$path"; then
27344          new_path="$p/$path"
27345          break
27346        fi
27347      done
27348      IFS="$IFS_save"
27349    else
27350      # This is an absolute path, we can use it without further modifications.
27351      new_path="$path"
27352    fi
27353
27354    if test "x$new_path" = x; then
27355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27356$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27357      has_space=`$ECHO "$complete" | $GREP " "`
27358      if test "x$has_space" != x; then
27359        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27361      fi
27362      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27363    fi
27364  fi
27365
27366  # Now join together the path and the arguments once again
27367  if test "x$arguments" != xEOL; then
27368    new_complete="$new_path ${arguments% *}"
27369  else
27370    new_complete="$new_path"
27371  fi
27372
27373  if test "x$complete" != "x$new_complete"; then
27374    VS_ENV_CMD="$new_complete"
27375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27376$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27377  fi
27378
27379
27380    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27381    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27382$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27383
27384    # We need to create a couple of temporary files.
27385    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27386    $MKDIR -p $VS_ENV_TMP_DIR
27387
27388    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27389    # Instead create a shell script which will set the relevant variables when run.
27390    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27391
27392  unix_path="$WINPATH_VS_ENV_CMD"
27393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27394    windows_path=`$CYGPATH -m "$unix_path"`
27395    WINPATH_VS_ENV_CMD="$windows_path"
27396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27397    windows_path=`cmd //c echo $unix_path`
27398    WINPATH_VS_ENV_CMD="$windows_path"
27399  fi
27400
27401    WINPATH_BASH="$BASH"
27402
27403  unix_path="$WINPATH_BASH"
27404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27405    windows_path=`$CYGPATH -m "$unix_path"`
27406    WINPATH_BASH="$windows_path"
27407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27408    windows_path=`cmd //c echo $unix_path`
27409    WINPATH_BASH="$windows_path"
27410  fi
27411
27412
27413    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27414    # script (executable by bash) that will setup the important variables.
27415    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27416    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27417    # This will end up something like:
27418    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27419    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27420    # These will end up something like:
27421    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27422    # The trailing space for everyone except PATH is no typo, but is needed due
27423    # to trailing \ in the Windows paths. These will be stripped later.
27424    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27425    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27426    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27427    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27428    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27429    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27430
27431    # Now execute the newly created bat file.
27432    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27433    # Change directory so we don't need to mess with Windows paths in redirects.
27434    cd $VS_ENV_TMP_DIR
27435    cmd /c extract-vs-env.bat | $CAT
27436    cd $CURDIR
27437
27438    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27439      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27440$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27441      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27442$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27443      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27444$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27445      as_fn_error $? "Cannot continue" "$LINENO" 5
27446    fi
27447
27448    # Now set all paths and other env variables. This will allow the rest of
27449    # the configure script to find and run the compiler in the proper way.
27450    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27451$as_echo "$as_me: Setting extracted environment variables" >&6;}
27452    . $VS_ENV_TMP_DIR/set-vs-env.sh
27453    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27454    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27455  else
27456    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27457    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27458$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27459  fi
27460
27461  # At this point, we should have correct variables in the environment, or we can't continue.
27462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27463$as_echo_n "checking for Visual Studio variables... " >&6; }
27464
27465  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27466    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27468$as_echo "present but broken" >&6; }
27469      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27470    else
27471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27472$as_echo "ok" >&6; }
27473      # Remove any trailing "\" and " " from the variables.
27474      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27475      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27476      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27477      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27478      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27479      # Remove any paths containing # (typically F#) as that messes up make. This
27480      # is needed if visual studio was installed with F# support.
27481      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27482
27483
27484
27485
27486    fi
27487  else
27488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27489$as_echo "not found" >&6; }
27490
27491    if test "x$VS_ENV_CMD" = x; then
27492      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27493$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27494      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27495$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27496    else
27497      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27498$as_echo "$as_me: Running the extraction script failed." >&6;}
27499    fi
27500    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27501$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27502    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27503$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27504    as_fn_error $? "Cannot continue" "$LINENO" 5
27505  fi
27506
27507    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27508    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27509    PATH="$VS_PATH"
27510    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27511    export INCLUDE="$VS_INCLUDE"
27512    export LIB="$VS_LIB"
27513  fi
27514
27515  # autoconf magic only relies on PATH, so update it if tools dir is specified
27516  OLD_PATH="$PATH"
27517
27518  # For solaris we really need solaris tools, and not the GNU equivalent.
27519  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27520  # so add that to path before starting to probe.
27521  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27522  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27523    PATH="/usr/ccs/bin:$PATH"
27524  fi
27525
27526  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27527  # override all other locations.
27528  if test "x$TOOLCHAIN_PATH" != x; then
27529    PATH=$TOOLCHAIN_PATH:$PATH
27530  fi
27531
27532
27533  #
27534  # Setup the compilers (CC and CXX)
27535  #
27536
27537  COMPILER_NAME=C
27538  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27539
27540  if test "x$CC" != x; then
27541    # User has supplied compiler name already, always let that override.
27542    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27543$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27544    if test "x`basename $CC`" = "x$CC"; then
27545      # A command without a complete path is provided, search $PATH.
27546
27547      for ac_prog in $CC
27548do
27549  # Extract the first word of "$ac_prog", so it can be a program name with args.
27550set dummy $ac_prog; ac_word=$2
27551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27552$as_echo_n "checking for $ac_word... " >&6; }
27553if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27554  $as_echo_n "(cached) " >&6
27555else
27556  case $POTENTIAL_CC in
27557  [\\/]* | ?:[\\/]*)
27558  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27559  ;;
27560  *)
27561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27562for as_dir in $PATH
27563do
27564  IFS=$as_save_IFS
27565  test -z "$as_dir" && as_dir=.
27566    for ac_exec_ext in '' $ac_executable_extensions; do
27567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27568    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27570    break 2
27571  fi
27572done
27573  done
27574IFS=$as_save_IFS
27575
27576  ;;
27577esac
27578fi
27579POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27580if test -n "$POTENTIAL_CC"; then
27581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27582$as_echo "$POTENTIAL_CC" >&6; }
27583else
27584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27585$as_echo "no" >&6; }
27586fi
27587
27588
27589  test -n "$POTENTIAL_CC" && break
27590done
27591
27592      if test "x$POTENTIAL_CC" != x; then
27593        CC=$POTENTIAL_CC
27594      else
27595        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27596      fi
27597    else
27598      # Otherwise it might already be a complete path
27599      if test ! -x "$CC"; then
27600        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27601      fi
27602    fi
27603  else
27604    # No user supplied value. Locate compiler ourselves.
27605
27606    # If we are cross compiling, assume cross compilation tools follows the
27607    # cross compilation standard where they are prefixed with the autoconf
27608    # standard name for the target. For example the binary
27609    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27610    # If we are not cross compiling, then the default compiler name will be
27611    # used.
27612
27613    CC=
27614    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27615    # before checking the rest of the PATH.
27616    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27617    # step, this should not be necessary.
27618    if test -n "$TOOLCHAIN_PATH"; then
27619      PATH_save="$PATH"
27620      PATH="$TOOLCHAIN_PATH"
27621      for ac_prog in $SEARCH_LIST
27622do
27623  # Extract the first word of "$ac_prog", so it can be a program name with args.
27624set dummy $ac_prog; ac_word=$2
27625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27626$as_echo_n "checking for $ac_word... " >&6; }
27627if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27628  $as_echo_n "(cached) " >&6
27629else
27630  case $TOOLCHAIN_PATH_CC in
27631  [\\/]* | ?:[\\/]*)
27632  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27633  ;;
27634  *)
27635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27636for as_dir in $PATH
27637do
27638  IFS=$as_save_IFS
27639  test -z "$as_dir" && as_dir=.
27640    for ac_exec_ext in '' $ac_executable_extensions; do
27641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27642    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27644    break 2
27645  fi
27646done
27647  done
27648IFS=$as_save_IFS
27649
27650  ;;
27651esac
27652fi
27653TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27654if test -n "$TOOLCHAIN_PATH_CC"; then
27655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27656$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27657else
27658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27659$as_echo "no" >&6; }
27660fi
27661
27662
27663  test -n "$TOOLCHAIN_PATH_CC" && break
27664done
27665
27666      CC=$TOOLCHAIN_PATH_CC
27667      PATH="$PATH_save"
27668    fi
27669
27670    # AC_PATH_PROGS can't be run multiple times with the same variable,
27671    # so create a new name for this run.
27672    if test "x$CC" = x; then
27673      for ac_prog in $SEARCH_LIST
27674do
27675  # Extract the first word of "$ac_prog", so it can be a program name with args.
27676set dummy $ac_prog; ac_word=$2
27677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27678$as_echo_n "checking for $ac_word... " >&6; }
27679if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27680  $as_echo_n "(cached) " >&6
27681else
27682  case $POTENTIAL_CC in
27683  [\\/]* | ?:[\\/]*)
27684  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27685  ;;
27686  *)
27687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27688for as_dir in $PATH
27689do
27690  IFS=$as_save_IFS
27691  test -z "$as_dir" && as_dir=.
27692    for ac_exec_ext in '' $ac_executable_extensions; do
27693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27694    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27696    break 2
27697  fi
27698done
27699  done
27700IFS=$as_save_IFS
27701
27702  ;;
27703esac
27704fi
27705POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27706if test -n "$POTENTIAL_CC"; then
27707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27708$as_echo "$POTENTIAL_CC" >&6; }
27709else
27710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27711$as_echo "no" >&6; }
27712fi
27713
27714
27715  test -n "$POTENTIAL_CC" && break
27716done
27717
27718      CC=$POTENTIAL_CC
27719    fi
27720
27721    if test "x$CC" = x; then
27722
27723  # Print a helpful message on how to acquire the necessary build dependency.
27724  # devkit is the help tag: freetype, cups, pulse, alsa etc
27725  MISSING_DEPENDENCY=devkit
27726
27727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27728    cygwin_help $MISSING_DEPENDENCY
27729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27730    msys_help $MISSING_DEPENDENCY
27731  else
27732    PKGHANDLER_COMMAND=
27733
27734    case $PKGHANDLER in
27735      apt-get)
27736        apt_help     $MISSING_DEPENDENCY ;;
27737      yum)
27738        yum_help     $MISSING_DEPENDENCY ;;
27739      port)
27740        port_help    $MISSING_DEPENDENCY ;;
27741      pkgutil)
27742        pkgutil_help $MISSING_DEPENDENCY ;;
27743      pkgadd)
27744        pkgadd_help  $MISSING_DEPENDENCY ;;
27745    esac
27746
27747    if test "x$PKGHANDLER_COMMAND" != x; then
27748      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27749    fi
27750  fi
27751
27752      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27753    fi
27754  fi
27755
27756  # Now we have a compiler binary in CC. Make sure it's okay.
27757
27758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27759
27760  # First separate the path from the arguments. This will split at the first
27761  # space.
27762  complete="$CC"
27763  path="${complete%% *}"
27764  tmp="$complete EOL"
27765  arguments="${tmp#* }"
27766
27767  # Input might be given as Windows format, start by converting to
27768  # unix format.
27769  new_path=`$CYGPATH -u "$path"`
27770
27771  # Now try to locate executable using which
27772  new_path=`$WHICH "$new_path" 2> /dev/null`
27773  # bat and cmd files are not always considered executable in cygwin causing which
27774  # to not find them
27775  if test "x$new_path" = x \
27776      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27777      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27778    new_path=`$CYGPATH -u "$path"`
27779  fi
27780  if test "x$new_path" = x; then
27781    # Oops. Which didn't find the executable.
27782    # The splitting of arguments from the executable at a space might have been incorrect,
27783    # since paths with space are more likely in Windows. Give it another try with the whole
27784    # argument.
27785    path="$complete"
27786    arguments="EOL"
27787    new_path=`$CYGPATH -u "$path"`
27788    new_path=`$WHICH "$new_path" 2> /dev/null`
27789    # bat and cmd files are not always considered executable in cygwin causing which
27790    # to not find them
27791    if test "x$new_path" = x \
27792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27794      new_path=`$CYGPATH -u "$path"`
27795    fi
27796    if test "x$new_path" = x; then
27797      # It's still not found. Now this is an unrecoverable error.
27798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27799$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27800      has_space=`$ECHO "$complete" | $GREP " "`
27801      if test "x$has_space" != x; then
27802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27804      fi
27805      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27806    fi
27807  fi
27808
27809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27812  # "foo.exe" is OK but "foo" is an error.
27813  #
27814  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27815  # It is also a way to make sure we got the proper file name for the real test later on.
27816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27817  if test "x$test_shortpath" = x; then
27818    # Short path failed, file does not exist as specified.
27819    # Try adding .exe or .cmd
27820    if test -f "${new_path}.exe"; then
27821      input_to_shortpath="${new_path}.exe"
27822    elif test -f "${new_path}.cmd"; then
27823      input_to_shortpath="${new_path}.cmd"
27824    else
27825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27826$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27829      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27830    fi
27831  else
27832    input_to_shortpath="$new_path"
27833  fi
27834
27835  # Call helper function which possibly converts this using DOS-style short mode.
27836  # If so, the updated path is stored in $new_path.
27837  new_path="$input_to_shortpath"
27838
27839  input_path="$input_to_shortpath"
27840  # Check if we need to convert this using DOS-style short mode. If the path
27841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27842  # take no chances and rewrite it.
27843  # Note: m4 eats our [], so we need to use [ and ] instead.
27844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27845  if test "x$has_forbidden_chars" != x; then
27846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27850      # Going to short mode and back again did indeed matter. Since short mode is
27851      # case insensitive, let's make it lowercase to improve readability.
27852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27853      # Now convert it back to Unix-stile (cygpath)
27854      input_path=`$CYGPATH -u "$shortmode_path"`
27855      new_path="$input_path"
27856    fi
27857  fi
27858
27859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27860  if test "x$test_cygdrive_prefix" = x; then
27861    # As a simple fix, exclude /usr/bin since it's not a real path.
27862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27864      # a path prefixed by /cygdrive for fixpath to work.
27865      new_path="$CYGWIN_ROOT_PATH$input_path"
27866    fi
27867  fi
27868
27869  # remove trailing .exe if any
27870  new_path="${new_path/%.exe/}"
27871
27872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27873
27874  # First separate the path from the arguments. This will split at the first
27875  # space.
27876  complete="$CC"
27877  path="${complete%% *}"
27878  tmp="$complete EOL"
27879  arguments="${tmp#* }"
27880
27881  # Input might be given as Windows format, start by converting to
27882  # unix format.
27883  new_path="$path"
27884
27885  windows_path="$new_path"
27886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27887    unix_path=`$CYGPATH -u "$windows_path"`
27888    new_path="$unix_path"
27889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27891    new_path="$unix_path"
27892  fi
27893
27894
27895  # Now try to locate executable using which
27896  new_path=`$WHICH "$new_path" 2> /dev/null`
27897
27898  if test "x$new_path" = x; then
27899    # Oops. Which didn't find the executable.
27900    # The splitting of arguments from the executable at a space might have been incorrect,
27901    # since paths with space are more likely in Windows. Give it another try with the whole
27902    # argument.
27903    path="$complete"
27904    arguments="EOL"
27905    new_path="$path"
27906
27907  windows_path="$new_path"
27908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27909    unix_path=`$CYGPATH -u "$windows_path"`
27910    new_path="$unix_path"
27911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27913    new_path="$unix_path"
27914  fi
27915
27916
27917    new_path=`$WHICH "$new_path" 2> /dev/null`
27918    # bat and cmd files are not always considered executable in MSYS causing which
27919    # to not find them
27920    if test "x$new_path" = x \
27921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27923      new_path="$path"
27924
27925  windows_path="$new_path"
27926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27927    unix_path=`$CYGPATH -u "$windows_path"`
27928    new_path="$unix_path"
27929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27931    new_path="$unix_path"
27932  fi
27933
27934    fi
27935
27936    if test "x$new_path" = x; then
27937      # It's still not found. Now this is an unrecoverable error.
27938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27939$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27940      has_space=`$ECHO "$complete" | $GREP " "`
27941      if test "x$has_space" != x; then
27942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27944      fi
27945      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27946    fi
27947  fi
27948
27949  # Now new_path has a complete unix path to the binary
27950  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27951    # Keep paths in /bin as-is, but remove trailing .exe if any
27952    new_path="${new_path/%.exe/}"
27953    # Do not save /bin paths to all_fixpath_prefixes!
27954  else
27955    # Not in mixed or Windows style, start by that.
27956    new_path=`cmd //c echo $new_path`
27957
27958  input_path="$new_path"
27959  # Check if we need to convert this using DOS-style short mode. If the path
27960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27961  # take no chances and rewrite it.
27962  # Note: m4 eats our [], so we need to use [ and ] instead.
27963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27964  if test "x$has_forbidden_chars" != x; then
27965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27967  fi
27968
27969    # Output is in $new_path
27970
27971  windows_path="$new_path"
27972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27973    unix_path=`$CYGPATH -u "$windows_path"`
27974    new_path="$unix_path"
27975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27977    new_path="$unix_path"
27978  fi
27979
27980    # remove trailing .exe if any
27981    new_path="${new_path/%.exe/}"
27982
27983    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27984    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27985  fi
27986
27987  else
27988    # We're on a unix platform. Hooray! :)
27989    # First separate the path from the arguments. This will split at the first
27990    # space.
27991    complete="$CC"
27992    path="${complete%% *}"
27993    tmp="$complete EOL"
27994    arguments="${tmp#* }"
27995
27996    # Cannot rely on the command "which" here since it doesn't always work.
27997    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27998    if test -z "$is_absolute_path"; then
27999      # Path to executable is not absolute. Find it.
28000      IFS_save="$IFS"
28001      IFS=:
28002      for p in $PATH; do
28003        if test -f "$p/$path" && test -x "$p/$path"; then
28004          new_path="$p/$path"
28005          break
28006        fi
28007      done
28008      IFS="$IFS_save"
28009    else
28010      # This is an absolute path, we can use it without further modifications.
28011      new_path="$path"
28012    fi
28013
28014    if test "x$new_path" = x; then
28015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28016$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28017      has_space=`$ECHO "$complete" | $GREP " "`
28018      if test "x$has_space" != x; then
28019        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28020$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28021      fi
28022      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28023    fi
28024  fi
28025
28026  # Now join together the path and the arguments once again
28027  if test "x$arguments" != xEOL; then
28028    new_complete="$new_path ${arguments% *}"
28029  else
28030    new_complete="$new_path"
28031  fi
28032
28033  if test "x$complete" != "x$new_complete"; then
28034    CC="$new_complete"
28035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28036$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28037  fi
28038
28039  TEST_COMPILER="$CC"
28040  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28041  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28042  if test "x$OPENJDK_BUILD_OS" != xaix; then
28043    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28045$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28046
28047  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28048    # Follow a chain of symbolic links. Use readlink
28049    # where it exists, else fall back to horribly
28050    # complicated shell code.
28051    if test "x$READLINK_TESTED" != yes; then
28052      # On MacOSX there is a readlink tool with a different
28053      # purpose than the GNU readlink tool. Check the found readlink.
28054      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28055      if test "x$ISGNU" = x; then
28056        # A readlink that we do not know how to use.
28057        # Are there other non-GNU readlinks out there?
28058        READLINK_TESTED=yes
28059        READLINK=
28060      fi
28061    fi
28062
28063    if test "x$READLINK" != x; then
28064      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28065    else
28066      # Save the current directory for restoring afterwards
28067      STARTDIR=$PWD
28068      COUNTER=0
28069      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28070      sym_link_file=`$BASENAME $TEST_COMPILER`
28071      cd $sym_link_dir
28072      # Use -P flag to resolve symlinks in directories.
28073      cd `$THEPWDCMD -P`
28074      sym_link_dir=`$THEPWDCMD -P`
28075      # Resolve file symlinks
28076      while test $COUNTER -lt 20; do
28077        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28078        if test "x$ISLINK" == x; then
28079          # This is not a symbolic link! We are done!
28080          break
28081        fi
28082        # Again resolve directory symlinks since the target of the just found
28083        # link could be in a different directory
28084        cd `$DIRNAME $ISLINK`
28085        sym_link_dir=`$THEPWDCMD -P`
28086        sym_link_file=`$BASENAME $ISLINK`
28087        let COUNTER=COUNTER+1
28088      done
28089      cd $STARTDIR
28090      TEST_COMPILER=$sym_link_dir/$sym_link_file
28091    fi
28092  fi
28093
28094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28095$as_echo "$TEST_COMPILER" >&6; }
28096  fi
28097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28098$as_echo_n "checking if CC is disguised ccache... " >&6; }
28099
28100  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28101  if test "x$COMPILER_BASENAME" = "xccache"; then
28102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28103$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28104    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28105    # We want to control ccache invocation ourselves, so ignore this cc and try
28106    # searching again.
28107
28108    # Remove the path to the fake ccache cc from the PATH
28109    RETRY_COMPILER_SAVED_PATH="$PATH"
28110    COMPILER_DIRNAME=`$DIRNAME $CC`
28111    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28112
28113    # Try again looking for our compiler
28114    if test -n "$ac_tool_prefix"; then
28115  for ac_prog in $TOOLCHAIN_CC_BINARY
28116  do
28117    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28118set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28120$as_echo_n "checking for $ac_word... " >&6; }
28121if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28122  $as_echo_n "(cached) " >&6
28123else
28124  if test -n "$PROPER_COMPILER_CC"; then
28125  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28126else
28127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28128for as_dir in $PATH
28129do
28130  IFS=$as_save_IFS
28131  test -z "$as_dir" && as_dir=.
28132    for ac_exec_ext in '' $ac_executable_extensions; do
28133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28134    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28136    break 2
28137  fi
28138done
28139  done
28140IFS=$as_save_IFS
28141
28142fi
28143fi
28144PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28145if test -n "$PROPER_COMPILER_CC"; then
28146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28147$as_echo "$PROPER_COMPILER_CC" >&6; }
28148else
28149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28150$as_echo "no" >&6; }
28151fi
28152
28153
28154    test -n "$PROPER_COMPILER_CC" && break
28155  done
28156fi
28157if test -z "$PROPER_COMPILER_CC"; then
28158  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28159  for ac_prog in $TOOLCHAIN_CC_BINARY
28160do
28161  # Extract the first word of "$ac_prog", so it can be a program name with args.
28162set dummy $ac_prog; ac_word=$2
28163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28164$as_echo_n "checking for $ac_word... " >&6; }
28165if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28166  $as_echo_n "(cached) " >&6
28167else
28168  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28169  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28170else
28171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28172for as_dir in $PATH
28173do
28174  IFS=$as_save_IFS
28175  test -z "$as_dir" && as_dir=.
28176    for ac_exec_ext in '' $ac_executable_extensions; do
28177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28178    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28180    break 2
28181  fi
28182done
28183  done
28184IFS=$as_save_IFS
28185
28186fi
28187fi
28188ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28189if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28191$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28192else
28193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28194$as_echo "no" >&6; }
28195fi
28196
28197
28198  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28199done
28200
28201  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28202    PROPER_COMPILER_CC=""
28203  else
28204    case $cross_compiling:$ac_tool_warned in
28205yes:)
28206{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28207$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28208ac_tool_warned=yes ;;
28209esac
28210    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28211  fi
28212fi
28213
28214
28215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28216
28217  # First separate the path from the arguments. This will split at the first
28218  # space.
28219  complete="$PROPER_COMPILER_CC"
28220  path="${complete%% *}"
28221  tmp="$complete EOL"
28222  arguments="${tmp#* }"
28223
28224  # Input might be given as Windows format, start by converting to
28225  # unix format.
28226  new_path=`$CYGPATH -u "$path"`
28227
28228  # Now try to locate executable using which
28229  new_path=`$WHICH "$new_path" 2> /dev/null`
28230  # bat and cmd files are not always considered executable in cygwin causing which
28231  # to not find them
28232  if test "x$new_path" = x \
28233      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28234      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28235    new_path=`$CYGPATH -u "$path"`
28236  fi
28237  if test "x$new_path" = x; then
28238    # Oops. Which didn't find the executable.
28239    # The splitting of arguments from the executable at a space might have been incorrect,
28240    # since paths with space are more likely in Windows. Give it another try with the whole
28241    # argument.
28242    path="$complete"
28243    arguments="EOL"
28244    new_path=`$CYGPATH -u "$path"`
28245    new_path=`$WHICH "$new_path" 2> /dev/null`
28246    # bat and cmd files are not always considered executable in cygwin causing which
28247    # to not find them
28248    if test "x$new_path" = x \
28249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28251      new_path=`$CYGPATH -u "$path"`
28252    fi
28253    if test "x$new_path" = x; then
28254      # It's still not found. Now this is an unrecoverable error.
28255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28256$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28257      has_space=`$ECHO "$complete" | $GREP " "`
28258      if test "x$has_space" != x; then
28259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28261      fi
28262      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28263    fi
28264  fi
28265
28266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28269  # "foo.exe" is OK but "foo" is an error.
28270  #
28271  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28272  # It is also a way to make sure we got the proper file name for the real test later on.
28273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28274  if test "x$test_shortpath" = x; then
28275    # Short path failed, file does not exist as specified.
28276    # Try adding .exe or .cmd
28277    if test -f "${new_path}.exe"; then
28278      input_to_shortpath="${new_path}.exe"
28279    elif test -f "${new_path}.cmd"; then
28280      input_to_shortpath="${new_path}.cmd"
28281    else
28282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28283$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28284      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28285$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28286      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28287    fi
28288  else
28289    input_to_shortpath="$new_path"
28290  fi
28291
28292  # Call helper function which possibly converts this using DOS-style short mode.
28293  # If so, the updated path is stored in $new_path.
28294  new_path="$input_to_shortpath"
28295
28296  input_path="$input_to_shortpath"
28297  # Check if we need to convert this using DOS-style short mode. If the path
28298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28299  # take no chances and rewrite it.
28300  # Note: m4 eats our [], so we need to use [ and ] instead.
28301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28302  if test "x$has_forbidden_chars" != x; then
28303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28307      # Going to short mode and back again did indeed matter. Since short mode is
28308      # case insensitive, let's make it lowercase to improve readability.
28309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28310      # Now convert it back to Unix-stile (cygpath)
28311      input_path=`$CYGPATH -u "$shortmode_path"`
28312      new_path="$input_path"
28313    fi
28314  fi
28315
28316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28317  if test "x$test_cygdrive_prefix" = x; then
28318    # As a simple fix, exclude /usr/bin since it's not a real path.
28319    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28321      # a path prefixed by /cygdrive for fixpath to work.
28322      new_path="$CYGWIN_ROOT_PATH$input_path"
28323    fi
28324  fi
28325
28326  # remove trailing .exe if any
28327  new_path="${new_path/%.exe/}"
28328
28329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28330
28331  # First separate the path from the arguments. This will split at the first
28332  # space.
28333  complete="$PROPER_COMPILER_CC"
28334  path="${complete%% *}"
28335  tmp="$complete EOL"
28336  arguments="${tmp#* }"
28337
28338  # Input might be given as Windows format, start by converting to
28339  # unix format.
28340  new_path="$path"
28341
28342  windows_path="$new_path"
28343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28344    unix_path=`$CYGPATH -u "$windows_path"`
28345    new_path="$unix_path"
28346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28348    new_path="$unix_path"
28349  fi
28350
28351
28352  # Now try to locate executable using which
28353  new_path=`$WHICH "$new_path" 2> /dev/null`
28354
28355  if test "x$new_path" = x; then
28356    # Oops. Which didn't find the executable.
28357    # The splitting of arguments from the executable at a space might have been incorrect,
28358    # since paths with space are more likely in Windows. Give it another try with the whole
28359    # argument.
28360    path="$complete"
28361    arguments="EOL"
28362    new_path="$path"
28363
28364  windows_path="$new_path"
28365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28366    unix_path=`$CYGPATH -u "$windows_path"`
28367    new_path="$unix_path"
28368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28370    new_path="$unix_path"
28371  fi
28372
28373
28374    new_path=`$WHICH "$new_path" 2> /dev/null`
28375    # bat and cmd files are not always considered executable in MSYS causing which
28376    # to not find them
28377    if test "x$new_path" = x \
28378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28380      new_path="$path"
28381
28382  windows_path="$new_path"
28383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28384    unix_path=`$CYGPATH -u "$windows_path"`
28385    new_path="$unix_path"
28386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28388    new_path="$unix_path"
28389  fi
28390
28391    fi
28392
28393    if test "x$new_path" = x; then
28394      # It's still not found. Now this is an unrecoverable error.
28395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28396$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28397      has_space=`$ECHO "$complete" | $GREP " "`
28398      if test "x$has_space" != x; then
28399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28401      fi
28402      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28403    fi
28404  fi
28405
28406  # Now new_path has a complete unix path to the binary
28407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28408    # Keep paths in /bin as-is, but remove trailing .exe if any
28409    new_path="${new_path/%.exe/}"
28410    # Do not save /bin paths to all_fixpath_prefixes!
28411  else
28412    # Not in mixed or Windows style, start by that.
28413    new_path=`cmd //c echo $new_path`
28414
28415  input_path="$new_path"
28416  # Check if we need to convert this using DOS-style short mode. If the path
28417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28418  # take no chances and rewrite it.
28419  # Note: m4 eats our [], so we need to use [ and ] instead.
28420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28421  if test "x$has_forbidden_chars" != x; then
28422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28424  fi
28425
28426    # Output is in $new_path
28427
28428  windows_path="$new_path"
28429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28430    unix_path=`$CYGPATH -u "$windows_path"`
28431    new_path="$unix_path"
28432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28434    new_path="$unix_path"
28435  fi
28436
28437    # remove trailing .exe if any
28438    new_path="${new_path/%.exe/}"
28439
28440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28442  fi
28443
28444  else
28445    # We're on a unix platform. Hooray! :)
28446    # First separate the path from the arguments. This will split at the first
28447    # space.
28448    complete="$PROPER_COMPILER_CC"
28449    path="${complete%% *}"
28450    tmp="$complete EOL"
28451    arguments="${tmp#* }"
28452
28453    # Cannot rely on the command "which" here since it doesn't always work.
28454    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28455    if test -z "$is_absolute_path"; then
28456      # Path to executable is not absolute. Find it.
28457      IFS_save="$IFS"
28458      IFS=:
28459      for p in $PATH; do
28460        if test -f "$p/$path" && test -x "$p/$path"; then
28461          new_path="$p/$path"
28462          break
28463        fi
28464      done
28465      IFS="$IFS_save"
28466    else
28467      # This is an absolute path, we can use it without further modifications.
28468      new_path="$path"
28469    fi
28470
28471    if test "x$new_path" = x; then
28472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28473$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28474      has_space=`$ECHO "$complete" | $GREP " "`
28475      if test "x$has_space" != x; then
28476        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28478      fi
28479      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28480    fi
28481  fi
28482
28483  # Now join together the path and the arguments once again
28484  if test "x$arguments" != xEOL; then
28485    new_complete="$new_path ${arguments% *}"
28486  else
28487    new_complete="$new_path"
28488  fi
28489
28490  if test "x$complete" != "x$new_complete"; then
28491    PROPER_COMPILER_CC="$new_complete"
28492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28493$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28494  fi
28495
28496    PATH="$RETRY_COMPILER_SAVED_PATH"
28497
28498    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28499$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28500
28501  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28502    # Follow a chain of symbolic links. Use readlink
28503    # where it exists, else fall back to horribly
28504    # complicated shell code.
28505    if test "x$READLINK_TESTED" != yes; then
28506      # On MacOSX there is a readlink tool with a different
28507      # purpose than the GNU readlink tool. Check the found readlink.
28508      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28509      if test "x$ISGNU" = x; then
28510        # A readlink that we do not know how to use.
28511        # Are there other non-GNU readlinks out there?
28512        READLINK_TESTED=yes
28513        READLINK=
28514      fi
28515    fi
28516
28517    if test "x$READLINK" != x; then
28518      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28519    else
28520      # Save the current directory for restoring afterwards
28521      STARTDIR=$PWD
28522      COUNTER=0
28523      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28524      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28525      cd $sym_link_dir
28526      # Use -P flag to resolve symlinks in directories.
28527      cd `$THEPWDCMD -P`
28528      sym_link_dir=`$THEPWDCMD -P`
28529      # Resolve file symlinks
28530      while test $COUNTER -lt 20; do
28531        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28532        if test "x$ISLINK" == x; then
28533          # This is not a symbolic link! We are done!
28534          break
28535        fi
28536        # Again resolve directory symlinks since the target of the just found
28537        # link could be in a different directory
28538        cd `$DIRNAME $ISLINK`
28539        sym_link_dir=`$THEPWDCMD -P`
28540        sym_link_file=`$BASENAME $ISLINK`
28541        let COUNTER=COUNTER+1
28542      done
28543      cd $STARTDIR
28544      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28545    fi
28546  fi
28547
28548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28549$as_echo "$PROPER_COMPILER_CC" >&6; }
28550    CC="$PROPER_COMPILER_CC"
28551  else
28552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28553$as_echo "no, keeping CC" >&6; }
28554  fi
28555
28556
28557  COMPILER=$CC
28558  COMPILER_NAME=$COMPILER_NAME
28559
28560  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28561    # cc -V output typically looks like
28562    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28563    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28564    # Check that this is likely to be the Solaris Studio cc.
28565    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28566    if test $? -ne 0; then
28567      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28568      { $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
28569$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28570      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28571$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28572      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28573$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28574      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28575    fi
28576    # Remove usage instructions (if present), and
28577    # collapse compiler output into a single line
28578    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28579        $SED -e 's/ *[Uu]sage:.*//'`
28580    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28581        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28582  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28583    # xlc -qversion output typically looks like
28584    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28585    #     Version: 11.01.0000.0015
28586    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28587    # Check that this is likely to be the IBM XL C compiler.
28588    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28589    if test $? -ne 0; then
28590      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28591      { $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
28592$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28593      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28594$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28595      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28596$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28597      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28598    fi
28599    # Collapse compiler output into a single line
28600    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28601    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28602        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28603  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28604    # There is no specific version flag, but all output starts with a version string.
28605    # First line typically looks something like:
28606    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28607    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28608    # Check that this is likely to be Microsoft CL.EXE.
28609    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28610    if test $? -ne 0; then
28611      { $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
28612$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28613      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28614$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28615      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28616    fi
28617    # Collapse compiler output into a single line
28618    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28619    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28620        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28621  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28622    # gcc --version output typically looks like
28623    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28624    #     Copyright (C) 2013 Free Software Foundation, Inc.
28625    #     This is free software; see the source for copying conditions.  There is NO
28626    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28627    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28628    # Check that this is likely to be GCC.
28629    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28630    if test $? -ne 0; then
28631      { $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
28632$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28633      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28634$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28635      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28636    fi
28637    # Remove Copyright and legalese from version string, and
28638    # collapse into a single line
28639    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28640        $SED -e 's/ *Copyright .*//'`
28641    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28642        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28643  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28644    # clang --version output typically looks like
28645    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28646    #    clang version 3.3 (tags/RELEASE_33/final)
28647    # or
28648    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28649    #    Target: x86_64-pc-linux-gnu
28650    #    Thread model: posix
28651    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28652    # Check that this is likely to be clang
28653    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28654    if test $? -ne 0; then
28655      { $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
28656$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28657      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28658$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28659      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28660    fi
28661    # Collapse compiler output into a single line
28662    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28663    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28664        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28665  else
28666      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28667  fi
28668  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28669  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28670  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28671  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28672
28673  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28674$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28675
28676
28677  # Now that we have resolved CC ourself, let autoconf have its go at it
28678  ac_ext=c
28679ac_cpp='$CPP $CPPFLAGS'
28680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28682ac_compiler_gnu=$ac_cv_c_compiler_gnu
28683if test -n "$ac_tool_prefix"; then
28684  for ac_prog in $CC
28685  do
28686    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28687set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28689$as_echo_n "checking for $ac_word... " >&6; }
28690if ${ac_cv_prog_CC+:} false; then :
28691  $as_echo_n "(cached) " >&6
28692else
28693  if test -n "$CC"; then
28694  ac_cv_prog_CC="$CC" # Let the user override the test.
28695else
28696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28697for as_dir in $PATH
28698do
28699  IFS=$as_save_IFS
28700  test -z "$as_dir" && as_dir=.
28701    for ac_exec_ext in '' $ac_executable_extensions; do
28702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28703    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28705    break 2
28706  fi
28707done
28708  done
28709IFS=$as_save_IFS
28710
28711fi
28712fi
28713CC=$ac_cv_prog_CC
28714if test -n "$CC"; then
28715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28716$as_echo "$CC" >&6; }
28717else
28718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28719$as_echo "no" >&6; }
28720fi
28721
28722
28723    test -n "$CC" && break
28724  done
28725fi
28726if test -z "$CC"; then
28727  ac_ct_CC=$CC
28728  for ac_prog in $CC
28729do
28730  # Extract the first word of "$ac_prog", so it can be a program name with args.
28731set dummy $ac_prog; ac_word=$2
28732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28733$as_echo_n "checking for $ac_word... " >&6; }
28734if ${ac_cv_prog_ac_ct_CC+:} false; then :
28735  $as_echo_n "(cached) " >&6
28736else
28737  if test -n "$ac_ct_CC"; then
28738  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28739else
28740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28741for as_dir in $PATH
28742do
28743  IFS=$as_save_IFS
28744  test -z "$as_dir" && as_dir=.
28745    for ac_exec_ext in '' $ac_executable_extensions; do
28746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28747    ac_cv_prog_ac_ct_CC="$ac_prog"
28748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28749    break 2
28750  fi
28751done
28752  done
28753IFS=$as_save_IFS
28754
28755fi
28756fi
28757ac_ct_CC=$ac_cv_prog_ac_ct_CC
28758if test -n "$ac_ct_CC"; then
28759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28760$as_echo "$ac_ct_CC" >&6; }
28761else
28762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28763$as_echo "no" >&6; }
28764fi
28765
28766
28767  test -n "$ac_ct_CC" && break
28768done
28769
28770  if test "x$ac_ct_CC" = x; then
28771    CC=""
28772  else
28773    case $cross_compiling:$ac_tool_warned in
28774yes:)
28775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28777ac_tool_warned=yes ;;
28778esac
28779    CC=$ac_ct_CC
28780  fi
28781fi
28782
28783
28784test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28786as_fn_error $? "no acceptable C compiler found in \$PATH
28787See \`config.log' for more details" "$LINENO" 5; }
28788
28789# Provide some information about the compiler.
28790$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28791set X $ac_compile
28792ac_compiler=$2
28793for ac_option in --version -v -V -qversion; do
28794  { { ac_try="$ac_compiler $ac_option >&5"
28795case "(($ac_try" in
28796  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28797  *) ac_try_echo=$ac_try;;
28798esac
28799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28800$as_echo "$ac_try_echo"; } >&5
28801  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28802  ac_status=$?
28803  if test -s conftest.err; then
28804    sed '10a\
28805... rest of stderr output deleted ...
28806         10q' conftest.err >conftest.er1
28807    cat conftest.er1 >&5
28808  fi
28809  rm -f conftest.er1 conftest.err
28810  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28811  test $ac_status = 0; }
28812done
28813
28814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28815/* end confdefs.h.  */
28816
28817int
28818main ()
28819{
28820
28821  ;
28822  return 0;
28823}
28824_ACEOF
28825ac_clean_files_save=$ac_clean_files
28826ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28827# Try to create an executable without -o first, disregard a.out.
28828# It will help us diagnose broken compilers, and finding out an intuition
28829# of exeext.
28830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28831$as_echo_n "checking whether the C compiler works... " >&6; }
28832ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28833
28834# The possible output files:
28835ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28836
28837ac_rmfiles=
28838for ac_file in $ac_files
28839do
28840  case $ac_file in
28841    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28842    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28843  esac
28844done
28845rm -f $ac_rmfiles
28846
28847if { { ac_try="$ac_link_default"
28848case "(($ac_try" in
28849  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28850  *) ac_try_echo=$ac_try;;
28851esac
28852eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28853$as_echo "$ac_try_echo"; } >&5
28854  (eval "$ac_link_default") 2>&5
28855  ac_status=$?
28856  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28857  test $ac_status = 0; }; then :
28858  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28859# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28860# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28861# so that the user can short-circuit this test for compilers unknown to
28862# Autoconf.
28863for ac_file in $ac_files ''
28864do
28865  test -f "$ac_file" || continue
28866  case $ac_file in
28867    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28868	;;
28869    [ab].out )
28870	# We found the default executable, but exeext='' is most
28871	# certainly right.
28872	break;;
28873    *.* )
28874	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28875	then :; else
28876	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28877	fi
28878	# We set ac_cv_exeext here because the later test for it is not
28879	# safe: cross compilers may not add the suffix if given an `-o'
28880	# argument, so we may need to know it at that point already.
28881	# Even if this section looks crufty: it has the advantage of
28882	# actually working.
28883	break;;
28884    * )
28885	break;;
28886  esac
28887done
28888test "$ac_cv_exeext" = no && ac_cv_exeext=
28889
28890else
28891  ac_file=''
28892fi
28893if test -z "$ac_file"; then :
28894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28895$as_echo "no" >&6; }
28896$as_echo "$as_me: failed program was:" >&5
28897sed 's/^/| /' conftest.$ac_ext >&5
28898
28899{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28901as_fn_error 77 "C compiler cannot create executables
28902See \`config.log' for more details" "$LINENO" 5; }
28903else
28904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28905$as_echo "yes" >&6; }
28906fi
28907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28908$as_echo_n "checking for C compiler default output file name... " >&6; }
28909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28910$as_echo "$ac_file" >&6; }
28911ac_exeext=$ac_cv_exeext
28912
28913rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28914ac_clean_files=$ac_clean_files_save
28915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28916$as_echo_n "checking for suffix of executables... " >&6; }
28917if { { ac_try="$ac_link"
28918case "(($ac_try" in
28919  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28920  *) ac_try_echo=$ac_try;;
28921esac
28922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28923$as_echo "$ac_try_echo"; } >&5
28924  (eval "$ac_link") 2>&5
28925  ac_status=$?
28926  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28927  test $ac_status = 0; }; then :
28928  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28929# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28930# work properly (i.e., refer to `conftest.exe'), while it won't with
28931# `rm'.
28932for ac_file in conftest.exe conftest conftest.*; do
28933  test -f "$ac_file" || continue
28934  case $ac_file in
28935    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28936    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28937	  break;;
28938    * ) break;;
28939  esac
28940done
28941else
28942  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28944as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28945See \`config.log' for more details" "$LINENO" 5; }
28946fi
28947rm -f conftest conftest$ac_cv_exeext
28948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28949$as_echo "$ac_cv_exeext" >&6; }
28950
28951rm -f conftest.$ac_ext
28952EXEEXT=$ac_cv_exeext
28953ac_exeext=$EXEEXT
28954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28955/* end confdefs.h.  */
28956#include <stdio.h>
28957int
28958main ()
28959{
28960FILE *f = fopen ("conftest.out", "w");
28961 return ferror (f) || fclose (f) != 0;
28962
28963  ;
28964  return 0;
28965}
28966_ACEOF
28967ac_clean_files="$ac_clean_files conftest.out"
28968# Check that the compiler produces executables we can run.  If not, either
28969# the compiler is broken, or we cross compile.
28970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28971$as_echo_n "checking whether we are cross compiling... " >&6; }
28972if test "$cross_compiling" != yes; then
28973  { { ac_try="$ac_link"
28974case "(($ac_try" in
28975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28976  *) ac_try_echo=$ac_try;;
28977esac
28978eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28979$as_echo "$ac_try_echo"; } >&5
28980  (eval "$ac_link") 2>&5
28981  ac_status=$?
28982  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28983  test $ac_status = 0; }
28984  if { ac_try='./conftest$ac_cv_exeext'
28985  { { case "(($ac_try" in
28986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28987  *) ac_try_echo=$ac_try;;
28988esac
28989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28990$as_echo "$ac_try_echo"; } >&5
28991  (eval "$ac_try") 2>&5
28992  ac_status=$?
28993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28994  test $ac_status = 0; }; }; then
28995    cross_compiling=no
28996  else
28997    if test "$cross_compiling" = maybe; then
28998	cross_compiling=yes
28999    else
29000	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29002as_fn_error $? "cannot run C compiled programs.
29003If you meant to cross compile, use \`--host'.
29004See \`config.log' for more details" "$LINENO" 5; }
29005    fi
29006  fi
29007fi
29008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29009$as_echo "$cross_compiling" >&6; }
29010
29011rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29012ac_clean_files=$ac_clean_files_save
29013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29014$as_echo_n "checking for suffix of object files... " >&6; }
29015if ${ac_cv_objext+:} false; then :
29016  $as_echo_n "(cached) " >&6
29017else
29018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29019/* end confdefs.h.  */
29020
29021int
29022main ()
29023{
29024
29025  ;
29026  return 0;
29027}
29028_ACEOF
29029rm -f conftest.o conftest.obj
29030if { { ac_try="$ac_compile"
29031case "(($ac_try" in
29032  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29033  *) ac_try_echo=$ac_try;;
29034esac
29035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29036$as_echo "$ac_try_echo"; } >&5
29037  (eval "$ac_compile") 2>&5
29038  ac_status=$?
29039  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29040  test $ac_status = 0; }; then :
29041  for ac_file in conftest.o conftest.obj conftest.*; do
29042  test -f "$ac_file" || continue;
29043  case $ac_file in
29044    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29045    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29046       break;;
29047  esac
29048done
29049else
29050  $as_echo "$as_me: failed program was:" >&5
29051sed 's/^/| /' conftest.$ac_ext >&5
29052
29053{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29055as_fn_error $? "cannot compute suffix of object files: cannot compile
29056See \`config.log' for more details" "$LINENO" 5; }
29057fi
29058rm -f conftest.$ac_cv_objext conftest.$ac_ext
29059fi
29060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29061$as_echo "$ac_cv_objext" >&6; }
29062OBJEXT=$ac_cv_objext
29063ac_objext=$OBJEXT
29064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29065$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29066if ${ac_cv_c_compiler_gnu+:} false; then :
29067  $as_echo_n "(cached) " >&6
29068else
29069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29070/* end confdefs.h.  */
29071
29072int
29073main ()
29074{
29075#ifndef __GNUC__
29076       choke me
29077#endif
29078
29079  ;
29080  return 0;
29081}
29082_ACEOF
29083if ac_fn_c_try_compile "$LINENO"; then :
29084  ac_compiler_gnu=yes
29085else
29086  ac_compiler_gnu=no
29087fi
29088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29089ac_cv_c_compiler_gnu=$ac_compiler_gnu
29090
29091fi
29092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29093$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29094if test $ac_compiler_gnu = yes; then
29095  GCC=yes
29096else
29097  GCC=
29098fi
29099ac_test_CFLAGS=${CFLAGS+set}
29100ac_save_CFLAGS=$CFLAGS
29101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29102$as_echo_n "checking whether $CC accepts -g... " >&6; }
29103if ${ac_cv_prog_cc_g+:} false; then :
29104  $as_echo_n "(cached) " >&6
29105else
29106  ac_save_c_werror_flag=$ac_c_werror_flag
29107   ac_c_werror_flag=yes
29108   ac_cv_prog_cc_g=no
29109   CFLAGS="-g"
29110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29111/* end confdefs.h.  */
29112
29113int
29114main ()
29115{
29116
29117  ;
29118  return 0;
29119}
29120_ACEOF
29121if ac_fn_c_try_compile "$LINENO"; then :
29122  ac_cv_prog_cc_g=yes
29123else
29124  CFLAGS=""
29125      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29126/* end confdefs.h.  */
29127
29128int
29129main ()
29130{
29131
29132  ;
29133  return 0;
29134}
29135_ACEOF
29136if ac_fn_c_try_compile "$LINENO"; then :
29137
29138else
29139  ac_c_werror_flag=$ac_save_c_werror_flag
29140	 CFLAGS="-g"
29141	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29142/* end confdefs.h.  */
29143
29144int
29145main ()
29146{
29147
29148  ;
29149  return 0;
29150}
29151_ACEOF
29152if ac_fn_c_try_compile "$LINENO"; then :
29153  ac_cv_prog_cc_g=yes
29154fi
29155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29156fi
29157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29158fi
29159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29160   ac_c_werror_flag=$ac_save_c_werror_flag
29161fi
29162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29163$as_echo "$ac_cv_prog_cc_g" >&6; }
29164if test "$ac_test_CFLAGS" = set; then
29165  CFLAGS=$ac_save_CFLAGS
29166elif test $ac_cv_prog_cc_g = yes; then
29167  if test "$GCC" = yes; then
29168    CFLAGS="-g -O2"
29169  else
29170    CFLAGS="-g"
29171  fi
29172else
29173  if test "$GCC" = yes; then
29174    CFLAGS="-O2"
29175  else
29176    CFLAGS=
29177  fi
29178fi
29179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29180$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29181if ${ac_cv_prog_cc_c89+:} false; then :
29182  $as_echo_n "(cached) " >&6
29183else
29184  ac_cv_prog_cc_c89=no
29185ac_save_CC=$CC
29186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29187/* end confdefs.h.  */
29188#include <stdarg.h>
29189#include <stdio.h>
29190struct stat;
29191/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29192struct buf { int x; };
29193FILE * (*rcsopen) (struct buf *, struct stat *, int);
29194static char *e (p, i)
29195     char **p;
29196     int i;
29197{
29198  return p[i];
29199}
29200static char *f (char * (*g) (char **, int), char **p, ...)
29201{
29202  char *s;
29203  va_list v;
29204  va_start (v,p);
29205  s = g (p, va_arg (v,int));
29206  va_end (v);
29207  return s;
29208}
29209
29210/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29211   function prototypes and stuff, but not '\xHH' hex character constants.
29212   These don't provoke an error unfortunately, instead are silently treated
29213   as 'x'.  The following induces an error, until -std is added to get
29214   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29215   array size at least.  It's necessary to write '\x00'==0 to get something
29216   that's true only with -std.  */
29217int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29218
29219/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29220   inside strings and character constants.  */
29221#define FOO(x) 'x'
29222int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29223
29224int test (int i, double x);
29225struct s1 {int (*f) (int a);};
29226struct s2 {int (*f) (double a);};
29227int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29228int argc;
29229char **argv;
29230int
29231main ()
29232{
29233return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29234  ;
29235  return 0;
29236}
29237_ACEOF
29238for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29239	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29240do
29241  CC="$ac_save_CC $ac_arg"
29242  if ac_fn_c_try_compile "$LINENO"; then :
29243  ac_cv_prog_cc_c89=$ac_arg
29244fi
29245rm -f core conftest.err conftest.$ac_objext
29246  test "x$ac_cv_prog_cc_c89" != "xno" && break
29247done
29248rm -f conftest.$ac_ext
29249CC=$ac_save_CC
29250
29251fi
29252# AC_CACHE_VAL
29253case "x$ac_cv_prog_cc_c89" in
29254  x)
29255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29256$as_echo "none needed" >&6; } ;;
29257  xno)
29258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29259$as_echo "unsupported" >&6; } ;;
29260  *)
29261    CC="$CC $ac_cv_prog_cc_c89"
29262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29263$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29264esac
29265if test "x$ac_cv_prog_cc_c89" != xno; then :
29266
29267fi
29268
29269ac_ext=cpp
29270ac_cpp='$CXXCPP $CPPFLAGS'
29271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29274
29275
29276
29277  COMPILER_NAME=C++
29278  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29279
29280  if test "x$CXX" != x; then
29281    # User has supplied compiler name already, always let that override.
29282    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29283$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29284    if test "x`basename $CXX`" = "x$CXX"; then
29285      # A command without a complete path is provided, search $PATH.
29286
29287      for ac_prog in $CXX
29288do
29289  # Extract the first word of "$ac_prog", so it can be a program name with args.
29290set dummy $ac_prog; ac_word=$2
29291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29292$as_echo_n "checking for $ac_word... " >&6; }
29293if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29294  $as_echo_n "(cached) " >&6
29295else
29296  case $POTENTIAL_CXX in
29297  [\\/]* | ?:[\\/]*)
29298  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29299  ;;
29300  *)
29301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29302for as_dir in $PATH
29303do
29304  IFS=$as_save_IFS
29305  test -z "$as_dir" && as_dir=.
29306    for ac_exec_ext in '' $ac_executable_extensions; do
29307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29308    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29310    break 2
29311  fi
29312done
29313  done
29314IFS=$as_save_IFS
29315
29316  ;;
29317esac
29318fi
29319POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29320if test -n "$POTENTIAL_CXX"; then
29321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29322$as_echo "$POTENTIAL_CXX" >&6; }
29323else
29324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29325$as_echo "no" >&6; }
29326fi
29327
29328
29329  test -n "$POTENTIAL_CXX" && break
29330done
29331
29332      if test "x$POTENTIAL_CXX" != x; then
29333        CXX=$POTENTIAL_CXX
29334      else
29335        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29336      fi
29337    else
29338      # Otherwise it might already be a complete path
29339      if test ! -x "$CXX"; then
29340        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29341      fi
29342    fi
29343  else
29344    # No user supplied value. Locate compiler ourselves.
29345
29346    # If we are cross compiling, assume cross compilation tools follows the
29347    # cross compilation standard where they are prefixed with the autoconf
29348    # standard name for the target. For example the binary
29349    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29350    # If we are not cross compiling, then the default compiler name will be
29351    # used.
29352
29353    CXX=
29354    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29355    # before checking the rest of the PATH.
29356    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29357    # step, this should not be necessary.
29358    if test -n "$TOOLCHAIN_PATH"; then
29359      PATH_save="$PATH"
29360      PATH="$TOOLCHAIN_PATH"
29361      for ac_prog in $SEARCH_LIST
29362do
29363  # Extract the first word of "$ac_prog", so it can be a program name with args.
29364set dummy $ac_prog; ac_word=$2
29365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29366$as_echo_n "checking for $ac_word... " >&6; }
29367if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29368  $as_echo_n "(cached) " >&6
29369else
29370  case $TOOLCHAIN_PATH_CXX in
29371  [\\/]* | ?:[\\/]*)
29372  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29373  ;;
29374  *)
29375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29376for as_dir in $PATH
29377do
29378  IFS=$as_save_IFS
29379  test -z "$as_dir" && as_dir=.
29380    for ac_exec_ext in '' $ac_executable_extensions; do
29381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29382    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29384    break 2
29385  fi
29386done
29387  done
29388IFS=$as_save_IFS
29389
29390  ;;
29391esac
29392fi
29393TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29394if test -n "$TOOLCHAIN_PATH_CXX"; then
29395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29396$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29397else
29398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29399$as_echo "no" >&6; }
29400fi
29401
29402
29403  test -n "$TOOLCHAIN_PATH_CXX" && break
29404done
29405
29406      CXX=$TOOLCHAIN_PATH_CXX
29407      PATH="$PATH_save"
29408    fi
29409
29410    # AC_PATH_PROGS can't be run multiple times with the same variable,
29411    # so create a new name for this run.
29412    if test "x$CXX" = x; then
29413      for ac_prog in $SEARCH_LIST
29414do
29415  # Extract the first word of "$ac_prog", so it can be a program name with args.
29416set dummy $ac_prog; ac_word=$2
29417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29418$as_echo_n "checking for $ac_word... " >&6; }
29419if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29420  $as_echo_n "(cached) " >&6
29421else
29422  case $POTENTIAL_CXX in
29423  [\\/]* | ?:[\\/]*)
29424  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29425  ;;
29426  *)
29427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29428for as_dir in $PATH
29429do
29430  IFS=$as_save_IFS
29431  test -z "$as_dir" && as_dir=.
29432    for ac_exec_ext in '' $ac_executable_extensions; do
29433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29434    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29436    break 2
29437  fi
29438done
29439  done
29440IFS=$as_save_IFS
29441
29442  ;;
29443esac
29444fi
29445POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29446if test -n "$POTENTIAL_CXX"; then
29447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29448$as_echo "$POTENTIAL_CXX" >&6; }
29449else
29450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29451$as_echo "no" >&6; }
29452fi
29453
29454
29455  test -n "$POTENTIAL_CXX" && break
29456done
29457
29458      CXX=$POTENTIAL_CXX
29459    fi
29460
29461    if test "x$CXX" = x; then
29462
29463  # Print a helpful message on how to acquire the necessary build dependency.
29464  # devkit is the help tag: freetype, cups, pulse, alsa etc
29465  MISSING_DEPENDENCY=devkit
29466
29467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29468    cygwin_help $MISSING_DEPENDENCY
29469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29470    msys_help $MISSING_DEPENDENCY
29471  else
29472    PKGHANDLER_COMMAND=
29473
29474    case $PKGHANDLER in
29475      apt-get)
29476        apt_help     $MISSING_DEPENDENCY ;;
29477      yum)
29478        yum_help     $MISSING_DEPENDENCY ;;
29479      port)
29480        port_help    $MISSING_DEPENDENCY ;;
29481      pkgutil)
29482        pkgutil_help $MISSING_DEPENDENCY ;;
29483      pkgadd)
29484        pkgadd_help  $MISSING_DEPENDENCY ;;
29485    esac
29486
29487    if test "x$PKGHANDLER_COMMAND" != x; then
29488      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29489    fi
29490  fi
29491
29492      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29493    fi
29494  fi
29495
29496  # Now we have a compiler binary in CXX. Make sure it's okay.
29497
29498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29499
29500  # First separate the path from the arguments. This will split at the first
29501  # space.
29502  complete="$CXX"
29503  path="${complete%% *}"
29504  tmp="$complete EOL"
29505  arguments="${tmp#* }"
29506
29507  # Input might be given as Windows format, start by converting to
29508  # unix format.
29509  new_path=`$CYGPATH -u "$path"`
29510
29511  # Now try to locate executable using which
29512  new_path=`$WHICH "$new_path" 2> /dev/null`
29513  # bat and cmd files are not always considered executable in cygwin causing which
29514  # to not find them
29515  if test "x$new_path" = x \
29516      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29517      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29518    new_path=`$CYGPATH -u "$path"`
29519  fi
29520  if test "x$new_path" = x; then
29521    # Oops. Which didn't find the executable.
29522    # The splitting of arguments from the executable at a space might have been incorrect,
29523    # since paths with space are more likely in Windows. Give it another try with the whole
29524    # argument.
29525    path="$complete"
29526    arguments="EOL"
29527    new_path=`$CYGPATH -u "$path"`
29528    new_path=`$WHICH "$new_path" 2> /dev/null`
29529    # bat and cmd files are not always considered executable in cygwin causing which
29530    # to not find them
29531    if test "x$new_path" = x \
29532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29534      new_path=`$CYGPATH -u "$path"`
29535    fi
29536    if test "x$new_path" = x; then
29537      # It's still not found. Now this is an unrecoverable error.
29538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29539$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29540      has_space=`$ECHO "$complete" | $GREP " "`
29541      if test "x$has_space" != x; then
29542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29544      fi
29545      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29546    fi
29547  fi
29548
29549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29552  # "foo.exe" is OK but "foo" is an error.
29553  #
29554  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29555  # It is also a way to make sure we got the proper file name for the real test later on.
29556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29557  if test "x$test_shortpath" = x; then
29558    # Short path failed, file does not exist as specified.
29559    # Try adding .exe or .cmd
29560    if test -f "${new_path}.exe"; then
29561      input_to_shortpath="${new_path}.exe"
29562    elif test -f "${new_path}.cmd"; then
29563      input_to_shortpath="${new_path}.cmd"
29564    else
29565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29566$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29567      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29568$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29569      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29570    fi
29571  else
29572    input_to_shortpath="$new_path"
29573  fi
29574
29575  # Call helper function which possibly converts this using DOS-style short mode.
29576  # If so, the updated path is stored in $new_path.
29577  new_path="$input_to_shortpath"
29578
29579  input_path="$input_to_shortpath"
29580  # Check if we need to convert this using DOS-style short mode. If the path
29581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29582  # take no chances and rewrite it.
29583  # Note: m4 eats our [], so we need to use [ and ] instead.
29584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29585  if test "x$has_forbidden_chars" != x; then
29586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29590      # Going to short mode and back again did indeed matter. Since short mode is
29591      # case insensitive, let's make it lowercase to improve readability.
29592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29593      # Now convert it back to Unix-stile (cygpath)
29594      input_path=`$CYGPATH -u "$shortmode_path"`
29595      new_path="$input_path"
29596    fi
29597  fi
29598
29599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29600  if test "x$test_cygdrive_prefix" = x; then
29601    # As a simple fix, exclude /usr/bin since it's not a real path.
29602    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29604      # a path prefixed by /cygdrive for fixpath to work.
29605      new_path="$CYGWIN_ROOT_PATH$input_path"
29606    fi
29607  fi
29608
29609  # remove trailing .exe if any
29610  new_path="${new_path/%.exe/}"
29611
29612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29613
29614  # First separate the path from the arguments. This will split at the first
29615  # space.
29616  complete="$CXX"
29617  path="${complete%% *}"
29618  tmp="$complete EOL"
29619  arguments="${tmp#* }"
29620
29621  # Input might be given as Windows format, start by converting to
29622  # unix format.
29623  new_path="$path"
29624
29625  windows_path="$new_path"
29626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29627    unix_path=`$CYGPATH -u "$windows_path"`
29628    new_path="$unix_path"
29629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29631    new_path="$unix_path"
29632  fi
29633
29634
29635  # Now try to locate executable using which
29636  new_path=`$WHICH "$new_path" 2> /dev/null`
29637
29638  if test "x$new_path" = x; then
29639    # Oops. Which didn't find the executable.
29640    # The splitting of arguments from the executable at a space might have been incorrect,
29641    # since paths with space are more likely in Windows. Give it another try with the whole
29642    # argument.
29643    path="$complete"
29644    arguments="EOL"
29645    new_path="$path"
29646
29647  windows_path="$new_path"
29648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29649    unix_path=`$CYGPATH -u "$windows_path"`
29650    new_path="$unix_path"
29651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29653    new_path="$unix_path"
29654  fi
29655
29656
29657    new_path=`$WHICH "$new_path" 2> /dev/null`
29658    # bat and cmd files are not always considered executable in MSYS causing which
29659    # to not find them
29660    if test "x$new_path" = x \
29661        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29662        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29663      new_path="$path"
29664
29665  windows_path="$new_path"
29666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29667    unix_path=`$CYGPATH -u "$windows_path"`
29668    new_path="$unix_path"
29669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29671    new_path="$unix_path"
29672  fi
29673
29674    fi
29675
29676    if test "x$new_path" = x; then
29677      # It's still not found. Now this is an unrecoverable error.
29678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29679$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29680      has_space=`$ECHO "$complete" | $GREP " "`
29681      if test "x$has_space" != x; then
29682        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29683$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29684      fi
29685      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29686    fi
29687  fi
29688
29689  # Now new_path has a complete unix path to the binary
29690  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29691    # Keep paths in /bin as-is, but remove trailing .exe if any
29692    new_path="${new_path/%.exe/}"
29693    # Do not save /bin paths to all_fixpath_prefixes!
29694  else
29695    # Not in mixed or Windows style, start by that.
29696    new_path=`cmd //c echo $new_path`
29697
29698  input_path="$new_path"
29699  # Check if we need to convert this using DOS-style short mode. If the path
29700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29701  # take no chances and rewrite it.
29702  # Note: m4 eats our [], so we need to use [ and ] instead.
29703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29704  if test "x$has_forbidden_chars" != x; then
29705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29707  fi
29708
29709    # Output is in $new_path
29710
29711  windows_path="$new_path"
29712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29713    unix_path=`$CYGPATH -u "$windows_path"`
29714    new_path="$unix_path"
29715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29717    new_path="$unix_path"
29718  fi
29719
29720    # remove trailing .exe if any
29721    new_path="${new_path/%.exe/}"
29722
29723    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29724    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29725  fi
29726
29727  else
29728    # We're on a unix platform. Hooray! :)
29729    # First separate the path from the arguments. This will split at the first
29730    # space.
29731    complete="$CXX"
29732    path="${complete%% *}"
29733    tmp="$complete EOL"
29734    arguments="${tmp#* }"
29735
29736    # Cannot rely on the command "which" here since it doesn't always work.
29737    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29738    if test -z "$is_absolute_path"; then
29739      # Path to executable is not absolute. Find it.
29740      IFS_save="$IFS"
29741      IFS=:
29742      for p in $PATH; do
29743        if test -f "$p/$path" && test -x "$p/$path"; then
29744          new_path="$p/$path"
29745          break
29746        fi
29747      done
29748      IFS="$IFS_save"
29749    else
29750      # This is an absolute path, we can use it without further modifications.
29751      new_path="$path"
29752    fi
29753
29754    if test "x$new_path" = x; then
29755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29756$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29757      has_space=`$ECHO "$complete" | $GREP " "`
29758      if test "x$has_space" != x; then
29759        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29760$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29761      fi
29762      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29763    fi
29764  fi
29765
29766  # Now join together the path and the arguments once again
29767  if test "x$arguments" != xEOL; then
29768    new_complete="$new_path ${arguments% *}"
29769  else
29770    new_complete="$new_path"
29771  fi
29772
29773  if test "x$complete" != "x$new_complete"; then
29774    CXX="$new_complete"
29775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29776$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29777  fi
29778
29779  TEST_COMPILER="$CXX"
29780  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29781  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29782  if test "x$OPENJDK_BUILD_OS" != xaix; then
29783    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29785$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29786
29787  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29788    # Follow a chain of symbolic links. Use readlink
29789    # where it exists, else fall back to horribly
29790    # complicated shell code.
29791    if test "x$READLINK_TESTED" != yes; then
29792      # On MacOSX there is a readlink tool with a different
29793      # purpose than the GNU readlink tool. Check the found readlink.
29794      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29795      if test "x$ISGNU" = x; then
29796        # A readlink that we do not know how to use.
29797        # Are there other non-GNU readlinks out there?
29798        READLINK_TESTED=yes
29799        READLINK=
29800      fi
29801    fi
29802
29803    if test "x$READLINK" != x; then
29804      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29805    else
29806      # Save the current directory for restoring afterwards
29807      STARTDIR=$PWD
29808      COUNTER=0
29809      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29810      sym_link_file=`$BASENAME $TEST_COMPILER`
29811      cd $sym_link_dir
29812      # Use -P flag to resolve symlinks in directories.
29813      cd `$THEPWDCMD -P`
29814      sym_link_dir=`$THEPWDCMD -P`
29815      # Resolve file symlinks
29816      while test $COUNTER -lt 20; do
29817        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29818        if test "x$ISLINK" == x; then
29819          # This is not a symbolic link! We are done!
29820          break
29821        fi
29822        # Again resolve directory symlinks since the target of the just found
29823        # link could be in a different directory
29824        cd `$DIRNAME $ISLINK`
29825        sym_link_dir=`$THEPWDCMD -P`
29826        sym_link_file=`$BASENAME $ISLINK`
29827        let COUNTER=COUNTER+1
29828      done
29829      cd $STARTDIR
29830      TEST_COMPILER=$sym_link_dir/$sym_link_file
29831    fi
29832  fi
29833
29834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29835$as_echo "$TEST_COMPILER" >&6; }
29836  fi
29837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29838$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29839
29840  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29841  if test "x$COMPILER_BASENAME" = "xccache"; then
29842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29843$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29844    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29845    # We want to control ccache invocation ourselves, so ignore this cc and try
29846    # searching again.
29847
29848    # Remove the path to the fake ccache cc from the PATH
29849    RETRY_COMPILER_SAVED_PATH="$PATH"
29850    COMPILER_DIRNAME=`$DIRNAME $CXX`
29851    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29852
29853    # Try again looking for our compiler
29854    if test -n "$ac_tool_prefix"; then
29855  for ac_prog in $TOOLCHAIN_CXX_BINARY
29856  do
29857    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29858set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29860$as_echo_n "checking for $ac_word... " >&6; }
29861if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29862  $as_echo_n "(cached) " >&6
29863else
29864  if test -n "$PROPER_COMPILER_CXX"; then
29865  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29866else
29867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29868for as_dir in $PATH
29869do
29870  IFS=$as_save_IFS
29871  test -z "$as_dir" && as_dir=.
29872    for ac_exec_ext in '' $ac_executable_extensions; do
29873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29874    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29876    break 2
29877  fi
29878done
29879  done
29880IFS=$as_save_IFS
29881
29882fi
29883fi
29884PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29885if test -n "$PROPER_COMPILER_CXX"; then
29886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29887$as_echo "$PROPER_COMPILER_CXX" >&6; }
29888else
29889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29890$as_echo "no" >&6; }
29891fi
29892
29893
29894    test -n "$PROPER_COMPILER_CXX" && break
29895  done
29896fi
29897if test -z "$PROPER_COMPILER_CXX"; then
29898  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29899  for ac_prog in $TOOLCHAIN_CXX_BINARY
29900do
29901  # Extract the first word of "$ac_prog", so it can be a program name with args.
29902set dummy $ac_prog; ac_word=$2
29903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29904$as_echo_n "checking for $ac_word... " >&6; }
29905if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29906  $as_echo_n "(cached) " >&6
29907else
29908  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29909  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29910else
29911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29912for as_dir in $PATH
29913do
29914  IFS=$as_save_IFS
29915  test -z "$as_dir" && as_dir=.
29916    for ac_exec_ext in '' $ac_executable_extensions; do
29917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29918    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29920    break 2
29921  fi
29922done
29923  done
29924IFS=$as_save_IFS
29925
29926fi
29927fi
29928ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29929if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29931$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29932else
29933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29934$as_echo "no" >&6; }
29935fi
29936
29937
29938  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29939done
29940
29941  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29942    PROPER_COMPILER_CXX=""
29943  else
29944    case $cross_compiling:$ac_tool_warned in
29945yes:)
29946{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29947$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29948ac_tool_warned=yes ;;
29949esac
29950    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29951  fi
29952fi
29953
29954
29955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29956
29957  # First separate the path from the arguments. This will split at the first
29958  # space.
29959  complete="$PROPER_COMPILER_CXX"
29960  path="${complete%% *}"
29961  tmp="$complete EOL"
29962  arguments="${tmp#* }"
29963
29964  # Input might be given as Windows format, start by converting to
29965  # unix format.
29966  new_path=`$CYGPATH -u "$path"`
29967
29968  # Now try to locate executable using which
29969  new_path=`$WHICH "$new_path" 2> /dev/null`
29970  # bat and cmd files are not always considered executable in cygwin causing which
29971  # to not find them
29972  if test "x$new_path" = x \
29973      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29974      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29975    new_path=`$CYGPATH -u "$path"`
29976  fi
29977  if test "x$new_path" = x; then
29978    # Oops. Which didn't find the executable.
29979    # The splitting of arguments from the executable at a space might have been incorrect,
29980    # since paths with space are more likely in Windows. Give it another try with the whole
29981    # argument.
29982    path="$complete"
29983    arguments="EOL"
29984    new_path=`$CYGPATH -u "$path"`
29985    new_path=`$WHICH "$new_path" 2> /dev/null`
29986    # bat and cmd files are not always considered executable in cygwin causing which
29987    # to not find them
29988    if test "x$new_path" = x \
29989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29991      new_path=`$CYGPATH -u "$path"`
29992    fi
29993    if test "x$new_path" = x; then
29994      # It's still not found. Now this is an unrecoverable error.
29995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29996$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29997      has_space=`$ECHO "$complete" | $GREP " "`
29998      if test "x$has_space" != x; then
29999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30001      fi
30002      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30003    fi
30004  fi
30005
30006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30009  # "foo.exe" is OK but "foo" is an error.
30010  #
30011  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30012  # It is also a way to make sure we got the proper file name for the real test later on.
30013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30014  if test "x$test_shortpath" = x; then
30015    # Short path failed, file does not exist as specified.
30016    # Try adding .exe or .cmd
30017    if test -f "${new_path}.exe"; then
30018      input_to_shortpath="${new_path}.exe"
30019    elif test -f "${new_path}.cmd"; then
30020      input_to_shortpath="${new_path}.cmd"
30021    else
30022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30023$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30024      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30025$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30026      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30027    fi
30028  else
30029    input_to_shortpath="$new_path"
30030  fi
30031
30032  # Call helper function which possibly converts this using DOS-style short mode.
30033  # If so, the updated path is stored in $new_path.
30034  new_path="$input_to_shortpath"
30035
30036  input_path="$input_to_shortpath"
30037  # Check if we need to convert this using DOS-style short mode. If the path
30038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30039  # take no chances and rewrite it.
30040  # Note: m4 eats our [], so we need to use [ and ] instead.
30041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30042  if test "x$has_forbidden_chars" != x; then
30043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30047      # Going to short mode and back again did indeed matter. Since short mode is
30048      # case insensitive, let's make it lowercase to improve readability.
30049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30050      # Now convert it back to Unix-stile (cygpath)
30051      input_path=`$CYGPATH -u "$shortmode_path"`
30052      new_path="$input_path"
30053    fi
30054  fi
30055
30056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30057  if test "x$test_cygdrive_prefix" = x; then
30058    # As a simple fix, exclude /usr/bin since it's not a real path.
30059    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30061      # a path prefixed by /cygdrive for fixpath to work.
30062      new_path="$CYGWIN_ROOT_PATH$input_path"
30063    fi
30064  fi
30065
30066  # remove trailing .exe if any
30067  new_path="${new_path/%.exe/}"
30068
30069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30070
30071  # First separate the path from the arguments. This will split at the first
30072  # space.
30073  complete="$PROPER_COMPILER_CXX"
30074  path="${complete%% *}"
30075  tmp="$complete EOL"
30076  arguments="${tmp#* }"
30077
30078  # Input might be given as Windows format, start by converting to
30079  # unix format.
30080  new_path="$path"
30081
30082  windows_path="$new_path"
30083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30084    unix_path=`$CYGPATH -u "$windows_path"`
30085    new_path="$unix_path"
30086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30088    new_path="$unix_path"
30089  fi
30090
30091
30092  # Now try to locate executable using which
30093  new_path=`$WHICH "$new_path" 2> /dev/null`
30094
30095  if test "x$new_path" = x; then
30096    # Oops. Which didn't find the executable.
30097    # The splitting of arguments from the executable at a space might have been incorrect,
30098    # since paths with space are more likely in Windows. Give it another try with the whole
30099    # argument.
30100    path="$complete"
30101    arguments="EOL"
30102    new_path="$path"
30103
30104  windows_path="$new_path"
30105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30106    unix_path=`$CYGPATH -u "$windows_path"`
30107    new_path="$unix_path"
30108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30110    new_path="$unix_path"
30111  fi
30112
30113
30114    new_path=`$WHICH "$new_path" 2> /dev/null`
30115    # bat and cmd files are not always considered executable in MSYS causing which
30116    # to not find them
30117    if test "x$new_path" = x \
30118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30120      new_path="$path"
30121
30122  windows_path="$new_path"
30123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30124    unix_path=`$CYGPATH -u "$windows_path"`
30125    new_path="$unix_path"
30126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30128    new_path="$unix_path"
30129  fi
30130
30131    fi
30132
30133    if test "x$new_path" = x; then
30134      # It's still not found. Now this is an unrecoverable error.
30135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30136$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30137      has_space=`$ECHO "$complete" | $GREP " "`
30138      if test "x$has_space" != x; then
30139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30141      fi
30142      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30143    fi
30144  fi
30145
30146  # Now new_path has a complete unix path to the binary
30147  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30148    # Keep paths in /bin as-is, but remove trailing .exe if any
30149    new_path="${new_path/%.exe/}"
30150    # Do not save /bin paths to all_fixpath_prefixes!
30151  else
30152    # Not in mixed or Windows style, start by that.
30153    new_path=`cmd //c echo $new_path`
30154
30155  input_path="$new_path"
30156  # Check if we need to convert this using DOS-style short mode. If the path
30157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30158  # take no chances and rewrite it.
30159  # Note: m4 eats our [], so we need to use [ and ] instead.
30160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30161  if test "x$has_forbidden_chars" != x; then
30162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30164  fi
30165
30166    # Output is in $new_path
30167
30168  windows_path="$new_path"
30169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30170    unix_path=`$CYGPATH -u "$windows_path"`
30171    new_path="$unix_path"
30172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30174    new_path="$unix_path"
30175  fi
30176
30177    # remove trailing .exe if any
30178    new_path="${new_path/%.exe/}"
30179
30180    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30181    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30182  fi
30183
30184  else
30185    # We're on a unix platform. Hooray! :)
30186    # First separate the path from the arguments. This will split at the first
30187    # space.
30188    complete="$PROPER_COMPILER_CXX"
30189    path="${complete%% *}"
30190    tmp="$complete EOL"
30191    arguments="${tmp#* }"
30192
30193    # Cannot rely on the command "which" here since it doesn't always work.
30194    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30195    if test -z "$is_absolute_path"; then
30196      # Path to executable is not absolute. Find it.
30197      IFS_save="$IFS"
30198      IFS=:
30199      for p in $PATH; do
30200        if test -f "$p/$path" && test -x "$p/$path"; then
30201          new_path="$p/$path"
30202          break
30203        fi
30204      done
30205      IFS="$IFS_save"
30206    else
30207      # This is an absolute path, we can use it without further modifications.
30208      new_path="$path"
30209    fi
30210
30211    if test "x$new_path" = x; then
30212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30213$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30214      has_space=`$ECHO "$complete" | $GREP " "`
30215      if test "x$has_space" != x; then
30216        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30217$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30218      fi
30219      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30220    fi
30221  fi
30222
30223  # Now join together the path and the arguments once again
30224  if test "x$arguments" != xEOL; then
30225    new_complete="$new_path ${arguments% *}"
30226  else
30227    new_complete="$new_path"
30228  fi
30229
30230  if test "x$complete" != "x$new_complete"; then
30231    PROPER_COMPILER_CXX="$new_complete"
30232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30233$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30234  fi
30235
30236    PATH="$RETRY_COMPILER_SAVED_PATH"
30237
30238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30239$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30240
30241  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30242    # Follow a chain of symbolic links. Use readlink
30243    # where it exists, else fall back to horribly
30244    # complicated shell code.
30245    if test "x$READLINK_TESTED" != yes; then
30246      # On MacOSX there is a readlink tool with a different
30247      # purpose than the GNU readlink tool. Check the found readlink.
30248      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30249      if test "x$ISGNU" = x; then
30250        # A readlink that we do not know how to use.
30251        # Are there other non-GNU readlinks out there?
30252        READLINK_TESTED=yes
30253        READLINK=
30254      fi
30255    fi
30256
30257    if test "x$READLINK" != x; then
30258      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30259    else
30260      # Save the current directory for restoring afterwards
30261      STARTDIR=$PWD
30262      COUNTER=0
30263      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30264      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30265      cd $sym_link_dir
30266      # Use -P flag to resolve symlinks in directories.
30267      cd `$THEPWDCMD -P`
30268      sym_link_dir=`$THEPWDCMD -P`
30269      # Resolve file symlinks
30270      while test $COUNTER -lt 20; do
30271        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30272        if test "x$ISLINK" == x; then
30273          # This is not a symbolic link! We are done!
30274          break
30275        fi
30276        # Again resolve directory symlinks since the target of the just found
30277        # link could be in a different directory
30278        cd `$DIRNAME $ISLINK`
30279        sym_link_dir=`$THEPWDCMD -P`
30280        sym_link_file=`$BASENAME $ISLINK`
30281        let COUNTER=COUNTER+1
30282      done
30283      cd $STARTDIR
30284      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30285    fi
30286  fi
30287
30288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30289$as_echo "$PROPER_COMPILER_CXX" >&6; }
30290    CXX="$PROPER_COMPILER_CXX"
30291  else
30292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30293$as_echo "no, keeping CXX" >&6; }
30294  fi
30295
30296
30297  COMPILER=$CXX
30298  COMPILER_NAME=$COMPILER_NAME
30299
30300  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30301    # cc -V output typically looks like
30302    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30303    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30304    # Check that this is likely to be the Solaris Studio cc.
30305    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30306    if test $? -ne 0; then
30307      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30308      { $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
30309$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30310      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30311$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30312      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30313$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30314      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30315    fi
30316    # Remove usage instructions (if present), and
30317    # collapse compiler output into a single line
30318    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30319        $SED -e 's/ *[Uu]sage:.*//'`
30320    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30321        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30322  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30323    # xlc -qversion output typically looks like
30324    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30325    #     Version: 11.01.0000.0015
30326    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30327    # Check that this is likely to be the IBM XL C compiler.
30328    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30329    if test $? -ne 0; then
30330      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30331      { $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
30332$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30333      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30334$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30335      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30336$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30337      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30338    fi
30339    # Collapse compiler output into a single line
30340    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30341    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30342        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30343  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30344    # There is no specific version flag, but all output starts with a version string.
30345    # First line typically looks something like:
30346    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30347    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30348    # Check that this is likely to be Microsoft CL.EXE.
30349    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30350    if test $? -ne 0; then
30351      { $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
30352$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30353      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30354$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30355      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30356    fi
30357    # Collapse compiler output into a single line
30358    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30359    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30360        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30361  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30362    # gcc --version output typically looks like
30363    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30364    #     Copyright (C) 2013 Free Software Foundation, Inc.
30365    #     This is free software; see the source for copying conditions.  There is NO
30366    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30367    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30368    # Check that this is likely to be GCC.
30369    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30370    if test $? -ne 0; then
30371      { $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
30372$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30373      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30374$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30375      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30376    fi
30377    # Remove Copyright and legalese from version string, and
30378    # collapse into a single line
30379    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30380        $SED -e 's/ *Copyright .*//'`
30381    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30382        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30383  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30384    # clang --version output typically looks like
30385    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30386    #    clang version 3.3 (tags/RELEASE_33/final)
30387    # or
30388    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30389    #    Target: x86_64-pc-linux-gnu
30390    #    Thread model: posix
30391    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30392    # Check that this is likely to be clang
30393    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30394    if test $? -ne 0; then
30395      { $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
30396$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30397      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30398$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30399      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30400    fi
30401    # Collapse compiler output into a single line
30402    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30403    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30404        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30405  else
30406      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30407  fi
30408  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30409  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30410  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30411  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30412
30413  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30414$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30415
30416
30417  # Now that we have resolved CXX ourself, let autoconf have its go at it
30418  ac_ext=cpp
30419ac_cpp='$CXXCPP $CPPFLAGS'
30420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30423if test -z "$CXX"; then
30424  if test -n "$CCC"; then
30425    CXX=$CCC
30426  else
30427    if test -n "$ac_tool_prefix"; then
30428  for ac_prog in $CXX
30429  do
30430    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30431set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30433$as_echo_n "checking for $ac_word... " >&6; }
30434if ${ac_cv_prog_CXX+:} false; then :
30435  $as_echo_n "(cached) " >&6
30436else
30437  if test -n "$CXX"; then
30438  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30439else
30440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30441for as_dir in $PATH
30442do
30443  IFS=$as_save_IFS
30444  test -z "$as_dir" && as_dir=.
30445    for ac_exec_ext in '' $ac_executable_extensions; do
30446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30447    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30449    break 2
30450  fi
30451done
30452  done
30453IFS=$as_save_IFS
30454
30455fi
30456fi
30457CXX=$ac_cv_prog_CXX
30458if test -n "$CXX"; then
30459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30460$as_echo "$CXX" >&6; }
30461else
30462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30463$as_echo "no" >&6; }
30464fi
30465
30466
30467    test -n "$CXX" && break
30468  done
30469fi
30470if test -z "$CXX"; then
30471  ac_ct_CXX=$CXX
30472  for ac_prog in $CXX
30473do
30474  # Extract the first word of "$ac_prog", so it can be a program name with args.
30475set dummy $ac_prog; ac_word=$2
30476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30477$as_echo_n "checking for $ac_word... " >&6; }
30478if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30479  $as_echo_n "(cached) " >&6
30480else
30481  if test -n "$ac_ct_CXX"; then
30482  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30483else
30484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30485for as_dir in $PATH
30486do
30487  IFS=$as_save_IFS
30488  test -z "$as_dir" && as_dir=.
30489    for ac_exec_ext in '' $ac_executable_extensions; do
30490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30491    ac_cv_prog_ac_ct_CXX="$ac_prog"
30492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30493    break 2
30494  fi
30495done
30496  done
30497IFS=$as_save_IFS
30498
30499fi
30500fi
30501ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30502if test -n "$ac_ct_CXX"; then
30503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30504$as_echo "$ac_ct_CXX" >&6; }
30505else
30506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30507$as_echo "no" >&6; }
30508fi
30509
30510
30511  test -n "$ac_ct_CXX" && break
30512done
30513
30514  if test "x$ac_ct_CXX" = x; then
30515    CXX="g++"
30516  else
30517    case $cross_compiling:$ac_tool_warned in
30518yes:)
30519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30521ac_tool_warned=yes ;;
30522esac
30523    CXX=$ac_ct_CXX
30524  fi
30525fi
30526
30527  fi
30528fi
30529# Provide some information about the compiler.
30530$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30531set X $ac_compile
30532ac_compiler=$2
30533for ac_option in --version -v -V -qversion; do
30534  { { ac_try="$ac_compiler $ac_option >&5"
30535case "(($ac_try" in
30536  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30537  *) ac_try_echo=$ac_try;;
30538esac
30539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30540$as_echo "$ac_try_echo"; } >&5
30541  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30542  ac_status=$?
30543  if test -s conftest.err; then
30544    sed '10a\
30545... rest of stderr output deleted ...
30546         10q' conftest.err >conftest.er1
30547    cat conftest.er1 >&5
30548  fi
30549  rm -f conftest.er1 conftest.err
30550  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30551  test $ac_status = 0; }
30552done
30553
30554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30555$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30556if ${ac_cv_cxx_compiler_gnu+:} false; then :
30557  $as_echo_n "(cached) " >&6
30558else
30559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30560/* end confdefs.h.  */
30561
30562int
30563main ()
30564{
30565#ifndef __GNUC__
30566       choke me
30567#endif
30568
30569  ;
30570  return 0;
30571}
30572_ACEOF
30573if ac_fn_cxx_try_compile "$LINENO"; then :
30574  ac_compiler_gnu=yes
30575else
30576  ac_compiler_gnu=no
30577fi
30578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30579ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30580
30581fi
30582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30583$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30584if test $ac_compiler_gnu = yes; then
30585  GXX=yes
30586else
30587  GXX=
30588fi
30589ac_test_CXXFLAGS=${CXXFLAGS+set}
30590ac_save_CXXFLAGS=$CXXFLAGS
30591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30592$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30593if ${ac_cv_prog_cxx_g+:} false; then :
30594  $as_echo_n "(cached) " >&6
30595else
30596  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30597   ac_cxx_werror_flag=yes
30598   ac_cv_prog_cxx_g=no
30599   CXXFLAGS="-g"
30600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30601/* end confdefs.h.  */
30602
30603int
30604main ()
30605{
30606
30607  ;
30608  return 0;
30609}
30610_ACEOF
30611if ac_fn_cxx_try_compile "$LINENO"; then :
30612  ac_cv_prog_cxx_g=yes
30613else
30614  CXXFLAGS=""
30615      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30616/* end confdefs.h.  */
30617
30618int
30619main ()
30620{
30621
30622  ;
30623  return 0;
30624}
30625_ACEOF
30626if ac_fn_cxx_try_compile "$LINENO"; then :
30627
30628else
30629  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30630	 CXXFLAGS="-g"
30631	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30632/* end confdefs.h.  */
30633
30634int
30635main ()
30636{
30637
30638  ;
30639  return 0;
30640}
30641_ACEOF
30642if ac_fn_cxx_try_compile "$LINENO"; then :
30643  ac_cv_prog_cxx_g=yes
30644fi
30645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30646fi
30647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30648fi
30649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30650   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30651fi
30652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30653$as_echo "$ac_cv_prog_cxx_g" >&6; }
30654if test "$ac_test_CXXFLAGS" = set; then
30655  CXXFLAGS=$ac_save_CXXFLAGS
30656elif test $ac_cv_prog_cxx_g = yes; then
30657  if test "$GXX" = yes; then
30658    CXXFLAGS="-g -O2"
30659  else
30660    CXXFLAGS="-g"
30661  fi
30662else
30663  if test "$GXX" = yes; then
30664    CXXFLAGS="-O2"
30665  else
30666    CXXFLAGS=
30667  fi
30668fi
30669ac_ext=cpp
30670ac_cpp='$CXXCPP $CPPFLAGS'
30671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30674
30675
30676  #
30677  # Setup the preprocessor (CPP and CXXCPP)
30678  #
30679  ac_ext=c
30680ac_cpp='$CPP $CPPFLAGS'
30681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30683ac_compiler_gnu=$ac_cv_c_compiler_gnu
30684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30685$as_echo_n "checking how to run the C preprocessor... " >&6; }
30686# On Suns, sometimes $CPP names a directory.
30687if test -n "$CPP" && test -d "$CPP"; then
30688  CPP=
30689fi
30690if test -z "$CPP"; then
30691  if ${ac_cv_prog_CPP+:} false; then :
30692  $as_echo_n "(cached) " >&6
30693else
30694      # Double quotes because CPP needs to be expanded
30695    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30696    do
30697      ac_preproc_ok=false
30698for ac_c_preproc_warn_flag in '' yes
30699do
30700  # Use a header file that comes with gcc, so configuring glibc
30701  # with a fresh cross-compiler works.
30702  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30703  # <limits.h> exists even on freestanding compilers.
30704  # On the NeXT, cc -E runs the code through the compiler's parser,
30705  # not just through cpp. "Syntax error" is here to catch this case.
30706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30707/* end confdefs.h.  */
30708#ifdef __STDC__
30709# include <limits.h>
30710#else
30711# include <assert.h>
30712#endif
30713		     Syntax error
30714_ACEOF
30715if ac_fn_c_try_cpp "$LINENO"; then :
30716
30717else
30718  # Broken: fails on valid input.
30719continue
30720fi
30721rm -f conftest.err conftest.i conftest.$ac_ext
30722
30723  # OK, works on sane cases.  Now check whether nonexistent headers
30724  # can be detected and how.
30725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30726/* end confdefs.h.  */
30727#include <ac_nonexistent.h>
30728_ACEOF
30729if ac_fn_c_try_cpp "$LINENO"; then :
30730  # Broken: success on invalid input.
30731continue
30732else
30733  # Passes both tests.
30734ac_preproc_ok=:
30735break
30736fi
30737rm -f conftest.err conftest.i conftest.$ac_ext
30738
30739done
30740# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30741rm -f conftest.i conftest.err conftest.$ac_ext
30742if $ac_preproc_ok; then :
30743  break
30744fi
30745
30746    done
30747    ac_cv_prog_CPP=$CPP
30748
30749fi
30750  CPP=$ac_cv_prog_CPP
30751else
30752  ac_cv_prog_CPP=$CPP
30753fi
30754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30755$as_echo "$CPP" >&6; }
30756ac_preproc_ok=false
30757for ac_c_preproc_warn_flag in '' yes
30758do
30759  # Use a header file that comes with gcc, so configuring glibc
30760  # with a fresh cross-compiler works.
30761  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30762  # <limits.h> exists even on freestanding compilers.
30763  # On the NeXT, cc -E runs the code through the compiler's parser,
30764  # not just through cpp. "Syntax error" is here to catch this case.
30765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30766/* end confdefs.h.  */
30767#ifdef __STDC__
30768# include <limits.h>
30769#else
30770# include <assert.h>
30771#endif
30772		     Syntax error
30773_ACEOF
30774if ac_fn_c_try_cpp "$LINENO"; then :
30775
30776else
30777  # Broken: fails on valid input.
30778continue
30779fi
30780rm -f conftest.err conftest.i conftest.$ac_ext
30781
30782  # OK, works on sane cases.  Now check whether nonexistent headers
30783  # can be detected and how.
30784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30785/* end confdefs.h.  */
30786#include <ac_nonexistent.h>
30787_ACEOF
30788if ac_fn_c_try_cpp "$LINENO"; then :
30789  # Broken: success on invalid input.
30790continue
30791else
30792  # Passes both tests.
30793ac_preproc_ok=:
30794break
30795fi
30796rm -f conftest.err conftest.i conftest.$ac_ext
30797
30798done
30799# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30800rm -f conftest.i conftest.err conftest.$ac_ext
30801if $ac_preproc_ok; then :
30802
30803else
30804  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30806as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30807See \`config.log' for more details" "$LINENO" 5; }
30808fi
30809
30810ac_ext=cpp
30811ac_cpp='$CXXCPP $CPPFLAGS'
30812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30815
30816
30817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30818
30819  # First separate the path from the arguments. This will split at the first
30820  # space.
30821  complete="$CPP"
30822  path="${complete%% *}"
30823  tmp="$complete EOL"
30824  arguments="${tmp#* }"
30825
30826  # Input might be given as Windows format, start by converting to
30827  # unix format.
30828  new_path=`$CYGPATH -u "$path"`
30829
30830  # Now try to locate executable using which
30831  new_path=`$WHICH "$new_path" 2> /dev/null`
30832  # bat and cmd files are not always considered executable in cygwin causing which
30833  # to not find them
30834  if test "x$new_path" = x \
30835      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30836      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30837    new_path=`$CYGPATH -u "$path"`
30838  fi
30839  if test "x$new_path" = x; then
30840    # Oops. Which didn't find the executable.
30841    # The splitting of arguments from the executable at a space might have been incorrect,
30842    # since paths with space are more likely in Windows. Give it another try with the whole
30843    # argument.
30844    path="$complete"
30845    arguments="EOL"
30846    new_path=`$CYGPATH -u "$path"`
30847    new_path=`$WHICH "$new_path" 2> /dev/null`
30848    # bat and cmd files are not always considered executable in cygwin causing which
30849    # to not find them
30850    if test "x$new_path" = x \
30851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30853      new_path=`$CYGPATH -u "$path"`
30854    fi
30855    if test "x$new_path" = x; then
30856      # It's still not found. Now this is an unrecoverable error.
30857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30858$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30859      has_space=`$ECHO "$complete" | $GREP " "`
30860      if test "x$has_space" != x; then
30861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30863      fi
30864      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30865    fi
30866  fi
30867
30868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30871  # "foo.exe" is OK but "foo" is an error.
30872  #
30873  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30874  # It is also a way to make sure we got the proper file name for the real test later on.
30875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30876  if test "x$test_shortpath" = x; then
30877    # Short path failed, file does not exist as specified.
30878    # Try adding .exe or .cmd
30879    if test -f "${new_path}.exe"; then
30880      input_to_shortpath="${new_path}.exe"
30881    elif test -f "${new_path}.cmd"; then
30882      input_to_shortpath="${new_path}.cmd"
30883    else
30884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30885$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30886      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30887$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30888      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30889    fi
30890  else
30891    input_to_shortpath="$new_path"
30892  fi
30893
30894  # Call helper function which possibly converts this using DOS-style short mode.
30895  # If so, the updated path is stored in $new_path.
30896  new_path="$input_to_shortpath"
30897
30898  input_path="$input_to_shortpath"
30899  # Check if we need to convert this using DOS-style short mode. If the path
30900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30901  # take no chances and rewrite it.
30902  # Note: m4 eats our [], so we need to use [ and ] instead.
30903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30904  if test "x$has_forbidden_chars" != x; then
30905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30909      # Going to short mode and back again did indeed matter. Since short mode is
30910      # case insensitive, let's make it lowercase to improve readability.
30911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30912      # Now convert it back to Unix-stile (cygpath)
30913      input_path=`$CYGPATH -u "$shortmode_path"`
30914      new_path="$input_path"
30915    fi
30916  fi
30917
30918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30919  if test "x$test_cygdrive_prefix" = x; then
30920    # As a simple fix, exclude /usr/bin since it's not a real path.
30921    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30923      # a path prefixed by /cygdrive for fixpath to work.
30924      new_path="$CYGWIN_ROOT_PATH$input_path"
30925    fi
30926  fi
30927
30928  # remove trailing .exe if any
30929  new_path="${new_path/%.exe/}"
30930
30931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30932
30933  # First separate the path from the arguments. This will split at the first
30934  # space.
30935  complete="$CPP"
30936  path="${complete%% *}"
30937  tmp="$complete EOL"
30938  arguments="${tmp#* }"
30939
30940  # Input might be given as Windows format, start by converting to
30941  # unix format.
30942  new_path="$path"
30943
30944  windows_path="$new_path"
30945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30946    unix_path=`$CYGPATH -u "$windows_path"`
30947    new_path="$unix_path"
30948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30950    new_path="$unix_path"
30951  fi
30952
30953
30954  # Now try to locate executable using which
30955  new_path=`$WHICH "$new_path" 2> /dev/null`
30956
30957  if test "x$new_path" = x; then
30958    # Oops. Which didn't find the executable.
30959    # The splitting of arguments from the executable at a space might have been incorrect,
30960    # since paths with space are more likely in Windows. Give it another try with the whole
30961    # argument.
30962    path="$complete"
30963    arguments="EOL"
30964    new_path="$path"
30965
30966  windows_path="$new_path"
30967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30968    unix_path=`$CYGPATH -u "$windows_path"`
30969    new_path="$unix_path"
30970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30972    new_path="$unix_path"
30973  fi
30974
30975
30976    new_path=`$WHICH "$new_path" 2> /dev/null`
30977    # bat and cmd files are not always considered executable in MSYS causing which
30978    # to not find them
30979    if test "x$new_path" = x \
30980        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30981        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30982      new_path="$path"
30983
30984  windows_path="$new_path"
30985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30986    unix_path=`$CYGPATH -u "$windows_path"`
30987    new_path="$unix_path"
30988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30990    new_path="$unix_path"
30991  fi
30992
30993    fi
30994
30995    if test "x$new_path" = x; then
30996      # It's still not found. Now this is an unrecoverable error.
30997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30998$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30999      has_space=`$ECHO "$complete" | $GREP " "`
31000      if test "x$has_space" != x; then
31001        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31002$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31003      fi
31004      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31005    fi
31006  fi
31007
31008  # Now new_path has a complete unix path to the binary
31009  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31010    # Keep paths in /bin as-is, but remove trailing .exe if any
31011    new_path="${new_path/%.exe/}"
31012    # Do not save /bin paths to all_fixpath_prefixes!
31013  else
31014    # Not in mixed or Windows style, start by that.
31015    new_path=`cmd //c echo $new_path`
31016
31017  input_path="$new_path"
31018  # Check if we need to convert this using DOS-style short mode. If the path
31019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31020  # take no chances and rewrite it.
31021  # Note: m4 eats our [], so we need to use [ and ] instead.
31022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31023  if test "x$has_forbidden_chars" != x; then
31024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31026  fi
31027
31028    # Output is in $new_path
31029
31030  windows_path="$new_path"
31031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31032    unix_path=`$CYGPATH -u "$windows_path"`
31033    new_path="$unix_path"
31034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31036    new_path="$unix_path"
31037  fi
31038
31039    # remove trailing .exe if any
31040    new_path="${new_path/%.exe/}"
31041
31042    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31043    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31044  fi
31045
31046  else
31047    # We're on a unix platform. Hooray! :)
31048    # First separate the path from the arguments. This will split at the first
31049    # space.
31050    complete="$CPP"
31051    path="${complete%% *}"
31052    tmp="$complete EOL"
31053    arguments="${tmp#* }"
31054
31055    # Cannot rely on the command "which" here since it doesn't always work.
31056    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31057    if test -z "$is_absolute_path"; then
31058      # Path to executable is not absolute. Find it.
31059      IFS_save="$IFS"
31060      IFS=:
31061      for p in $PATH; do
31062        if test -f "$p/$path" && test -x "$p/$path"; then
31063          new_path="$p/$path"
31064          break
31065        fi
31066      done
31067      IFS="$IFS_save"
31068    else
31069      # This is an absolute path, we can use it without further modifications.
31070      new_path="$path"
31071    fi
31072
31073    if test "x$new_path" = x; then
31074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31075$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31076      has_space=`$ECHO "$complete" | $GREP " "`
31077      if test "x$has_space" != x; then
31078        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31079$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31080      fi
31081      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31082    fi
31083  fi
31084
31085  # Now join together the path and the arguments once again
31086  if test "x$arguments" != xEOL; then
31087    new_complete="$new_path ${arguments% *}"
31088  else
31089    new_complete="$new_path"
31090  fi
31091
31092  if test "x$complete" != "x$new_complete"; then
31093    CPP="$new_complete"
31094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31095$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31096  fi
31097
31098  ac_ext=cpp
31099ac_cpp='$CXXCPP $CPPFLAGS'
31100ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31101ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31102ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31104$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31105if test -z "$CXXCPP"; then
31106  if ${ac_cv_prog_CXXCPP+:} false; then :
31107  $as_echo_n "(cached) " >&6
31108else
31109      # Double quotes because CXXCPP needs to be expanded
31110    for CXXCPP in "$CXX -E" "/lib/cpp"
31111    do
31112      ac_preproc_ok=false
31113for ac_cxx_preproc_warn_flag in '' yes
31114do
31115  # Use a header file that comes with gcc, so configuring glibc
31116  # with a fresh cross-compiler works.
31117  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31118  # <limits.h> exists even on freestanding compilers.
31119  # On the NeXT, cc -E runs the code through the compiler's parser,
31120  # not just through cpp. "Syntax error" is here to catch this case.
31121  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31122/* end confdefs.h.  */
31123#ifdef __STDC__
31124# include <limits.h>
31125#else
31126# include <assert.h>
31127#endif
31128		     Syntax error
31129_ACEOF
31130if ac_fn_cxx_try_cpp "$LINENO"; then :
31131
31132else
31133  # Broken: fails on valid input.
31134continue
31135fi
31136rm -f conftest.err conftest.i conftest.$ac_ext
31137
31138  # OK, works on sane cases.  Now check whether nonexistent headers
31139  # can be detected and how.
31140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31141/* end confdefs.h.  */
31142#include <ac_nonexistent.h>
31143_ACEOF
31144if ac_fn_cxx_try_cpp "$LINENO"; then :
31145  # Broken: success on invalid input.
31146continue
31147else
31148  # Passes both tests.
31149ac_preproc_ok=:
31150break
31151fi
31152rm -f conftest.err conftest.i conftest.$ac_ext
31153
31154done
31155# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31156rm -f conftest.i conftest.err conftest.$ac_ext
31157if $ac_preproc_ok; then :
31158  break
31159fi
31160
31161    done
31162    ac_cv_prog_CXXCPP=$CXXCPP
31163
31164fi
31165  CXXCPP=$ac_cv_prog_CXXCPP
31166else
31167  ac_cv_prog_CXXCPP=$CXXCPP
31168fi
31169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31170$as_echo "$CXXCPP" >&6; }
31171ac_preproc_ok=false
31172for ac_cxx_preproc_warn_flag in '' yes
31173do
31174  # Use a header file that comes with gcc, so configuring glibc
31175  # with a fresh cross-compiler works.
31176  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31177  # <limits.h> exists even on freestanding compilers.
31178  # On the NeXT, cc -E runs the code through the compiler's parser,
31179  # not just through cpp. "Syntax error" is here to catch this case.
31180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31181/* end confdefs.h.  */
31182#ifdef __STDC__
31183# include <limits.h>
31184#else
31185# include <assert.h>
31186#endif
31187		     Syntax error
31188_ACEOF
31189if ac_fn_cxx_try_cpp "$LINENO"; then :
31190
31191else
31192  # Broken: fails on valid input.
31193continue
31194fi
31195rm -f conftest.err conftest.i conftest.$ac_ext
31196
31197  # OK, works on sane cases.  Now check whether nonexistent headers
31198  # can be detected and how.
31199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31200/* end confdefs.h.  */
31201#include <ac_nonexistent.h>
31202_ACEOF
31203if ac_fn_cxx_try_cpp "$LINENO"; then :
31204  # Broken: success on invalid input.
31205continue
31206else
31207  # Passes both tests.
31208ac_preproc_ok=:
31209break
31210fi
31211rm -f conftest.err conftest.i conftest.$ac_ext
31212
31213done
31214# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31215rm -f conftest.i conftest.err conftest.$ac_ext
31216if $ac_preproc_ok; then :
31217
31218else
31219  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31220$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31221as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31222See \`config.log' for more details" "$LINENO" 5; }
31223fi
31224
31225ac_ext=cpp
31226ac_cpp='$CXXCPP $CPPFLAGS'
31227ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31228ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31229ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31230
31231
31232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31233
31234  # First separate the path from the arguments. This will split at the first
31235  # space.
31236  complete="$CXXCPP"
31237  path="${complete%% *}"
31238  tmp="$complete EOL"
31239  arguments="${tmp#* }"
31240
31241  # Input might be given as Windows format, start by converting to
31242  # unix format.
31243  new_path=`$CYGPATH -u "$path"`
31244
31245  # Now try to locate executable using which
31246  new_path=`$WHICH "$new_path" 2> /dev/null`
31247  # bat and cmd files are not always considered executable in cygwin causing which
31248  # to not find them
31249  if test "x$new_path" = x \
31250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31252    new_path=`$CYGPATH -u "$path"`
31253  fi
31254  if test "x$new_path" = x; then
31255    # Oops. Which didn't find the executable.
31256    # The splitting of arguments from the executable at a space might have been incorrect,
31257    # since paths with space are more likely in Windows. Give it another try with the whole
31258    # argument.
31259    path="$complete"
31260    arguments="EOL"
31261    new_path=`$CYGPATH -u "$path"`
31262    new_path=`$WHICH "$new_path" 2> /dev/null`
31263    # bat and cmd files are not always considered executable in cygwin causing which
31264    # to not find them
31265    if test "x$new_path" = x \
31266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31268      new_path=`$CYGPATH -u "$path"`
31269    fi
31270    if test "x$new_path" = x; then
31271      # It's still not found. Now this is an unrecoverable error.
31272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31273$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31274      has_space=`$ECHO "$complete" | $GREP " "`
31275      if test "x$has_space" != x; then
31276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31278      fi
31279      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31280    fi
31281  fi
31282
31283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31286  # "foo.exe" is OK but "foo" is an error.
31287  #
31288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31289  # It is also a way to make sure we got the proper file name for the real test later on.
31290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31291  if test "x$test_shortpath" = x; then
31292    # Short path failed, file does not exist as specified.
31293    # Try adding .exe or .cmd
31294    if test -f "${new_path}.exe"; then
31295      input_to_shortpath="${new_path}.exe"
31296    elif test -f "${new_path}.cmd"; then
31297      input_to_shortpath="${new_path}.cmd"
31298    else
31299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31300$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31303      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31304    fi
31305  else
31306    input_to_shortpath="$new_path"
31307  fi
31308
31309  # Call helper function which possibly converts this using DOS-style short mode.
31310  # If so, the updated path is stored in $new_path.
31311  new_path="$input_to_shortpath"
31312
31313  input_path="$input_to_shortpath"
31314  # Check if we need to convert this using DOS-style short mode. If the path
31315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31316  # take no chances and rewrite it.
31317  # Note: m4 eats our [], so we need to use [ and ] instead.
31318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31319  if test "x$has_forbidden_chars" != x; then
31320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31324      # Going to short mode and back again did indeed matter. Since short mode is
31325      # case insensitive, let's make it lowercase to improve readability.
31326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31327      # Now convert it back to Unix-stile (cygpath)
31328      input_path=`$CYGPATH -u "$shortmode_path"`
31329      new_path="$input_path"
31330    fi
31331  fi
31332
31333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31334  if test "x$test_cygdrive_prefix" = x; then
31335    # As a simple fix, exclude /usr/bin since it's not a real path.
31336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31338      # a path prefixed by /cygdrive for fixpath to work.
31339      new_path="$CYGWIN_ROOT_PATH$input_path"
31340    fi
31341  fi
31342
31343  # remove trailing .exe if any
31344  new_path="${new_path/%.exe/}"
31345
31346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31347
31348  # First separate the path from the arguments. This will split at the first
31349  # space.
31350  complete="$CXXCPP"
31351  path="${complete%% *}"
31352  tmp="$complete EOL"
31353  arguments="${tmp#* }"
31354
31355  # Input might be given as Windows format, start by converting to
31356  # unix format.
31357  new_path="$path"
31358
31359  windows_path="$new_path"
31360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31361    unix_path=`$CYGPATH -u "$windows_path"`
31362    new_path="$unix_path"
31363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31365    new_path="$unix_path"
31366  fi
31367
31368
31369  # Now try to locate executable using which
31370  new_path=`$WHICH "$new_path" 2> /dev/null`
31371
31372  if test "x$new_path" = x; then
31373    # Oops. Which didn't find the executable.
31374    # The splitting of arguments from the executable at a space might have been incorrect,
31375    # since paths with space are more likely in Windows. Give it another try with the whole
31376    # argument.
31377    path="$complete"
31378    arguments="EOL"
31379    new_path="$path"
31380
31381  windows_path="$new_path"
31382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31383    unix_path=`$CYGPATH -u "$windows_path"`
31384    new_path="$unix_path"
31385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31387    new_path="$unix_path"
31388  fi
31389
31390
31391    new_path=`$WHICH "$new_path" 2> /dev/null`
31392    # bat and cmd files are not always considered executable in MSYS causing which
31393    # to not find them
31394    if test "x$new_path" = x \
31395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31397      new_path="$path"
31398
31399  windows_path="$new_path"
31400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31401    unix_path=`$CYGPATH -u "$windows_path"`
31402    new_path="$unix_path"
31403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31405    new_path="$unix_path"
31406  fi
31407
31408    fi
31409
31410    if test "x$new_path" = x; then
31411      # It's still not found. Now this is an unrecoverable error.
31412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31413$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31414      has_space=`$ECHO "$complete" | $GREP " "`
31415      if test "x$has_space" != x; then
31416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31418      fi
31419      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31420    fi
31421  fi
31422
31423  # Now new_path has a complete unix path to the binary
31424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31425    # Keep paths in /bin as-is, but remove trailing .exe if any
31426    new_path="${new_path/%.exe/}"
31427    # Do not save /bin paths to all_fixpath_prefixes!
31428  else
31429    # Not in mixed or Windows style, start by that.
31430    new_path=`cmd //c echo $new_path`
31431
31432  input_path="$new_path"
31433  # Check if we need to convert this using DOS-style short mode. If the path
31434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31435  # take no chances and rewrite it.
31436  # Note: m4 eats our [], so we need to use [ and ] instead.
31437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31438  if test "x$has_forbidden_chars" != x; then
31439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31441  fi
31442
31443    # Output is in $new_path
31444
31445  windows_path="$new_path"
31446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31447    unix_path=`$CYGPATH -u "$windows_path"`
31448    new_path="$unix_path"
31449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31451    new_path="$unix_path"
31452  fi
31453
31454    # remove trailing .exe if any
31455    new_path="${new_path/%.exe/}"
31456
31457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31459  fi
31460
31461  else
31462    # We're on a unix platform. Hooray! :)
31463    # First separate the path from the arguments. This will split at the first
31464    # space.
31465    complete="$CXXCPP"
31466    path="${complete%% *}"
31467    tmp="$complete EOL"
31468    arguments="${tmp#* }"
31469
31470    # Cannot rely on the command "which" here since it doesn't always work.
31471    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31472    if test -z "$is_absolute_path"; then
31473      # Path to executable is not absolute. Find it.
31474      IFS_save="$IFS"
31475      IFS=:
31476      for p in $PATH; do
31477        if test -f "$p/$path" && test -x "$p/$path"; then
31478          new_path="$p/$path"
31479          break
31480        fi
31481      done
31482      IFS="$IFS_save"
31483    else
31484      # This is an absolute path, we can use it without further modifications.
31485      new_path="$path"
31486    fi
31487
31488    if test "x$new_path" = x; then
31489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31490$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31491      has_space=`$ECHO "$complete" | $GREP " "`
31492      if test "x$has_space" != x; then
31493        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31495      fi
31496      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31497    fi
31498  fi
31499
31500  # Now join together the path and the arguments once again
31501  if test "x$arguments" != xEOL; then
31502    new_complete="$new_path ${arguments% *}"
31503  else
31504    new_complete="$new_path"
31505  fi
31506
31507  if test "x$complete" != "x$new_complete"; then
31508    CXXCPP="$new_complete"
31509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31510$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31511  fi
31512
31513
31514  #
31515  # Setup the linker (LD)
31516  #
31517  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31518    # In the Microsoft toolchain we have a separate LD command "link".
31519    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31520    # a cygwin program for something completely different.
31521    # Extract the first word of "link", so it can be a program name with args.
31522set dummy link; ac_word=$2
31523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31524$as_echo_n "checking for $ac_word... " >&6; }
31525if ${ac_cv_prog_LD+:} false; then :
31526  $as_echo_n "(cached) " >&6
31527else
31528  if test -n "$LD"; then
31529  ac_cv_prog_LD="$LD" # Let the user override the test.
31530else
31531  ac_prog_rejected=no
31532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31533for as_dir in $PATH
31534do
31535  IFS=$as_save_IFS
31536  test -z "$as_dir" && as_dir=.
31537    for ac_exec_ext in '' $ac_executable_extensions; do
31538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31539    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31540       ac_prog_rejected=yes
31541       continue
31542     fi
31543    ac_cv_prog_LD="link"
31544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31545    break 2
31546  fi
31547done
31548  done
31549IFS=$as_save_IFS
31550
31551if test $ac_prog_rejected = yes; then
31552  # We found a bogon in the path, so make sure we never use it.
31553  set dummy $ac_cv_prog_LD
31554  shift
31555  if test $# != 0; then
31556    # We chose a different compiler from the bogus one.
31557    # However, it has the same basename, so the bogon will be chosen
31558    # first if we set LD to just the basename; use the full file name.
31559    shift
31560    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31561  fi
31562fi
31563fi
31564fi
31565LD=$ac_cv_prog_LD
31566if test -n "$LD"; then
31567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31568$as_echo "$LD" >&6; }
31569else
31570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31571$as_echo "no" >&6; }
31572fi
31573
31574
31575
31576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31577
31578  # First separate the path from the arguments. This will split at the first
31579  # space.
31580  complete="$LD"
31581  path="${complete%% *}"
31582  tmp="$complete EOL"
31583  arguments="${tmp#* }"
31584
31585  # Input might be given as Windows format, start by converting to
31586  # unix format.
31587  new_path=`$CYGPATH -u "$path"`
31588
31589  # Now try to locate executable using which
31590  new_path=`$WHICH "$new_path" 2> /dev/null`
31591  # bat and cmd files are not always considered executable in cygwin causing which
31592  # to not find them
31593  if test "x$new_path" = x \
31594      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31595      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31596    new_path=`$CYGPATH -u "$path"`
31597  fi
31598  if test "x$new_path" = x; then
31599    # Oops. Which didn't find the executable.
31600    # The splitting of arguments from the executable at a space might have been incorrect,
31601    # since paths with space are more likely in Windows. Give it another try with the whole
31602    # argument.
31603    path="$complete"
31604    arguments="EOL"
31605    new_path=`$CYGPATH -u "$path"`
31606    new_path=`$WHICH "$new_path" 2> /dev/null`
31607    # bat and cmd files are not always considered executable in cygwin causing which
31608    # to not find them
31609    if test "x$new_path" = x \
31610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31612      new_path=`$CYGPATH -u "$path"`
31613    fi
31614    if test "x$new_path" = x; then
31615      # It's still not found. Now this is an unrecoverable error.
31616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31617$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31618      has_space=`$ECHO "$complete" | $GREP " "`
31619      if test "x$has_space" != x; then
31620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31622      fi
31623      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31624    fi
31625  fi
31626
31627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31630  # "foo.exe" is OK but "foo" is an error.
31631  #
31632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31633  # It is also a way to make sure we got the proper file name for the real test later on.
31634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31635  if test "x$test_shortpath" = x; then
31636    # Short path failed, file does not exist as specified.
31637    # Try adding .exe or .cmd
31638    if test -f "${new_path}.exe"; then
31639      input_to_shortpath="${new_path}.exe"
31640    elif test -f "${new_path}.cmd"; then
31641      input_to_shortpath="${new_path}.cmd"
31642    else
31643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31644$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31647      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31648    fi
31649  else
31650    input_to_shortpath="$new_path"
31651  fi
31652
31653  # Call helper function which possibly converts this using DOS-style short mode.
31654  # If so, the updated path is stored in $new_path.
31655  new_path="$input_to_shortpath"
31656
31657  input_path="$input_to_shortpath"
31658  # Check if we need to convert this using DOS-style short mode. If the path
31659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31660  # take no chances and rewrite it.
31661  # Note: m4 eats our [], so we need to use [ and ] instead.
31662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31663  if test "x$has_forbidden_chars" != x; then
31664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31668      # Going to short mode and back again did indeed matter. Since short mode is
31669      # case insensitive, let's make it lowercase to improve readability.
31670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31671      # Now convert it back to Unix-stile (cygpath)
31672      input_path=`$CYGPATH -u "$shortmode_path"`
31673      new_path="$input_path"
31674    fi
31675  fi
31676
31677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31678  if test "x$test_cygdrive_prefix" = x; then
31679    # As a simple fix, exclude /usr/bin since it's not a real path.
31680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31682      # a path prefixed by /cygdrive for fixpath to work.
31683      new_path="$CYGWIN_ROOT_PATH$input_path"
31684    fi
31685  fi
31686
31687  # remove trailing .exe if any
31688  new_path="${new_path/%.exe/}"
31689
31690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31691
31692  # First separate the path from the arguments. This will split at the first
31693  # space.
31694  complete="$LD"
31695  path="${complete%% *}"
31696  tmp="$complete EOL"
31697  arguments="${tmp#* }"
31698
31699  # Input might be given as Windows format, start by converting to
31700  # unix format.
31701  new_path="$path"
31702
31703  windows_path="$new_path"
31704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31705    unix_path=`$CYGPATH -u "$windows_path"`
31706    new_path="$unix_path"
31707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31709    new_path="$unix_path"
31710  fi
31711
31712
31713  # Now try to locate executable using which
31714  new_path=`$WHICH "$new_path" 2> /dev/null`
31715
31716  if test "x$new_path" = x; then
31717    # Oops. Which didn't find the executable.
31718    # The splitting of arguments from the executable at a space might have been incorrect,
31719    # since paths with space are more likely in Windows. Give it another try with the whole
31720    # argument.
31721    path="$complete"
31722    arguments="EOL"
31723    new_path="$path"
31724
31725  windows_path="$new_path"
31726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31727    unix_path=`$CYGPATH -u "$windows_path"`
31728    new_path="$unix_path"
31729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31731    new_path="$unix_path"
31732  fi
31733
31734
31735    new_path=`$WHICH "$new_path" 2> /dev/null`
31736    # bat and cmd files are not always considered executable in MSYS causing which
31737    # to not find them
31738    if test "x$new_path" = x \
31739        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31740        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31741      new_path="$path"
31742
31743  windows_path="$new_path"
31744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31745    unix_path=`$CYGPATH -u "$windows_path"`
31746    new_path="$unix_path"
31747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31749    new_path="$unix_path"
31750  fi
31751
31752    fi
31753
31754    if test "x$new_path" = x; then
31755      # It's still not found. Now this is an unrecoverable error.
31756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31757$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31758      has_space=`$ECHO "$complete" | $GREP " "`
31759      if test "x$has_space" != x; then
31760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31762      fi
31763      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31764    fi
31765  fi
31766
31767  # Now new_path has a complete unix path to the binary
31768  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31769    # Keep paths in /bin as-is, but remove trailing .exe if any
31770    new_path="${new_path/%.exe/}"
31771    # Do not save /bin paths to all_fixpath_prefixes!
31772  else
31773    # Not in mixed or Windows style, start by that.
31774    new_path=`cmd //c echo $new_path`
31775
31776  input_path="$new_path"
31777  # Check if we need to convert this using DOS-style short mode. If the path
31778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31779  # take no chances and rewrite it.
31780  # Note: m4 eats our [], so we need to use [ and ] instead.
31781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31782  if test "x$has_forbidden_chars" != x; then
31783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31785  fi
31786
31787    # Output is in $new_path
31788
31789  windows_path="$new_path"
31790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31791    unix_path=`$CYGPATH -u "$windows_path"`
31792    new_path="$unix_path"
31793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31795    new_path="$unix_path"
31796  fi
31797
31798    # remove trailing .exe if any
31799    new_path="${new_path/%.exe/}"
31800
31801    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31802    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31803  fi
31804
31805  else
31806    # We're on a unix platform. Hooray! :)
31807    # First separate the path from the arguments. This will split at the first
31808    # space.
31809    complete="$LD"
31810    path="${complete%% *}"
31811    tmp="$complete EOL"
31812    arguments="${tmp#* }"
31813
31814    # Cannot rely on the command "which" here since it doesn't always work.
31815    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31816    if test -z "$is_absolute_path"; then
31817      # Path to executable is not absolute. Find it.
31818      IFS_save="$IFS"
31819      IFS=:
31820      for p in $PATH; do
31821        if test -f "$p/$path" && test -x "$p/$path"; then
31822          new_path="$p/$path"
31823          break
31824        fi
31825      done
31826      IFS="$IFS_save"
31827    else
31828      # This is an absolute path, we can use it without further modifications.
31829      new_path="$path"
31830    fi
31831
31832    if test "x$new_path" = x; then
31833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31834$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31835      has_space=`$ECHO "$complete" | $GREP " "`
31836      if test "x$has_space" != x; then
31837        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31838$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31839      fi
31840      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31841    fi
31842  fi
31843
31844  # Now join together the path and the arguments once again
31845  if test "x$arguments" != xEOL; then
31846    new_complete="$new_path ${arguments% *}"
31847  else
31848    new_complete="$new_path"
31849  fi
31850
31851  if test "x$complete" != "x$new_complete"; then
31852    LD="$new_complete"
31853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31854$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31855  fi
31856
31857    # Verify that we indeed succeeded with this trick.
31858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31859$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31860    "$LD" --version > /dev/null
31861    if test $? -eq 0 ; then
31862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31863$as_echo "no" >&6; }
31864      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31865    else
31866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31867$as_echo "yes" >&6; }
31868    fi
31869    LDCXX="$LD"
31870  else
31871    # All other toolchains use the compiler to link.
31872    LD="$CC"
31873    LDCXX="$CXX"
31874  fi
31875
31876  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31877
31878
31879  #
31880  # Setup the assembler (AS)
31881  #
31882  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31883    # FIXME: should this really be solaris, or solstudio?
31884
31885
31886  # Publish this variable in the help.
31887
31888
31889  if test "x$AS" = x; then
31890    # The variable is not set by user, try to locate tool using the code snippet
31891    for ac_prog in as
31892do
31893  # Extract the first word of "$ac_prog", so it can be a program name with args.
31894set dummy $ac_prog; ac_word=$2
31895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31896$as_echo_n "checking for $ac_word... " >&6; }
31897if ${ac_cv_path_AS+:} false; then :
31898  $as_echo_n "(cached) " >&6
31899else
31900  case $AS in
31901  [\\/]* | ?:[\\/]*)
31902  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31903  ;;
31904  *)
31905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31906for as_dir in $PATH
31907do
31908  IFS=$as_save_IFS
31909  test -z "$as_dir" && as_dir=.
31910    for ac_exec_ext in '' $ac_executable_extensions; do
31911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31912    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31914    break 2
31915  fi
31916done
31917  done
31918IFS=$as_save_IFS
31919
31920  ;;
31921esac
31922fi
31923AS=$ac_cv_path_AS
31924if test -n "$AS"; then
31925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31926$as_echo "$AS" >&6; }
31927else
31928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31929$as_echo "no" >&6; }
31930fi
31931
31932
31933  test -n "$AS" && break
31934done
31935
31936  else
31937    # The variable is set, but is it from the command line or the environment?
31938
31939    # Try to remove the string !AS! from our list.
31940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31942      # If it failed, the variable was not from the command line. Ignore it,
31943      # but warn the user (except for BASH, which is always set by the calling BASH).
31944      if test "xAS" != xBASH; then
31945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31946$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31947      fi
31948      # Try to locate tool using the code snippet
31949      for ac_prog in as
31950do
31951  # Extract the first word of "$ac_prog", so it can be a program name with args.
31952set dummy $ac_prog; ac_word=$2
31953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31954$as_echo_n "checking for $ac_word... " >&6; }
31955if ${ac_cv_path_AS+:} false; then :
31956  $as_echo_n "(cached) " >&6
31957else
31958  case $AS in
31959  [\\/]* | ?:[\\/]*)
31960  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31961  ;;
31962  *)
31963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31964for as_dir in $PATH
31965do
31966  IFS=$as_save_IFS
31967  test -z "$as_dir" && as_dir=.
31968    for ac_exec_ext in '' $ac_executable_extensions; do
31969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31970    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31972    break 2
31973  fi
31974done
31975  done
31976IFS=$as_save_IFS
31977
31978  ;;
31979esac
31980fi
31981AS=$ac_cv_path_AS
31982if test -n "$AS"; then
31983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31984$as_echo "$AS" >&6; }
31985else
31986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31987$as_echo "no" >&6; }
31988fi
31989
31990
31991  test -n "$AS" && break
31992done
31993
31994    else
31995      # If it succeeded, then it was overridden by the user. We will use it
31996      # for the tool.
31997
31998      # First remove it from the list of overridden variables, so we can test
31999      # for unknown variables in the end.
32000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32001
32002      # Check if the provided tool contains a complete path.
32003      tool_specified="$AS"
32004      tool_basename="${tool_specified##*/}"
32005      if test "x$tool_basename" = "x$tool_specified"; then
32006        # A command without a complete path is provided, search $PATH.
32007        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32008$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32009        # Extract the first word of "$tool_basename", so it can be a program name with args.
32010set dummy $tool_basename; ac_word=$2
32011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32012$as_echo_n "checking for $ac_word... " >&6; }
32013if ${ac_cv_path_AS+:} false; then :
32014  $as_echo_n "(cached) " >&6
32015else
32016  case $AS in
32017  [\\/]* | ?:[\\/]*)
32018  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32019  ;;
32020  *)
32021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32022for as_dir in $PATH
32023do
32024  IFS=$as_save_IFS
32025  test -z "$as_dir" && as_dir=.
32026    for ac_exec_ext in '' $ac_executable_extensions; do
32027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32028    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32030    break 2
32031  fi
32032done
32033  done
32034IFS=$as_save_IFS
32035
32036  ;;
32037esac
32038fi
32039AS=$ac_cv_path_AS
32040if test -n "$AS"; then
32041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32042$as_echo "$AS" >&6; }
32043else
32044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32045$as_echo "no" >&6; }
32046fi
32047
32048
32049        if test "x$AS" = x; then
32050          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32051        fi
32052      else
32053        # Otherwise we believe it is a complete path. Use it as it is.
32054        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32055$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32057$as_echo_n "checking for AS... " >&6; }
32058        if test ! -x "$tool_specified"; then
32059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32060$as_echo "not found" >&6; }
32061          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32062        fi
32063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32064$as_echo "$tool_specified" >&6; }
32065      fi
32066    fi
32067  fi
32068
32069
32070
32071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32072
32073  # First separate the path from the arguments. This will split at the first
32074  # space.
32075  complete="$AS"
32076  path="${complete%% *}"
32077  tmp="$complete EOL"
32078  arguments="${tmp#* }"
32079
32080  # Input might be given as Windows format, start by converting to
32081  # unix format.
32082  new_path=`$CYGPATH -u "$path"`
32083
32084  # Now try to locate executable using which
32085  new_path=`$WHICH "$new_path" 2> /dev/null`
32086  # bat and cmd files are not always considered executable in cygwin causing which
32087  # to not find them
32088  if test "x$new_path" = x \
32089      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32090      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32091    new_path=`$CYGPATH -u "$path"`
32092  fi
32093  if test "x$new_path" = x; then
32094    # Oops. Which didn't find the executable.
32095    # The splitting of arguments from the executable at a space might have been incorrect,
32096    # since paths with space are more likely in Windows. Give it another try with the whole
32097    # argument.
32098    path="$complete"
32099    arguments="EOL"
32100    new_path=`$CYGPATH -u "$path"`
32101    new_path=`$WHICH "$new_path" 2> /dev/null`
32102    # bat and cmd files are not always considered executable in cygwin causing which
32103    # to not find them
32104    if test "x$new_path" = x \
32105        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32106        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32107      new_path=`$CYGPATH -u "$path"`
32108    fi
32109    if test "x$new_path" = x; then
32110      # It's still not found. Now this is an unrecoverable error.
32111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32112$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32113      has_space=`$ECHO "$complete" | $GREP " "`
32114      if test "x$has_space" != x; then
32115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32117      fi
32118      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32119    fi
32120  fi
32121
32122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32125  # "foo.exe" is OK but "foo" is an error.
32126  #
32127  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32128  # It is also a way to make sure we got the proper file name for the real test later on.
32129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32130  if test "x$test_shortpath" = x; then
32131    # Short path failed, file does not exist as specified.
32132    # Try adding .exe or .cmd
32133    if test -f "${new_path}.exe"; then
32134      input_to_shortpath="${new_path}.exe"
32135    elif test -f "${new_path}.cmd"; then
32136      input_to_shortpath="${new_path}.cmd"
32137    else
32138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32139$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32140      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32141$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32142      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32143    fi
32144  else
32145    input_to_shortpath="$new_path"
32146  fi
32147
32148  # Call helper function which possibly converts this using DOS-style short mode.
32149  # If so, the updated path is stored in $new_path.
32150  new_path="$input_to_shortpath"
32151
32152  input_path="$input_to_shortpath"
32153  # Check if we need to convert this using DOS-style short mode. If the path
32154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32155  # take no chances and rewrite it.
32156  # Note: m4 eats our [], so we need to use [ and ] instead.
32157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32158  if test "x$has_forbidden_chars" != x; then
32159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32160    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32161    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32162    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32163      # Going to short mode and back again did indeed matter. Since short mode is
32164      # case insensitive, let's make it lowercase to improve readability.
32165      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32166      # Now convert it back to Unix-stile (cygpath)
32167      input_path=`$CYGPATH -u "$shortmode_path"`
32168      new_path="$input_path"
32169    fi
32170  fi
32171
32172  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32173  if test "x$test_cygdrive_prefix" = x; then
32174    # As a simple fix, exclude /usr/bin since it's not a real path.
32175    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32176      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32177      # a path prefixed by /cygdrive for fixpath to work.
32178      new_path="$CYGWIN_ROOT_PATH$input_path"
32179    fi
32180  fi
32181
32182  # remove trailing .exe if any
32183  new_path="${new_path/%.exe/}"
32184
32185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32186
32187  # First separate the path from the arguments. This will split at the first
32188  # space.
32189  complete="$AS"
32190  path="${complete%% *}"
32191  tmp="$complete EOL"
32192  arguments="${tmp#* }"
32193
32194  # Input might be given as Windows format, start by converting to
32195  # unix format.
32196  new_path="$path"
32197
32198  windows_path="$new_path"
32199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32200    unix_path=`$CYGPATH -u "$windows_path"`
32201    new_path="$unix_path"
32202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32204    new_path="$unix_path"
32205  fi
32206
32207
32208  # Now try to locate executable using which
32209  new_path=`$WHICH "$new_path" 2> /dev/null`
32210
32211  if test "x$new_path" = x; then
32212    # Oops. Which didn't find the executable.
32213    # The splitting of arguments from the executable at a space might have been incorrect,
32214    # since paths with space are more likely in Windows. Give it another try with the whole
32215    # argument.
32216    path="$complete"
32217    arguments="EOL"
32218    new_path="$path"
32219
32220  windows_path="$new_path"
32221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32222    unix_path=`$CYGPATH -u "$windows_path"`
32223    new_path="$unix_path"
32224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32226    new_path="$unix_path"
32227  fi
32228
32229
32230    new_path=`$WHICH "$new_path" 2> /dev/null`
32231    # bat and cmd files are not always considered executable in MSYS causing which
32232    # to not find them
32233    if test "x$new_path" = x \
32234        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32235        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32236      new_path="$path"
32237
32238  windows_path="$new_path"
32239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32240    unix_path=`$CYGPATH -u "$windows_path"`
32241    new_path="$unix_path"
32242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32244    new_path="$unix_path"
32245  fi
32246
32247    fi
32248
32249    if test "x$new_path" = x; then
32250      # It's still not found. Now this is an unrecoverable error.
32251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32252$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32253      has_space=`$ECHO "$complete" | $GREP " "`
32254      if test "x$has_space" != x; then
32255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32257      fi
32258      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32259    fi
32260  fi
32261
32262  # Now new_path has a complete unix path to the binary
32263  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32264    # Keep paths in /bin as-is, but remove trailing .exe if any
32265    new_path="${new_path/%.exe/}"
32266    # Do not save /bin paths to all_fixpath_prefixes!
32267  else
32268    # Not in mixed or Windows style, start by that.
32269    new_path=`cmd //c echo $new_path`
32270
32271  input_path="$new_path"
32272  # Check if we need to convert this using DOS-style short mode. If the path
32273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32274  # take no chances and rewrite it.
32275  # Note: m4 eats our [], so we need to use [ and ] instead.
32276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32277  if test "x$has_forbidden_chars" != x; then
32278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32280  fi
32281
32282    # Output is in $new_path
32283
32284  windows_path="$new_path"
32285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32286    unix_path=`$CYGPATH -u "$windows_path"`
32287    new_path="$unix_path"
32288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32290    new_path="$unix_path"
32291  fi
32292
32293    # remove trailing .exe if any
32294    new_path="${new_path/%.exe/}"
32295
32296    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32297    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32298  fi
32299
32300  else
32301    # We're on a unix platform. Hooray! :)
32302    # First separate the path from the arguments. This will split at the first
32303    # space.
32304    complete="$AS"
32305    path="${complete%% *}"
32306    tmp="$complete EOL"
32307    arguments="${tmp#* }"
32308
32309    # Cannot rely on the command "which" here since it doesn't always work.
32310    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32311    if test -z "$is_absolute_path"; then
32312      # Path to executable is not absolute. Find it.
32313      IFS_save="$IFS"
32314      IFS=:
32315      for p in $PATH; do
32316        if test -f "$p/$path" && test -x "$p/$path"; then
32317          new_path="$p/$path"
32318          break
32319        fi
32320      done
32321      IFS="$IFS_save"
32322    else
32323      # This is an absolute path, we can use it without further modifications.
32324      new_path="$path"
32325    fi
32326
32327    if test "x$new_path" = x; then
32328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32329$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32330      has_space=`$ECHO "$complete" | $GREP " "`
32331      if test "x$has_space" != x; then
32332        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32333$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32334      fi
32335      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32336    fi
32337  fi
32338
32339  # Now join together the path and the arguments once again
32340  if test "x$arguments" != xEOL; then
32341    new_complete="$new_path ${arguments% *}"
32342  else
32343    new_complete="$new_path"
32344  fi
32345
32346  if test "x$complete" != "x$new_complete"; then
32347    AS="$new_complete"
32348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32349$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32350  fi
32351
32352  else
32353    # FIXME: is this correct for microsoft?
32354    AS="$CC -c"
32355  fi
32356
32357
32358  #
32359  # Setup the archiver (AR)
32360  #
32361  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32362    # The corresponding ar tool is lib.exe (used to create static libraries)
32363    # Extract the first word of "lib", so it can be a program name with args.
32364set dummy lib; ac_word=$2
32365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32366$as_echo_n "checking for $ac_word... " >&6; }
32367if ${ac_cv_prog_AR+:} false; then :
32368  $as_echo_n "(cached) " >&6
32369else
32370  if test -n "$AR"; then
32371  ac_cv_prog_AR="$AR" # Let the user override the test.
32372else
32373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32374for as_dir in $PATH
32375do
32376  IFS=$as_save_IFS
32377  test -z "$as_dir" && as_dir=.
32378    for ac_exec_ext in '' $ac_executable_extensions; do
32379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32380    ac_cv_prog_AR="lib"
32381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32382    break 2
32383  fi
32384done
32385  done
32386IFS=$as_save_IFS
32387
32388fi
32389fi
32390AR=$ac_cv_prog_AR
32391if test -n "$AR"; then
32392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32393$as_echo "$AR" >&6; }
32394else
32395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32396$as_echo "no" >&6; }
32397fi
32398
32399
32400  else
32401
32402
32403  # Publish this variable in the help.
32404
32405
32406  if test "x$AR" = x; then
32407    # The variable is not set by user, try to locate tool using the code snippet
32408    if test -n "$ac_tool_prefix"; then
32409  for ac_prog in ar
32410  do
32411    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32412set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32414$as_echo_n "checking for $ac_word... " >&6; }
32415if ${ac_cv_prog_AR+:} false; then :
32416  $as_echo_n "(cached) " >&6
32417else
32418  if test -n "$AR"; then
32419  ac_cv_prog_AR="$AR" # Let the user override the test.
32420else
32421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32422for as_dir in $PATH
32423do
32424  IFS=$as_save_IFS
32425  test -z "$as_dir" && as_dir=.
32426    for ac_exec_ext in '' $ac_executable_extensions; do
32427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32428    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32430    break 2
32431  fi
32432done
32433  done
32434IFS=$as_save_IFS
32435
32436fi
32437fi
32438AR=$ac_cv_prog_AR
32439if test -n "$AR"; then
32440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32441$as_echo "$AR" >&6; }
32442else
32443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32444$as_echo "no" >&6; }
32445fi
32446
32447
32448    test -n "$AR" && break
32449  done
32450fi
32451if test -z "$AR"; then
32452  ac_ct_AR=$AR
32453  for ac_prog in ar
32454do
32455  # Extract the first word of "$ac_prog", so it can be a program name with args.
32456set dummy $ac_prog; ac_word=$2
32457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32458$as_echo_n "checking for $ac_word... " >&6; }
32459if ${ac_cv_prog_ac_ct_AR+:} false; then :
32460  $as_echo_n "(cached) " >&6
32461else
32462  if test -n "$ac_ct_AR"; then
32463  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32464else
32465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32466for as_dir in $PATH
32467do
32468  IFS=$as_save_IFS
32469  test -z "$as_dir" && as_dir=.
32470    for ac_exec_ext in '' $ac_executable_extensions; do
32471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32472    ac_cv_prog_ac_ct_AR="$ac_prog"
32473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32474    break 2
32475  fi
32476done
32477  done
32478IFS=$as_save_IFS
32479
32480fi
32481fi
32482ac_ct_AR=$ac_cv_prog_ac_ct_AR
32483if test -n "$ac_ct_AR"; then
32484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32485$as_echo "$ac_ct_AR" >&6; }
32486else
32487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32488$as_echo "no" >&6; }
32489fi
32490
32491
32492  test -n "$ac_ct_AR" && break
32493done
32494
32495  if test "x$ac_ct_AR" = x; then
32496    AR=""
32497  else
32498    case $cross_compiling:$ac_tool_warned in
32499yes:)
32500{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32502ac_tool_warned=yes ;;
32503esac
32504    AR=$ac_ct_AR
32505  fi
32506fi
32507
32508  else
32509    # The variable is set, but is it from the command line or the environment?
32510
32511    # Try to remove the string !AR! from our list.
32512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32514      # If it failed, the variable was not from the command line. Ignore it,
32515      # but warn the user (except for BASH, which is always set by the calling BASH).
32516      if test "xAR" != xBASH; then
32517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32518$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32519      fi
32520      # Try to locate tool using the code snippet
32521      if test -n "$ac_tool_prefix"; then
32522  for ac_prog in ar
32523  do
32524    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32525set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32527$as_echo_n "checking for $ac_word... " >&6; }
32528if ${ac_cv_prog_AR+:} false; then :
32529  $as_echo_n "(cached) " >&6
32530else
32531  if test -n "$AR"; then
32532  ac_cv_prog_AR="$AR" # Let the user override the test.
32533else
32534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32535for as_dir in $PATH
32536do
32537  IFS=$as_save_IFS
32538  test -z "$as_dir" && as_dir=.
32539    for ac_exec_ext in '' $ac_executable_extensions; do
32540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32541    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32543    break 2
32544  fi
32545done
32546  done
32547IFS=$as_save_IFS
32548
32549fi
32550fi
32551AR=$ac_cv_prog_AR
32552if test -n "$AR"; then
32553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32554$as_echo "$AR" >&6; }
32555else
32556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32557$as_echo "no" >&6; }
32558fi
32559
32560
32561    test -n "$AR" && break
32562  done
32563fi
32564if test -z "$AR"; then
32565  ac_ct_AR=$AR
32566  for ac_prog in ar
32567do
32568  # Extract the first word of "$ac_prog", so it can be a program name with args.
32569set dummy $ac_prog; ac_word=$2
32570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32571$as_echo_n "checking for $ac_word... " >&6; }
32572if ${ac_cv_prog_ac_ct_AR+:} false; then :
32573  $as_echo_n "(cached) " >&6
32574else
32575  if test -n "$ac_ct_AR"; then
32576  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32577else
32578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32579for as_dir in $PATH
32580do
32581  IFS=$as_save_IFS
32582  test -z "$as_dir" && as_dir=.
32583    for ac_exec_ext in '' $ac_executable_extensions; do
32584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32585    ac_cv_prog_ac_ct_AR="$ac_prog"
32586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32587    break 2
32588  fi
32589done
32590  done
32591IFS=$as_save_IFS
32592
32593fi
32594fi
32595ac_ct_AR=$ac_cv_prog_ac_ct_AR
32596if test -n "$ac_ct_AR"; then
32597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32598$as_echo "$ac_ct_AR" >&6; }
32599else
32600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32601$as_echo "no" >&6; }
32602fi
32603
32604
32605  test -n "$ac_ct_AR" && break
32606done
32607
32608  if test "x$ac_ct_AR" = x; then
32609    AR=""
32610  else
32611    case $cross_compiling:$ac_tool_warned in
32612yes:)
32613{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32614$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32615ac_tool_warned=yes ;;
32616esac
32617    AR=$ac_ct_AR
32618  fi
32619fi
32620
32621    else
32622      # If it succeeded, then it was overridden by the user. We will use it
32623      # for the tool.
32624
32625      # First remove it from the list of overridden variables, so we can test
32626      # for unknown variables in the end.
32627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32628
32629      # Check if the provided tool contains a complete path.
32630      tool_specified="$AR"
32631      tool_basename="${tool_specified##*/}"
32632      if test "x$tool_basename" = "x$tool_specified"; then
32633        # A command without a complete path is provided, search $PATH.
32634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32635$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32636        # Extract the first word of "$tool_basename", so it can be a program name with args.
32637set dummy $tool_basename; ac_word=$2
32638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32639$as_echo_n "checking for $ac_word... " >&6; }
32640if ${ac_cv_path_AR+:} false; then :
32641  $as_echo_n "(cached) " >&6
32642else
32643  case $AR in
32644  [\\/]* | ?:[\\/]*)
32645  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32646  ;;
32647  *)
32648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32649for as_dir in $PATH
32650do
32651  IFS=$as_save_IFS
32652  test -z "$as_dir" && as_dir=.
32653    for ac_exec_ext in '' $ac_executable_extensions; do
32654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32655    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32657    break 2
32658  fi
32659done
32660  done
32661IFS=$as_save_IFS
32662
32663  ;;
32664esac
32665fi
32666AR=$ac_cv_path_AR
32667if test -n "$AR"; then
32668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32669$as_echo "$AR" >&6; }
32670else
32671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32672$as_echo "no" >&6; }
32673fi
32674
32675
32676        if test "x$AR" = x; then
32677          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32678        fi
32679      else
32680        # Otherwise we believe it is a complete path. Use it as it is.
32681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32682$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32684$as_echo_n "checking for AR... " >&6; }
32685        if test ! -x "$tool_specified"; then
32686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32687$as_echo "not found" >&6; }
32688          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32689        fi
32690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32691$as_echo "$tool_specified" >&6; }
32692      fi
32693    fi
32694  fi
32695
32696
32697  fi
32698
32699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32700
32701  # First separate the path from the arguments. This will split at the first
32702  # space.
32703  complete="$AR"
32704  path="${complete%% *}"
32705  tmp="$complete EOL"
32706  arguments="${tmp#* }"
32707
32708  # Input might be given as Windows format, start by converting to
32709  # unix format.
32710  new_path=`$CYGPATH -u "$path"`
32711
32712  # Now try to locate executable using which
32713  new_path=`$WHICH "$new_path" 2> /dev/null`
32714  # bat and cmd files are not always considered executable in cygwin causing which
32715  # to not find them
32716  if test "x$new_path" = x \
32717      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32718      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32719    new_path=`$CYGPATH -u "$path"`
32720  fi
32721  if test "x$new_path" = x; then
32722    # Oops. Which didn't find the executable.
32723    # The splitting of arguments from the executable at a space might have been incorrect,
32724    # since paths with space are more likely in Windows. Give it another try with the whole
32725    # argument.
32726    path="$complete"
32727    arguments="EOL"
32728    new_path=`$CYGPATH -u "$path"`
32729    new_path=`$WHICH "$new_path" 2> /dev/null`
32730    # bat and cmd files are not always considered executable in cygwin causing which
32731    # to not find them
32732    if test "x$new_path" = x \
32733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32735      new_path=`$CYGPATH -u "$path"`
32736    fi
32737    if test "x$new_path" = x; then
32738      # It's still not found. Now this is an unrecoverable error.
32739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32740$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32741      has_space=`$ECHO "$complete" | $GREP " "`
32742      if test "x$has_space" != x; then
32743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32745      fi
32746      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32747    fi
32748  fi
32749
32750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32753  # "foo.exe" is OK but "foo" is an error.
32754  #
32755  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32756  # It is also a way to make sure we got the proper file name for the real test later on.
32757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32758  if test "x$test_shortpath" = x; then
32759    # Short path failed, file does not exist as specified.
32760    # Try adding .exe or .cmd
32761    if test -f "${new_path}.exe"; then
32762      input_to_shortpath="${new_path}.exe"
32763    elif test -f "${new_path}.cmd"; then
32764      input_to_shortpath="${new_path}.cmd"
32765    else
32766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32767$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32770      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32771    fi
32772  else
32773    input_to_shortpath="$new_path"
32774  fi
32775
32776  # Call helper function which possibly converts this using DOS-style short mode.
32777  # If so, the updated path is stored in $new_path.
32778  new_path="$input_to_shortpath"
32779
32780  input_path="$input_to_shortpath"
32781  # Check if we need to convert this using DOS-style short mode. If the path
32782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32783  # take no chances and rewrite it.
32784  # Note: m4 eats our [], so we need to use [ and ] instead.
32785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32786  if test "x$has_forbidden_chars" != x; then
32787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32791      # Going to short mode and back again did indeed matter. Since short mode is
32792      # case insensitive, let's make it lowercase to improve readability.
32793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32794      # Now convert it back to Unix-stile (cygpath)
32795      input_path=`$CYGPATH -u "$shortmode_path"`
32796      new_path="$input_path"
32797    fi
32798  fi
32799
32800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32801  if test "x$test_cygdrive_prefix" = x; then
32802    # As a simple fix, exclude /usr/bin since it's not a real path.
32803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32805      # a path prefixed by /cygdrive for fixpath to work.
32806      new_path="$CYGWIN_ROOT_PATH$input_path"
32807    fi
32808  fi
32809
32810  # remove trailing .exe if any
32811  new_path="${new_path/%.exe/}"
32812
32813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32814
32815  # First separate the path from the arguments. This will split at the first
32816  # space.
32817  complete="$AR"
32818  path="${complete%% *}"
32819  tmp="$complete EOL"
32820  arguments="${tmp#* }"
32821
32822  # Input might be given as Windows format, start by converting to
32823  # unix format.
32824  new_path="$path"
32825
32826  windows_path="$new_path"
32827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32828    unix_path=`$CYGPATH -u "$windows_path"`
32829    new_path="$unix_path"
32830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32832    new_path="$unix_path"
32833  fi
32834
32835
32836  # Now try to locate executable using which
32837  new_path=`$WHICH "$new_path" 2> /dev/null`
32838
32839  if test "x$new_path" = x; then
32840    # Oops. Which didn't find the executable.
32841    # The splitting of arguments from the executable at a space might have been incorrect,
32842    # since paths with space are more likely in Windows. Give it another try with the whole
32843    # argument.
32844    path="$complete"
32845    arguments="EOL"
32846    new_path="$path"
32847
32848  windows_path="$new_path"
32849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32850    unix_path=`$CYGPATH -u "$windows_path"`
32851    new_path="$unix_path"
32852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32854    new_path="$unix_path"
32855  fi
32856
32857
32858    new_path=`$WHICH "$new_path" 2> /dev/null`
32859    # bat and cmd files are not always considered executable in MSYS causing which
32860    # to not find them
32861    if test "x$new_path" = x \
32862        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32863        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32864      new_path="$path"
32865
32866  windows_path="$new_path"
32867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32868    unix_path=`$CYGPATH -u "$windows_path"`
32869    new_path="$unix_path"
32870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32872    new_path="$unix_path"
32873  fi
32874
32875    fi
32876
32877    if test "x$new_path" = x; then
32878      # It's still not found. Now this is an unrecoverable error.
32879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32880$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32881      has_space=`$ECHO "$complete" | $GREP " "`
32882      if test "x$has_space" != x; then
32883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32885      fi
32886      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32887    fi
32888  fi
32889
32890  # Now new_path has a complete unix path to the binary
32891  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32892    # Keep paths in /bin as-is, but remove trailing .exe if any
32893    new_path="${new_path/%.exe/}"
32894    # Do not save /bin paths to all_fixpath_prefixes!
32895  else
32896    # Not in mixed or Windows style, start by that.
32897    new_path=`cmd //c echo $new_path`
32898
32899  input_path="$new_path"
32900  # Check if we need to convert this using DOS-style short mode. If the path
32901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32902  # take no chances and rewrite it.
32903  # Note: m4 eats our [], so we need to use [ and ] instead.
32904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32905  if test "x$has_forbidden_chars" != x; then
32906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32908  fi
32909
32910    # Output is in $new_path
32911
32912  windows_path="$new_path"
32913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32914    unix_path=`$CYGPATH -u "$windows_path"`
32915    new_path="$unix_path"
32916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32918    new_path="$unix_path"
32919  fi
32920
32921    # remove trailing .exe if any
32922    new_path="${new_path/%.exe/}"
32923
32924    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32925    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32926  fi
32927
32928  else
32929    # We're on a unix platform. Hooray! :)
32930    # First separate the path from the arguments. This will split at the first
32931    # space.
32932    complete="$AR"
32933    path="${complete%% *}"
32934    tmp="$complete EOL"
32935    arguments="${tmp#* }"
32936
32937    # Cannot rely on the command "which" here since it doesn't always work.
32938    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32939    if test -z "$is_absolute_path"; then
32940      # Path to executable is not absolute. Find it.
32941      IFS_save="$IFS"
32942      IFS=:
32943      for p in $PATH; do
32944        if test -f "$p/$path" && test -x "$p/$path"; then
32945          new_path="$p/$path"
32946          break
32947        fi
32948      done
32949      IFS="$IFS_save"
32950    else
32951      # This is an absolute path, we can use it without further modifications.
32952      new_path="$path"
32953    fi
32954
32955    if test "x$new_path" = x; then
32956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32957$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32958      has_space=`$ECHO "$complete" | $GREP " "`
32959      if test "x$has_space" != x; then
32960        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32962      fi
32963      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32964    fi
32965  fi
32966
32967  # Now join together the path and the arguments once again
32968  if test "x$arguments" != xEOL; then
32969    new_complete="$new_path ${arguments% *}"
32970  else
32971    new_complete="$new_path"
32972  fi
32973
32974  if test "x$complete" != "x$new_complete"; then
32975    AR="$new_complete"
32976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32977$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32978  fi
32979
32980
32981
32982  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32983    ac_ext=m
32984ac_cpp='$OBJCPP $CPPFLAGS'
32985ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32986ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32987ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32988if test -n "$ac_tool_prefix"; then
32989  for ac_prog in gcc objcc objc cc CC
32990  do
32991    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32992set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32994$as_echo_n "checking for $ac_word... " >&6; }
32995if ${ac_cv_prog_OBJC+:} false; then :
32996  $as_echo_n "(cached) " >&6
32997else
32998  if test -n "$OBJC"; then
32999  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33000else
33001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33002for as_dir in $PATH
33003do
33004  IFS=$as_save_IFS
33005  test -z "$as_dir" && as_dir=.
33006    for ac_exec_ext in '' $ac_executable_extensions; do
33007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33008    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33010    break 2
33011  fi
33012done
33013  done
33014IFS=$as_save_IFS
33015
33016fi
33017fi
33018OBJC=$ac_cv_prog_OBJC
33019if test -n "$OBJC"; then
33020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33021$as_echo "$OBJC" >&6; }
33022else
33023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33024$as_echo "no" >&6; }
33025fi
33026
33027
33028    test -n "$OBJC" && break
33029  done
33030fi
33031if test -z "$OBJC"; then
33032  ac_ct_OBJC=$OBJC
33033  for ac_prog in gcc objcc objc cc CC
33034do
33035  # Extract the first word of "$ac_prog", so it can be a program name with args.
33036set dummy $ac_prog; ac_word=$2
33037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33038$as_echo_n "checking for $ac_word... " >&6; }
33039if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33040  $as_echo_n "(cached) " >&6
33041else
33042  if test -n "$ac_ct_OBJC"; then
33043  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33044else
33045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33046for as_dir in $PATH
33047do
33048  IFS=$as_save_IFS
33049  test -z "$as_dir" && as_dir=.
33050    for ac_exec_ext in '' $ac_executable_extensions; do
33051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33052    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33054    break 2
33055  fi
33056done
33057  done
33058IFS=$as_save_IFS
33059
33060fi
33061fi
33062ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33063if test -n "$ac_ct_OBJC"; then
33064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33065$as_echo "$ac_ct_OBJC" >&6; }
33066else
33067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33068$as_echo "no" >&6; }
33069fi
33070
33071
33072  test -n "$ac_ct_OBJC" && break
33073done
33074
33075  if test "x$ac_ct_OBJC" = x; then
33076    OBJC="gcc"
33077  else
33078    case $cross_compiling:$ac_tool_warned in
33079yes:)
33080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33082ac_tool_warned=yes ;;
33083esac
33084    OBJC=$ac_ct_OBJC
33085  fi
33086fi
33087
33088# Provide some information about the compiler.
33089$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33090set X $ac_compile
33091ac_compiler=$2
33092for ac_option in --version -v -V -qversion; do
33093  { { ac_try="$ac_compiler $ac_option >&5"
33094case "(($ac_try" in
33095  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33096  *) ac_try_echo=$ac_try;;
33097esac
33098eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33099$as_echo "$ac_try_echo"; } >&5
33100  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33101  ac_status=$?
33102  if test -s conftest.err; then
33103    sed '10a\
33104... rest of stderr output deleted ...
33105         10q' conftest.err >conftest.er1
33106    cat conftest.er1 >&5
33107  fi
33108  rm -f conftest.er1 conftest.err
33109  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33110  test $ac_status = 0; }
33111done
33112
33113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33114$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33115if ${ac_cv_objc_compiler_gnu+:} false; then :
33116  $as_echo_n "(cached) " >&6
33117else
33118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33119/* end confdefs.h.  */
33120
33121int
33122main ()
33123{
33124#ifndef __GNUC__
33125       choke me
33126#endif
33127
33128  ;
33129  return 0;
33130}
33131_ACEOF
33132if ac_fn_objc_try_compile "$LINENO"; then :
33133  ac_compiler_gnu=yes
33134else
33135  ac_compiler_gnu=no
33136fi
33137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33138ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33139
33140fi
33141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33142$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33143if test $ac_compiler_gnu = yes; then
33144  GOBJC=yes
33145else
33146  GOBJC=
33147fi
33148ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33149ac_save_OBJCFLAGS=$OBJCFLAGS
33150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33151$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33152if ${ac_cv_prog_objc_g+:} false; then :
33153  $as_echo_n "(cached) " >&6
33154else
33155  ac_save_objc_werror_flag=$ac_objc_werror_flag
33156   ac_objc_werror_flag=yes
33157   ac_cv_prog_objc_g=no
33158   OBJCFLAGS="-g"
33159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33160/* end confdefs.h.  */
33161
33162int
33163main ()
33164{
33165
33166  ;
33167  return 0;
33168}
33169_ACEOF
33170if ac_fn_objc_try_compile "$LINENO"; then :
33171  ac_cv_prog_objc_g=yes
33172else
33173  OBJCFLAGS=""
33174      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33175/* end confdefs.h.  */
33176
33177int
33178main ()
33179{
33180
33181  ;
33182  return 0;
33183}
33184_ACEOF
33185if ac_fn_objc_try_compile "$LINENO"; then :
33186
33187else
33188  ac_objc_werror_flag=$ac_save_objc_werror_flag
33189	 OBJCFLAGS="-g"
33190	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33191/* end confdefs.h.  */
33192
33193int
33194main ()
33195{
33196
33197  ;
33198  return 0;
33199}
33200_ACEOF
33201if ac_fn_objc_try_compile "$LINENO"; then :
33202  ac_cv_prog_objc_g=yes
33203fi
33204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33205fi
33206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33207fi
33208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33209   ac_objc_werror_flag=$ac_save_objc_werror_flag
33210fi
33211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33212$as_echo "$ac_cv_prog_objc_g" >&6; }
33213if test "$ac_test_OBJCFLAGS" = set; then
33214  OBJCFLAGS=$ac_save_OBJCFLAGS
33215elif test $ac_cv_prog_objc_g = yes; then
33216  if test "$GOBJC" = yes; then
33217    OBJCFLAGS="-g -O2"
33218  else
33219    OBJCFLAGS="-g"
33220  fi
33221else
33222  if test "$GOBJC" = yes; then
33223    OBJCFLAGS="-O2"
33224  else
33225    OBJCFLAGS=
33226  fi
33227fi
33228ac_ext=cpp
33229ac_cpp='$CXXCPP $CPPFLAGS'
33230ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33231ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33232ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33233
33234
33235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33236
33237  # First separate the path from the arguments. This will split at the first
33238  # space.
33239  complete="$OBJC"
33240  path="${complete%% *}"
33241  tmp="$complete EOL"
33242  arguments="${tmp#* }"
33243
33244  # Input might be given as Windows format, start by converting to
33245  # unix format.
33246  new_path=`$CYGPATH -u "$path"`
33247
33248  # Now try to locate executable using which
33249  new_path=`$WHICH "$new_path" 2> /dev/null`
33250  # bat and cmd files are not always considered executable in cygwin causing which
33251  # to not find them
33252  if test "x$new_path" = x \
33253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33255    new_path=`$CYGPATH -u "$path"`
33256  fi
33257  if test "x$new_path" = x; then
33258    # Oops. Which didn't find the executable.
33259    # The splitting of arguments from the executable at a space might have been incorrect,
33260    # since paths with space are more likely in Windows. Give it another try with the whole
33261    # argument.
33262    path="$complete"
33263    arguments="EOL"
33264    new_path=`$CYGPATH -u "$path"`
33265    new_path=`$WHICH "$new_path" 2> /dev/null`
33266    # bat and cmd files are not always considered executable in cygwin causing which
33267    # to not find them
33268    if test "x$new_path" = x \
33269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33271      new_path=`$CYGPATH -u "$path"`
33272    fi
33273    if test "x$new_path" = x; then
33274      # It's still not found. Now this is an unrecoverable error.
33275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33276$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33277      has_space=`$ECHO "$complete" | $GREP " "`
33278      if test "x$has_space" != x; then
33279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33281      fi
33282      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33283    fi
33284  fi
33285
33286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33289  # "foo.exe" is OK but "foo" is an error.
33290  #
33291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33292  # It is also a way to make sure we got the proper file name for the real test later on.
33293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33294  if test "x$test_shortpath" = x; then
33295    # Short path failed, file does not exist as specified.
33296    # Try adding .exe or .cmd
33297    if test -f "${new_path}.exe"; then
33298      input_to_shortpath="${new_path}.exe"
33299    elif test -f "${new_path}.cmd"; then
33300      input_to_shortpath="${new_path}.cmd"
33301    else
33302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33303$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33306      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33307    fi
33308  else
33309    input_to_shortpath="$new_path"
33310  fi
33311
33312  # Call helper function which possibly converts this using DOS-style short mode.
33313  # If so, the updated path is stored in $new_path.
33314  new_path="$input_to_shortpath"
33315
33316  input_path="$input_to_shortpath"
33317  # Check if we need to convert this using DOS-style short mode. If the path
33318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33319  # take no chances and rewrite it.
33320  # Note: m4 eats our [], so we need to use [ and ] instead.
33321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33322  if test "x$has_forbidden_chars" != x; then
33323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33327      # Going to short mode and back again did indeed matter. Since short mode is
33328      # case insensitive, let's make it lowercase to improve readability.
33329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33330      # Now convert it back to Unix-stile (cygpath)
33331      input_path=`$CYGPATH -u "$shortmode_path"`
33332      new_path="$input_path"
33333    fi
33334  fi
33335
33336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33337  if test "x$test_cygdrive_prefix" = x; then
33338    # As a simple fix, exclude /usr/bin since it's not a real path.
33339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33341      # a path prefixed by /cygdrive for fixpath to work.
33342      new_path="$CYGWIN_ROOT_PATH$input_path"
33343    fi
33344  fi
33345
33346  # remove trailing .exe if any
33347  new_path="${new_path/%.exe/}"
33348
33349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33350
33351  # First separate the path from the arguments. This will split at the first
33352  # space.
33353  complete="$OBJC"
33354  path="${complete%% *}"
33355  tmp="$complete EOL"
33356  arguments="${tmp#* }"
33357
33358  # Input might be given as Windows format, start by converting to
33359  # unix format.
33360  new_path="$path"
33361
33362  windows_path="$new_path"
33363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33364    unix_path=`$CYGPATH -u "$windows_path"`
33365    new_path="$unix_path"
33366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33368    new_path="$unix_path"
33369  fi
33370
33371
33372  # Now try to locate executable using which
33373  new_path=`$WHICH "$new_path" 2> /dev/null`
33374
33375  if test "x$new_path" = x; then
33376    # Oops. Which didn't find the executable.
33377    # The splitting of arguments from the executable at a space might have been incorrect,
33378    # since paths with space are more likely in Windows. Give it another try with the whole
33379    # argument.
33380    path="$complete"
33381    arguments="EOL"
33382    new_path="$path"
33383
33384  windows_path="$new_path"
33385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33386    unix_path=`$CYGPATH -u "$windows_path"`
33387    new_path="$unix_path"
33388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33390    new_path="$unix_path"
33391  fi
33392
33393
33394    new_path=`$WHICH "$new_path" 2> /dev/null`
33395    # bat and cmd files are not always considered executable in MSYS causing which
33396    # to not find them
33397    if test "x$new_path" = x \
33398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33400      new_path="$path"
33401
33402  windows_path="$new_path"
33403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33404    unix_path=`$CYGPATH -u "$windows_path"`
33405    new_path="$unix_path"
33406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33408    new_path="$unix_path"
33409  fi
33410
33411    fi
33412
33413    if test "x$new_path" = x; then
33414      # It's still not found. Now this is an unrecoverable error.
33415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33416$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33417      has_space=`$ECHO "$complete" | $GREP " "`
33418      if test "x$has_space" != x; then
33419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33421      fi
33422      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33423    fi
33424  fi
33425
33426  # Now new_path has a complete unix path to the binary
33427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33428    # Keep paths in /bin as-is, but remove trailing .exe if any
33429    new_path="${new_path/%.exe/}"
33430    # Do not save /bin paths to all_fixpath_prefixes!
33431  else
33432    # Not in mixed or Windows style, start by that.
33433    new_path=`cmd //c echo $new_path`
33434
33435  input_path="$new_path"
33436  # Check if we need to convert this using DOS-style short mode. If the path
33437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33438  # take no chances and rewrite it.
33439  # Note: m4 eats our [], so we need to use [ and ] instead.
33440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33441  if test "x$has_forbidden_chars" != x; then
33442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33444  fi
33445
33446    # Output is in $new_path
33447
33448  windows_path="$new_path"
33449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33450    unix_path=`$CYGPATH -u "$windows_path"`
33451    new_path="$unix_path"
33452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33454    new_path="$unix_path"
33455  fi
33456
33457    # remove trailing .exe if any
33458    new_path="${new_path/%.exe/}"
33459
33460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33462  fi
33463
33464  else
33465    # We're on a unix platform. Hooray! :)
33466    # First separate the path from the arguments. This will split at the first
33467    # space.
33468    complete="$OBJC"
33469    path="${complete%% *}"
33470    tmp="$complete EOL"
33471    arguments="${tmp#* }"
33472
33473    # Cannot rely on the command "which" here since it doesn't always work.
33474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33475    if test -z "$is_absolute_path"; then
33476      # Path to executable is not absolute. Find it.
33477      IFS_save="$IFS"
33478      IFS=:
33479      for p in $PATH; do
33480        if test -f "$p/$path" && test -x "$p/$path"; then
33481          new_path="$p/$path"
33482          break
33483        fi
33484      done
33485      IFS="$IFS_save"
33486    else
33487      # This is an absolute path, we can use it without further modifications.
33488      new_path="$path"
33489    fi
33490
33491    if test "x$new_path" = x; then
33492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33493$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33494      has_space=`$ECHO "$complete" | $GREP " "`
33495      if test "x$has_space" != x; then
33496        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33498      fi
33499      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33500    fi
33501  fi
33502
33503  # Now join together the path and the arguments once again
33504  if test "x$arguments" != xEOL; then
33505    new_complete="$new_path ${arguments% *}"
33506  else
33507    new_complete="$new_path"
33508  fi
33509
33510  if test "x$complete" != "x$new_complete"; then
33511    OBJC="$new_complete"
33512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33513$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33514  fi
33515
33516
33517
33518  # Publish this variable in the help.
33519
33520
33521  if test "x$LIPO" = x; then
33522    # The variable is not set by user, try to locate tool using the code snippet
33523    for ac_prog in lipo
33524do
33525  # Extract the first word of "$ac_prog", so it can be a program name with args.
33526set dummy $ac_prog; ac_word=$2
33527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33528$as_echo_n "checking for $ac_word... " >&6; }
33529if ${ac_cv_path_LIPO+:} false; then :
33530  $as_echo_n "(cached) " >&6
33531else
33532  case $LIPO in
33533  [\\/]* | ?:[\\/]*)
33534  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33535  ;;
33536  *)
33537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33538for as_dir in $PATH
33539do
33540  IFS=$as_save_IFS
33541  test -z "$as_dir" && as_dir=.
33542    for ac_exec_ext in '' $ac_executable_extensions; do
33543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33544    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33546    break 2
33547  fi
33548done
33549  done
33550IFS=$as_save_IFS
33551
33552  ;;
33553esac
33554fi
33555LIPO=$ac_cv_path_LIPO
33556if test -n "$LIPO"; then
33557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33558$as_echo "$LIPO" >&6; }
33559else
33560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33561$as_echo "no" >&6; }
33562fi
33563
33564
33565  test -n "$LIPO" && break
33566done
33567
33568  else
33569    # The variable is set, but is it from the command line or the environment?
33570
33571    # Try to remove the string !LIPO! from our list.
33572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33574      # If it failed, the variable was not from the command line. Ignore it,
33575      # but warn the user (except for BASH, which is always set by the calling BASH).
33576      if test "xLIPO" != xBASH; then
33577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33578$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33579      fi
33580      # Try to locate tool using the code snippet
33581      for ac_prog in lipo
33582do
33583  # Extract the first word of "$ac_prog", so it can be a program name with args.
33584set dummy $ac_prog; ac_word=$2
33585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33586$as_echo_n "checking for $ac_word... " >&6; }
33587if ${ac_cv_path_LIPO+:} false; then :
33588  $as_echo_n "(cached) " >&6
33589else
33590  case $LIPO in
33591  [\\/]* | ?:[\\/]*)
33592  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33593  ;;
33594  *)
33595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33596for as_dir in $PATH
33597do
33598  IFS=$as_save_IFS
33599  test -z "$as_dir" && as_dir=.
33600    for ac_exec_ext in '' $ac_executable_extensions; do
33601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33602    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33604    break 2
33605  fi
33606done
33607  done
33608IFS=$as_save_IFS
33609
33610  ;;
33611esac
33612fi
33613LIPO=$ac_cv_path_LIPO
33614if test -n "$LIPO"; then
33615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33616$as_echo "$LIPO" >&6; }
33617else
33618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33619$as_echo "no" >&6; }
33620fi
33621
33622
33623  test -n "$LIPO" && break
33624done
33625
33626    else
33627      # If it succeeded, then it was overridden by the user. We will use it
33628      # for the tool.
33629
33630      # First remove it from the list of overridden variables, so we can test
33631      # for unknown variables in the end.
33632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33633
33634      # Check if the provided tool contains a complete path.
33635      tool_specified="$LIPO"
33636      tool_basename="${tool_specified##*/}"
33637      if test "x$tool_basename" = "x$tool_specified"; then
33638        # A command without a complete path is provided, search $PATH.
33639        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33640$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33641        # Extract the first word of "$tool_basename", so it can be a program name with args.
33642set dummy $tool_basename; ac_word=$2
33643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33644$as_echo_n "checking for $ac_word... " >&6; }
33645if ${ac_cv_path_LIPO+:} false; then :
33646  $as_echo_n "(cached) " >&6
33647else
33648  case $LIPO in
33649  [\\/]* | ?:[\\/]*)
33650  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33651  ;;
33652  *)
33653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33654for as_dir in $PATH
33655do
33656  IFS=$as_save_IFS
33657  test -z "$as_dir" && as_dir=.
33658    for ac_exec_ext in '' $ac_executable_extensions; do
33659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33660    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33662    break 2
33663  fi
33664done
33665  done
33666IFS=$as_save_IFS
33667
33668  ;;
33669esac
33670fi
33671LIPO=$ac_cv_path_LIPO
33672if test -n "$LIPO"; then
33673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33674$as_echo "$LIPO" >&6; }
33675else
33676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33677$as_echo "no" >&6; }
33678fi
33679
33680
33681        if test "x$LIPO" = x; then
33682          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33683        fi
33684      else
33685        # Otherwise we believe it is a complete path. Use it as it is.
33686        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33687$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33689$as_echo_n "checking for LIPO... " >&6; }
33690        if test ! -x "$tool_specified"; then
33691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33692$as_echo "not found" >&6; }
33693          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33694        fi
33695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33696$as_echo "$tool_specified" >&6; }
33697      fi
33698    fi
33699  fi
33700
33701
33702
33703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33704
33705  # First separate the path from the arguments. This will split at the first
33706  # space.
33707  complete="$LIPO"
33708  path="${complete%% *}"
33709  tmp="$complete EOL"
33710  arguments="${tmp#* }"
33711
33712  # Input might be given as Windows format, start by converting to
33713  # unix format.
33714  new_path=`$CYGPATH -u "$path"`
33715
33716  # Now try to locate executable using which
33717  new_path=`$WHICH "$new_path" 2> /dev/null`
33718  # bat and cmd files are not always considered executable in cygwin causing which
33719  # to not find them
33720  if test "x$new_path" = x \
33721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33723    new_path=`$CYGPATH -u "$path"`
33724  fi
33725  if test "x$new_path" = x; then
33726    # Oops. Which didn't find the executable.
33727    # The splitting of arguments from the executable at a space might have been incorrect,
33728    # since paths with space are more likely in Windows. Give it another try with the whole
33729    # argument.
33730    path="$complete"
33731    arguments="EOL"
33732    new_path=`$CYGPATH -u "$path"`
33733    new_path=`$WHICH "$new_path" 2> /dev/null`
33734    # bat and cmd files are not always considered executable in cygwin causing which
33735    # to not find them
33736    if test "x$new_path" = x \
33737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33739      new_path=`$CYGPATH -u "$path"`
33740    fi
33741    if test "x$new_path" = x; then
33742      # It's still not found. Now this is an unrecoverable error.
33743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33744$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33745      has_space=`$ECHO "$complete" | $GREP " "`
33746      if test "x$has_space" != x; then
33747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33749      fi
33750      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33751    fi
33752  fi
33753
33754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33757  # "foo.exe" is OK but "foo" is an error.
33758  #
33759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33760  # It is also a way to make sure we got the proper file name for the real test later on.
33761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33762  if test "x$test_shortpath" = x; then
33763    # Short path failed, file does not exist as specified.
33764    # Try adding .exe or .cmd
33765    if test -f "${new_path}.exe"; then
33766      input_to_shortpath="${new_path}.exe"
33767    elif test -f "${new_path}.cmd"; then
33768      input_to_shortpath="${new_path}.cmd"
33769    else
33770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33771$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33774      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33775    fi
33776  else
33777    input_to_shortpath="$new_path"
33778  fi
33779
33780  # Call helper function which possibly converts this using DOS-style short mode.
33781  # If so, the updated path is stored in $new_path.
33782  new_path="$input_to_shortpath"
33783
33784  input_path="$input_to_shortpath"
33785  # Check if we need to convert this using DOS-style short mode. If the path
33786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33787  # take no chances and rewrite it.
33788  # Note: m4 eats our [], so we need to use [ and ] instead.
33789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33790  if test "x$has_forbidden_chars" != x; then
33791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33795      # Going to short mode and back again did indeed matter. Since short mode is
33796      # case insensitive, let's make it lowercase to improve readability.
33797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33798      # Now convert it back to Unix-stile (cygpath)
33799      input_path=`$CYGPATH -u "$shortmode_path"`
33800      new_path="$input_path"
33801    fi
33802  fi
33803
33804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33805  if test "x$test_cygdrive_prefix" = x; then
33806    # As a simple fix, exclude /usr/bin since it's not a real path.
33807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33809      # a path prefixed by /cygdrive for fixpath to work.
33810      new_path="$CYGWIN_ROOT_PATH$input_path"
33811    fi
33812  fi
33813
33814  # remove trailing .exe if any
33815  new_path="${new_path/%.exe/}"
33816
33817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33818
33819  # First separate the path from the arguments. This will split at the first
33820  # space.
33821  complete="$LIPO"
33822  path="${complete%% *}"
33823  tmp="$complete EOL"
33824  arguments="${tmp#* }"
33825
33826  # Input might be given as Windows format, start by converting to
33827  # unix format.
33828  new_path="$path"
33829
33830  windows_path="$new_path"
33831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33832    unix_path=`$CYGPATH -u "$windows_path"`
33833    new_path="$unix_path"
33834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33836    new_path="$unix_path"
33837  fi
33838
33839
33840  # Now try to locate executable using which
33841  new_path=`$WHICH "$new_path" 2> /dev/null`
33842
33843  if test "x$new_path" = x; then
33844    # Oops. Which didn't find the executable.
33845    # The splitting of arguments from the executable at a space might have been incorrect,
33846    # since paths with space are more likely in Windows. Give it another try with the whole
33847    # argument.
33848    path="$complete"
33849    arguments="EOL"
33850    new_path="$path"
33851
33852  windows_path="$new_path"
33853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33854    unix_path=`$CYGPATH -u "$windows_path"`
33855    new_path="$unix_path"
33856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33858    new_path="$unix_path"
33859  fi
33860
33861
33862    new_path=`$WHICH "$new_path" 2> /dev/null`
33863    # bat and cmd files are not always considered executable in MSYS causing which
33864    # to not find them
33865    if test "x$new_path" = x \
33866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33868      new_path="$path"
33869
33870  windows_path="$new_path"
33871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33872    unix_path=`$CYGPATH -u "$windows_path"`
33873    new_path="$unix_path"
33874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33876    new_path="$unix_path"
33877  fi
33878
33879    fi
33880
33881    if test "x$new_path" = x; then
33882      # It's still not found. Now this is an unrecoverable error.
33883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33884$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33885      has_space=`$ECHO "$complete" | $GREP " "`
33886      if test "x$has_space" != x; then
33887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33889      fi
33890      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33891    fi
33892  fi
33893
33894  # Now new_path has a complete unix path to the binary
33895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33896    # Keep paths in /bin as-is, but remove trailing .exe if any
33897    new_path="${new_path/%.exe/}"
33898    # Do not save /bin paths to all_fixpath_prefixes!
33899  else
33900    # Not in mixed or Windows style, start by that.
33901    new_path=`cmd //c echo $new_path`
33902
33903  input_path="$new_path"
33904  # Check if we need to convert this using DOS-style short mode. If the path
33905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33906  # take no chances and rewrite it.
33907  # Note: m4 eats our [], so we need to use [ and ] instead.
33908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33909  if test "x$has_forbidden_chars" != x; then
33910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33912  fi
33913
33914    # Output is in $new_path
33915
33916  windows_path="$new_path"
33917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33918    unix_path=`$CYGPATH -u "$windows_path"`
33919    new_path="$unix_path"
33920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33922    new_path="$unix_path"
33923  fi
33924
33925    # remove trailing .exe if any
33926    new_path="${new_path/%.exe/}"
33927
33928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33930  fi
33931
33932  else
33933    # We're on a unix platform. Hooray! :)
33934    # First separate the path from the arguments. This will split at the first
33935    # space.
33936    complete="$LIPO"
33937    path="${complete%% *}"
33938    tmp="$complete EOL"
33939    arguments="${tmp#* }"
33940
33941    # Cannot rely on the command "which" here since it doesn't always work.
33942    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33943    if test -z "$is_absolute_path"; then
33944      # Path to executable is not absolute. Find it.
33945      IFS_save="$IFS"
33946      IFS=:
33947      for p in $PATH; do
33948        if test -f "$p/$path" && test -x "$p/$path"; then
33949          new_path="$p/$path"
33950          break
33951        fi
33952      done
33953      IFS="$IFS_save"
33954    else
33955      # This is an absolute path, we can use it without further modifications.
33956      new_path="$path"
33957    fi
33958
33959    if test "x$new_path" = x; then
33960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33961$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33962      has_space=`$ECHO "$complete" | $GREP " "`
33963      if test "x$has_space" != x; then
33964        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33966      fi
33967      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33968    fi
33969  fi
33970
33971  # Now join together the path and the arguments once again
33972  if test "x$arguments" != xEOL; then
33973    new_complete="$new_path ${arguments% *}"
33974  else
33975    new_complete="$new_path"
33976  fi
33977
33978  if test "x$complete" != "x$new_complete"; then
33979    LIPO="$new_complete"
33980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33981$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33982  fi
33983
33984  else
33985    OBJC=
33986  fi
33987
33988  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33989    # Extract the first word of "mt", so it can be a program name with args.
33990set dummy mt; ac_word=$2
33991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33992$as_echo_n "checking for $ac_word... " >&6; }
33993if ${ac_cv_prog_MT+:} false; then :
33994  $as_echo_n "(cached) " >&6
33995else
33996  if test -n "$MT"; then
33997  ac_cv_prog_MT="$MT" # Let the user override the test.
33998else
33999  ac_prog_rejected=no
34000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34001for as_dir in $PATH
34002do
34003  IFS=$as_save_IFS
34004  test -z "$as_dir" && as_dir=.
34005    for ac_exec_ext in '' $ac_executable_extensions; do
34006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34007    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34008       ac_prog_rejected=yes
34009       continue
34010     fi
34011    ac_cv_prog_MT="mt"
34012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34013    break 2
34014  fi
34015done
34016  done
34017IFS=$as_save_IFS
34018
34019if test $ac_prog_rejected = yes; then
34020  # We found a bogon in the path, so make sure we never use it.
34021  set dummy $ac_cv_prog_MT
34022  shift
34023  if test $# != 0; then
34024    # We chose a different compiler from the bogus one.
34025    # However, it has the same basename, so the bogon will be chosen
34026    # first if we set MT to just the basename; use the full file name.
34027    shift
34028    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34029  fi
34030fi
34031fi
34032fi
34033MT=$ac_cv_prog_MT
34034if test -n "$MT"; then
34035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34036$as_echo "$MT" >&6; }
34037else
34038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34039$as_echo "no" >&6; }
34040fi
34041
34042
34043
34044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34045
34046  # First separate the path from the arguments. This will split at the first
34047  # space.
34048  complete="$MT"
34049  path="${complete%% *}"
34050  tmp="$complete EOL"
34051  arguments="${tmp#* }"
34052
34053  # Input might be given as Windows format, start by converting to
34054  # unix format.
34055  new_path=`$CYGPATH -u "$path"`
34056
34057  # Now try to locate executable using which
34058  new_path=`$WHICH "$new_path" 2> /dev/null`
34059  # bat and cmd files are not always considered executable in cygwin causing which
34060  # to not find them
34061  if test "x$new_path" = x \
34062      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34063      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34064    new_path=`$CYGPATH -u "$path"`
34065  fi
34066  if test "x$new_path" = x; then
34067    # Oops. Which didn't find the executable.
34068    # The splitting of arguments from the executable at a space might have been incorrect,
34069    # since paths with space are more likely in Windows. Give it another try with the whole
34070    # argument.
34071    path="$complete"
34072    arguments="EOL"
34073    new_path=`$CYGPATH -u "$path"`
34074    new_path=`$WHICH "$new_path" 2> /dev/null`
34075    # bat and cmd files are not always considered executable in cygwin causing which
34076    # to not find them
34077    if test "x$new_path" = x \
34078        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34079        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34080      new_path=`$CYGPATH -u "$path"`
34081    fi
34082    if test "x$new_path" = x; then
34083      # It's still not found. Now this is an unrecoverable error.
34084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34085$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34086      has_space=`$ECHO "$complete" | $GREP " "`
34087      if test "x$has_space" != x; then
34088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34090      fi
34091      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34092    fi
34093  fi
34094
34095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34098  # "foo.exe" is OK but "foo" is an error.
34099  #
34100  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34101  # It is also a way to make sure we got the proper file name for the real test later on.
34102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34103  if test "x$test_shortpath" = x; then
34104    # Short path failed, file does not exist as specified.
34105    # Try adding .exe or .cmd
34106    if test -f "${new_path}.exe"; then
34107      input_to_shortpath="${new_path}.exe"
34108    elif test -f "${new_path}.cmd"; then
34109      input_to_shortpath="${new_path}.cmd"
34110    else
34111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34112$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34113      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34114$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34115      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34116    fi
34117  else
34118    input_to_shortpath="$new_path"
34119  fi
34120
34121  # Call helper function which possibly converts this using DOS-style short mode.
34122  # If so, the updated path is stored in $new_path.
34123  new_path="$input_to_shortpath"
34124
34125  input_path="$input_to_shortpath"
34126  # Check if we need to convert this using DOS-style short mode. If the path
34127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34128  # take no chances and rewrite it.
34129  # Note: m4 eats our [], so we need to use [ and ] instead.
34130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34131  if test "x$has_forbidden_chars" != x; then
34132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34136      # Going to short mode and back again did indeed matter. Since short mode is
34137      # case insensitive, let's make it lowercase to improve readability.
34138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34139      # Now convert it back to Unix-stile (cygpath)
34140      input_path=`$CYGPATH -u "$shortmode_path"`
34141      new_path="$input_path"
34142    fi
34143  fi
34144
34145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34146  if test "x$test_cygdrive_prefix" = x; then
34147    # As a simple fix, exclude /usr/bin since it's not a real path.
34148    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34150      # a path prefixed by /cygdrive for fixpath to work.
34151      new_path="$CYGWIN_ROOT_PATH$input_path"
34152    fi
34153  fi
34154
34155  # remove trailing .exe if any
34156  new_path="${new_path/%.exe/}"
34157
34158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34159
34160  # First separate the path from the arguments. This will split at the first
34161  # space.
34162  complete="$MT"
34163  path="${complete%% *}"
34164  tmp="$complete EOL"
34165  arguments="${tmp#* }"
34166
34167  # Input might be given as Windows format, start by converting to
34168  # unix format.
34169  new_path="$path"
34170
34171  windows_path="$new_path"
34172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34173    unix_path=`$CYGPATH -u "$windows_path"`
34174    new_path="$unix_path"
34175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34177    new_path="$unix_path"
34178  fi
34179
34180
34181  # Now try to locate executable using which
34182  new_path=`$WHICH "$new_path" 2> /dev/null`
34183
34184  if test "x$new_path" = x; then
34185    # Oops. Which didn't find the executable.
34186    # The splitting of arguments from the executable at a space might have been incorrect,
34187    # since paths with space are more likely in Windows. Give it another try with the whole
34188    # argument.
34189    path="$complete"
34190    arguments="EOL"
34191    new_path="$path"
34192
34193  windows_path="$new_path"
34194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34195    unix_path=`$CYGPATH -u "$windows_path"`
34196    new_path="$unix_path"
34197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34199    new_path="$unix_path"
34200  fi
34201
34202
34203    new_path=`$WHICH "$new_path" 2> /dev/null`
34204    # bat and cmd files are not always considered executable in MSYS causing which
34205    # to not find them
34206    if test "x$new_path" = x \
34207        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34208        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34209      new_path="$path"
34210
34211  windows_path="$new_path"
34212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34213    unix_path=`$CYGPATH -u "$windows_path"`
34214    new_path="$unix_path"
34215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34217    new_path="$unix_path"
34218  fi
34219
34220    fi
34221
34222    if test "x$new_path" = x; then
34223      # It's still not found. Now this is an unrecoverable error.
34224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34225$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34226      has_space=`$ECHO "$complete" | $GREP " "`
34227      if test "x$has_space" != x; then
34228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34230      fi
34231      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34232    fi
34233  fi
34234
34235  # Now new_path has a complete unix path to the binary
34236  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34237    # Keep paths in /bin as-is, but remove trailing .exe if any
34238    new_path="${new_path/%.exe/}"
34239    # Do not save /bin paths to all_fixpath_prefixes!
34240  else
34241    # Not in mixed or Windows style, start by that.
34242    new_path=`cmd //c echo $new_path`
34243
34244  input_path="$new_path"
34245  # Check if we need to convert this using DOS-style short mode. If the path
34246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34247  # take no chances and rewrite it.
34248  # Note: m4 eats our [], so we need to use [ and ] instead.
34249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34250  if test "x$has_forbidden_chars" != x; then
34251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34253  fi
34254
34255    # Output is in $new_path
34256
34257  windows_path="$new_path"
34258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34259    unix_path=`$CYGPATH -u "$windows_path"`
34260    new_path="$unix_path"
34261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34263    new_path="$unix_path"
34264  fi
34265
34266    # remove trailing .exe if any
34267    new_path="${new_path/%.exe/}"
34268
34269    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34270    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34271  fi
34272
34273  else
34274    # We're on a unix platform. Hooray! :)
34275    # First separate the path from the arguments. This will split at the first
34276    # space.
34277    complete="$MT"
34278    path="${complete%% *}"
34279    tmp="$complete EOL"
34280    arguments="${tmp#* }"
34281
34282    # Cannot rely on the command "which" here since it doesn't always work.
34283    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34284    if test -z "$is_absolute_path"; then
34285      # Path to executable is not absolute. Find it.
34286      IFS_save="$IFS"
34287      IFS=:
34288      for p in $PATH; do
34289        if test -f "$p/$path" && test -x "$p/$path"; then
34290          new_path="$p/$path"
34291          break
34292        fi
34293      done
34294      IFS="$IFS_save"
34295    else
34296      # This is an absolute path, we can use it without further modifications.
34297      new_path="$path"
34298    fi
34299
34300    if test "x$new_path" = x; then
34301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34302$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34303      has_space=`$ECHO "$complete" | $GREP " "`
34304      if test "x$has_space" != x; then
34305        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34306$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34307      fi
34308      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34309    fi
34310  fi
34311
34312  # Now join together the path and the arguments once again
34313  if test "x$arguments" != xEOL; then
34314    new_complete="$new_path ${arguments% *}"
34315  else
34316    new_complete="$new_path"
34317  fi
34318
34319  if test "x$complete" != "x$new_complete"; then
34320    MT="$new_complete"
34321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34322$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34323  fi
34324
34325    # Setup the resource compiler (RC)
34326    # Extract the first word of "rc", so it can be a program name with args.
34327set dummy rc; ac_word=$2
34328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34329$as_echo_n "checking for $ac_word... " >&6; }
34330if ${ac_cv_prog_RC+:} false; then :
34331  $as_echo_n "(cached) " >&6
34332else
34333  if test -n "$RC"; then
34334  ac_cv_prog_RC="$RC" # Let the user override the test.
34335else
34336  ac_prog_rejected=no
34337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34338for as_dir in $PATH
34339do
34340  IFS=$as_save_IFS
34341  test -z "$as_dir" && as_dir=.
34342    for ac_exec_ext in '' $ac_executable_extensions; do
34343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34344    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34345       ac_prog_rejected=yes
34346       continue
34347     fi
34348    ac_cv_prog_RC="rc"
34349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34350    break 2
34351  fi
34352done
34353  done
34354IFS=$as_save_IFS
34355
34356if test $ac_prog_rejected = yes; then
34357  # We found a bogon in the path, so make sure we never use it.
34358  set dummy $ac_cv_prog_RC
34359  shift
34360  if test $# != 0; then
34361    # We chose a different compiler from the bogus one.
34362    # However, it has the same basename, so the bogon will be chosen
34363    # first if we set RC to just the basename; use the full file name.
34364    shift
34365    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34366  fi
34367fi
34368fi
34369fi
34370RC=$ac_cv_prog_RC
34371if test -n "$RC"; then
34372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34373$as_echo "$RC" >&6; }
34374else
34375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34376$as_echo "no" >&6; }
34377fi
34378
34379
34380
34381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34382
34383  # First separate the path from the arguments. This will split at the first
34384  # space.
34385  complete="$RC"
34386  path="${complete%% *}"
34387  tmp="$complete EOL"
34388  arguments="${tmp#* }"
34389
34390  # Input might be given as Windows format, start by converting to
34391  # unix format.
34392  new_path=`$CYGPATH -u "$path"`
34393
34394  # Now try to locate executable using which
34395  new_path=`$WHICH "$new_path" 2> /dev/null`
34396  # bat and cmd files are not always considered executable in cygwin causing which
34397  # to not find them
34398  if test "x$new_path" = x \
34399      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34400      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34401    new_path=`$CYGPATH -u "$path"`
34402  fi
34403  if test "x$new_path" = x; then
34404    # Oops. Which didn't find the executable.
34405    # The splitting of arguments from the executable at a space might have been incorrect,
34406    # since paths with space are more likely in Windows. Give it another try with the whole
34407    # argument.
34408    path="$complete"
34409    arguments="EOL"
34410    new_path=`$CYGPATH -u "$path"`
34411    new_path=`$WHICH "$new_path" 2> /dev/null`
34412    # bat and cmd files are not always considered executable in cygwin causing which
34413    # to not find them
34414    if test "x$new_path" = x \
34415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34417      new_path=`$CYGPATH -u "$path"`
34418    fi
34419    if test "x$new_path" = x; then
34420      # It's still not found. Now this is an unrecoverable error.
34421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34422$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34423      has_space=`$ECHO "$complete" | $GREP " "`
34424      if test "x$has_space" != x; then
34425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34427      fi
34428      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34429    fi
34430  fi
34431
34432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34435  # "foo.exe" is OK but "foo" is an error.
34436  #
34437  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34438  # It is also a way to make sure we got the proper file name for the real test later on.
34439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34440  if test "x$test_shortpath" = x; then
34441    # Short path failed, file does not exist as specified.
34442    # Try adding .exe or .cmd
34443    if test -f "${new_path}.exe"; then
34444      input_to_shortpath="${new_path}.exe"
34445    elif test -f "${new_path}.cmd"; then
34446      input_to_shortpath="${new_path}.cmd"
34447    else
34448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34449$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34450      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34451$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34452      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34453    fi
34454  else
34455    input_to_shortpath="$new_path"
34456  fi
34457
34458  # Call helper function which possibly converts this using DOS-style short mode.
34459  # If so, the updated path is stored in $new_path.
34460  new_path="$input_to_shortpath"
34461
34462  input_path="$input_to_shortpath"
34463  # Check if we need to convert this using DOS-style short mode. If the path
34464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34465  # take no chances and rewrite it.
34466  # Note: m4 eats our [], so we need to use [ and ] instead.
34467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34468  if test "x$has_forbidden_chars" != x; then
34469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34473      # Going to short mode and back again did indeed matter. Since short mode is
34474      # case insensitive, let's make it lowercase to improve readability.
34475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34476      # Now convert it back to Unix-stile (cygpath)
34477      input_path=`$CYGPATH -u "$shortmode_path"`
34478      new_path="$input_path"
34479    fi
34480  fi
34481
34482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34483  if test "x$test_cygdrive_prefix" = x; then
34484    # As a simple fix, exclude /usr/bin since it's not a real path.
34485    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34487      # a path prefixed by /cygdrive for fixpath to work.
34488      new_path="$CYGWIN_ROOT_PATH$input_path"
34489    fi
34490  fi
34491
34492  # remove trailing .exe if any
34493  new_path="${new_path/%.exe/}"
34494
34495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34496
34497  # First separate the path from the arguments. This will split at the first
34498  # space.
34499  complete="$RC"
34500  path="${complete%% *}"
34501  tmp="$complete EOL"
34502  arguments="${tmp#* }"
34503
34504  # Input might be given as Windows format, start by converting to
34505  # unix format.
34506  new_path="$path"
34507
34508  windows_path="$new_path"
34509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34510    unix_path=`$CYGPATH -u "$windows_path"`
34511    new_path="$unix_path"
34512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34514    new_path="$unix_path"
34515  fi
34516
34517
34518  # Now try to locate executable using which
34519  new_path=`$WHICH "$new_path" 2> /dev/null`
34520
34521  if test "x$new_path" = x; then
34522    # Oops. Which didn't find the executable.
34523    # The splitting of arguments from the executable at a space might have been incorrect,
34524    # since paths with space are more likely in Windows. Give it another try with the whole
34525    # argument.
34526    path="$complete"
34527    arguments="EOL"
34528    new_path="$path"
34529
34530  windows_path="$new_path"
34531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34532    unix_path=`$CYGPATH -u "$windows_path"`
34533    new_path="$unix_path"
34534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34536    new_path="$unix_path"
34537  fi
34538
34539
34540    new_path=`$WHICH "$new_path" 2> /dev/null`
34541    # bat and cmd files are not always considered executable in MSYS causing which
34542    # to not find them
34543    if test "x$new_path" = x \
34544        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34545        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34546      new_path="$path"
34547
34548  windows_path="$new_path"
34549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34550    unix_path=`$CYGPATH -u "$windows_path"`
34551    new_path="$unix_path"
34552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34554    new_path="$unix_path"
34555  fi
34556
34557    fi
34558
34559    if test "x$new_path" = x; then
34560      # It's still not found. Now this is an unrecoverable error.
34561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34562$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34563      has_space=`$ECHO "$complete" | $GREP " "`
34564      if test "x$has_space" != x; then
34565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34567      fi
34568      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34569    fi
34570  fi
34571
34572  # Now new_path has a complete unix path to the binary
34573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34574    # Keep paths in /bin as-is, but remove trailing .exe if any
34575    new_path="${new_path/%.exe/}"
34576    # Do not save /bin paths to all_fixpath_prefixes!
34577  else
34578    # Not in mixed or Windows style, start by that.
34579    new_path=`cmd //c echo $new_path`
34580
34581  input_path="$new_path"
34582  # Check if we need to convert this using DOS-style short mode. If the path
34583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34584  # take no chances and rewrite it.
34585  # Note: m4 eats our [], so we need to use [ and ] instead.
34586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34587  if test "x$has_forbidden_chars" != x; then
34588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34590  fi
34591
34592    # Output is in $new_path
34593
34594  windows_path="$new_path"
34595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34596    unix_path=`$CYGPATH -u "$windows_path"`
34597    new_path="$unix_path"
34598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34600    new_path="$unix_path"
34601  fi
34602
34603    # remove trailing .exe if any
34604    new_path="${new_path/%.exe/}"
34605
34606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34608  fi
34609
34610  else
34611    # We're on a unix platform. Hooray! :)
34612    # First separate the path from the arguments. This will split at the first
34613    # space.
34614    complete="$RC"
34615    path="${complete%% *}"
34616    tmp="$complete EOL"
34617    arguments="${tmp#* }"
34618
34619    # Cannot rely on the command "which" here since it doesn't always work.
34620    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34621    if test -z "$is_absolute_path"; then
34622      # Path to executable is not absolute. Find it.
34623      IFS_save="$IFS"
34624      IFS=:
34625      for p in $PATH; do
34626        if test -f "$p/$path" && test -x "$p/$path"; then
34627          new_path="$p/$path"
34628          break
34629        fi
34630      done
34631      IFS="$IFS_save"
34632    else
34633      # This is an absolute path, we can use it without further modifications.
34634      new_path="$path"
34635    fi
34636
34637    if test "x$new_path" = x; then
34638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34639$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34640      has_space=`$ECHO "$complete" | $GREP " "`
34641      if test "x$has_space" != x; then
34642        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34643$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34644      fi
34645      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34646    fi
34647  fi
34648
34649  # Now join together the path and the arguments once again
34650  if test "x$arguments" != xEOL; then
34651    new_complete="$new_path ${arguments% *}"
34652  else
34653    new_complete="$new_path"
34654  fi
34655
34656  if test "x$complete" != "x$new_complete"; then
34657    RC="$new_complete"
34658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34659$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34660  fi
34661
34662    # Extract the first word of "dumpbin", so it can be a program name with args.
34663set dummy dumpbin; ac_word=$2
34664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34665$as_echo_n "checking for $ac_word... " >&6; }
34666if ${ac_cv_prog_DUMPBIN+:} false; then :
34667  $as_echo_n "(cached) " >&6
34668else
34669  if test -n "$DUMPBIN"; then
34670  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34671else
34672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34673for as_dir in $PATH
34674do
34675  IFS=$as_save_IFS
34676  test -z "$as_dir" && as_dir=.
34677    for ac_exec_ext in '' $ac_executable_extensions; do
34678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34679    ac_cv_prog_DUMPBIN="dumpbin"
34680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34681    break 2
34682  fi
34683done
34684  done
34685IFS=$as_save_IFS
34686
34687fi
34688fi
34689DUMPBIN=$ac_cv_prog_DUMPBIN
34690if test -n "$DUMPBIN"; then
34691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34692$as_echo "$DUMPBIN" >&6; }
34693else
34694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34695$as_echo "no" >&6; }
34696fi
34697
34698
34699
34700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34701
34702  # First separate the path from the arguments. This will split at the first
34703  # space.
34704  complete="$DUMPBIN"
34705  path="${complete%% *}"
34706  tmp="$complete EOL"
34707  arguments="${tmp#* }"
34708
34709  # Input might be given as Windows format, start by converting to
34710  # unix format.
34711  new_path=`$CYGPATH -u "$path"`
34712
34713  # Now try to locate executable using which
34714  new_path=`$WHICH "$new_path" 2> /dev/null`
34715  # bat and cmd files are not always considered executable in cygwin causing which
34716  # to not find them
34717  if test "x$new_path" = x \
34718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34720    new_path=`$CYGPATH -u "$path"`
34721  fi
34722  if test "x$new_path" = x; then
34723    # Oops. Which didn't find the executable.
34724    # The splitting of arguments from the executable at a space might have been incorrect,
34725    # since paths with space are more likely in Windows. Give it another try with the whole
34726    # argument.
34727    path="$complete"
34728    arguments="EOL"
34729    new_path=`$CYGPATH -u "$path"`
34730    new_path=`$WHICH "$new_path" 2> /dev/null`
34731    # bat and cmd files are not always considered executable in cygwin causing which
34732    # to not find them
34733    if test "x$new_path" = x \
34734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34736      new_path=`$CYGPATH -u "$path"`
34737    fi
34738    if test "x$new_path" = x; then
34739      # It's still not found. Now this is an unrecoverable error.
34740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34741$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34742      has_space=`$ECHO "$complete" | $GREP " "`
34743      if test "x$has_space" != x; then
34744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34746      fi
34747      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34748    fi
34749  fi
34750
34751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34754  # "foo.exe" is OK but "foo" is an error.
34755  #
34756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34757  # It is also a way to make sure we got the proper file name for the real test later on.
34758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34759  if test "x$test_shortpath" = x; then
34760    # Short path failed, file does not exist as specified.
34761    # Try adding .exe or .cmd
34762    if test -f "${new_path}.exe"; then
34763      input_to_shortpath="${new_path}.exe"
34764    elif test -f "${new_path}.cmd"; then
34765      input_to_shortpath="${new_path}.cmd"
34766    else
34767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34768$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34771      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34772    fi
34773  else
34774    input_to_shortpath="$new_path"
34775  fi
34776
34777  # Call helper function which possibly converts this using DOS-style short mode.
34778  # If so, the updated path is stored in $new_path.
34779  new_path="$input_to_shortpath"
34780
34781  input_path="$input_to_shortpath"
34782  # Check if we need to convert this using DOS-style short mode. If the path
34783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34784  # take no chances and rewrite it.
34785  # Note: m4 eats our [], so we need to use [ and ] instead.
34786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34787  if test "x$has_forbidden_chars" != x; then
34788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34792      # Going to short mode and back again did indeed matter. Since short mode is
34793      # case insensitive, let's make it lowercase to improve readability.
34794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34795      # Now convert it back to Unix-stile (cygpath)
34796      input_path=`$CYGPATH -u "$shortmode_path"`
34797      new_path="$input_path"
34798    fi
34799  fi
34800
34801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34802  if test "x$test_cygdrive_prefix" = x; then
34803    # As a simple fix, exclude /usr/bin since it's not a real path.
34804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34806      # a path prefixed by /cygdrive for fixpath to work.
34807      new_path="$CYGWIN_ROOT_PATH$input_path"
34808    fi
34809  fi
34810
34811  # remove trailing .exe if any
34812  new_path="${new_path/%.exe/}"
34813
34814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34815
34816  # First separate the path from the arguments. This will split at the first
34817  # space.
34818  complete="$DUMPBIN"
34819  path="${complete%% *}"
34820  tmp="$complete EOL"
34821  arguments="${tmp#* }"
34822
34823  # Input might be given as Windows format, start by converting to
34824  # unix format.
34825  new_path="$path"
34826
34827  windows_path="$new_path"
34828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34829    unix_path=`$CYGPATH -u "$windows_path"`
34830    new_path="$unix_path"
34831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34833    new_path="$unix_path"
34834  fi
34835
34836
34837  # Now try to locate executable using which
34838  new_path=`$WHICH "$new_path" 2> /dev/null`
34839
34840  if test "x$new_path" = x; then
34841    # Oops. Which didn't find the executable.
34842    # The splitting of arguments from the executable at a space might have been incorrect,
34843    # since paths with space are more likely in Windows. Give it another try with the whole
34844    # argument.
34845    path="$complete"
34846    arguments="EOL"
34847    new_path="$path"
34848
34849  windows_path="$new_path"
34850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34851    unix_path=`$CYGPATH -u "$windows_path"`
34852    new_path="$unix_path"
34853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34855    new_path="$unix_path"
34856  fi
34857
34858
34859    new_path=`$WHICH "$new_path" 2> /dev/null`
34860    # bat and cmd files are not always considered executable in MSYS causing which
34861    # to not find them
34862    if test "x$new_path" = x \
34863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34865      new_path="$path"
34866
34867  windows_path="$new_path"
34868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34869    unix_path=`$CYGPATH -u "$windows_path"`
34870    new_path="$unix_path"
34871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34873    new_path="$unix_path"
34874  fi
34875
34876    fi
34877
34878    if test "x$new_path" = x; then
34879      # It's still not found. Now this is an unrecoverable error.
34880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34881$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34882      has_space=`$ECHO "$complete" | $GREP " "`
34883      if test "x$has_space" != x; then
34884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34886      fi
34887      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34888    fi
34889  fi
34890
34891  # Now new_path has a complete unix path to the binary
34892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34893    # Keep paths in /bin as-is, but remove trailing .exe if any
34894    new_path="${new_path/%.exe/}"
34895    # Do not save /bin paths to all_fixpath_prefixes!
34896  else
34897    # Not in mixed or Windows style, start by that.
34898    new_path=`cmd //c echo $new_path`
34899
34900  input_path="$new_path"
34901  # Check if we need to convert this using DOS-style short mode. If the path
34902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34903  # take no chances and rewrite it.
34904  # Note: m4 eats our [], so we need to use [ and ] instead.
34905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34906  if test "x$has_forbidden_chars" != x; then
34907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34909  fi
34910
34911    # Output is in $new_path
34912
34913  windows_path="$new_path"
34914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34915    unix_path=`$CYGPATH -u "$windows_path"`
34916    new_path="$unix_path"
34917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34919    new_path="$unix_path"
34920  fi
34921
34922    # remove trailing .exe if any
34923    new_path="${new_path/%.exe/}"
34924
34925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34927  fi
34928
34929  else
34930    # We're on a unix platform. Hooray! :)
34931    # First separate the path from the arguments. This will split at the first
34932    # space.
34933    complete="$DUMPBIN"
34934    path="${complete%% *}"
34935    tmp="$complete EOL"
34936    arguments="${tmp#* }"
34937
34938    # Cannot rely on the command "which" here since it doesn't always work.
34939    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34940    if test -z "$is_absolute_path"; then
34941      # Path to executable is not absolute. Find it.
34942      IFS_save="$IFS"
34943      IFS=:
34944      for p in $PATH; do
34945        if test -f "$p/$path" && test -x "$p/$path"; then
34946          new_path="$p/$path"
34947          break
34948        fi
34949      done
34950      IFS="$IFS_save"
34951    else
34952      # This is an absolute path, we can use it without further modifications.
34953      new_path="$path"
34954    fi
34955
34956    if test "x$new_path" = x; then
34957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34958$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34959      has_space=`$ECHO "$complete" | $GREP " "`
34960      if test "x$has_space" != x; then
34961        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34963      fi
34964      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34965    fi
34966  fi
34967
34968  # Now join together the path and the arguments once again
34969  if test "x$arguments" != xEOL; then
34970    new_complete="$new_path ${arguments% *}"
34971  else
34972    new_complete="$new_path"
34973  fi
34974
34975  if test "x$complete" != "x$new_complete"; then
34976    DUMPBIN="$new_complete"
34977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34978$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34979  fi
34980
34981    # We need to check for 'msbuild.exe' because at the place where we expect to
34982    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34983    # won't find the 'msbuild.exe' executable in that case (and the
34984    # 'ac_executable_extensions' is unusable due to performance reasons).
34985    # Notice that we intentionally don't fix up the path to MSBUILD because we
34986    # will call it in a DOS shell during freetype detection on Windows (see
34987    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34988    # Extract the first word of "msbuild.exe", so it can be a program name with args.
34989set dummy msbuild.exe; ac_word=$2
34990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34991$as_echo_n "checking for $ac_word... " >&6; }
34992if ${ac_cv_prog_MSBUILD+:} false; then :
34993  $as_echo_n "(cached) " >&6
34994else
34995  if test -n "$MSBUILD"; then
34996  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34997else
34998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34999for as_dir in $PATH
35000do
35001  IFS=$as_save_IFS
35002  test -z "$as_dir" && as_dir=.
35003    for ac_exec_ext in '' $ac_executable_extensions; do
35004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35005    ac_cv_prog_MSBUILD="msbuild.exe"
35006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35007    break 2
35008  fi
35009done
35010  done
35011IFS=$as_save_IFS
35012
35013fi
35014fi
35015MSBUILD=$ac_cv_prog_MSBUILD
35016if test -n "$MSBUILD"; then
35017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35018$as_echo "$MSBUILD" >&6; }
35019else
35020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35021$as_echo "no" >&6; }
35022fi
35023
35024
35025  fi
35026
35027  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35028
35029
35030  # Publish this variable in the help.
35031
35032
35033  if test "x$STRIP" = x; then
35034    # The variable is not set by user, try to locate tool using the code snippet
35035    for ac_prog in strip
35036do
35037  # Extract the first word of "$ac_prog", so it can be a program name with args.
35038set dummy $ac_prog; ac_word=$2
35039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35040$as_echo_n "checking for $ac_word... " >&6; }
35041if ${ac_cv_path_STRIP+:} false; then :
35042  $as_echo_n "(cached) " >&6
35043else
35044  case $STRIP in
35045  [\\/]* | ?:[\\/]*)
35046  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35047  ;;
35048  *)
35049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35050for as_dir in $PATH
35051do
35052  IFS=$as_save_IFS
35053  test -z "$as_dir" && as_dir=.
35054    for ac_exec_ext in '' $ac_executable_extensions; do
35055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35056    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35058    break 2
35059  fi
35060done
35061  done
35062IFS=$as_save_IFS
35063
35064  ;;
35065esac
35066fi
35067STRIP=$ac_cv_path_STRIP
35068if test -n "$STRIP"; then
35069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35070$as_echo "$STRIP" >&6; }
35071else
35072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35073$as_echo "no" >&6; }
35074fi
35075
35076
35077  test -n "$STRIP" && break
35078done
35079
35080  else
35081    # The variable is set, but is it from the command line or the environment?
35082
35083    # Try to remove the string !STRIP! from our list.
35084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35086      # If it failed, the variable was not from the command line. Ignore it,
35087      # but warn the user (except for BASH, which is always set by the calling BASH).
35088      if test "xSTRIP" != xBASH; then
35089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35090$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35091      fi
35092      # Try to locate tool using the code snippet
35093      for ac_prog in strip
35094do
35095  # Extract the first word of "$ac_prog", so it can be a program name with args.
35096set dummy $ac_prog; ac_word=$2
35097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35098$as_echo_n "checking for $ac_word... " >&6; }
35099if ${ac_cv_path_STRIP+:} false; then :
35100  $as_echo_n "(cached) " >&6
35101else
35102  case $STRIP in
35103  [\\/]* | ?:[\\/]*)
35104  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35105  ;;
35106  *)
35107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35108for as_dir in $PATH
35109do
35110  IFS=$as_save_IFS
35111  test -z "$as_dir" && as_dir=.
35112    for ac_exec_ext in '' $ac_executable_extensions; do
35113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35114    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35116    break 2
35117  fi
35118done
35119  done
35120IFS=$as_save_IFS
35121
35122  ;;
35123esac
35124fi
35125STRIP=$ac_cv_path_STRIP
35126if test -n "$STRIP"; then
35127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35128$as_echo "$STRIP" >&6; }
35129else
35130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35131$as_echo "no" >&6; }
35132fi
35133
35134
35135  test -n "$STRIP" && break
35136done
35137
35138    else
35139      # If it succeeded, then it was overridden by the user. We will use it
35140      # for the tool.
35141
35142      # First remove it from the list of overridden variables, so we can test
35143      # for unknown variables in the end.
35144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35145
35146      # Check if the provided tool contains a complete path.
35147      tool_specified="$STRIP"
35148      tool_basename="${tool_specified##*/}"
35149      if test "x$tool_basename" = "x$tool_specified"; then
35150        # A command without a complete path is provided, search $PATH.
35151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35152$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35153        # Extract the first word of "$tool_basename", so it can be a program name with args.
35154set dummy $tool_basename; ac_word=$2
35155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35156$as_echo_n "checking for $ac_word... " >&6; }
35157if ${ac_cv_path_STRIP+:} false; then :
35158  $as_echo_n "(cached) " >&6
35159else
35160  case $STRIP in
35161  [\\/]* | ?:[\\/]*)
35162  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35163  ;;
35164  *)
35165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35166for as_dir in $PATH
35167do
35168  IFS=$as_save_IFS
35169  test -z "$as_dir" && as_dir=.
35170    for ac_exec_ext in '' $ac_executable_extensions; do
35171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35172    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35174    break 2
35175  fi
35176done
35177  done
35178IFS=$as_save_IFS
35179
35180  ;;
35181esac
35182fi
35183STRIP=$ac_cv_path_STRIP
35184if test -n "$STRIP"; then
35185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35186$as_echo "$STRIP" >&6; }
35187else
35188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35189$as_echo "no" >&6; }
35190fi
35191
35192
35193        if test "x$STRIP" = x; then
35194          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35195        fi
35196      else
35197        # Otherwise we believe it is a complete path. Use it as it is.
35198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35199$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35201$as_echo_n "checking for STRIP... " >&6; }
35202        if test ! -x "$tool_specified"; then
35203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35204$as_echo "not found" >&6; }
35205          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35206        fi
35207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35208$as_echo "$tool_specified" >&6; }
35209      fi
35210    fi
35211  fi
35212
35213
35214
35215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35216
35217  # First separate the path from the arguments. This will split at the first
35218  # space.
35219  complete="$STRIP"
35220  path="${complete%% *}"
35221  tmp="$complete EOL"
35222  arguments="${tmp#* }"
35223
35224  # Input might be given as Windows format, start by converting to
35225  # unix format.
35226  new_path=`$CYGPATH -u "$path"`
35227
35228  # Now try to locate executable using which
35229  new_path=`$WHICH "$new_path" 2> /dev/null`
35230  # bat and cmd files are not always considered executable in cygwin causing which
35231  # to not find them
35232  if test "x$new_path" = x \
35233      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35234      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35235    new_path=`$CYGPATH -u "$path"`
35236  fi
35237  if test "x$new_path" = x; then
35238    # Oops. Which didn't find the executable.
35239    # The splitting of arguments from the executable at a space might have been incorrect,
35240    # since paths with space are more likely in Windows. Give it another try with the whole
35241    # argument.
35242    path="$complete"
35243    arguments="EOL"
35244    new_path=`$CYGPATH -u "$path"`
35245    new_path=`$WHICH "$new_path" 2> /dev/null`
35246    # bat and cmd files are not always considered executable in cygwin causing which
35247    # to not find them
35248    if test "x$new_path" = x \
35249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35251      new_path=`$CYGPATH -u "$path"`
35252    fi
35253    if test "x$new_path" = x; then
35254      # It's still not found. Now this is an unrecoverable error.
35255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35256$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35257      has_space=`$ECHO "$complete" | $GREP " "`
35258      if test "x$has_space" != x; then
35259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35261      fi
35262      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35263    fi
35264  fi
35265
35266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35269  # "foo.exe" is OK but "foo" is an error.
35270  #
35271  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35272  # It is also a way to make sure we got the proper file name for the real test later on.
35273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35274  if test "x$test_shortpath" = x; then
35275    # Short path failed, file does not exist as specified.
35276    # Try adding .exe or .cmd
35277    if test -f "${new_path}.exe"; then
35278      input_to_shortpath="${new_path}.exe"
35279    elif test -f "${new_path}.cmd"; then
35280      input_to_shortpath="${new_path}.cmd"
35281    else
35282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35283$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35284      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35285$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35286      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35287    fi
35288  else
35289    input_to_shortpath="$new_path"
35290  fi
35291
35292  # Call helper function which possibly converts this using DOS-style short mode.
35293  # If so, the updated path is stored in $new_path.
35294  new_path="$input_to_shortpath"
35295
35296  input_path="$input_to_shortpath"
35297  # Check if we need to convert this using DOS-style short mode. If the path
35298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35299  # take no chances and rewrite it.
35300  # Note: m4 eats our [], so we need to use [ and ] instead.
35301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35302  if test "x$has_forbidden_chars" != x; then
35303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35307      # Going to short mode and back again did indeed matter. Since short mode is
35308      # case insensitive, let's make it lowercase to improve readability.
35309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35310      # Now convert it back to Unix-stile (cygpath)
35311      input_path=`$CYGPATH -u "$shortmode_path"`
35312      new_path="$input_path"
35313    fi
35314  fi
35315
35316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35317  if test "x$test_cygdrive_prefix" = x; then
35318    # As a simple fix, exclude /usr/bin since it's not a real path.
35319    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35321      # a path prefixed by /cygdrive for fixpath to work.
35322      new_path="$CYGWIN_ROOT_PATH$input_path"
35323    fi
35324  fi
35325
35326  # remove trailing .exe if any
35327  new_path="${new_path/%.exe/}"
35328
35329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35330
35331  # First separate the path from the arguments. This will split at the first
35332  # space.
35333  complete="$STRIP"
35334  path="${complete%% *}"
35335  tmp="$complete EOL"
35336  arguments="${tmp#* }"
35337
35338  # Input might be given as Windows format, start by converting to
35339  # unix format.
35340  new_path="$path"
35341
35342  windows_path="$new_path"
35343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35344    unix_path=`$CYGPATH -u "$windows_path"`
35345    new_path="$unix_path"
35346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35348    new_path="$unix_path"
35349  fi
35350
35351
35352  # Now try to locate executable using which
35353  new_path=`$WHICH "$new_path" 2> /dev/null`
35354
35355  if test "x$new_path" = x; then
35356    # Oops. Which didn't find the executable.
35357    # The splitting of arguments from the executable at a space might have been incorrect,
35358    # since paths with space are more likely in Windows. Give it another try with the whole
35359    # argument.
35360    path="$complete"
35361    arguments="EOL"
35362    new_path="$path"
35363
35364  windows_path="$new_path"
35365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35366    unix_path=`$CYGPATH -u "$windows_path"`
35367    new_path="$unix_path"
35368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35370    new_path="$unix_path"
35371  fi
35372
35373
35374    new_path=`$WHICH "$new_path" 2> /dev/null`
35375    # bat and cmd files are not always considered executable in MSYS causing which
35376    # to not find them
35377    if test "x$new_path" = x \
35378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35380      new_path="$path"
35381
35382  windows_path="$new_path"
35383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35384    unix_path=`$CYGPATH -u "$windows_path"`
35385    new_path="$unix_path"
35386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35388    new_path="$unix_path"
35389  fi
35390
35391    fi
35392
35393    if test "x$new_path" = x; then
35394      # It's still not found. Now this is an unrecoverable error.
35395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35396$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35397      has_space=`$ECHO "$complete" | $GREP " "`
35398      if test "x$has_space" != x; then
35399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35401      fi
35402      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35403    fi
35404  fi
35405
35406  # Now new_path has a complete unix path to the binary
35407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35408    # Keep paths in /bin as-is, but remove trailing .exe if any
35409    new_path="${new_path/%.exe/}"
35410    # Do not save /bin paths to all_fixpath_prefixes!
35411  else
35412    # Not in mixed or Windows style, start by that.
35413    new_path=`cmd //c echo $new_path`
35414
35415  input_path="$new_path"
35416  # Check if we need to convert this using DOS-style short mode. If the path
35417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35418  # take no chances and rewrite it.
35419  # Note: m4 eats our [], so we need to use [ and ] instead.
35420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35421  if test "x$has_forbidden_chars" != x; then
35422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35424  fi
35425
35426    # Output is in $new_path
35427
35428  windows_path="$new_path"
35429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35430    unix_path=`$CYGPATH -u "$windows_path"`
35431    new_path="$unix_path"
35432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35434    new_path="$unix_path"
35435  fi
35436
35437    # remove trailing .exe if any
35438    new_path="${new_path/%.exe/}"
35439
35440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35442  fi
35443
35444  else
35445    # We're on a unix platform. Hooray! :)
35446    # First separate the path from the arguments. This will split at the first
35447    # space.
35448    complete="$STRIP"
35449    path="${complete%% *}"
35450    tmp="$complete EOL"
35451    arguments="${tmp#* }"
35452
35453    # Cannot rely on the command "which" here since it doesn't always work.
35454    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35455    if test -z "$is_absolute_path"; then
35456      # Path to executable is not absolute. Find it.
35457      IFS_save="$IFS"
35458      IFS=:
35459      for p in $PATH; do
35460        if test -f "$p/$path" && test -x "$p/$path"; then
35461          new_path="$p/$path"
35462          break
35463        fi
35464      done
35465      IFS="$IFS_save"
35466    else
35467      # This is an absolute path, we can use it without further modifications.
35468      new_path="$path"
35469    fi
35470
35471    if test "x$new_path" = x; then
35472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35473$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35474      has_space=`$ECHO "$complete" | $GREP " "`
35475      if test "x$has_space" != x; then
35476        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35478      fi
35479      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35480    fi
35481  fi
35482
35483  # Now join together the path and the arguments once again
35484  if test "x$arguments" != xEOL; then
35485    new_complete="$new_path ${arguments% *}"
35486  else
35487    new_complete="$new_path"
35488  fi
35489
35490  if test "x$complete" != "x$new_complete"; then
35491    STRIP="$new_complete"
35492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35493$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35494  fi
35495
35496
35497
35498  # Publish this variable in the help.
35499
35500
35501  if test "x$NM" = x; then
35502    # The variable is not set by user, try to locate tool using the code snippet
35503    for ac_prog in nm
35504do
35505  # Extract the first word of "$ac_prog", so it can be a program name with args.
35506set dummy $ac_prog; ac_word=$2
35507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35508$as_echo_n "checking for $ac_word... " >&6; }
35509if ${ac_cv_path_NM+:} false; then :
35510  $as_echo_n "(cached) " >&6
35511else
35512  case $NM in
35513  [\\/]* | ?:[\\/]*)
35514  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35515  ;;
35516  *)
35517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35518for as_dir in $PATH
35519do
35520  IFS=$as_save_IFS
35521  test -z "$as_dir" && as_dir=.
35522    for ac_exec_ext in '' $ac_executable_extensions; do
35523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35524    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35526    break 2
35527  fi
35528done
35529  done
35530IFS=$as_save_IFS
35531
35532  ;;
35533esac
35534fi
35535NM=$ac_cv_path_NM
35536if test -n "$NM"; then
35537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35538$as_echo "$NM" >&6; }
35539else
35540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35541$as_echo "no" >&6; }
35542fi
35543
35544
35545  test -n "$NM" && break
35546done
35547
35548  else
35549    # The variable is set, but is it from the command line or the environment?
35550
35551    # Try to remove the string !NM! from our list.
35552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35554      # If it failed, the variable was not from the command line. Ignore it,
35555      # but warn the user (except for BASH, which is always set by the calling BASH).
35556      if test "xNM" != xBASH; then
35557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35558$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35559      fi
35560      # Try to locate tool using the code snippet
35561      for ac_prog in nm
35562do
35563  # Extract the first word of "$ac_prog", so it can be a program name with args.
35564set dummy $ac_prog; ac_word=$2
35565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35566$as_echo_n "checking for $ac_word... " >&6; }
35567if ${ac_cv_path_NM+:} false; then :
35568  $as_echo_n "(cached) " >&6
35569else
35570  case $NM in
35571  [\\/]* | ?:[\\/]*)
35572  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35573  ;;
35574  *)
35575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35576for as_dir in $PATH
35577do
35578  IFS=$as_save_IFS
35579  test -z "$as_dir" && as_dir=.
35580    for ac_exec_ext in '' $ac_executable_extensions; do
35581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35582    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35584    break 2
35585  fi
35586done
35587  done
35588IFS=$as_save_IFS
35589
35590  ;;
35591esac
35592fi
35593NM=$ac_cv_path_NM
35594if test -n "$NM"; then
35595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35596$as_echo "$NM" >&6; }
35597else
35598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35599$as_echo "no" >&6; }
35600fi
35601
35602
35603  test -n "$NM" && break
35604done
35605
35606    else
35607      # If it succeeded, then it was overridden by the user. We will use it
35608      # for the tool.
35609
35610      # First remove it from the list of overridden variables, so we can test
35611      # for unknown variables in the end.
35612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35613
35614      # Check if the provided tool contains a complete path.
35615      tool_specified="$NM"
35616      tool_basename="${tool_specified##*/}"
35617      if test "x$tool_basename" = "x$tool_specified"; then
35618        # A command without a complete path is provided, search $PATH.
35619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35620$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35621        # Extract the first word of "$tool_basename", so it can be a program name with args.
35622set dummy $tool_basename; ac_word=$2
35623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35624$as_echo_n "checking for $ac_word... " >&6; }
35625if ${ac_cv_path_NM+:} false; then :
35626  $as_echo_n "(cached) " >&6
35627else
35628  case $NM in
35629  [\\/]* | ?:[\\/]*)
35630  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35631  ;;
35632  *)
35633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35634for as_dir in $PATH
35635do
35636  IFS=$as_save_IFS
35637  test -z "$as_dir" && as_dir=.
35638    for ac_exec_ext in '' $ac_executable_extensions; do
35639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35640    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35642    break 2
35643  fi
35644done
35645  done
35646IFS=$as_save_IFS
35647
35648  ;;
35649esac
35650fi
35651NM=$ac_cv_path_NM
35652if test -n "$NM"; then
35653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35654$as_echo "$NM" >&6; }
35655else
35656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35657$as_echo "no" >&6; }
35658fi
35659
35660
35661        if test "x$NM" = x; then
35662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35663        fi
35664      else
35665        # Otherwise we believe it is a complete path. Use it as it is.
35666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35667$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35669$as_echo_n "checking for NM... " >&6; }
35670        if test ! -x "$tool_specified"; then
35671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35672$as_echo "not found" >&6; }
35673          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35674        fi
35675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35676$as_echo "$tool_specified" >&6; }
35677      fi
35678    fi
35679  fi
35680
35681
35682
35683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35684
35685  # First separate the path from the arguments. This will split at the first
35686  # space.
35687  complete="$NM"
35688  path="${complete%% *}"
35689  tmp="$complete EOL"
35690  arguments="${tmp#* }"
35691
35692  # Input might be given as Windows format, start by converting to
35693  # unix format.
35694  new_path=`$CYGPATH -u "$path"`
35695
35696  # Now try to locate executable using which
35697  new_path=`$WHICH "$new_path" 2> /dev/null`
35698  # bat and cmd files are not always considered executable in cygwin causing which
35699  # to not find them
35700  if test "x$new_path" = x \
35701      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35702      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35703    new_path=`$CYGPATH -u "$path"`
35704  fi
35705  if test "x$new_path" = x; then
35706    # Oops. Which didn't find the executable.
35707    # The splitting of arguments from the executable at a space might have been incorrect,
35708    # since paths with space are more likely in Windows. Give it another try with the whole
35709    # argument.
35710    path="$complete"
35711    arguments="EOL"
35712    new_path=`$CYGPATH -u "$path"`
35713    new_path=`$WHICH "$new_path" 2> /dev/null`
35714    # bat and cmd files are not always considered executable in cygwin causing which
35715    # to not find them
35716    if test "x$new_path" = x \
35717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35719      new_path=`$CYGPATH -u "$path"`
35720    fi
35721    if test "x$new_path" = x; then
35722      # It's still not found. Now this is an unrecoverable error.
35723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35724$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35725      has_space=`$ECHO "$complete" | $GREP " "`
35726      if test "x$has_space" != x; then
35727        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35728$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35729      fi
35730      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35731    fi
35732  fi
35733
35734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35737  # "foo.exe" is OK but "foo" is an error.
35738  #
35739  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35740  # It is also a way to make sure we got the proper file name for the real test later on.
35741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35742  if test "x$test_shortpath" = x; then
35743    # Short path failed, file does not exist as specified.
35744    # Try adding .exe or .cmd
35745    if test -f "${new_path}.exe"; then
35746      input_to_shortpath="${new_path}.exe"
35747    elif test -f "${new_path}.cmd"; then
35748      input_to_shortpath="${new_path}.cmd"
35749    else
35750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35751$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35752      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35753$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35754      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35755    fi
35756  else
35757    input_to_shortpath="$new_path"
35758  fi
35759
35760  # Call helper function which possibly converts this using DOS-style short mode.
35761  # If so, the updated path is stored in $new_path.
35762  new_path="$input_to_shortpath"
35763
35764  input_path="$input_to_shortpath"
35765  # Check if we need to convert this using DOS-style short mode. If the path
35766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35767  # take no chances and rewrite it.
35768  # Note: m4 eats our [], so we need to use [ and ] instead.
35769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35770  if test "x$has_forbidden_chars" != x; then
35771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35775      # Going to short mode and back again did indeed matter. Since short mode is
35776      # case insensitive, let's make it lowercase to improve readability.
35777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35778      # Now convert it back to Unix-stile (cygpath)
35779      input_path=`$CYGPATH -u "$shortmode_path"`
35780      new_path="$input_path"
35781    fi
35782  fi
35783
35784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35785  if test "x$test_cygdrive_prefix" = x; then
35786    # As a simple fix, exclude /usr/bin since it's not a real path.
35787    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35789      # a path prefixed by /cygdrive for fixpath to work.
35790      new_path="$CYGWIN_ROOT_PATH$input_path"
35791    fi
35792  fi
35793
35794  # remove trailing .exe if any
35795  new_path="${new_path/%.exe/}"
35796
35797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35798
35799  # First separate the path from the arguments. This will split at the first
35800  # space.
35801  complete="$NM"
35802  path="${complete%% *}"
35803  tmp="$complete EOL"
35804  arguments="${tmp#* }"
35805
35806  # Input might be given as Windows format, start by converting to
35807  # unix format.
35808  new_path="$path"
35809
35810  windows_path="$new_path"
35811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35812    unix_path=`$CYGPATH -u "$windows_path"`
35813    new_path="$unix_path"
35814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35816    new_path="$unix_path"
35817  fi
35818
35819
35820  # Now try to locate executable using which
35821  new_path=`$WHICH "$new_path" 2> /dev/null`
35822
35823  if test "x$new_path" = x; then
35824    # Oops. Which didn't find the executable.
35825    # The splitting of arguments from the executable at a space might have been incorrect,
35826    # since paths with space are more likely in Windows. Give it another try with the whole
35827    # argument.
35828    path="$complete"
35829    arguments="EOL"
35830    new_path="$path"
35831
35832  windows_path="$new_path"
35833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35834    unix_path=`$CYGPATH -u "$windows_path"`
35835    new_path="$unix_path"
35836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35838    new_path="$unix_path"
35839  fi
35840
35841
35842    new_path=`$WHICH "$new_path" 2> /dev/null`
35843    # bat and cmd files are not always considered executable in MSYS causing which
35844    # to not find them
35845    if test "x$new_path" = x \
35846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35848      new_path="$path"
35849
35850  windows_path="$new_path"
35851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35852    unix_path=`$CYGPATH -u "$windows_path"`
35853    new_path="$unix_path"
35854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35856    new_path="$unix_path"
35857  fi
35858
35859    fi
35860
35861    if test "x$new_path" = x; then
35862      # It's still not found. Now this is an unrecoverable error.
35863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35864$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35865      has_space=`$ECHO "$complete" | $GREP " "`
35866      if test "x$has_space" != x; then
35867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35869      fi
35870      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35871    fi
35872  fi
35873
35874  # Now new_path has a complete unix path to the binary
35875  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35876    # Keep paths in /bin as-is, but remove trailing .exe if any
35877    new_path="${new_path/%.exe/}"
35878    # Do not save /bin paths to all_fixpath_prefixes!
35879  else
35880    # Not in mixed or Windows style, start by that.
35881    new_path=`cmd //c echo $new_path`
35882
35883  input_path="$new_path"
35884  # Check if we need to convert this using DOS-style short mode. If the path
35885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35886  # take no chances and rewrite it.
35887  # Note: m4 eats our [], so we need to use [ and ] instead.
35888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35889  if test "x$has_forbidden_chars" != x; then
35890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35892  fi
35893
35894    # Output is in $new_path
35895
35896  windows_path="$new_path"
35897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35898    unix_path=`$CYGPATH -u "$windows_path"`
35899    new_path="$unix_path"
35900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35902    new_path="$unix_path"
35903  fi
35904
35905    # remove trailing .exe if any
35906    new_path="${new_path/%.exe/}"
35907
35908    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35909    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35910  fi
35911
35912  else
35913    # We're on a unix platform. Hooray! :)
35914    # First separate the path from the arguments. This will split at the first
35915    # space.
35916    complete="$NM"
35917    path="${complete%% *}"
35918    tmp="$complete EOL"
35919    arguments="${tmp#* }"
35920
35921    # Cannot rely on the command "which" here since it doesn't always work.
35922    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35923    if test -z "$is_absolute_path"; then
35924      # Path to executable is not absolute. Find it.
35925      IFS_save="$IFS"
35926      IFS=:
35927      for p in $PATH; do
35928        if test -f "$p/$path" && test -x "$p/$path"; then
35929          new_path="$p/$path"
35930          break
35931        fi
35932      done
35933      IFS="$IFS_save"
35934    else
35935      # This is an absolute path, we can use it without further modifications.
35936      new_path="$path"
35937    fi
35938
35939    if test "x$new_path" = x; then
35940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35941$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35942      has_space=`$ECHO "$complete" | $GREP " "`
35943      if test "x$has_space" != x; then
35944        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35945$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35946      fi
35947      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35948    fi
35949  fi
35950
35951  # Now join together the path and the arguments once again
35952  if test "x$arguments" != xEOL; then
35953    new_complete="$new_path ${arguments% *}"
35954  else
35955    new_complete="$new_path"
35956  fi
35957
35958  if test "x$complete" != "x$new_complete"; then
35959    NM="$new_complete"
35960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35961$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35962  fi
35963
35964
35965
35966  # Publish this variable in the help.
35967
35968
35969  if test "x$GNM" = x; then
35970    # The variable is not set by user, try to locate tool using the code snippet
35971    for ac_prog in gnm
35972do
35973  # Extract the first word of "$ac_prog", so it can be a program name with args.
35974set dummy $ac_prog; ac_word=$2
35975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35976$as_echo_n "checking for $ac_word... " >&6; }
35977if ${ac_cv_path_GNM+:} false; then :
35978  $as_echo_n "(cached) " >&6
35979else
35980  case $GNM in
35981  [\\/]* | ?:[\\/]*)
35982  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35983  ;;
35984  *)
35985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35986for as_dir in $PATH
35987do
35988  IFS=$as_save_IFS
35989  test -z "$as_dir" && as_dir=.
35990    for ac_exec_ext in '' $ac_executable_extensions; do
35991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35992    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35994    break 2
35995  fi
35996done
35997  done
35998IFS=$as_save_IFS
35999
36000  ;;
36001esac
36002fi
36003GNM=$ac_cv_path_GNM
36004if test -n "$GNM"; then
36005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36006$as_echo "$GNM" >&6; }
36007else
36008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36009$as_echo "no" >&6; }
36010fi
36011
36012
36013  test -n "$GNM" && break
36014done
36015
36016  else
36017    # The variable is set, but is it from the command line or the environment?
36018
36019    # Try to remove the string !GNM! from our list.
36020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36022      # If it failed, the variable was not from the command line. Ignore it,
36023      # but warn the user (except for BASH, which is always set by the calling BASH).
36024      if test "xGNM" != xBASH; then
36025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36026$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36027      fi
36028      # Try to locate tool using the code snippet
36029      for ac_prog in gnm
36030do
36031  # Extract the first word of "$ac_prog", so it can be a program name with args.
36032set dummy $ac_prog; ac_word=$2
36033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36034$as_echo_n "checking for $ac_word... " >&6; }
36035if ${ac_cv_path_GNM+:} false; then :
36036  $as_echo_n "(cached) " >&6
36037else
36038  case $GNM in
36039  [\\/]* | ?:[\\/]*)
36040  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36041  ;;
36042  *)
36043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36044for as_dir in $PATH
36045do
36046  IFS=$as_save_IFS
36047  test -z "$as_dir" && as_dir=.
36048    for ac_exec_ext in '' $ac_executable_extensions; do
36049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36050    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36052    break 2
36053  fi
36054done
36055  done
36056IFS=$as_save_IFS
36057
36058  ;;
36059esac
36060fi
36061GNM=$ac_cv_path_GNM
36062if test -n "$GNM"; then
36063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36064$as_echo "$GNM" >&6; }
36065else
36066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36067$as_echo "no" >&6; }
36068fi
36069
36070
36071  test -n "$GNM" && break
36072done
36073
36074    else
36075      # If it succeeded, then it was overridden by the user. We will use it
36076      # for the tool.
36077
36078      # First remove it from the list of overridden variables, so we can test
36079      # for unknown variables in the end.
36080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36081
36082      # Check if the provided tool contains a complete path.
36083      tool_specified="$GNM"
36084      tool_basename="${tool_specified##*/}"
36085      if test "x$tool_basename" = "x$tool_specified"; then
36086        # A command without a complete path is provided, search $PATH.
36087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36088$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36089        # Extract the first word of "$tool_basename", so it can be a program name with args.
36090set dummy $tool_basename; ac_word=$2
36091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36092$as_echo_n "checking for $ac_word... " >&6; }
36093if ${ac_cv_path_GNM+:} false; then :
36094  $as_echo_n "(cached) " >&6
36095else
36096  case $GNM in
36097  [\\/]* | ?:[\\/]*)
36098  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36099  ;;
36100  *)
36101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36102for as_dir in $PATH
36103do
36104  IFS=$as_save_IFS
36105  test -z "$as_dir" && as_dir=.
36106    for ac_exec_ext in '' $ac_executable_extensions; do
36107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36108    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36110    break 2
36111  fi
36112done
36113  done
36114IFS=$as_save_IFS
36115
36116  ;;
36117esac
36118fi
36119GNM=$ac_cv_path_GNM
36120if test -n "$GNM"; then
36121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36122$as_echo "$GNM" >&6; }
36123else
36124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36125$as_echo "no" >&6; }
36126fi
36127
36128
36129        if test "x$GNM" = x; then
36130          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36131        fi
36132      else
36133        # Otherwise we believe it is a complete path. Use it as it is.
36134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36135$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36137$as_echo_n "checking for GNM... " >&6; }
36138        if test ! -x "$tool_specified"; then
36139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36140$as_echo "not found" >&6; }
36141          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36142        fi
36143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36144$as_echo "$tool_specified" >&6; }
36145      fi
36146    fi
36147  fi
36148
36149
36150
36151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36152
36153  # First separate the path from the arguments. This will split at the first
36154  # space.
36155  complete="$GNM"
36156  path="${complete%% *}"
36157  tmp="$complete EOL"
36158  arguments="${tmp#* }"
36159
36160  # Input might be given as Windows format, start by converting to
36161  # unix format.
36162  new_path=`$CYGPATH -u "$path"`
36163
36164  # Now try to locate executable using which
36165  new_path=`$WHICH "$new_path" 2> /dev/null`
36166  # bat and cmd files are not always considered executable in cygwin causing which
36167  # to not find them
36168  if test "x$new_path" = x \
36169      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36170      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36171    new_path=`$CYGPATH -u "$path"`
36172  fi
36173  if test "x$new_path" = x; then
36174    # Oops. Which didn't find the executable.
36175    # The splitting of arguments from the executable at a space might have been incorrect,
36176    # since paths with space are more likely in Windows. Give it another try with the whole
36177    # argument.
36178    path="$complete"
36179    arguments="EOL"
36180    new_path=`$CYGPATH -u "$path"`
36181    new_path=`$WHICH "$new_path" 2> /dev/null`
36182    # bat and cmd files are not always considered executable in cygwin causing which
36183    # to not find them
36184    if test "x$new_path" = x \
36185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36187      new_path=`$CYGPATH -u "$path"`
36188    fi
36189    if test "x$new_path" = x; then
36190      # It's still not found. Now this is an unrecoverable error.
36191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36192$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36193      has_space=`$ECHO "$complete" | $GREP " "`
36194      if test "x$has_space" != x; then
36195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36197      fi
36198      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36199    fi
36200  fi
36201
36202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36205  # "foo.exe" is OK but "foo" is an error.
36206  #
36207  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36208  # It is also a way to make sure we got the proper file name for the real test later on.
36209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36210  if test "x$test_shortpath" = x; then
36211    # Short path failed, file does not exist as specified.
36212    # Try adding .exe or .cmd
36213    if test -f "${new_path}.exe"; then
36214      input_to_shortpath="${new_path}.exe"
36215    elif test -f "${new_path}.cmd"; then
36216      input_to_shortpath="${new_path}.cmd"
36217    else
36218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36219$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36222      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36223    fi
36224  else
36225    input_to_shortpath="$new_path"
36226  fi
36227
36228  # Call helper function which possibly converts this using DOS-style short mode.
36229  # If so, the updated path is stored in $new_path.
36230  new_path="$input_to_shortpath"
36231
36232  input_path="$input_to_shortpath"
36233  # Check if we need to convert this using DOS-style short mode. If the path
36234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36235  # take no chances and rewrite it.
36236  # Note: m4 eats our [], so we need to use [ and ] instead.
36237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36238  if test "x$has_forbidden_chars" != x; then
36239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36243      # Going to short mode and back again did indeed matter. Since short mode is
36244      # case insensitive, let's make it lowercase to improve readability.
36245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36246      # Now convert it back to Unix-stile (cygpath)
36247      input_path=`$CYGPATH -u "$shortmode_path"`
36248      new_path="$input_path"
36249    fi
36250  fi
36251
36252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36253  if test "x$test_cygdrive_prefix" = x; then
36254    # As a simple fix, exclude /usr/bin since it's not a real path.
36255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36257      # a path prefixed by /cygdrive for fixpath to work.
36258      new_path="$CYGWIN_ROOT_PATH$input_path"
36259    fi
36260  fi
36261
36262  # remove trailing .exe if any
36263  new_path="${new_path/%.exe/}"
36264
36265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36266
36267  # First separate the path from the arguments. This will split at the first
36268  # space.
36269  complete="$GNM"
36270  path="${complete%% *}"
36271  tmp="$complete EOL"
36272  arguments="${tmp#* }"
36273
36274  # Input might be given as Windows format, start by converting to
36275  # unix format.
36276  new_path="$path"
36277
36278  windows_path="$new_path"
36279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36280    unix_path=`$CYGPATH -u "$windows_path"`
36281    new_path="$unix_path"
36282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36284    new_path="$unix_path"
36285  fi
36286
36287
36288  # Now try to locate executable using which
36289  new_path=`$WHICH "$new_path" 2> /dev/null`
36290
36291  if test "x$new_path" = x; then
36292    # Oops. Which didn't find the executable.
36293    # The splitting of arguments from the executable at a space might have been incorrect,
36294    # since paths with space are more likely in Windows. Give it another try with the whole
36295    # argument.
36296    path="$complete"
36297    arguments="EOL"
36298    new_path="$path"
36299
36300  windows_path="$new_path"
36301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36302    unix_path=`$CYGPATH -u "$windows_path"`
36303    new_path="$unix_path"
36304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36306    new_path="$unix_path"
36307  fi
36308
36309
36310    new_path=`$WHICH "$new_path" 2> /dev/null`
36311    # bat and cmd files are not always considered executable in MSYS causing which
36312    # to not find them
36313    if test "x$new_path" = x \
36314        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36315        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36316      new_path="$path"
36317
36318  windows_path="$new_path"
36319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36320    unix_path=`$CYGPATH -u "$windows_path"`
36321    new_path="$unix_path"
36322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36324    new_path="$unix_path"
36325  fi
36326
36327    fi
36328
36329    if test "x$new_path" = x; then
36330      # It's still not found. Now this is an unrecoverable error.
36331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36332$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36333      has_space=`$ECHO "$complete" | $GREP " "`
36334      if test "x$has_space" != x; then
36335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36337      fi
36338      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36339    fi
36340  fi
36341
36342  # Now new_path has a complete unix path to the binary
36343  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36344    # Keep paths in /bin as-is, but remove trailing .exe if any
36345    new_path="${new_path/%.exe/}"
36346    # Do not save /bin paths to all_fixpath_prefixes!
36347  else
36348    # Not in mixed or Windows style, start by that.
36349    new_path=`cmd //c echo $new_path`
36350
36351  input_path="$new_path"
36352  # Check if we need to convert this using DOS-style short mode. If the path
36353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36354  # take no chances and rewrite it.
36355  # Note: m4 eats our [], so we need to use [ and ] instead.
36356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36357  if test "x$has_forbidden_chars" != x; then
36358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36360  fi
36361
36362    # Output is in $new_path
36363
36364  windows_path="$new_path"
36365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36366    unix_path=`$CYGPATH -u "$windows_path"`
36367    new_path="$unix_path"
36368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36370    new_path="$unix_path"
36371  fi
36372
36373    # remove trailing .exe if any
36374    new_path="${new_path/%.exe/}"
36375
36376    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36377    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36378  fi
36379
36380  else
36381    # We're on a unix platform. Hooray! :)
36382    # First separate the path from the arguments. This will split at the first
36383    # space.
36384    complete="$GNM"
36385    path="${complete%% *}"
36386    tmp="$complete EOL"
36387    arguments="${tmp#* }"
36388
36389    # Cannot rely on the command "which" here since it doesn't always work.
36390    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36391    if test -z "$is_absolute_path"; then
36392      # Path to executable is not absolute. Find it.
36393      IFS_save="$IFS"
36394      IFS=:
36395      for p in $PATH; do
36396        if test -f "$p/$path" && test -x "$p/$path"; then
36397          new_path="$p/$path"
36398          break
36399        fi
36400      done
36401      IFS="$IFS_save"
36402    else
36403      # This is an absolute path, we can use it without further modifications.
36404      new_path="$path"
36405    fi
36406
36407    if test "x$new_path" = x; then
36408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36409$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36410      has_space=`$ECHO "$complete" | $GREP " "`
36411      if test "x$has_space" != x; then
36412        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36413$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36414      fi
36415      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36416    fi
36417  fi
36418
36419  # Now join together the path and the arguments once again
36420  if test "x$arguments" != xEOL; then
36421    new_complete="$new_path ${arguments% *}"
36422  else
36423    new_complete="$new_path"
36424  fi
36425
36426  if test "x$complete" != "x$new_complete"; then
36427    GNM="$new_complete"
36428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36429$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36430  fi
36431
36432
36433
36434
36435  # Publish this variable in the help.
36436
36437
36438  if test "x$MCS" = x; then
36439    # The variable is not set by user, try to locate tool using the code snippet
36440    for ac_prog in mcs
36441do
36442  # Extract the first word of "$ac_prog", so it can be a program name with args.
36443set dummy $ac_prog; ac_word=$2
36444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36445$as_echo_n "checking for $ac_word... " >&6; }
36446if ${ac_cv_path_MCS+:} false; then :
36447  $as_echo_n "(cached) " >&6
36448else
36449  case $MCS in
36450  [\\/]* | ?:[\\/]*)
36451  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36452  ;;
36453  *)
36454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36455for as_dir in $PATH
36456do
36457  IFS=$as_save_IFS
36458  test -z "$as_dir" && as_dir=.
36459    for ac_exec_ext in '' $ac_executable_extensions; do
36460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36461    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36463    break 2
36464  fi
36465done
36466  done
36467IFS=$as_save_IFS
36468
36469  ;;
36470esac
36471fi
36472MCS=$ac_cv_path_MCS
36473if test -n "$MCS"; then
36474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36475$as_echo "$MCS" >&6; }
36476else
36477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36478$as_echo "no" >&6; }
36479fi
36480
36481
36482  test -n "$MCS" && break
36483done
36484
36485  else
36486    # The variable is set, but is it from the command line or the environment?
36487
36488    # Try to remove the string !MCS! from our list.
36489    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36490    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36491      # If it failed, the variable was not from the command line. Ignore it,
36492      # but warn the user (except for BASH, which is always set by the calling BASH).
36493      if test "xMCS" != xBASH; then
36494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36495$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36496      fi
36497      # Try to locate tool using the code snippet
36498      for ac_prog in mcs
36499do
36500  # Extract the first word of "$ac_prog", so it can be a program name with args.
36501set dummy $ac_prog; ac_word=$2
36502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36503$as_echo_n "checking for $ac_word... " >&6; }
36504if ${ac_cv_path_MCS+:} false; then :
36505  $as_echo_n "(cached) " >&6
36506else
36507  case $MCS in
36508  [\\/]* | ?:[\\/]*)
36509  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36510  ;;
36511  *)
36512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36513for as_dir in $PATH
36514do
36515  IFS=$as_save_IFS
36516  test -z "$as_dir" && as_dir=.
36517    for ac_exec_ext in '' $ac_executable_extensions; do
36518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36519    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36521    break 2
36522  fi
36523done
36524  done
36525IFS=$as_save_IFS
36526
36527  ;;
36528esac
36529fi
36530MCS=$ac_cv_path_MCS
36531if test -n "$MCS"; then
36532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36533$as_echo "$MCS" >&6; }
36534else
36535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36536$as_echo "no" >&6; }
36537fi
36538
36539
36540  test -n "$MCS" && break
36541done
36542
36543    else
36544      # If it succeeded, then it was overridden by the user. We will use it
36545      # for the tool.
36546
36547      # First remove it from the list of overridden variables, so we can test
36548      # for unknown variables in the end.
36549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36550
36551      # Check if the provided tool contains a complete path.
36552      tool_specified="$MCS"
36553      tool_basename="${tool_specified##*/}"
36554      if test "x$tool_basename" = "x$tool_specified"; then
36555        # A command without a complete path is provided, search $PATH.
36556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36557$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36558        # Extract the first word of "$tool_basename", so it can be a program name with args.
36559set dummy $tool_basename; ac_word=$2
36560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36561$as_echo_n "checking for $ac_word... " >&6; }
36562if ${ac_cv_path_MCS+:} false; then :
36563  $as_echo_n "(cached) " >&6
36564else
36565  case $MCS in
36566  [\\/]* | ?:[\\/]*)
36567  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36568  ;;
36569  *)
36570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36571for as_dir in $PATH
36572do
36573  IFS=$as_save_IFS
36574  test -z "$as_dir" && as_dir=.
36575    for ac_exec_ext in '' $ac_executable_extensions; do
36576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36577    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36579    break 2
36580  fi
36581done
36582  done
36583IFS=$as_save_IFS
36584
36585  ;;
36586esac
36587fi
36588MCS=$ac_cv_path_MCS
36589if test -n "$MCS"; then
36590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36591$as_echo "$MCS" >&6; }
36592else
36593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36594$as_echo "no" >&6; }
36595fi
36596
36597
36598        if test "x$MCS" = x; then
36599          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36600        fi
36601      else
36602        # Otherwise we believe it is a complete path. Use it as it is.
36603        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36604$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36606$as_echo_n "checking for MCS... " >&6; }
36607        if test ! -x "$tool_specified"; then
36608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36609$as_echo "not found" >&6; }
36610          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36611        fi
36612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36613$as_echo "$tool_specified" >&6; }
36614      fi
36615    fi
36616  fi
36617
36618
36619
36620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36621
36622  # First separate the path from the arguments. This will split at the first
36623  # space.
36624  complete="$MCS"
36625  path="${complete%% *}"
36626  tmp="$complete EOL"
36627  arguments="${tmp#* }"
36628
36629  # Input might be given as Windows format, start by converting to
36630  # unix format.
36631  new_path=`$CYGPATH -u "$path"`
36632
36633  # Now try to locate executable using which
36634  new_path=`$WHICH "$new_path" 2> /dev/null`
36635  # bat and cmd files are not always considered executable in cygwin causing which
36636  # to not find them
36637  if test "x$new_path" = x \
36638      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36639      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36640    new_path=`$CYGPATH -u "$path"`
36641  fi
36642  if test "x$new_path" = x; then
36643    # Oops. Which didn't find the executable.
36644    # The splitting of arguments from the executable at a space might have been incorrect,
36645    # since paths with space are more likely in Windows. Give it another try with the whole
36646    # argument.
36647    path="$complete"
36648    arguments="EOL"
36649    new_path=`$CYGPATH -u "$path"`
36650    new_path=`$WHICH "$new_path" 2> /dev/null`
36651    # bat and cmd files are not always considered executable in cygwin causing which
36652    # to not find them
36653    if test "x$new_path" = x \
36654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36656      new_path=`$CYGPATH -u "$path"`
36657    fi
36658    if test "x$new_path" = x; then
36659      # It's still not found. Now this is an unrecoverable error.
36660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36661$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36662      has_space=`$ECHO "$complete" | $GREP " "`
36663      if test "x$has_space" != x; then
36664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36666      fi
36667      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36668    fi
36669  fi
36670
36671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36674  # "foo.exe" is OK but "foo" is an error.
36675  #
36676  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36677  # It is also a way to make sure we got the proper file name for the real test later on.
36678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36679  if test "x$test_shortpath" = x; then
36680    # Short path failed, file does not exist as specified.
36681    # Try adding .exe or .cmd
36682    if test -f "${new_path}.exe"; then
36683      input_to_shortpath="${new_path}.exe"
36684    elif test -f "${new_path}.cmd"; then
36685      input_to_shortpath="${new_path}.cmd"
36686    else
36687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36688$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36691      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36692    fi
36693  else
36694    input_to_shortpath="$new_path"
36695  fi
36696
36697  # Call helper function which possibly converts this using DOS-style short mode.
36698  # If so, the updated path is stored in $new_path.
36699  new_path="$input_to_shortpath"
36700
36701  input_path="$input_to_shortpath"
36702  # Check if we need to convert this using DOS-style short mode. If the path
36703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36704  # take no chances and rewrite it.
36705  # Note: m4 eats our [], so we need to use [ and ] instead.
36706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36707  if test "x$has_forbidden_chars" != x; then
36708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36712      # Going to short mode and back again did indeed matter. Since short mode is
36713      # case insensitive, let's make it lowercase to improve readability.
36714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36715      # Now convert it back to Unix-stile (cygpath)
36716      input_path=`$CYGPATH -u "$shortmode_path"`
36717      new_path="$input_path"
36718    fi
36719  fi
36720
36721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36722  if test "x$test_cygdrive_prefix" = x; then
36723    # As a simple fix, exclude /usr/bin since it's not a real path.
36724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36726      # a path prefixed by /cygdrive for fixpath to work.
36727      new_path="$CYGWIN_ROOT_PATH$input_path"
36728    fi
36729  fi
36730
36731  # remove trailing .exe if any
36732  new_path="${new_path/%.exe/}"
36733
36734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36735
36736  # First separate the path from the arguments. This will split at the first
36737  # space.
36738  complete="$MCS"
36739  path="${complete%% *}"
36740  tmp="$complete EOL"
36741  arguments="${tmp#* }"
36742
36743  # Input might be given as Windows format, start by converting to
36744  # unix format.
36745  new_path="$path"
36746
36747  windows_path="$new_path"
36748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36749    unix_path=`$CYGPATH -u "$windows_path"`
36750    new_path="$unix_path"
36751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36753    new_path="$unix_path"
36754  fi
36755
36756
36757  # Now try to locate executable using which
36758  new_path=`$WHICH "$new_path" 2> /dev/null`
36759
36760  if test "x$new_path" = x; then
36761    # Oops. Which didn't find the executable.
36762    # The splitting of arguments from the executable at a space might have been incorrect,
36763    # since paths with space are more likely in Windows. Give it another try with the whole
36764    # argument.
36765    path="$complete"
36766    arguments="EOL"
36767    new_path="$path"
36768
36769  windows_path="$new_path"
36770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36771    unix_path=`$CYGPATH -u "$windows_path"`
36772    new_path="$unix_path"
36773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36775    new_path="$unix_path"
36776  fi
36777
36778
36779    new_path=`$WHICH "$new_path" 2> /dev/null`
36780    # bat and cmd files are not always considered executable in MSYS causing which
36781    # to not find them
36782    if test "x$new_path" = x \
36783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36785      new_path="$path"
36786
36787  windows_path="$new_path"
36788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36789    unix_path=`$CYGPATH -u "$windows_path"`
36790    new_path="$unix_path"
36791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36793    new_path="$unix_path"
36794  fi
36795
36796    fi
36797
36798    if test "x$new_path" = x; then
36799      # It's still not found. Now this is an unrecoverable error.
36800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36801$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36802      has_space=`$ECHO "$complete" | $GREP " "`
36803      if test "x$has_space" != x; then
36804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36806      fi
36807      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36808    fi
36809  fi
36810
36811  # Now new_path has a complete unix path to the binary
36812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36813    # Keep paths in /bin as-is, but remove trailing .exe if any
36814    new_path="${new_path/%.exe/}"
36815    # Do not save /bin paths to all_fixpath_prefixes!
36816  else
36817    # Not in mixed or Windows style, start by that.
36818    new_path=`cmd //c echo $new_path`
36819
36820  input_path="$new_path"
36821  # Check if we need to convert this using DOS-style short mode. If the path
36822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36823  # take no chances and rewrite it.
36824  # Note: m4 eats our [], so we need to use [ and ] instead.
36825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36826  if test "x$has_forbidden_chars" != x; then
36827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36829  fi
36830
36831    # Output is in $new_path
36832
36833  windows_path="$new_path"
36834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36835    unix_path=`$CYGPATH -u "$windows_path"`
36836    new_path="$unix_path"
36837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36839    new_path="$unix_path"
36840  fi
36841
36842    # remove trailing .exe if any
36843    new_path="${new_path/%.exe/}"
36844
36845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36847  fi
36848
36849  else
36850    # We're on a unix platform. Hooray! :)
36851    # First separate the path from the arguments. This will split at the first
36852    # space.
36853    complete="$MCS"
36854    path="${complete%% *}"
36855    tmp="$complete EOL"
36856    arguments="${tmp#* }"
36857
36858    # Cannot rely on the command "which" here since it doesn't always work.
36859    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36860    if test -z "$is_absolute_path"; then
36861      # Path to executable is not absolute. Find it.
36862      IFS_save="$IFS"
36863      IFS=:
36864      for p in $PATH; do
36865        if test -f "$p/$path" && test -x "$p/$path"; then
36866          new_path="$p/$path"
36867          break
36868        fi
36869      done
36870      IFS="$IFS_save"
36871    else
36872      # This is an absolute path, we can use it without further modifications.
36873      new_path="$path"
36874    fi
36875
36876    if test "x$new_path" = x; then
36877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36878$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36879      has_space=`$ECHO "$complete" | $GREP " "`
36880      if test "x$has_space" != x; then
36881        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36882$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36883      fi
36884      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36885    fi
36886  fi
36887
36888  # Now join together the path and the arguments once again
36889  if test "x$arguments" != xEOL; then
36890    new_complete="$new_path ${arguments% *}"
36891  else
36892    new_complete="$new_path"
36893  fi
36894
36895  if test "x$complete" != "x$new_complete"; then
36896    MCS="$new_complete"
36897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36898$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36899  fi
36900
36901  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36902    # FIXME: we should unify this with the solaris case above.
36903
36904
36905  # Publish this variable in the help.
36906
36907
36908  if test "x$STRIP" = x; then
36909    # The variable is not set by user, try to locate tool using the code snippet
36910    if test -n "$ac_tool_prefix"; then
36911  for ac_prog in strip
36912  do
36913    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36914set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36916$as_echo_n "checking for $ac_word... " >&6; }
36917if ${ac_cv_prog_STRIP+:} false; then :
36918  $as_echo_n "(cached) " >&6
36919else
36920  if test -n "$STRIP"; then
36921  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36922else
36923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36924for as_dir in $PATH
36925do
36926  IFS=$as_save_IFS
36927  test -z "$as_dir" && as_dir=.
36928    for ac_exec_ext in '' $ac_executable_extensions; do
36929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36930    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36932    break 2
36933  fi
36934done
36935  done
36936IFS=$as_save_IFS
36937
36938fi
36939fi
36940STRIP=$ac_cv_prog_STRIP
36941if test -n "$STRIP"; then
36942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36943$as_echo "$STRIP" >&6; }
36944else
36945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36946$as_echo "no" >&6; }
36947fi
36948
36949
36950    test -n "$STRIP" && break
36951  done
36952fi
36953if test -z "$STRIP"; then
36954  ac_ct_STRIP=$STRIP
36955  for ac_prog in strip
36956do
36957  # Extract the first word of "$ac_prog", so it can be a program name with args.
36958set dummy $ac_prog; ac_word=$2
36959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36960$as_echo_n "checking for $ac_word... " >&6; }
36961if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36962  $as_echo_n "(cached) " >&6
36963else
36964  if test -n "$ac_ct_STRIP"; then
36965  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36966else
36967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36968for as_dir in $PATH
36969do
36970  IFS=$as_save_IFS
36971  test -z "$as_dir" && as_dir=.
36972    for ac_exec_ext in '' $ac_executable_extensions; do
36973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36974    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36976    break 2
36977  fi
36978done
36979  done
36980IFS=$as_save_IFS
36981
36982fi
36983fi
36984ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36985if test -n "$ac_ct_STRIP"; then
36986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36987$as_echo "$ac_ct_STRIP" >&6; }
36988else
36989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36990$as_echo "no" >&6; }
36991fi
36992
36993
36994  test -n "$ac_ct_STRIP" && break
36995done
36996
36997  if test "x$ac_ct_STRIP" = x; then
36998    STRIP=""
36999  else
37000    case $cross_compiling:$ac_tool_warned in
37001yes:)
37002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37004ac_tool_warned=yes ;;
37005esac
37006    STRIP=$ac_ct_STRIP
37007  fi
37008fi
37009
37010  else
37011    # The variable is set, but is it from the command line or the environment?
37012
37013    # Try to remove the string !STRIP! from our list.
37014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37016      # If it failed, the variable was not from the command line. Ignore it,
37017      # but warn the user (except for BASH, which is always set by the calling BASH).
37018      if test "xSTRIP" != xBASH; then
37019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37020$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37021      fi
37022      # Try to locate tool using the code snippet
37023      if test -n "$ac_tool_prefix"; then
37024  for ac_prog in strip
37025  do
37026    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37029$as_echo_n "checking for $ac_word... " >&6; }
37030if ${ac_cv_prog_STRIP+:} false; then :
37031  $as_echo_n "(cached) " >&6
37032else
37033  if test -n "$STRIP"; then
37034  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37035else
37036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37037for as_dir in $PATH
37038do
37039  IFS=$as_save_IFS
37040  test -z "$as_dir" && as_dir=.
37041    for ac_exec_ext in '' $ac_executable_extensions; do
37042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37043    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37045    break 2
37046  fi
37047done
37048  done
37049IFS=$as_save_IFS
37050
37051fi
37052fi
37053STRIP=$ac_cv_prog_STRIP
37054if test -n "$STRIP"; then
37055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37056$as_echo "$STRIP" >&6; }
37057else
37058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37059$as_echo "no" >&6; }
37060fi
37061
37062
37063    test -n "$STRIP" && break
37064  done
37065fi
37066if test -z "$STRIP"; then
37067  ac_ct_STRIP=$STRIP
37068  for ac_prog in strip
37069do
37070  # Extract the first word of "$ac_prog", so it can be a program name with args.
37071set dummy $ac_prog; ac_word=$2
37072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37073$as_echo_n "checking for $ac_word... " >&6; }
37074if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37075  $as_echo_n "(cached) " >&6
37076else
37077  if test -n "$ac_ct_STRIP"; then
37078  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37079else
37080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37081for as_dir in $PATH
37082do
37083  IFS=$as_save_IFS
37084  test -z "$as_dir" && as_dir=.
37085    for ac_exec_ext in '' $ac_executable_extensions; do
37086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37087    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37089    break 2
37090  fi
37091done
37092  done
37093IFS=$as_save_IFS
37094
37095fi
37096fi
37097ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37098if test -n "$ac_ct_STRIP"; then
37099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37100$as_echo "$ac_ct_STRIP" >&6; }
37101else
37102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37103$as_echo "no" >&6; }
37104fi
37105
37106
37107  test -n "$ac_ct_STRIP" && break
37108done
37109
37110  if test "x$ac_ct_STRIP" = x; then
37111    STRIP=""
37112  else
37113    case $cross_compiling:$ac_tool_warned in
37114yes:)
37115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37117ac_tool_warned=yes ;;
37118esac
37119    STRIP=$ac_ct_STRIP
37120  fi
37121fi
37122
37123    else
37124      # If it succeeded, then it was overridden by the user. We will use it
37125      # for the tool.
37126
37127      # First remove it from the list of overridden variables, so we can test
37128      # for unknown variables in the end.
37129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37130
37131      # Check if the provided tool contains a complete path.
37132      tool_specified="$STRIP"
37133      tool_basename="${tool_specified##*/}"
37134      if test "x$tool_basename" = "x$tool_specified"; then
37135        # A command without a complete path is provided, search $PATH.
37136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37137$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37138        # Extract the first word of "$tool_basename", so it can be a program name with args.
37139set dummy $tool_basename; ac_word=$2
37140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37141$as_echo_n "checking for $ac_word... " >&6; }
37142if ${ac_cv_path_STRIP+:} false; then :
37143  $as_echo_n "(cached) " >&6
37144else
37145  case $STRIP in
37146  [\\/]* | ?:[\\/]*)
37147  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37148  ;;
37149  *)
37150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37151for as_dir in $PATH
37152do
37153  IFS=$as_save_IFS
37154  test -z "$as_dir" && as_dir=.
37155    for ac_exec_ext in '' $ac_executable_extensions; do
37156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37157    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37159    break 2
37160  fi
37161done
37162  done
37163IFS=$as_save_IFS
37164
37165  ;;
37166esac
37167fi
37168STRIP=$ac_cv_path_STRIP
37169if test -n "$STRIP"; then
37170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37171$as_echo "$STRIP" >&6; }
37172else
37173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37174$as_echo "no" >&6; }
37175fi
37176
37177
37178        if test "x$STRIP" = x; then
37179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37180        fi
37181      else
37182        # Otherwise we believe it is a complete path. Use it as it is.
37183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37184$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37186$as_echo_n "checking for STRIP... " >&6; }
37187        if test ! -x "$tool_specified"; then
37188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37189$as_echo "not found" >&6; }
37190          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37191        fi
37192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37193$as_echo "$tool_specified" >&6; }
37194      fi
37195    fi
37196  fi
37197
37198
37199
37200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37201
37202  # First separate the path from the arguments. This will split at the first
37203  # space.
37204  complete="$STRIP"
37205  path="${complete%% *}"
37206  tmp="$complete EOL"
37207  arguments="${tmp#* }"
37208
37209  # Input might be given as Windows format, start by converting to
37210  # unix format.
37211  new_path=`$CYGPATH -u "$path"`
37212
37213  # Now try to locate executable using which
37214  new_path=`$WHICH "$new_path" 2> /dev/null`
37215  # bat and cmd files are not always considered executable in cygwin causing which
37216  # to not find them
37217  if test "x$new_path" = x \
37218      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37219      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37220    new_path=`$CYGPATH -u "$path"`
37221  fi
37222  if test "x$new_path" = x; then
37223    # Oops. Which didn't find the executable.
37224    # The splitting of arguments from the executable at a space might have been incorrect,
37225    # since paths with space are more likely in Windows. Give it another try with the whole
37226    # argument.
37227    path="$complete"
37228    arguments="EOL"
37229    new_path=`$CYGPATH -u "$path"`
37230    new_path=`$WHICH "$new_path" 2> /dev/null`
37231    # bat and cmd files are not always considered executable in cygwin causing which
37232    # to not find them
37233    if test "x$new_path" = x \
37234        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37235        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37236      new_path=`$CYGPATH -u "$path"`
37237    fi
37238    if test "x$new_path" = x; then
37239      # It's still not found. Now this is an unrecoverable error.
37240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37241$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37242      has_space=`$ECHO "$complete" | $GREP " "`
37243      if test "x$has_space" != x; then
37244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37246      fi
37247      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37248    fi
37249  fi
37250
37251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37254  # "foo.exe" is OK but "foo" is an error.
37255  #
37256  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37257  # It is also a way to make sure we got the proper file name for the real test later on.
37258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37259  if test "x$test_shortpath" = x; then
37260    # Short path failed, file does not exist as specified.
37261    # Try adding .exe or .cmd
37262    if test -f "${new_path}.exe"; then
37263      input_to_shortpath="${new_path}.exe"
37264    elif test -f "${new_path}.cmd"; then
37265      input_to_shortpath="${new_path}.cmd"
37266    else
37267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37268$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37269      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37270$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37271      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37272    fi
37273  else
37274    input_to_shortpath="$new_path"
37275  fi
37276
37277  # Call helper function which possibly converts this using DOS-style short mode.
37278  # If so, the updated path is stored in $new_path.
37279  new_path="$input_to_shortpath"
37280
37281  input_path="$input_to_shortpath"
37282  # Check if we need to convert this using DOS-style short mode. If the path
37283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37284  # take no chances and rewrite it.
37285  # Note: m4 eats our [], so we need to use [ and ] instead.
37286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37287  if test "x$has_forbidden_chars" != x; then
37288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37292      # Going to short mode and back again did indeed matter. Since short mode is
37293      # case insensitive, let's make it lowercase to improve readability.
37294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37295      # Now convert it back to Unix-stile (cygpath)
37296      input_path=`$CYGPATH -u "$shortmode_path"`
37297      new_path="$input_path"
37298    fi
37299  fi
37300
37301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37302  if test "x$test_cygdrive_prefix" = x; then
37303    # As a simple fix, exclude /usr/bin since it's not a real path.
37304    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37306      # a path prefixed by /cygdrive for fixpath to work.
37307      new_path="$CYGWIN_ROOT_PATH$input_path"
37308    fi
37309  fi
37310
37311  # remove trailing .exe if any
37312  new_path="${new_path/%.exe/}"
37313
37314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37315
37316  # First separate the path from the arguments. This will split at the first
37317  # space.
37318  complete="$STRIP"
37319  path="${complete%% *}"
37320  tmp="$complete EOL"
37321  arguments="${tmp#* }"
37322
37323  # Input might be given as Windows format, start by converting to
37324  # unix format.
37325  new_path="$path"
37326
37327  windows_path="$new_path"
37328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37329    unix_path=`$CYGPATH -u "$windows_path"`
37330    new_path="$unix_path"
37331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37333    new_path="$unix_path"
37334  fi
37335
37336
37337  # Now try to locate executable using which
37338  new_path=`$WHICH "$new_path" 2> /dev/null`
37339
37340  if test "x$new_path" = x; then
37341    # Oops. Which didn't find the executable.
37342    # The splitting of arguments from the executable at a space might have been incorrect,
37343    # since paths with space are more likely in Windows. Give it another try with the whole
37344    # argument.
37345    path="$complete"
37346    arguments="EOL"
37347    new_path="$path"
37348
37349  windows_path="$new_path"
37350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37351    unix_path=`$CYGPATH -u "$windows_path"`
37352    new_path="$unix_path"
37353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37355    new_path="$unix_path"
37356  fi
37357
37358
37359    new_path=`$WHICH "$new_path" 2> /dev/null`
37360    # bat and cmd files are not always considered executable in MSYS causing which
37361    # to not find them
37362    if test "x$new_path" = x \
37363        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37364        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37365      new_path="$path"
37366
37367  windows_path="$new_path"
37368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37369    unix_path=`$CYGPATH -u "$windows_path"`
37370    new_path="$unix_path"
37371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37373    new_path="$unix_path"
37374  fi
37375
37376    fi
37377
37378    if test "x$new_path" = x; then
37379      # It's still not found. Now this is an unrecoverable error.
37380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37381$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37382      has_space=`$ECHO "$complete" | $GREP " "`
37383      if test "x$has_space" != x; then
37384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37386      fi
37387      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37388    fi
37389  fi
37390
37391  # Now new_path has a complete unix path to the binary
37392  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37393    # Keep paths in /bin as-is, but remove trailing .exe if any
37394    new_path="${new_path/%.exe/}"
37395    # Do not save /bin paths to all_fixpath_prefixes!
37396  else
37397    # Not in mixed or Windows style, start by that.
37398    new_path=`cmd //c echo $new_path`
37399
37400  input_path="$new_path"
37401  # Check if we need to convert this using DOS-style short mode. If the path
37402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37403  # take no chances and rewrite it.
37404  # Note: m4 eats our [], so we need to use [ and ] instead.
37405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37406  if test "x$has_forbidden_chars" != x; then
37407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37409  fi
37410
37411    # Output is in $new_path
37412
37413  windows_path="$new_path"
37414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37415    unix_path=`$CYGPATH -u "$windows_path"`
37416    new_path="$unix_path"
37417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37419    new_path="$unix_path"
37420  fi
37421
37422    # remove trailing .exe if any
37423    new_path="${new_path/%.exe/}"
37424
37425    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37426    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37427  fi
37428
37429  else
37430    # We're on a unix platform. Hooray! :)
37431    # First separate the path from the arguments. This will split at the first
37432    # space.
37433    complete="$STRIP"
37434    path="${complete%% *}"
37435    tmp="$complete EOL"
37436    arguments="${tmp#* }"
37437
37438    # Cannot rely on the command "which" here since it doesn't always work.
37439    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37440    if test -z "$is_absolute_path"; then
37441      # Path to executable is not absolute. Find it.
37442      IFS_save="$IFS"
37443      IFS=:
37444      for p in $PATH; do
37445        if test -f "$p/$path" && test -x "$p/$path"; then
37446          new_path="$p/$path"
37447          break
37448        fi
37449      done
37450      IFS="$IFS_save"
37451    else
37452      # This is an absolute path, we can use it without further modifications.
37453      new_path="$path"
37454    fi
37455
37456    if test "x$new_path" = x; then
37457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37458$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37459      has_space=`$ECHO "$complete" | $GREP " "`
37460      if test "x$has_space" != x; then
37461        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37462$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37463      fi
37464      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37465    fi
37466  fi
37467
37468  # Now join together the path and the arguments once again
37469  if test "x$arguments" != xEOL; then
37470    new_complete="$new_path ${arguments% *}"
37471  else
37472    new_complete="$new_path"
37473  fi
37474
37475  if test "x$complete" != "x$new_complete"; then
37476    STRIP="$new_complete"
37477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37478$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37479  fi
37480
37481
37482
37483  # Publish this variable in the help.
37484
37485
37486  if test "x$NM" = x; then
37487    # The variable is not set by user, try to locate tool using the code snippet
37488    if test -n "$ac_tool_prefix"; then
37489  for ac_prog in nm
37490  do
37491    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37492set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37494$as_echo_n "checking for $ac_word... " >&6; }
37495if ${ac_cv_prog_NM+:} false; then :
37496  $as_echo_n "(cached) " >&6
37497else
37498  if test -n "$NM"; then
37499  ac_cv_prog_NM="$NM" # Let the user override the test.
37500else
37501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37502for as_dir in $PATH
37503do
37504  IFS=$as_save_IFS
37505  test -z "$as_dir" && as_dir=.
37506    for ac_exec_ext in '' $ac_executable_extensions; do
37507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37508    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37510    break 2
37511  fi
37512done
37513  done
37514IFS=$as_save_IFS
37515
37516fi
37517fi
37518NM=$ac_cv_prog_NM
37519if test -n "$NM"; then
37520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37521$as_echo "$NM" >&6; }
37522else
37523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37524$as_echo "no" >&6; }
37525fi
37526
37527
37528    test -n "$NM" && break
37529  done
37530fi
37531if test -z "$NM"; then
37532  ac_ct_NM=$NM
37533  for ac_prog in nm
37534do
37535  # Extract the first word of "$ac_prog", so it can be a program name with args.
37536set dummy $ac_prog; ac_word=$2
37537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37538$as_echo_n "checking for $ac_word... " >&6; }
37539if ${ac_cv_prog_ac_ct_NM+:} false; then :
37540  $as_echo_n "(cached) " >&6
37541else
37542  if test -n "$ac_ct_NM"; then
37543  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37544else
37545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37546for as_dir in $PATH
37547do
37548  IFS=$as_save_IFS
37549  test -z "$as_dir" && as_dir=.
37550    for ac_exec_ext in '' $ac_executable_extensions; do
37551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37552    ac_cv_prog_ac_ct_NM="$ac_prog"
37553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37554    break 2
37555  fi
37556done
37557  done
37558IFS=$as_save_IFS
37559
37560fi
37561fi
37562ac_ct_NM=$ac_cv_prog_ac_ct_NM
37563if test -n "$ac_ct_NM"; then
37564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37565$as_echo "$ac_ct_NM" >&6; }
37566else
37567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37568$as_echo "no" >&6; }
37569fi
37570
37571
37572  test -n "$ac_ct_NM" && break
37573done
37574
37575  if test "x$ac_ct_NM" = x; then
37576    NM=""
37577  else
37578    case $cross_compiling:$ac_tool_warned in
37579yes:)
37580{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37581$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37582ac_tool_warned=yes ;;
37583esac
37584    NM=$ac_ct_NM
37585  fi
37586fi
37587
37588  else
37589    # The variable is set, but is it from the command line or the environment?
37590
37591    # Try to remove the string !NM! from our list.
37592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37594      # If it failed, the variable was not from the command line. Ignore it,
37595      # but warn the user (except for BASH, which is always set by the calling BASH).
37596      if test "xNM" != xBASH; then
37597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37598$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37599      fi
37600      # Try to locate tool using the code snippet
37601      if test -n "$ac_tool_prefix"; then
37602  for ac_prog in nm
37603  do
37604    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37605set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37607$as_echo_n "checking for $ac_word... " >&6; }
37608if ${ac_cv_prog_NM+:} false; then :
37609  $as_echo_n "(cached) " >&6
37610else
37611  if test -n "$NM"; then
37612  ac_cv_prog_NM="$NM" # Let the user override the test.
37613else
37614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37615for as_dir in $PATH
37616do
37617  IFS=$as_save_IFS
37618  test -z "$as_dir" && as_dir=.
37619    for ac_exec_ext in '' $ac_executable_extensions; do
37620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37621    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37623    break 2
37624  fi
37625done
37626  done
37627IFS=$as_save_IFS
37628
37629fi
37630fi
37631NM=$ac_cv_prog_NM
37632if test -n "$NM"; then
37633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37634$as_echo "$NM" >&6; }
37635else
37636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37637$as_echo "no" >&6; }
37638fi
37639
37640
37641    test -n "$NM" && break
37642  done
37643fi
37644if test -z "$NM"; then
37645  ac_ct_NM=$NM
37646  for ac_prog in nm
37647do
37648  # Extract the first word of "$ac_prog", so it can be a program name with args.
37649set dummy $ac_prog; ac_word=$2
37650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37651$as_echo_n "checking for $ac_word... " >&6; }
37652if ${ac_cv_prog_ac_ct_NM+:} false; then :
37653  $as_echo_n "(cached) " >&6
37654else
37655  if test -n "$ac_ct_NM"; then
37656  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37657else
37658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37659for as_dir in $PATH
37660do
37661  IFS=$as_save_IFS
37662  test -z "$as_dir" && as_dir=.
37663    for ac_exec_ext in '' $ac_executable_extensions; do
37664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37665    ac_cv_prog_ac_ct_NM="$ac_prog"
37666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37667    break 2
37668  fi
37669done
37670  done
37671IFS=$as_save_IFS
37672
37673fi
37674fi
37675ac_ct_NM=$ac_cv_prog_ac_ct_NM
37676if test -n "$ac_ct_NM"; then
37677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37678$as_echo "$ac_ct_NM" >&6; }
37679else
37680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37681$as_echo "no" >&6; }
37682fi
37683
37684
37685  test -n "$ac_ct_NM" && break
37686done
37687
37688  if test "x$ac_ct_NM" = x; then
37689    NM=""
37690  else
37691    case $cross_compiling:$ac_tool_warned in
37692yes:)
37693{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37694$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37695ac_tool_warned=yes ;;
37696esac
37697    NM=$ac_ct_NM
37698  fi
37699fi
37700
37701    else
37702      # If it succeeded, then it was overridden by the user. We will use it
37703      # for the tool.
37704
37705      # First remove it from the list of overridden variables, so we can test
37706      # for unknown variables in the end.
37707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37708
37709      # Check if the provided tool contains a complete path.
37710      tool_specified="$NM"
37711      tool_basename="${tool_specified##*/}"
37712      if test "x$tool_basename" = "x$tool_specified"; then
37713        # A command without a complete path is provided, search $PATH.
37714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37715$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37716        # Extract the first word of "$tool_basename", so it can be a program name with args.
37717set dummy $tool_basename; ac_word=$2
37718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37719$as_echo_n "checking for $ac_word... " >&6; }
37720if ${ac_cv_path_NM+:} false; then :
37721  $as_echo_n "(cached) " >&6
37722else
37723  case $NM in
37724  [\\/]* | ?:[\\/]*)
37725  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37726  ;;
37727  *)
37728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37729for as_dir in $PATH
37730do
37731  IFS=$as_save_IFS
37732  test -z "$as_dir" && as_dir=.
37733    for ac_exec_ext in '' $ac_executable_extensions; do
37734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37735    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37737    break 2
37738  fi
37739done
37740  done
37741IFS=$as_save_IFS
37742
37743  ;;
37744esac
37745fi
37746NM=$ac_cv_path_NM
37747if test -n "$NM"; then
37748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37749$as_echo "$NM" >&6; }
37750else
37751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37752$as_echo "no" >&6; }
37753fi
37754
37755
37756        if test "x$NM" = x; then
37757          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37758        fi
37759      else
37760        # Otherwise we believe it is a complete path. Use it as it is.
37761        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37762$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37764$as_echo_n "checking for NM... " >&6; }
37765        if test ! -x "$tool_specified"; then
37766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37767$as_echo "not found" >&6; }
37768          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37769        fi
37770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37771$as_echo "$tool_specified" >&6; }
37772      fi
37773    fi
37774  fi
37775
37776
37777
37778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37779
37780  # First separate the path from the arguments. This will split at the first
37781  # space.
37782  complete="$NM"
37783  path="${complete%% *}"
37784  tmp="$complete EOL"
37785  arguments="${tmp#* }"
37786
37787  # Input might be given as Windows format, start by converting to
37788  # unix format.
37789  new_path=`$CYGPATH -u "$path"`
37790
37791  # Now try to locate executable using which
37792  new_path=`$WHICH "$new_path" 2> /dev/null`
37793  # bat and cmd files are not always considered executable in cygwin causing which
37794  # to not find them
37795  if test "x$new_path" = x \
37796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37798    new_path=`$CYGPATH -u "$path"`
37799  fi
37800  if test "x$new_path" = x; then
37801    # Oops. Which didn't find the executable.
37802    # The splitting of arguments from the executable at a space might have been incorrect,
37803    # since paths with space are more likely in Windows. Give it another try with the whole
37804    # argument.
37805    path="$complete"
37806    arguments="EOL"
37807    new_path=`$CYGPATH -u "$path"`
37808    new_path=`$WHICH "$new_path" 2> /dev/null`
37809    # bat and cmd files are not always considered executable in cygwin causing which
37810    # to not find them
37811    if test "x$new_path" = x \
37812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37814      new_path=`$CYGPATH -u "$path"`
37815    fi
37816    if test "x$new_path" = x; then
37817      # It's still not found. Now this is an unrecoverable error.
37818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37819$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37820      has_space=`$ECHO "$complete" | $GREP " "`
37821      if test "x$has_space" != x; then
37822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37824      fi
37825      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37826    fi
37827  fi
37828
37829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37832  # "foo.exe" is OK but "foo" is an error.
37833  #
37834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37835  # It is also a way to make sure we got the proper file name for the real test later on.
37836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37837  if test "x$test_shortpath" = x; then
37838    # Short path failed, file does not exist as specified.
37839    # Try adding .exe or .cmd
37840    if test -f "${new_path}.exe"; then
37841      input_to_shortpath="${new_path}.exe"
37842    elif test -f "${new_path}.cmd"; then
37843      input_to_shortpath="${new_path}.cmd"
37844    else
37845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37846$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37849      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37850    fi
37851  else
37852    input_to_shortpath="$new_path"
37853  fi
37854
37855  # Call helper function which possibly converts this using DOS-style short mode.
37856  # If so, the updated path is stored in $new_path.
37857  new_path="$input_to_shortpath"
37858
37859  input_path="$input_to_shortpath"
37860  # Check if we need to convert this using DOS-style short mode. If the path
37861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37862  # take no chances and rewrite it.
37863  # Note: m4 eats our [], so we need to use [ and ] instead.
37864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37865  if test "x$has_forbidden_chars" != x; then
37866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37870      # Going to short mode and back again did indeed matter. Since short mode is
37871      # case insensitive, let's make it lowercase to improve readability.
37872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37873      # Now convert it back to Unix-stile (cygpath)
37874      input_path=`$CYGPATH -u "$shortmode_path"`
37875      new_path="$input_path"
37876    fi
37877  fi
37878
37879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37880  if test "x$test_cygdrive_prefix" = x; then
37881    # As a simple fix, exclude /usr/bin since it's not a real path.
37882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37884      # a path prefixed by /cygdrive for fixpath to work.
37885      new_path="$CYGWIN_ROOT_PATH$input_path"
37886    fi
37887  fi
37888
37889  # remove trailing .exe if any
37890  new_path="${new_path/%.exe/}"
37891
37892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37893
37894  # First separate the path from the arguments. This will split at the first
37895  # space.
37896  complete="$NM"
37897  path="${complete%% *}"
37898  tmp="$complete EOL"
37899  arguments="${tmp#* }"
37900
37901  # Input might be given as Windows format, start by converting to
37902  # unix format.
37903  new_path="$path"
37904
37905  windows_path="$new_path"
37906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37907    unix_path=`$CYGPATH -u "$windows_path"`
37908    new_path="$unix_path"
37909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37911    new_path="$unix_path"
37912  fi
37913
37914
37915  # Now try to locate executable using which
37916  new_path=`$WHICH "$new_path" 2> /dev/null`
37917
37918  if test "x$new_path" = x; then
37919    # Oops. Which didn't find the executable.
37920    # The splitting of arguments from the executable at a space might have been incorrect,
37921    # since paths with space are more likely in Windows. Give it another try with the whole
37922    # argument.
37923    path="$complete"
37924    arguments="EOL"
37925    new_path="$path"
37926
37927  windows_path="$new_path"
37928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37929    unix_path=`$CYGPATH -u "$windows_path"`
37930    new_path="$unix_path"
37931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37933    new_path="$unix_path"
37934  fi
37935
37936
37937    new_path=`$WHICH "$new_path" 2> /dev/null`
37938    # bat and cmd files are not always considered executable in MSYS causing which
37939    # to not find them
37940    if test "x$new_path" = x \
37941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37943      new_path="$path"
37944
37945  windows_path="$new_path"
37946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37947    unix_path=`$CYGPATH -u "$windows_path"`
37948    new_path="$unix_path"
37949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37951    new_path="$unix_path"
37952  fi
37953
37954    fi
37955
37956    if test "x$new_path" = x; then
37957      # It's still not found. Now this is an unrecoverable error.
37958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37959$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37960      has_space=`$ECHO "$complete" | $GREP " "`
37961      if test "x$has_space" != x; then
37962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37964      fi
37965      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37966    fi
37967  fi
37968
37969  # Now new_path has a complete unix path to the binary
37970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37971    # Keep paths in /bin as-is, but remove trailing .exe if any
37972    new_path="${new_path/%.exe/}"
37973    # Do not save /bin paths to all_fixpath_prefixes!
37974  else
37975    # Not in mixed or Windows style, start by that.
37976    new_path=`cmd //c echo $new_path`
37977
37978  input_path="$new_path"
37979  # Check if we need to convert this using DOS-style short mode. If the path
37980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37981  # take no chances and rewrite it.
37982  # Note: m4 eats our [], so we need to use [ and ] instead.
37983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37984  if test "x$has_forbidden_chars" != x; then
37985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37987  fi
37988
37989    # Output is in $new_path
37990
37991  windows_path="$new_path"
37992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37993    unix_path=`$CYGPATH -u "$windows_path"`
37994    new_path="$unix_path"
37995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37997    new_path="$unix_path"
37998  fi
37999
38000    # remove trailing .exe if any
38001    new_path="${new_path/%.exe/}"
38002
38003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38005  fi
38006
38007  else
38008    # We're on a unix platform. Hooray! :)
38009    # First separate the path from the arguments. This will split at the first
38010    # space.
38011    complete="$NM"
38012    path="${complete%% *}"
38013    tmp="$complete EOL"
38014    arguments="${tmp#* }"
38015
38016    # Cannot rely on the command "which" here since it doesn't always work.
38017    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38018    if test -z "$is_absolute_path"; then
38019      # Path to executable is not absolute. Find it.
38020      IFS_save="$IFS"
38021      IFS=:
38022      for p in $PATH; do
38023        if test -f "$p/$path" && test -x "$p/$path"; then
38024          new_path="$p/$path"
38025          break
38026        fi
38027      done
38028      IFS="$IFS_save"
38029    else
38030      # This is an absolute path, we can use it without further modifications.
38031      new_path="$path"
38032    fi
38033
38034    if test "x$new_path" = x; then
38035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38036$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38037      has_space=`$ECHO "$complete" | $GREP " "`
38038      if test "x$has_space" != x; then
38039        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38041      fi
38042      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38043    fi
38044  fi
38045
38046  # Now join together the path and the arguments once again
38047  if test "x$arguments" != xEOL; then
38048    new_complete="$new_path ${arguments% *}"
38049  else
38050    new_complete="$new_path"
38051  fi
38052
38053  if test "x$complete" != "x$new_complete"; then
38054    NM="$new_complete"
38055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38056$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38057  fi
38058
38059    GNM="$NM"
38060
38061  fi
38062
38063  # objcopy is used for moving debug symbols to separate files when
38064  # full debug symbols are enabled.
38065  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38066
38067
38068  # Publish this variable in the help.
38069
38070
38071  if test "x$OBJCOPY" = x; then
38072    # The variable is not set by user, try to locate tool using the code snippet
38073    if test -n "$ac_tool_prefix"; then
38074  for ac_prog in gobjcopy objcopy
38075  do
38076    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38077set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38079$as_echo_n "checking for $ac_word... " >&6; }
38080if ${ac_cv_prog_OBJCOPY+:} false; then :
38081  $as_echo_n "(cached) " >&6
38082else
38083  if test -n "$OBJCOPY"; then
38084  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38085else
38086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38087for as_dir in $PATH
38088do
38089  IFS=$as_save_IFS
38090  test -z "$as_dir" && as_dir=.
38091    for ac_exec_ext in '' $ac_executable_extensions; do
38092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38093    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38095    break 2
38096  fi
38097done
38098  done
38099IFS=$as_save_IFS
38100
38101fi
38102fi
38103OBJCOPY=$ac_cv_prog_OBJCOPY
38104if test -n "$OBJCOPY"; then
38105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38106$as_echo "$OBJCOPY" >&6; }
38107else
38108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38109$as_echo "no" >&6; }
38110fi
38111
38112
38113    test -n "$OBJCOPY" && break
38114  done
38115fi
38116if test -z "$OBJCOPY"; then
38117  ac_ct_OBJCOPY=$OBJCOPY
38118  for ac_prog in gobjcopy objcopy
38119do
38120  # Extract the first word of "$ac_prog", so it can be a program name with args.
38121set dummy $ac_prog; ac_word=$2
38122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38123$as_echo_n "checking for $ac_word... " >&6; }
38124if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38125  $as_echo_n "(cached) " >&6
38126else
38127  if test -n "$ac_ct_OBJCOPY"; then
38128  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38129else
38130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38131for as_dir in $PATH
38132do
38133  IFS=$as_save_IFS
38134  test -z "$as_dir" && as_dir=.
38135    for ac_exec_ext in '' $ac_executable_extensions; do
38136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38137    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38139    break 2
38140  fi
38141done
38142  done
38143IFS=$as_save_IFS
38144
38145fi
38146fi
38147ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38148if test -n "$ac_ct_OBJCOPY"; then
38149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38150$as_echo "$ac_ct_OBJCOPY" >&6; }
38151else
38152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38153$as_echo "no" >&6; }
38154fi
38155
38156
38157  test -n "$ac_ct_OBJCOPY" && break
38158done
38159
38160  if test "x$ac_ct_OBJCOPY" = x; then
38161    OBJCOPY=""
38162  else
38163    case $cross_compiling:$ac_tool_warned in
38164yes:)
38165{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38166$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38167ac_tool_warned=yes ;;
38168esac
38169    OBJCOPY=$ac_ct_OBJCOPY
38170  fi
38171fi
38172
38173  else
38174    # The variable is set, but is it from the command line or the environment?
38175
38176    # Try to remove the string !OBJCOPY! from our list.
38177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38179      # If it failed, the variable was not from the command line. Ignore it,
38180      # but warn the user (except for BASH, which is always set by the calling BASH).
38181      if test "xOBJCOPY" != xBASH; then
38182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38183$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38184      fi
38185      # Try to locate tool using the code snippet
38186      if test -n "$ac_tool_prefix"; then
38187  for ac_prog in gobjcopy objcopy
38188  do
38189    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38190set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38192$as_echo_n "checking for $ac_word... " >&6; }
38193if ${ac_cv_prog_OBJCOPY+:} false; then :
38194  $as_echo_n "(cached) " >&6
38195else
38196  if test -n "$OBJCOPY"; then
38197  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38198else
38199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38200for as_dir in $PATH
38201do
38202  IFS=$as_save_IFS
38203  test -z "$as_dir" && as_dir=.
38204    for ac_exec_ext in '' $ac_executable_extensions; do
38205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38206    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38208    break 2
38209  fi
38210done
38211  done
38212IFS=$as_save_IFS
38213
38214fi
38215fi
38216OBJCOPY=$ac_cv_prog_OBJCOPY
38217if test -n "$OBJCOPY"; then
38218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38219$as_echo "$OBJCOPY" >&6; }
38220else
38221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38222$as_echo "no" >&6; }
38223fi
38224
38225
38226    test -n "$OBJCOPY" && break
38227  done
38228fi
38229if test -z "$OBJCOPY"; then
38230  ac_ct_OBJCOPY=$OBJCOPY
38231  for ac_prog in gobjcopy objcopy
38232do
38233  # Extract the first word of "$ac_prog", so it can be a program name with args.
38234set dummy $ac_prog; ac_word=$2
38235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38236$as_echo_n "checking for $ac_word... " >&6; }
38237if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38238  $as_echo_n "(cached) " >&6
38239else
38240  if test -n "$ac_ct_OBJCOPY"; then
38241  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38242else
38243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38244for as_dir in $PATH
38245do
38246  IFS=$as_save_IFS
38247  test -z "$as_dir" && as_dir=.
38248    for ac_exec_ext in '' $ac_executable_extensions; do
38249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38250    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38252    break 2
38253  fi
38254done
38255  done
38256IFS=$as_save_IFS
38257
38258fi
38259fi
38260ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38261if test -n "$ac_ct_OBJCOPY"; then
38262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38263$as_echo "$ac_ct_OBJCOPY" >&6; }
38264else
38265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38266$as_echo "no" >&6; }
38267fi
38268
38269
38270  test -n "$ac_ct_OBJCOPY" && break
38271done
38272
38273  if test "x$ac_ct_OBJCOPY" = x; then
38274    OBJCOPY=""
38275  else
38276    case $cross_compiling:$ac_tool_warned in
38277yes:)
38278{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38279$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38280ac_tool_warned=yes ;;
38281esac
38282    OBJCOPY=$ac_ct_OBJCOPY
38283  fi
38284fi
38285
38286    else
38287      # If it succeeded, then it was overridden by the user. We will use it
38288      # for the tool.
38289
38290      # First remove it from the list of overridden variables, so we can test
38291      # for unknown variables in the end.
38292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38293
38294      # Check if the provided tool contains a complete path.
38295      tool_specified="$OBJCOPY"
38296      tool_basename="${tool_specified##*/}"
38297      if test "x$tool_basename" = "x$tool_specified"; then
38298        # A command without a complete path is provided, search $PATH.
38299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38300$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38301        # Extract the first word of "$tool_basename", so it can be a program name with args.
38302set dummy $tool_basename; ac_word=$2
38303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38304$as_echo_n "checking for $ac_word... " >&6; }
38305if ${ac_cv_path_OBJCOPY+:} false; then :
38306  $as_echo_n "(cached) " >&6
38307else
38308  case $OBJCOPY in
38309  [\\/]* | ?:[\\/]*)
38310  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38311  ;;
38312  *)
38313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38314for as_dir in $PATH
38315do
38316  IFS=$as_save_IFS
38317  test -z "$as_dir" && as_dir=.
38318    for ac_exec_ext in '' $ac_executable_extensions; do
38319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38320    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38322    break 2
38323  fi
38324done
38325  done
38326IFS=$as_save_IFS
38327
38328  ;;
38329esac
38330fi
38331OBJCOPY=$ac_cv_path_OBJCOPY
38332if test -n "$OBJCOPY"; then
38333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38334$as_echo "$OBJCOPY" >&6; }
38335else
38336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38337$as_echo "no" >&6; }
38338fi
38339
38340
38341        if test "x$OBJCOPY" = x; then
38342          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38343        fi
38344      else
38345        # Otherwise we believe it is a complete path. Use it as it is.
38346        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38347$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38349$as_echo_n "checking for OBJCOPY... " >&6; }
38350        if test ! -x "$tool_specified"; then
38351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38352$as_echo "not found" >&6; }
38353          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38354        fi
38355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38356$as_echo "$tool_specified" >&6; }
38357      fi
38358    fi
38359  fi
38360
38361
38362    # Only call fixup if objcopy was found.
38363    if test -n "$OBJCOPY"; then
38364
38365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38366
38367  # First separate the path from the arguments. This will split at the first
38368  # space.
38369  complete="$OBJCOPY"
38370  path="${complete%% *}"
38371  tmp="$complete EOL"
38372  arguments="${tmp#* }"
38373
38374  # Input might be given as Windows format, start by converting to
38375  # unix format.
38376  new_path=`$CYGPATH -u "$path"`
38377
38378  # Now try to locate executable using which
38379  new_path=`$WHICH "$new_path" 2> /dev/null`
38380  # bat and cmd files are not always considered executable in cygwin causing which
38381  # to not find them
38382  if test "x$new_path" = x \
38383      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38384      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38385    new_path=`$CYGPATH -u "$path"`
38386  fi
38387  if test "x$new_path" = x; then
38388    # Oops. Which didn't find the executable.
38389    # The splitting of arguments from the executable at a space might have been incorrect,
38390    # since paths with space are more likely in Windows. Give it another try with the whole
38391    # argument.
38392    path="$complete"
38393    arguments="EOL"
38394    new_path=`$CYGPATH -u "$path"`
38395    new_path=`$WHICH "$new_path" 2> /dev/null`
38396    # bat and cmd files are not always considered executable in cygwin causing which
38397    # to not find them
38398    if test "x$new_path" = x \
38399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38401      new_path=`$CYGPATH -u "$path"`
38402    fi
38403    if test "x$new_path" = x; then
38404      # It's still not found. Now this is an unrecoverable error.
38405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38406$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38407      has_space=`$ECHO "$complete" | $GREP " "`
38408      if test "x$has_space" != x; then
38409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38411      fi
38412      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38413    fi
38414  fi
38415
38416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38419  # "foo.exe" is OK but "foo" is an error.
38420  #
38421  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38422  # It is also a way to make sure we got the proper file name for the real test later on.
38423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38424  if test "x$test_shortpath" = x; then
38425    # Short path failed, file does not exist as specified.
38426    # Try adding .exe or .cmd
38427    if test -f "${new_path}.exe"; then
38428      input_to_shortpath="${new_path}.exe"
38429    elif test -f "${new_path}.cmd"; then
38430      input_to_shortpath="${new_path}.cmd"
38431    else
38432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38433$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38434      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38435$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38436      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38437    fi
38438  else
38439    input_to_shortpath="$new_path"
38440  fi
38441
38442  # Call helper function which possibly converts this using DOS-style short mode.
38443  # If so, the updated path is stored in $new_path.
38444  new_path="$input_to_shortpath"
38445
38446  input_path="$input_to_shortpath"
38447  # Check if we need to convert this using DOS-style short mode. If the path
38448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38449  # take no chances and rewrite it.
38450  # Note: m4 eats our [], so we need to use [ and ] instead.
38451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38452  if test "x$has_forbidden_chars" != x; then
38453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38454    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38455    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38456    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38457      # Going to short mode and back again did indeed matter. Since short mode is
38458      # case insensitive, let's make it lowercase to improve readability.
38459      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38460      # Now convert it back to Unix-stile (cygpath)
38461      input_path=`$CYGPATH -u "$shortmode_path"`
38462      new_path="$input_path"
38463    fi
38464  fi
38465
38466  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38467  if test "x$test_cygdrive_prefix" = x; then
38468    # As a simple fix, exclude /usr/bin since it's not a real path.
38469    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38470      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38471      # a path prefixed by /cygdrive for fixpath to work.
38472      new_path="$CYGWIN_ROOT_PATH$input_path"
38473    fi
38474  fi
38475
38476  # remove trailing .exe if any
38477  new_path="${new_path/%.exe/}"
38478
38479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38480
38481  # First separate the path from the arguments. This will split at the first
38482  # space.
38483  complete="$OBJCOPY"
38484  path="${complete%% *}"
38485  tmp="$complete EOL"
38486  arguments="${tmp#* }"
38487
38488  # Input might be given as Windows format, start by converting to
38489  # unix format.
38490  new_path="$path"
38491
38492  windows_path="$new_path"
38493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38494    unix_path=`$CYGPATH -u "$windows_path"`
38495    new_path="$unix_path"
38496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38498    new_path="$unix_path"
38499  fi
38500
38501
38502  # Now try to locate executable using which
38503  new_path=`$WHICH "$new_path" 2> /dev/null`
38504
38505  if test "x$new_path" = x; then
38506    # Oops. Which didn't find the executable.
38507    # The splitting of arguments from the executable at a space might have been incorrect,
38508    # since paths with space are more likely in Windows. Give it another try with the whole
38509    # argument.
38510    path="$complete"
38511    arguments="EOL"
38512    new_path="$path"
38513
38514  windows_path="$new_path"
38515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38516    unix_path=`$CYGPATH -u "$windows_path"`
38517    new_path="$unix_path"
38518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38520    new_path="$unix_path"
38521  fi
38522
38523
38524    new_path=`$WHICH "$new_path" 2> /dev/null`
38525    # bat and cmd files are not always considered executable in MSYS causing which
38526    # to not find them
38527    if test "x$new_path" = x \
38528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38530      new_path="$path"
38531
38532  windows_path="$new_path"
38533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38534    unix_path=`$CYGPATH -u "$windows_path"`
38535    new_path="$unix_path"
38536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38538    new_path="$unix_path"
38539  fi
38540
38541    fi
38542
38543    if test "x$new_path" = x; then
38544      # It's still not found. Now this is an unrecoverable error.
38545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38546$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38547      has_space=`$ECHO "$complete" | $GREP " "`
38548      if test "x$has_space" != x; then
38549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38551      fi
38552      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38553    fi
38554  fi
38555
38556  # Now new_path has a complete unix path to the binary
38557  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38558    # Keep paths in /bin as-is, but remove trailing .exe if any
38559    new_path="${new_path/%.exe/}"
38560    # Do not save /bin paths to all_fixpath_prefixes!
38561  else
38562    # Not in mixed or Windows style, start by that.
38563    new_path=`cmd //c echo $new_path`
38564
38565  input_path="$new_path"
38566  # Check if we need to convert this using DOS-style short mode. If the path
38567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38568  # take no chances and rewrite it.
38569  # Note: m4 eats our [], so we need to use [ and ] instead.
38570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38571  if test "x$has_forbidden_chars" != x; then
38572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38574  fi
38575
38576    # Output is in $new_path
38577
38578  windows_path="$new_path"
38579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38580    unix_path=`$CYGPATH -u "$windows_path"`
38581    new_path="$unix_path"
38582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38584    new_path="$unix_path"
38585  fi
38586
38587    # remove trailing .exe if any
38588    new_path="${new_path/%.exe/}"
38589
38590    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38591    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38592  fi
38593
38594  else
38595    # We're on a unix platform. Hooray! :)
38596    # First separate the path from the arguments. This will split at the first
38597    # space.
38598    complete="$OBJCOPY"
38599    path="${complete%% *}"
38600    tmp="$complete EOL"
38601    arguments="${tmp#* }"
38602
38603    # Cannot rely on the command "which" here since it doesn't always work.
38604    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38605    if test -z "$is_absolute_path"; then
38606      # Path to executable is not absolute. Find it.
38607      IFS_save="$IFS"
38608      IFS=:
38609      for p in $PATH; do
38610        if test -f "$p/$path" && test -x "$p/$path"; then
38611          new_path="$p/$path"
38612          break
38613        fi
38614      done
38615      IFS="$IFS_save"
38616    else
38617      # This is an absolute path, we can use it without further modifications.
38618      new_path="$path"
38619    fi
38620
38621    if test "x$new_path" = x; then
38622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38623$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38624      has_space=`$ECHO "$complete" | $GREP " "`
38625      if test "x$has_space" != x; then
38626        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38627$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38628      fi
38629      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38630    fi
38631  fi
38632
38633  # Now join together the path and the arguments once again
38634  if test "x$arguments" != xEOL; then
38635    new_complete="$new_path ${arguments% *}"
38636  else
38637    new_complete="$new_path"
38638  fi
38639
38640  if test "x$complete" != "x$new_complete"; then
38641    OBJCOPY="$new_complete"
38642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38643$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38644  fi
38645
38646    fi
38647  fi
38648
38649
38650
38651  # Publish this variable in the help.
38652
38653
38654  if test "x$OBJDUMP" = x; then
38655    # The variable is not set by user, try to locate tool using the code snippet
38656    if test -n "$ac_tool_prefix"; then
38657  for ac_prog in gobjdump objdump
38658  do
38659    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38662$as_echo_n "checking for $ac_word... " >&6; }
38663if ${ac_cv_prog_OBJDUMP+:} false; then :
38664  $as_echo_n "(cached) " >&6
38665else
38666  if test -n "$OBJDUMP"; then
38667  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38668else
38669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38670for as_dir in $PATH
38671do
38672  IFS=$as_save_IFS
38673  test -z "$as_dir" && as_dir=.
38674    for ac_exec_ext in '' $ac_executable_extensions; do
38675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38676    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38678    break 2
38679  fi
38680done
38681  done
38682IFS=$as_save_IFS
38683
38684fi
38685fi
38686OBJDUMP=$ac_cv_prog_OBJDUMP
38687if test -n "$OBJDUMP"; then
38688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38689$as_echo "$OBJDUMP" >&6; }
38690else
38691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38692$as_echo "no" >&6; }
38693fi
38694
38695
38696    test -n "$OBJDUMP" && break
38697  done
38698fi
38699if test -z "$OBJDUMP"; then
38700  ac_ct_OBJDUMP=$OBJDUMP
38701  for ac_prog in gobjdump objdump
38702do
38703  # Extract the first word of "$ac_prog", so it can be a program name with args.
38704set dummy $ac_prog; ac_word=$2
38705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38706$as_echo_n "checking for $ac_word... " >&6; }
38707if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38708  $as_echo_n "(cached) " >&6
38709else
38710  if test -n "$ac_ct_OBJDUMP"; then
38711  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38712else
38713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38714for as_dir in $PATH
38715do
38716  IFS=$as_save_IFS
38717  test -z "$as_dir" && as_dir=.
38718    for ac_exec_ext in '' $ac_executable_extensions; do
38719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38720    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38722    break 2
38723  fi
38724done
38725  done
38726IFS=$as_save_IFS
38727
38728fi
38729fi
38730ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38731if test -n "$ac_ct_OBJDUMP"; then
38732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38733$as_echo "$ac_ct_OBJDUMP" >&6; }
38734else
38735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38736$as_echo "no" >&6; }
38737fi
38738
38739
38740  test -n "$ac_ct_OBJDUMP" && break
38741done
38742
38743  if test "x$ac_ct_OBJDUMP" = x; then
38744    OBJDUMP=""
38745  else
38746    case $cross_compiling:$ac_tool_warned in
38747yes:)
38748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38750ac_tool_warned=yes ;;
38751esac
38752    OBJDUMP=$ac_ct_OBJDUMP
38753  fi
38754fi
38755
38756  else
38757    # The variable is set, but is it from the command line or the environment?
38758
38759    # Try to remove the string !OBJDUMP! from our list.
38760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38762      # If it failed, the variable was not from the command line. Ignore it,
38763      # but warn the user (except for BASH, which is always set by the calling BASH).
38764      if test "xOBJDUMP" != xBASH; then
38765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38766$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38767      fi
38768      # Try to locate tool using the code snippet
38769      if test -n "$ac_tool_prefix"; then
38770  for ac_prog in gobjdump objdump
38771  do
38772    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38775$as_echo_n "checking for $ac_word... " >&6; }
38776if ${ac_cv_prog_OBJDUMP+:} false; then :
38777  $as_echo_n "(cached) " >&6
38778else
38779  if test -n "$OBJDUMP"; then
38780  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38781else
38782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38783for as_dir in $PATH
38784do
38785  IFS=$as_save_IFS
38786  test -z "$as_dir" && as_dir=.
38787    for ac_exec_ext in '' $ac_executable_extensions; do
38788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38789    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38791    break 2
38792  fi
38793done
38794  done
38795IFS=$as_save_IFS
38796
38797fi
38798fi
38799OBJDUMP=$ac_cv_prog_OBJDUMP
38800if test -n "$OBJDUMP"; then
38801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38802$as_echo "$OBJDUMP" >&6; }
38803else
38804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38805$as_echo "no" >&6; }
38806fi
38807
38808
38809    test -n "$OBJDUMP" && break
38810  done
38811fi
38812if test -z "$OBJDUMP"; then
38813  ac_ct_OBJDUMP=$OBJDUMP
38814  for ac_prog in gobjdump objdump
38815do
38816  # Extract the first word of "$ac_prog", so it can be a program name with args.
38817set dummy $ac_prog; ac_word=$2
38818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38819$as_echo_n "checking for $ac_word... " >&6; }
38820if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38821  $as_echo_n "(cached) " >&6
38822else
38823  if test -n "$ac_ct_OBJDUMP"; then
38824  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38825else
38826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38827for as_dir in $PATH
38828do
38829  IFS=$as_save_IFS
38830  test -z "$as_dir" && as_dir=.
38831    for ac_exec_ext in '' $ac_executable_extensions; do
38832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38833    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38835    break 2
38836  fi
38837done
38838  done
38839IFS=$as_save_IFS
38840
38841fi
38842fi
38843ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38844if test -n "$ac_ct_OBJDUMP"; then
38845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38846$as_echo "$ac_ct_OBJDUMP" >&6; }
38847else
38848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38849$as_echo "no" >&6; }
38850fi
38851
38852
38853  test -n "$ac_ct_OBJDUMP" && break
38854done
38855
38856  if test "x$ac_ct_OBJDUMP" = x; then
38857    OBJDUMP=""
38858  else
38859    case $cross_compiling:$ac_tool_warned in
38860yes:)
38861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38863ac_tool_warned=yes ;;
38864esac
38865    OBJDUMP=$ac_ct_OBJDUMP
38866  fi
38867fi
38868
38869    else
38870      # If it succeeded, then it was overridden by the user. We will use it
38871      # for the tool.
38872
38873      # First remove it from the list of overridden variables, so we can test
38874      # for unknown variables in the end.
38875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38876
38877      # Check if the provided tool contains a complete path.
38878      tool_specified="$OBJDUMP"
38879      tool_basename="${tool_specified##*/}"
38880      if test "x$tool_basename" = "x$tool_specified"; then
38881        # A command without a complete path is provided, search $PATH.
38882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38883$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38884        # Extract the first word of "$tool_basename", so it can be a program name with args.
38885set dummy $tool_basename; ac_word=$2
38886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38887$as_echo_n "checking for $ac_word... " >&6; }
38888if ${ac_cv_path_OBJDUMP+:} false; then :
38889  $as_echo_n "(cached) " >&6
38890else
38891  case $OBJDUMP in
38892  [\\/]* | ?:[\\/]*)
38893  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38894  ;;
38895  *)
38896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38897for as_dir in $PATH
38898do
38899  IFS=$as_save_IFS
38900  test -z "$as_dir" && as_dir=.
38901    for ac_exec_ext in '' $ac_executable_extensions; do
38902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38903    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38905    break 2
38906  fi
38907done
38908  done
38909IFS=$as_save_IFS
38910
38911  ;;
38912esac
38913fi
38914OBJDUMP=$ac_cv_path_OBJDUMP
38915if test -n "$OBJDUMP"; then
38916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38917$as_echo "$OBJDUMP" >&6; }
38918else
38919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38920$as_echo "no" >&6; }
38921fi
38922
38923
38924        if test "x$OBJDUMP" = x; then
38925          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38926        fi
38927      else
38928        # Otherwise we believe it is a complete path. Use it as it is.
38929        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38930$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38932$as_echo_n "checking for OBJDUMP... " >&6; }
38933        if test ! -x "$tool_specified"; then
38934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38935$as_echo "not found" >&6; }
38936          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38937        fi
38938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38939$as_echo "$tool_specified" >&6; }
38940      fi
38941    fi
38942  fi
38943
38944
38945  if test "x$OBJDUMP" != x; then
38946    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38947    # bails if argument is missing.
38948
38949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38950
38951  # First separate the path from the arguments. This will split at the first
38952  # space.
38953  complete="$OBJDUMP"
38954  path="${complete%% *}"
38955  tmp="$complete EOL"
38956  arguments="${tmp#* }"
38957
38958  # Input might be given as Windows format, start by converting to
38959  # unix format.
38960  new_path=`$CYGPATH -u "$path"`
38961
38962  # Now try to locate executable using which
38963  new_path=`$WHICH "$new_path" 2> /dev/null`
38964  # bat and cmd files are not always considered executable in cygwin causing which
38965  # to not find them
38966  if test "x$new_path" = x \
38967      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38968      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38969    new_path=`$CYGPATH -u "$path"`
38970  fi
38971  if test "x$new_path" = x; then
38972    # Oops. Which didn't find the executable.
38973    # The splitting of arguments from the executable at a space might have been incorrect,
38974    # since paths with space are more likely in Windows. Give it another try with the whole
38975    # argument.
38976    path="$complete"
38977    arguments="EOL"
38978    new_path=`$CYGPATH -u "$path"`
38979    new_path=`$WHICH "$new_path" 2> /dev/null`
38980    # bat and cmd files are not always considered executable in cygwin causing which
38981    # to not find them
38982    if test "x$new_path" = x \
38983        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38984        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38985      new_path=`$CYGPATH -u "$path"`
38986    fi
38987    if test "x$new_path" = x; then
38988      # It's still not found. Now this is an unrecoverable error.
38989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38990$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38991      has_space=`$ECHO "$complete" | $GREP " "`
38992      if test "x$has_space" != x; then
38993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38995      fi
38996      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38997    fi
38998  fi
38999
39000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39003  # "foo.exe" is OK but "foo" is an error.
39004  #
39005  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39006  # It is also a way to make sure we got the proper file name for the real test later on.
39007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39008  if test "x$test_shortpath" = x; then
39009    # Short path failed, file does not exist as specified.
39010    # Try adding .exe or .cmd
39011    if test -f "${new_path}.exe"; then
39012      input_to_shortpath="${new_path}.exe"
39013    elif test -f "${new_path}.cmd"; then
39014      input_to_shortpath="${new_path}.cmd"
39015    else
39016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39017$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39018      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39019$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39020      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39021    fi
39022  else
39023    input_to_shortpath="$new_path"
39024  fi
39025
39026  # Call helper function which possibly converts this using DOS-style short mode.
39027  # If so, the updated path is stored in $new_path.
39028  new_path="$input_to_shortpath"
39029
39030  input_path="$input_to_shortpath"
39031  # Check if we need to convert this using DOS-style short mode. If the path
39032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39033  # take no chances and rewrite it.
39034  # Note: m4 eats our [], so we need to use [ and ] instead.
39035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39036  if test "x$has_forbidden_chars" != x; then
39037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39041      # Going to short mode and back again did indeed matter. Since short mode is
39042      # case insensitive, let's make it lowercase to improve readability.
39043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39044      # Now convert it back to Unix-stile (cygpath)
39045      input_path=`$CYGPATH -u "$shortmode_path"`
39046      new_path="$input_path"
39047    fi
39048  fi
39049
39050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39051  if test "x$test_cygdrive_prefix" = x; then
39052    # As a simple fix, exclude /usr/bin since it's not a real path.
39053    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39055      # a path prefixed by /cygdrive for fixpath to work.
39056      new_path="$CYGWIN_ROOT_PATH$input_path"
39057    fi
39058  fi
39059
39060  # remove trailing .exe if any
39061  new_path="${new_path/%.exe/}"
39062
39063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39064
39065  # First separate the path from the arguments. This will split at the first
39066  # space.
39067  complete="$OBJDUMP"
39068  path="${complete%% *}"
39069  tmp="$complete EOL"
39070  arguments="${tmp#* }"
39071
39072  # Input might be given as Windows format, start by converting to
39073  # unix format.
39074  new_path="$path"
39075
39076  windows_path="$new_path"
39077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39078    unix_path=`$CYGPATH -u "$windows_path"`
39079    new_path="$unix_path"
39080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39082    new_path="$unix_path"
39083  fi
39084
39085
39086  # Now try to locate executable using which
39087  new_path=`$WHICH "$new_path" 2> /dev/null`
39088
39089  if test "x$new_path" = x; then
39090    # Oops. Which didn't find the executable.
39091    # The splitting of arguments from the executable at a space might have been incorrect,
39092    # since paths with space are more likely in Windows. Give it another try with the whole
39093    # argument.
39094    path="$complete"
39095    arguments="EOL"
39096    new_path="$path"
39097
39098  windows_path="$new_path"
39099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39100    unix_path=`$CYGPATH -u "$windows_path"`
39101    new_path="$unix_path"
39102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39104    new_path="$unix_path"
39105  fi
39106
39107
39108    new_path=`$WHICH "$new_path" 2> /dev/null`
39109    # bat and cmd files are not always considered executable in MSYS causing which
39110    # to not find them
39111    if test "x$new_path" = x \
39112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39114      new_path="$path"
39115
39116  windows_path="$new_path"
39117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39118    unix_path=`$CYGPATH -u "$windows_path"`
39119    new_path="$unix_path"
39120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39122    new_path="$unix_path"
39123  fi
39124
39125    fi
39126
39127    if test "x$new_path" = x; then
39128      # It's still not found. Now this is an unrecoverable error.
39129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39130$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39131      has_space=`$ECHO "$complete" | $GREP " "`
39132      if test "x$has_space" != x; then
39133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39135      fi
39136      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39137    fi
39138  fi
39139
39140  # Now new_path has a complete unix path to the binary
39141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39142    # Keep paths in /bin as-is, but remove trailing .exe if any
39143    new_path="${new_path/%.exe/}"
39144    # Do not save /bin paths to all_fixpath_prefixes!
39145  else
39146    # Not in mixed or Windows style, start by that.
39147    new_path=`cmd //c echo $new_path`
39148
39149  input_path="$new_path"
39150  # Check if we need to convert this using DOS-style short mode. If the path
39151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39152  # take no chances and rewrite it.
39153  # Note: m4 eats our [], so we need to use [ and ] instead.
39154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39155  if test "x$has_forbidden_chars" != x; then
39156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39158  fi
39159
39160    # Output is in $new_path
39161
39162  windows_path="$new_path"
39163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39164    unix_path=`$CYGPATH -u "$windows_path"`
39165    new_path="$unix_path"
39166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39168    new_path="$unix_path"
39169  fi
39170
39171    # remove trailing .exe if any
39172    new_path="${new_path/%.exe/}"
39173
39174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39176  fi
39177
39178  else
39179    # We're on a unix platform. Hooray! :)
39180    # First separate the path from the arguments. This will split at the first
39181    # space.
39182    complete="$OBJDUMP"
39183    path="${complete%% *}"
39184    tmp="$complete EOL"
39185    arguments="${tmp#* }"
39186
39187    # Cannot rely on the command "which" here since it doesn't always work.
39188    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39189    if test -z "$is_absolute_path"; then
39190      # Path to executable is not absolute. Find it.
39191      IFS_save="$IFS"
39192      IFS=:
39193      for p in $PATH; do
39194        if test -f "$p/$path" && test -x "$p/$path"; then
39195          new_path="$p/$path"
39196          break
39197        fi
39198      done
39199      IFS="$IFS_save"
39200    else
39201      # This is an absolute path, we can use it without further modifications.
39202      new_path="$path"
39203    fi
39204
39205    if test "x$new_path" = x; then
39206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39207$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39208      has_space=`$ECHO "$complete" | $GREP " "`
39209      if test "x$has_space" != x; then
39210        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39211$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39212      fi
39213      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39214    fi
39215  fi
39216
39217  # Now join together the path and the arguments once again
39218  if test "x$arguments" != xEOL; then
39219    new_complete="$new_path ${arguments% *}"
39220  else
39221    new_complete="$new_path"
39222  fi
39223
39224  if test "x$complete" != "x$new_complete"; then
39225    OBJDUMP="$new_complete"
39226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39227$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39228  fi
39229
39230  fi
39231
39232
39233  # Restore old path.
39234  PATH="$OLD_PATH"
39235
39236  # Restore the flags to the user specified values.
39237  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39238  CFLAGS="$ORG_CFLAGS"
39239  CXXFLAGS="$ORG_CXXFLAGS"
39240  OBJCFLAGS="$ORG_OBJCFLAGS"
39241
39242
39243# Finally do some processing after the detection phase
39244
39245  if test "x$COMPILE_TYPE" = "xcross"; then
39246    # Now we need to find a C/C++ compiler that can build executables for the
39247    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39248    # used once. Also, we need to do this without adding a tools dir to the
39249    # path, otherwise we might pick up cross-compilers which don't use standard
39250    # naming.
39251
39252    # FIXME: we should list the discovered compilers as an exclude pattern!
39253    # If we do that, we can do this detection before POST_DETECTION, and still
39254    # find the build compilers in the tools dir, if needed.
39255
39256
39257  # Publish this variable in the help.
39258
39259
39260  if test "x$BUILD_CC" = x; then
39261    # The variable is not set by user, try to locate tool using the code snippet
39262    for ac_prog in cl cc gcc
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_path_BUILD_CC+:} false; then :
39269  $as_echo_n "(cached) " >&6
39270else
39271  case $BUILD_CC in
39272  [\\/]* | ?:[\\/]*)
39273  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39274  ;;
39275  *)
39276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39277for as_dir in $PATH
39278do
39279  IFS=$as_save_IFS
39280  test -z "$as_dir" && as_dir=.
39281    for ac_exec_ext in '' $ac_executable_extensions; do
39282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39283    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39285    break 2
39286  fi
39287done
39288  done
39289IFS=$as_save_IFS
39290
39291  ;;
39292esac
39293fi
39294BUILD_CC=$ac_cv_path_BUILD_CC
39295if test -n "$BUILD_CC"; then
39296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39297$as_echo "$BUILD_CC" >&6; }
39298else
39299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39300$as_echo "no" >&6; }
39301fi
39302
39303
39304  test -n "$BUILD_CC" && break
39305done
39306
39307  else
39308    # The variable is set, but is it from the command line or the environment?
39309
39310    # Try to remove the string !BUILD_CC! from our list.
39311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39313      # If it failed, the variable was not from the command line. Ignore it,
39314      # but warn the user (except for BASH, which is always set by the calling BASH).
39315      if test "xBUILD_CC" != xBASH; then
39316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39317$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39318      fi
39319      # Try to locate tool using the code snippet
39320      for ac_prog in cl cc gcc
39321do
39322  # Extract the first word of "$ac_prog", so it can be a program name with args.
39323set dummy $ac_prog; ac_word=$2
39324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39325$as_echo_n "checking for $ac_word... " >&6; }
39326if ${ac_cv_path_BUILD_CC+:} false; then :
39327  $as_echo_n "(cached) " >&6
39328else
39329  case $BUILD_CC in
39330  [\\/]* | ?:[\\/]*)
39331  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39332  ;;
39333  *)
39334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39335for as_dir in $PATH
39336do
39337  IFS=$as_save_IFS
39338  test -z "$as_dir" && as_dir=.
39339    for ac_exec_ext in '' $ac_executable_extensions; do
39340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39341    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39343    break 2
39344  fi
39345done
39346  done
39347IFS=$as_save_IFS
39348
39349  ;;
39350esac
39351fi
39352BUILD_CC=$ac_cv_path_BUILD_CC
39353if test -n "$BUILD_CC"; then
39354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39355$as_echo "$BUILD_CC" >&6; }
39356else
39357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39358$as_echo "no" >&6; }
39359fi
39360
39361
39362  test -n "$BUILD_CC" && break
39363done
39364
39365    else
39366      # If it succeeded, then it was overridden by the user. We will use it
39367      # for the tool.
39368
39369      # First remove it from the list of overridden variables, so we can test
39370      # for unknown variables in the end.
39371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39372
39373      # Check if the provided tool contains a complete path.
39374      tool_specified="$BUILD_CC"
39375      tool_basename="${tool_specified##*/}"
39376      if test "x$tool_basename" = "x$tool_specified"; then
39377        # A command without a complete path is provided, search $PATH.
39378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39379$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39380        # Extract the first word of "$tool_basename", so it can be a program name with args.
39381set dummy $tool_basename; ac_word=$2
39382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39383$as_echo_n "checking for $ac_word... " >&6; }
39384if ${ac_cv_path_BUILD_CC+:} false; then :
39385  $as_echo_n "(cached) " >&6
39386else
39387  case $BUILD_CC in
39388  [\\/]* | ?:[\\/]*)
39389  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39390  ;;
39391  *)
39392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39393for as_dir in $PATH
39394do
39395  IFS=$as_save_IFS
39396  test -z "$as_dir" && as_dir=.
39397    for ac_exec_ext in '' $ac_executable_extensions; do
39398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39399    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39401    break 2
39402  fi
39403done
39404  done
39405IFS=$as_save_IFS
39406
39407  ;;
39408esac
39409fi
39410BUILD_CC=$ac_cv_path_BUILD_CC
39411if test -n "$BUILD_CC"; then
39412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39413$as_echo "$BUILD_CC" >&6; }
39414else
39415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39416$as_echo "no" >&6; }
39417fi
39418
39419
39420        if test "x$BUILD_CC" = x; then
39421          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39422        fi
39423      else
39424        # Otherwise we believe it is a complete path. Use it as it is.
39425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39426$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39428$as_echo_n "checking for BUILD_CC... " >&6; }
39429        if test ! -x "$tool_specified"; then
39430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39431$as_echo "not found" >&6; }
39432          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39433        fi
39434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39435$as_echo "$tool_specified" >&6; }
39436      fi
39437    fi
39438  fi
39439
39440
39441
39442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39443
39444  # First separate the path from the arguments. This will split at the first
39445  # space.
39446  complete="$BUILD_CC"
39447  path="${complete%% *}"
39448  tmp="$complete EOL"
39449  arguments="${tmp#* }"
39450
39451  # Input might be given as Windows format, start by converting to
39452  # unix format.
39453  new_path=`$CYGPATH -u "$path"`
39454
39455  # Now try to locate executable using which
39456  new_path=`$WHICH "$new_path" 2> /dev/null`
39457  # bat and cmd files are not always considered executable in cygwin causing which
39458  # to not find them
39459  if test "x$new_path" = x \
39460      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39461      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39462    new_path=`$CYGPATH -u "$path"`
39463  fi
39464  if test "x$new_path" = x; then
39465    # Oops. Which didn't find the executable.
39466    # The splitting of arguments from the executable at a space might have been incorrect,
39467    # since paths with space are more likely in Windows. Give it another try with the whole
39468    # argument.
39469    path="$complete"
39470    arguments="EOL"
39471    new_path=`$CYGPATH -u "$path"`
39472    new_path=`$WHICH "$new_path" 2> /dev/null`
39473    # bat and cmd files are not always considered executable in cygwin causing which
39474    # to not find them
39475    if test "x$new_path" = x \
39476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39478      new_path=`$CYGPATH -u "$path"`
39479    fi
39480    if test "x$new_path" = x; then
39481      # It's still not found. Now this is an unrecoverable error.
39482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39483$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39484      has_space=`$ECHO "$complete" | $GREP " "`
39485      if test "x$has_space" != x; then
39486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39488      fi
39489      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39490    fi
39491  fi
39492
39493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39496  # "foo.exe" is OK but "foo" is an error.
39497  #
39498  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39499  # It is also a way to make sure we got the proper file name for the real test later on.
39500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39501  if test "x$test_shortpath" = x; then
39502    # Short path failed, file does not exist as specified.
39503    # Try adding .exe or .cmd
39504    if test -f "${new_path}.exe"; then
39505      input_to_shortpath="${new_path}.exe"
39506    elif test -f "${new_path}.cmd"; then
39507      input_to_shortpath="${new_path}.cmd"
39508    else
39509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39510$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39511      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39512$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39513      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39514    fi
39515  else
39516    input_to_shortpath="$new_path"
39517  fi
39518
39519  # Call helper function which possibly converts this using DOS-style short mode.
39520  # If so, the updated path is stored in $new_path.
39521  new_path="$input_to_shortpath"
39522
39523  input_path="$input_to_shortpath"
39524  # Check if we need to convert this using DOS-style short mode. If the path
39525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39526  # take no chances and rewrite it.
39527  # Note: m4 eats our [], so we need to use [ and ] instead.
39528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39529  if test "x$has_forbidden_chars" != x; then
39530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39534      # Going to short mode and back again did indeed matter. Since short mode is
39535      # case insensitive, let's make it lowercase to improve readability.
39536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39537      # Now convert it back to Unix-stile (cygpath)
39538      input_path=`$CYGPATH -u "$shortmode_path"`
39539      new_path="$input_path"
39540    fi
39541  fi
39542
39543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39544  if test "x$test_cygdrive_prefix" = x; then
39545    # As a simple fix, exclude /usr/bin since it's not a real path.
39546    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39548      # a path prefixed by /cygdrive for fixpath to work.
39549      new_path="$CYGWIN_ROOT_PATH$input_path"
39550    fi
39551  fi
39552
39553  # remove trailing .exe if any
39554  new_path="${new_path/%.exe/}"
39555
39556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39557
39558  # First separate the path from the arguments. This will split at the first
39559  # space.
39560  complete="$BUILD_CC"
39561  path="${complete%% *}"
39562  tmp="$complete EOL"
39563  arguments="${tmp#* }"
39564
39565  # Input might be given as Windows format, start by converting to
39566  # unix format.
39567  new_path="$path"
39568
39569  windows_path="$new_path"
39570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39571    unix_path=`$CYGPATH -u "$windows_path"`
39572    new_path="$unix_path"
39573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39575    new_path="$unix_path"
39576  fi
39577
39578
39579  # Now try to locate executable using which
39580  new_path=`$WHICH "$new_path" 2> /dev/null`
39581
39582  if test "x$new_path" = x; then
39583    # Oops. Which didn't find the executable.
39584    # The splitting of arguments from the executable at a space might have been incorrect,
39585    # since paths with space are more likely in Windows. Give it another try with the whole
39586    # argument.
39587    path="$complete"
39588    arguments="EOL"
39589    new_path="$path"
39590
39591  windows_path="$new_path"
39592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39593    unix_path=`$CYGPATH -u "$windows_path"`
39594    new_path="$unix_path"
39595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39597    new_path="$unix_path"
39598  fi
39599
39600
39601    new_path=`$WHICH "$new_path" 2> /dev/null`
39602    # bat and cmd files are not always considered executable in MSYS causing which
39603    # to not find them
39604    if test "x$new_path" = x \
39605        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39606        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39607      new_path="$path"
39608
39609  windows_path="$new_path"
39610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39611    unix_path=`$CYGPATH -u "$windows_path"`
39612    new_path="$unix_path"
39613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39615    new_path="$unix_path"
39616  fi
39617
39618    fi
39619
39620    if test "x$new_path" = x; then
39621      # It's still not found. Now this is an unrecoverable error.
39622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39623$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39624      has_space=`$ECHO "$complete" | $GREP " "`
39625      if test "x$has_space" != x; then
39626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39628      fi
39629      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39630    fi
39631  fi
39632
39633  # Now new_path has a complete unix path to the binary
39634  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39635    # Keep paths in /bin as-is, but remove trailing .exe if any
39636    new_path="${new_path/%.exe/}"
39637    # Do not save /bin paths to all_fixpath_prefixes!
39638  else
39639    # Not in mixed or Windows style, start by that.
39640    new_path=`cmd //c echo $new_path`
39641
39642  input_path="$new_path"
39643  # Check if we need to convert this using DOS-style short mode. If the path
39644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39645  # take no chances and rewrite it.
39646  # Note: m4 eats our [], so we need to use [ and ] instead.
39647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39648  if test "x$has_forbidden_chars" != x; then
39649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39651  fi
39652
39653    # Output is in $new_path
39654
39655  windows_path="$new_path"
39656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39657    unix_path=`$CYGPATH -u "$windows_path"`
39658    new_path="$unix_path"
39659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39661    new_path="$unix_path"
39662  fi
39663
39664    # remove trailing .exe if any
39665    new_path="${new_path/%.exe/}"
39666
39667    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39668    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39669  fi
39670
39671  else
39672    # We're on a unix platform. Hooray! :)
39673    # First separate the path from the arguments. This will split at the first
39674    # space.
39675    complete="$BUILD_CC"
39676    path="${complete%% *}"
39677    tmp="$complete EOL"
39678    arguments="${tmp#* }"
39679
39680    # Cannot rely on the command "which" here since it doesn't always work.
39681    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39682    if test -z "$is_absolute_path"; then
39683      # Path to executable is not absolute. Find it.
39684      IFS_save="$IFS"
39685      IFS=:
39686      for p in $PATH; do
39687        if test -f "$p/$path" && test -x "$p/$path"; then
39688          new_path="$p/$path"
39689          break
39690        fi
39691      done
39692      IFS="$IFS_save"
39693    else
39694      # This is an absolute path, we can use it without further modifications.
39695      new_path="$path"
39696    fi
39697
39698    if test "x$new_path" = x; then
39699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39700$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39701      has_space=`$ECHO "$complete" | $GREP " "`
39702      if test "x$has_space" != x; then
39703        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39704$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39705      fi
39706      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39707    fi
39708  fi
39709
39710  # Now join together the path and the arguments once again
39711  if test "x$arguments" != xEOL; then
39712    new_complete="$new_path ${arguments% *}"
39713  else
39714    new_complete="$new_path"
39715  fi
39716
39717  if test "x$complete" != "x$new_complete"; then
39718    BUILD_CC="$new_complete"
39719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39720$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39721  fi
39722
39723
39724
39725  # Publish this variable in the help.
39726
39727
39728  if test "x$BUILD_CXX" = x; then
39729    # The variable is not set by user, try to locate tool using the code snippet
39730    for ac_prog in cl CC g++
39731do
39732  # Extract the first word of "$ac_prog", so it can be a program name with args.
39733set dummy $ac_prog; ac_word=$2
39734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39735$as_echo_n "checking for $ac_word... " >&6; }
39736if ${ac_cv_path_BUILD_CXX+:} false; then :
39737  $as_echo_n "(cached) " >&6
39738else
39739  case $BUILD_CXX in
39740  [\\/]* | ?:[\\/]*)
39741  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39742  ;;
39743  *)
39744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39745for as_dir in $PATH
39746do
39747  IFS=$as_save_IFS
39748  test -z "$as_dir" && as_dir=.
39749    for ac_exec_ext in '' $ac_executable_extensions; do
39750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39751    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39753    break 2
39754  fi
39755done
39756  done
39757IFS=$as_save_IFS
39758
39759  ;;
39760esac
39761fi
39762BUILD_CXX=$ac_cv_path_BUILD_CXX
39763if test -n "$BUILD_CXX"; then
39764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39765$as_echo "$BUILD_CXX" >&6; }
39766else
39767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39768$as_echo "no" >&6; }
39769fi
39770
39771
39772  test -n "$BUILD_CXX" && break
39773done
39774
39775  else
39776    # The variable is set, but is it from the command line or the environment?
39777
39778    # Try to remove the string !BUILD_CXX! from our list.
39779    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39780    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39781      # If it failed, the variable was not from the command line. Ignore it,
39782      # but warn the user (except for BASH, which is always set by the calling BASH).
39783      if test "xBUILD_CXX" != xBASH; then
39784        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39785$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39786      fi
39787      # Try to locate tool using the code snippet
39788      for ac_prog in cl CC g++
39789do
39790  # Extract the first word of "$ac_prog", so it can be a program name with args.
39791set dummy $ac_prog; ac_word=$2
39792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39793$as_echo_n "checking for $ac_word... " >&6; }
39794if ${ac_cv_path_BUILD_CXX+:} false; then :
39795  $as_echo_n "(cached) " >&6
39796else
39797  case $BUILD_CXX in
39798  [\\/]* | ?:[\\/]*)
39799  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39800  ;;
39801  *)
39802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39803for as_dir in $PATH
39804do
39805  IFS=$as_save_IFS
39806  test -z "$as_dir" && as_dir=.
39807    for ac_exec_ext in '' $ac_executable_extensions; do
39808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39809    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39811    break 2
39812  fi
39813done
39814  done
39815IFS=$as_save_IFS
39816
39817  ;;
39818esac
39819fi
39820BUILD_CXX=$ac_cv_path_BUILD_CXX
39821if test -n "$BUILD_CXX"; then
39822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39823$as_echo "$BUILD_CXX" >&6; }
39824else
39825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39826$as_echo "no" >&6; }
39827fi
39828
39829
39830  test -n "$BUILD_CXX" && break
39831done
39832
39833    else
39834      # If it succeeded, then it was overridden by the user. We will use it
39835      # for the tool.
39836
39837      # First remove it from the list of overridden variables, so we can test
39838      # for unknown variables in the end.
39839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39840
39841      # Check if the provided tool contains a complete path.
39842      tool_specified="$BUILD_CXX"
39843      tool_basename="${tool_specified##*/}"
39844      if test "x$tool_basename" = "x$tool_specified"; then
39845        # A command without a complete path is provided, search $PATH.
39846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39847$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39848        # Extract the first word of "$tool_basename", so it can be a program name with args.
39849set dummy $tool_basename; ac_word=$2
39850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39851$as_echo_n "checking for $ac_word... " >&6; }
39852if ${ac_cv_path_BUILD_CXX+:} false; then :
39853  $as_echo_n "(cached) " >&6
39854else
39855  case $BUILD_CXX in
39856  [\\/]* | ?:[\\/]*)
39857  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39858  ;;
39859  *)
39860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39861for as_dir in $PATH
39862do
39863  IFS=$as_save_IFS
39864  test -z "$as_dir" && as_dir=.
39865    for ac_exec_ext in '' $ac_executable_extensions; do
39866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39867    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39869    break 2
39870  fi
39871done
39872  done
39873IFS=$as_save_IFS
39874
39875  ;;
39876esac
39877fi
39878BUILD_CXX=$ac_cv_path_BUILD_CXX
39879if test -n "$BUILD_CXX"; then
39880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39881$as_echo "$BUILD_CXX" >&6; }
39882else
39883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39884$as_echo "no" >&6; }
39885fi
39886
39887
39888        if test "x$BUILD_CXX" = x; then
39889          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39890        fi
39891      else
39892        # Otherwise we believe it is a complete path. Use it as it is.
39893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39894$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39896$as_echo_n "checking for BUILD_CXX... " >&6; }
39897        if test ! -x "$tool_specified"; then
39898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39899$as_echo "not found" >&6; }
39900          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39901        fi
39902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39903$as_echo "$tool_specified" >&6; }
39904      fi
39905    fi
39906  fi
39907
39908
39909
39910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39911
39912  # First separate the path from the arguments. This will split at the first
39913  # space.
39914  complete="$BUILD_CXX"
39915  path="${complete%% *}"
39916  tmp="$complete EOL"
39917  arguments="${tmp#* }"
39918
39919  # Input might be given as Windows format, start by converting to
39920  # unix format.
39921  new_path=`$CYGPATH -u "$path"`
39922
39923  # Now try to locate executable using which
39924  new_path=`$WHICH "$new_path" 2> /dev/null`
39925  # bat and cmd files are not always considered executable in cygwin causing which
39926  # to not find them
39927  if test "x$new_path" = x \
39928      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39929      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39930    new_path=`$CYGPATH -u "$path"`
39931  fi
39932  if test "x$new_path" = x; then
39933    # Oops. Which didn't find the executable.
39934    # The splitting of arguments from the executable at a space might have been incorrect,
39935    # since paths with space are more likely in Windows. Give it another try with the whole
39936    # argument.
39937    path="$complete"
39938    arguments="EOL"
39939    new_path=`$CYGPATH -u "$path"`
39940    new_path=`$WHICH "$new_path" 2> /dev/null`
39941    # bat and cmd files are not always considered executable in cygwin causing which
39942    # to not find them
39943    if test "x$new_path" = x \
39944        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39945        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39946      new_path=`$CYGPATH -u "$path"`
39947    fi
39948    if test "x$new_path" = x; then
39949      # It's still not found. Now this is an unrecoverable error.
39950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39951$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39952      has_space=`$ECHO "$complete" | $GREP " "`
39953      if test "x$has_space" != x; then
39954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39956      fi
39957      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39958    fi
39959  fi
39960
39961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39964  # "foo.exe" is OK but "foo" is an error.
39965  #
39966  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39967  # It is also a way to make sure we got the proper file name for the real test later on.
39968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39969  if test "x$test_shortpath" = x; then
39970    # Short path failed, file does not exist as specified.
39971    # Try adding .exe or .cmd
39972    if test -f "${new_path}.exe"; then
39973      input_to_shortpath="${new_path}.exe"
39974    elif test -f "${new_path}.cmd"; then
39975      input_to_shortpath="${new_path}.cmd"
39976    else
39977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39978$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39979      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39980$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39981      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39982    fi
39983  else
39984    input_to_shortpath="$new_path"
39985  fi
39986
39987  # Call helper function which possibly converts this using DOS-style short mode.
39988  # If so, the updated path is stored in $new_path.
39989  new_path="$input_to_shortpath"
39990
39991  input_path="$input_to_shortpath"
39992  # Check if we need to convert this using DOS-style short mode. If the path
39993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39994  # take no chances and rewrite it.
39995  # Note: m4 eats our [], so we need to use [ and ] instead.
39996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39997  if test "x$has_forbidden_chars" != x; then
39998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40002      # Going to short mode and back again did indeed matter. Since short mode is
40003      # case insensitive, let's make it lowercase to improve readability.
40004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40005      # Now convert it back to Unix-stile (cygpath)
40006      input_path=`$CYGPATH -u "$shortmode_path"`
40007      new_path="$input_path"
40008    fi
40009  fi
40010
40011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40012  if test "x$test_cygdrive_prefix" = x; then
40013    # As a simple fix, exclude /usr/bin since it's not a real path.
40014    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40016      # a path prefixed by /cygdrive for fixpath to work.
40017      new_path="$CYGWIN_ROOT_PATH$input_path"
40018    fi
40019  fi
40020
40021  # remove trailing .exe if any
40022  new_path="${new_path/%.exe/}"
40023
40024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40025
40026  # First separate the path from the arguments. This will split at the first
40027  # space.
40028  complete="$BUILD_CXX"
40029  path="${complete%% *}"
40030  tmp="$complete EOL"
40031  arguments="${tmp#* }"
40032
40033  # Input might be given as Windows format, start by converting to
40034  # unix format.
40035  new_path="$path"
40036
40037  windows_path="$new_path"
40038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40039    unix_path=`$CYGPATH -u "$windows_path"`
40040    new_path="$unix_path"
40041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40043    new_path="$unix_path"
40044  fi
40045
40046
40047  # Now try to locate executable using which
40048  new_path=`$WHICH "$new_path" 2> /dev/null`
40049
40050  if test "x$new_path" = x; then
40051    # Oops. Which didn't find the executable.
40052    # The splitting of arguments from the executable at a space might have been incorrect,
40053    # since paths with space are more likely in Windows. Give it another try with the whole
40054    # argument.
40055    path="$complete"
40056    arguments="EOL"
40057    new_path="$path"
40058
40059  windows_path="$new_path"
40060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40061    unix_path=`$CYGPATH -u "$windows_path"`
40062    new_path="$unix_path"
40063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40065    new_path="$unix_path"
40066  fi
40067
40068
40069    new_path=`$WHICH "$new_path" 2> /dev/null`
40070    # bat and cmd files are not always considered executable in MSYS causing which
40071    # to not find them
40072    if test "x$new_path" = x \
40073        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40074        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40075      new_path="$path"
40076
40077  windows_path="$new_path"
40078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40079    unix_path=`$CYGPATH -u "$windows_path"`
40080    new_path="$unix_path"
40081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40083    new_path="$unix_path"
40084  fi
40085
40086    fi
40087
40088    if test "x$new_path" = x; then
40089      # It's still not found. Now this is an unrecoverable error.
40090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40091$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40092      has_space=`$ECHO "$complete" | $GREP " "`
40093      if test "x$has_space" != x; then
40094        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40095$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40096      fi
40097      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40098    fi
40099  fi
40100
40101  # Now new_path has a complete unix path to the binary
40102  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40103    # Keep paths in /bin as-is, but remove trailing .exe if any
40104    new_path="${new_path/%.exe/}"
40105    # Do not save /bin paths to all_fixpath_prefixes!
40106  else
40107    # Not in mixed or Windows style, start by that.
40108    new_path=`cmd //c echo $new_path`
40109
40110  input_path="$new_path"
40111  # Check if we need to convert this using DOS-style short mode. If the path
40112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40113  # take no chances and rewrite it.
40114  # Note: m4 eats our [], so we need to use [ and ] instead.
40115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40116  if test "x$has_forbidden_chars" != x; then
40117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40119  fi
40120
40121    # Output is in $new_path
40122
40123  windows_path="$new_path"
40124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40125    unix_path=`$CYGPATH -u "$windows_path"`
40126    new_path="$unix_path"
40127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40129    new_path="$unix_path"
40130  fi
40131
40132    # remove trailing .exe if any
40133    new_path="${new_path/%.exe/}"
40134
40135    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40136    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40137  fi
40138
40139  else
40140    # We're on a unix platform. Hooray! :)
40141    # First separate the path from the arguments. This will split at the first
40142    # space.
40143    complete="$BUILD_CXX"
40144    path="${complete%% *}"
40145    tmp="$complete EOL"
40146    arguments="${tmp#* }"
40147
40148    # Cannot rely on the command "which" here since it doesn't always work.
40149    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40150    if test -z "$is_absolute_path"; then
40151      # Path to executable is not absolute. Find it.
40152      IFS_save="$IFS"
40153      IFS=:
40154      for p in $PATH; do
40155        if test -f "$p/$path" && test -x "$p/$path"; then
40156          new_path="$p/$path"
40157          break
40158        fi
40159      done
40160      IFS="$IFS_save"
40161    else
40162      # This is an absolute path, we can use it without further modifications.
40163      new_path="$path"
40164    fi
40165
40166    if test "x$new_path" = x; then
40167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40168$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40169      has_space=`$ECHO "$complete" | $GREP " "`
40170      if test "x$has_space" != x; then
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40172$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40173      fi
40174      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40175    fi
40176  fi
40177
40178  # Now join together the path and the arguments once again
40179  if test "x$arguments" != xEOL; then
40180    new_complete="$new_path ${arguments% *}"
40181  else
40182    new_complete="$new_path"
40183  fi
40184
40185  if test "x$complete" != "x$new_complete"; then
40186    BUILD_CXX="$new_complete"
40187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40188$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40189  fi
40190
40191
40192
40193  # Publish this variable in the help.
40194
40195
40196  if test "x$BUILD_LD" = x; then
40197    # The variable is not set by user, try to locate tool using the code snippet
40198    for ac_prog in ld
40199do
40200  # Extract the first word of "$ac_prog", so it can be a program name with args.
40201set dummy $ac_prog; ac_word=$2
40202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40203$as_echo_n "checking for $ac_word... " >&6; }
40204if ${ac_cv_path_BUILD_LD+:} false; then :
40205  $as_echo_n "(cached) " >&6
40206else
40207  case $BUILD_LD in
40208  [\\/]* | ?:[\\/]*)
40209  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40210  ;;
40211  *)
40212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40213for as_dir in $PATH
40214do
40215  IFS=$as_save_IFS
40216  test -z "$as_dir" && as_dir=.
40217    for ac_exec_ext in '' $ac_executable_extensions; do
40218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40219    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40221    break 2
40222  fi
40223done
40224  done
40225IFS=$as_save_IFS
40226
40227  ;;
40228esac
40229fi
40230BUILD_LD=$ac_cv_path_BUILD_LD
40231if test -n "$BUILD_LD"; then
40232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40233$as_echo "$BUILD_LD" >&6; }
40234else
40235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40236$as_echo "no" >&6; }
40237fi
40238
40239
40240  test -n "$BUILD_LD" && break
40241done
40242
40243  else
40244    # The variable is set, but is it from the command line or the environment?
40245
40246    # Try to remove the string !BUILD_LD! from our list.
40247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40249      # If it failed, the variable was not from the command line. Ignore it,
40250      # but warn the user (except for BASH, which is always set by the calling BASH).
40251      if test "xBUILD_LD" != xBASH; then
40252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40253$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40254      fi
40255      # Try to locate tool using the code snippet
40256      for ac_prog in ld
40257do
40258  # Extract the first word of "$ac_prog", so it can be a program name with args.
40259set dummy $ac_prog; ac_word=$2
40260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40261$as_echo_n "checking for $ac_word... " >&6; }
40262if ${ac_cv_path_BUILD_LD+:} false; then :
40263  $as_echo_n "(cached) " >&6
40264else
40265  case $BUILD_LD in
40266  [\\/]* | ?:[\\/]*)
40267  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40268  ;;
40269  *)
40270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40271for as_dir in $PATH
40272do
40273  IFS=$as_save_IFS
40274  test -z "$as_dir" && as_dir=.
40275    for ac_exec_ext in '' $ac_executable_extensions; do
40276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40277    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40279    break 2
40280  fi
40281done
40282  done
40283IFS=$as_save_IFS
40284
40285  ;;
40286esac
40287fi
40288BUILD_LD=$ac_cv_path_BUILD_LD
40289if test -n "$BUILD_LD"; then
40290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40291$as_echo "$BUILD_LD" >&6; }
40292else
40293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40294$as_echo "no" >&6; }
40295fi
40296
40297
40298  test -n "$BUILD_LD" && break
40299done
40300
40301    else
40302      # If it succeeded, then it was overridden by the user. We will use it
40303      # for the tool.
40304
40305      # First remove it from the list of overridden variables, so we can test
40306      # for unknown variables in the end.
40307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40308
40309      # Check if the provided tool contains a complete path.
40310      tool_specified="$BUILD_LD"
40311      tool_basename="${tool_specified##*/}"
40312      if test "x$tool_basename" = "x$tool_specified"; then
40313        # A command without a complete path is provided, search $PATH.
40314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40315$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40316        # Extract the first word of "$tool_basename", so it can be a program name with args.
40317set dummy $tool_basename; ac_word=$2
40318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40319$as_echo_n "checking for $ac_word... " >&6; }
40320if ${ac_cv_path_BUILD_LD+:} false; then :
40321  $as_echo_n "(cached) " >&6
40322else
40323  case $BUILD_LD in
40324  [\\/]* | ?:[\\/]*)
40325  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40326  ;;
40327  *)
40328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40329for as_dir in $PATH
40330do
40331  IFS=$as_save_IFS
40332  test -z "$as_dir" && as_dir=.
40333    for ac_exec_ext in '' $ac_executable_extensions; do
40334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40335    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40337    break 2
40338  fi
40339done
40340  done
40341IFS=$as_save_IFS
40342
40343  ;;
40344esac
40345fi
40346BUILD_LD=$ac_cv_path_BUILD_LD
40347if test -n "$BUILD_LD"; then
40348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40349$as_echo "$BUILD_LD" >&6; }
40350else
40351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40352$as_echo "no" >&6; }
40353fi
40354
40355
40356        if test "x$BUILD_LD" = x; then
40357          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40358        fi
40359      else
40360        # Otherwise we believe it is a complete path. Use it as it is.
40361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40362$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40364$as_echo_n "checking for BUILD_LD... " >&6; }
40365        if test ! -x "$tool_specified"; then
40366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40367$as_echo "not found" >&6; }
40368          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40369        fi
40370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40371$as_echo "$tool_specified" >&6; }
40372      fi
40373    fi
40374  fi
40375
40376
40377
40378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40379
40380  # First separate the path from the arguments. This will split at the first
40381  # space.
40382  complete="$BUILD_LD"
40383  path="${complete%% *}"
40384  tmp="$complete EOL"
40385  arguments="${tmp#* }"
40386
40387  # Input might be given as Windows format, start by converting to
40388  # unix format.
40389  new_path=`$CYGPATH -u "$path"`
40390
40391  # Now try to locate executable using which
40392  new_path=`$WHICH "$new_path" 2> /dev/null`
40393  # bat and cmd files are not always considered executable in cygwin causing which
40394  # to not find them
40395  if test "x$new_path" = x \
40396      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40397      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40398    new_path=`$CYGPATH -u "$path"`
40399  fi
40400  if test "x$new_path" = x; then
40401    # Oops. Which didn't find the executable.
40402    # The splitting of arguments from the executable at a space might have been incorrect,
40403    # since paths with space are more likely in Windows. Give it another try with the whole
40404    # argument.
40405    path="$complete"
40406    arguments="EOL"
40407    new_path=`$CYGPATH -u "$path"`
40408    new_path=`$WHICH "$new_path" 2> /dev/null`
40409    # bat and cmd files are not always considered executable in cygwin causing which
40410    # to not find them
40411    if test "x$new_path" = x \
40412        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40413        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40414      new_path=`$CYGPATH -u "$path"`
40415    fi
40416    if test "x$new_path" = x; then
40417      # It's still not found. Now this is an unrecoverable error.
40418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40419$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40420      has_space=`$ECHO "$complete" | $GREP " "`
40421      if test "x$has_space" != x; then
40422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40424      fi
40425      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40426    fi
40427  fi
40428
40429  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40430  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40431  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40432  # "foo.exe" is OK but "foo" is an error.
40433  #
40434  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40435  # It is also a way to make sure we got the proper file name for the real test later on.
40436  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40437  if test "x$test_shortpath" = x; then
40438    # Short path failed, file does not exist as specified.
40439    # Try adding .exe or .cmd
40440    if test -f "${new_path}.exe"; then
40441      input_to_shortpath="${new_path}.exe"
40442    elif test -f "${new_path}.cmd"; then
40443      input_to_shortpath="${new_path}.cmd"
40444    else
40445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40446$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40447      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40448$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40449      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40450    fi
40451  else
40452    input_to_shortpath="$new_path"
40453  fi
40454
40455  # Call helper function which possibly converts this using DOS-style short mode.
40456  # If so, the updated path is stored in $new_path.
40457  new_path="$input_to_shortpath"
40458
40459  input_path="$input_to_shortpath"
40460  # Check if we need to convert this using DOS-style short mode. If the path
40461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40462  # take no chances and rewrite it.
40463  # Note: m4 eats our [], so we need to use [ and ] instead.
40464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40465  if test "x$has_forbidden_chars" != x; then
40466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40470      # Going to short mode and back again did indeed matter. Since short mode is
40471      # case insensitive, let's make it lowercase to improve readability.
40472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40473      # Now convert it back to Unix-stile (cygpath)
40474      input_path=`$CYGPATH -u "$shortmode_path"`
40475      new_path="$input_path"
40476    fi
40477  fi
40478
40479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40480  if test "x$test_cygdrive_prefix" = x; then
40481    # As a simple fix, exclude /usr/bin since it's not a real path.
40482    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40484      # a path prefixed by /cygdrive for fixpath to work.
40485      new_path="$CYGWIN_ROOT_PATH$input_path"
40486    fi
40487  fi
40488
40489  # remove trailing .exe if any
40490  new_path="${new_path/%.exe/}"
40491
40492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40493
40494  # First separate the path from the arguments. This will split at the first
40495  # space.
40496  complete="$BUILD_LD"
40497  path="${complete%% *}"
40498  tmp="$complete EOL"
40499  arguments="${tmp#* }"
40500
40501  # Input might be given as Windows format, start by converting to
40502  # unix format.
40503  new_path="$path"
40504
40505  windows_path="$new_path"
40506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40507    unix_path=`$CYGPATH -u "$windows_path"`
40508    new_path="$unix_path"
40509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40511    new_path="$unix_path"
40512  fi
40513
40514
40515  # Now try to locate executable using which
40516  new_path=`$WHICH "$new_path" 2> /dev/null`
40517
40518  if test "x$new_path" = x; then
40519    # Oops. Which didn't find the executable.
40520    # The splitting of arguments from the executable at a space might have been incorrect,
40521    # since paths with space are more likely in Windows. Give it another try with the whole
40522    # argument.
40523    path="$complete"
40524    arguments="EOL"
40525    new_path="$path"
40526
40527  windows_path="$new_path"
40528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40529    unix_path=`$CYGPATH -u "$windows_path"`
40530    new_path="$unix_path"
40531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40533    new_path="$unix_path"
40534  fi
40535
40536
40537    new_path=`$WHICH "$new_path" 2> /dev/null`
40538    # bat and cmd files are not always considered executable in MSYS causing which
40539    # to not find them
40540    if test "x$new_path" = x \
40541        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40542        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40543      new_path="$path"
40544
40545  windows_path="$new_path"
40546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40547    unix_path=`$CYGPATH -u "$windows_path"`
40548    new_path="$unix_path"
40549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40551    new_path="$unix_path"
40552  fi
40553
40554    fi
40555
40556    if test "x$new_path" = x; then
40557      # It's still not found. Now this is an unrecoverable error.
40558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40559$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40560      has_space=`$ECHO "$complete" | $GREP " "`
40561      if test "x$has_space" != x; then
40562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40564      fi
40565      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40566    fi
40567  fi
40568
40569  # Now new_path has a complete unix path to the binary
40570  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40571    # Keep paths in /bin as-is, but remove trailing .exe if any
40572    new_path="${new_path/%.exe/}"
40573    # Do not save /bin paths to all_fixpath_prefixes!
40574  else
40575    # Not in mixed or Windows style, start by that.
40576    new_path=`cmd //c echo $new_path`
40577
40578  input_path="$new_path"
40579  # Check if we need to convert this using DOS-style short mode. If the path
40580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40581  # take no chances and rewrite it.
40582  # Note: m4 eats our [], so we need to use [ and ] instead.
40583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40584  if test "x$has_forbidden_chars" != x; then
40585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40587  fi
40588
40589    # Output is in $new_path
40590
40591  windows_path="$new_path"
40592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40593    unix_path=`$CYGPATH -u "$windows_path"`
40594    new_path="$unix_path"
40595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40597    new_path="$unix_path"
40598  fi
40599
40600    # remove trailing .exe if any
40601    new_path="${new_path/%.exe/}"
40602
40603    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40604    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40605  fi
40606
40607  else
40608    # We're on a unix platform. Hooray! :)
40609    # First separate the path from the arguments. This will split at the first
40610    # space.
40611    complete="$BUILD_LD"
40612    path="${complete%% *}"
40613    tmp="$complete EOL"
40614    arguments="${tmp#* }"
40615
40616    # Cannot rely on the command "which" here since it doesn't always work.
40617    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40618    if test -z "$is_absolute_path"; then
40619      # Path to executable is not absolute. Find it.
40620      IFS_save="$IFS"
40621      IFS=:
40622      for p in $PATH; do
40623        if test -f "$p/$path" && test -x "$p/$path"; then
40624          new_path="$p/$path"
40625          break
40626        fi
40627      done
40628      IFS="$IFS_save"
40629    else
40630      # This is an absolute path, we can use it without further modifications.
40631      new_path="$path"
40632    fi
40633
40634    if test "x$new_path" = x; then
40635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40636$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40637      has_space=`$ECHO "$complete" | $GREP " "`
40638      if test "x$has_space" != x; then
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40640$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40641      fi
40642      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40643    fi
40644  fi
40645
40646  # Now join together the path and the arguments once again
40647  if test "x$arguments" != xEOL; then
40648    new_complete="$new_path ${arguments% *}"
40649  else
40650    new_complete="$new_path"
40651  fi
40652
40653  if test "x$complete" != "x$new_complete"; then
40654    BUILD_LD="$new_complete"
40655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40656$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40657  fi
40658
40659  else
40660    # If we are not cross compiling, use the normal target compilers for
40661    # building the build platform executables.
40662    BUILD_CC="$CC"
40663    BUILD_CXX="$CXX"
40664    BUILD_LD="$LD"
40665  fi
40666
40667
40668
40669
40670
40671
40672  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40673    # For hotspot, we need these in Windows mixed path,
40674    # so rewrite them all. Need added .exe suffix.
40675    HOTSPOT_CXX="$CXX.exe"
40676    HOTSPOT_LD="$LD.exe"
40677    HOTSPOT_MT="$MT.exe"
40678    HOTSPOT_RC="$RC.exe"
40679
40680  unix_path="$HOTSPOT_CXX"
40681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40682    windows_path=`$CYGPATH -m "$unix_path"`
40683    HOTSPOT_CXX="$windows_path"
40684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40685    windows_path=`cmd //c echo $unix_path`
40686    HOTSPOT_CXX="$windows_path"
40687  fi
40688
40689
40690  unix_path="$HOTSPOT_LD"
40691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40692    windows_path=`$CYGPATH -m "$unix_path"`
40693    HOTSPOT_LD="$windows_path"
40694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40695    windows_path=`cmd //c echo $unix_path`
40696    HOTSPOT_LD="$windows_path"
40697  fi
40698
40699
40700  unix_path="$HOTSPOT_MT"
40701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40702    windows_path=`$CYGPATH -m "$unix_path"`
40703    HOTSPOT_MT="$windows_path"
40704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40705    windows_path=`cmd //c echo $unix_path`
40706    HOTSPOT_MT="$windows_path"
40707  fi
40708
40709
40710  unix_path="$HOTSPOT_RC"
40711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40712    windows_path=`$CYGPATH -m "$unix_path"`
40713    HOTSPOT_RC="$windows_path"
40714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40715    windows_path=`cmd //c echo $unix_path`
40716    HOTSPOT_RC="$windows_path"
40717  fi
40718
40719
40720
40721  else
40722    HOTSPOT_CXX="$CXX"
40723    HOTSPOT_LD="$LD"
40724  fi
40725
40726
40727
40728  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40729    USE_CLANG=true
40730  fi
40731
40732
40733  # LDEXE is the linker to use, when creating executables. Not really used.
40734  # FIXME: These should just be removed!
40735  LDEXE="$LD"
40736  LDEXECXX="$LDCXX"
40737
40738
40739
40740
40741
40742
40743  # The package path is used only on macosx?
40744  # FIXME: clean this up, and/or move it elsewhere.
40745  PACKAGE_PATH=/opt/local
40746
40747
40748  # Check for extra potential brokenness.
40749  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40750    # On Windows, double-check that we got the right compiler.
40751    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40752    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40753    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40754      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40755        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40756      fi
40757    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40758      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40759        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40760      fi
40761    fi
40762  fi
40763
40764  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40765    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40766    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40767    # This is later checked when setting flags.
40768
40769    # "-Og" suppported for GCC 4.8 and later
40770    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40771
40772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40773$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40774  supports=yes
40775
40776  saved_cflags="$CFLAGS"
40777  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40778  ac_ext=c
40779ac_cpp='$CPP $CPPFLAGS'
40780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40782ac_compiler_gnu=$ac_cv_c_compiler_gnu
40783
40784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40785/* end confdefs.h.  */
40786int i;
40787_ACEOF
40788if ac_fn_c_try_compile "$LINENO"; then :
40789
40790else
40791  supports=no
40792fi
40793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40794  ac_ext=cpp
40795ac_cpp='$CXXCPP $CPPFLAGS'
40796ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40797ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40798ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40799
40800  CFLAGS="$saved_cflags"
40801
40802  saved_cxxflags="$CXXFLAGS"
40803  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40804  ac_ext=cpp
40805ac_cpp='$CXXCPP $CPPFLAGS'
40806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40809
40810  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40811/* end confdefs.h.  */
40812int i;
40813_ACEOF
40814if ac_fn_cxx_try_compile "$LINENO"; then :
40815
40816else
40817  supports=no
40818fi
40819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40820  ac_ext=cpp
40821ac_cpp='$CXXCPP $CPPFLAGS'
40822ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40823ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40824ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40825
40826  CXXFLAGS="$saved_cxxflags"
40827
40828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40829$as_echo "$supports" >&6; }
40830  if test "x$supports" = "xyes" ; then
40831    HAS_CFLAG_OPTIMIZE_DEBUG=true
40832  else
40833    HAS_CFLAG_OPTIMIZE_DEBUG=false
40834  fi
40835
40836
40837    # "-z relro" supported in GNU binutils 2.17 and later
40838    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40839
40840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40841$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40842  supports=yes
40843
40844  saved_ldflags="$LDFLAGS"
40845  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40846  ac_ext=c
40847ac_cpp='$CPP $CPPFLAGS'
40848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40850ac_compiler_gnu=$ac_cv_c_compiler_gnu
40851
40852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40853/* end confdefs.h.  */
40854
40855int
40856main ()
40857{
40858
40859  ;
40860  return 0;
40861}
40862_ACEOF
40863if ac_fn_c_try_link "$LINENO"; then :
40864
40865else
40866  supports=no
40867fi
40868rm -f core conftest.err conftest.$ac_objext \
40869    conftest$ac_exeext conftest.$ac_ext
40870  ac_ext=cpp
40871ac_cpp='$CXXCPP $CPPFLAGS'
40872ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40873ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40874ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40875
40876  LDFLAGS="$saved_ldflags"
40877
40878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40879$as_echo "$supports" >&6; }
40880  if test "x$supports" = "xyes" ; then
40881    HAS_LINKER_RELRO=true
40882  else
40883    HAS_LINKER_RELRO=false
40884  fi
40885
40886
40887    # "-z now" supported in GNU binutils 2.11 and later
40888    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40889
40890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40891$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40892  supports=yes
40893
40894  saved_ldflags="$LDFLAGS"
40895  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40896  ac_ext=c
40897ac_cpp='$CPP $CPPFLAGS'
40898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40900ac_compiler_gnu=$ac_cv_c_compiler_gnu
40901
40902  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40903/* end confdefs.h.  */
40904
40905int
40906main ()
40907{
40908
40909  ;
40910  return 0;
40911}
40912_ACEOF
40913if ac_fn_c_try_link "$LINENO"; then :
40914
40915else
40916  supports=no
40917fi
40918rm -f core conftest.err conftest.$ac_objext \
40919    conftest$ac_exeext conftest.$ac_ext
40920  ac_ext=cpp
40921ac_cpp='$CXXCPP $CPPFLAGS'
40922ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40923ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40924ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40925
40926  LDFLAGS="$saved_ldflags"
40927
40928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40929$as_echo "$supports" >&6; }
40930  if test "x$supports" = "xyes" ; then
40931    HAS_LINKER_NOW=true
40932  else
40933    HAS_LINKER_NOW=false
40934  fi
40935
40936  fi
40937
40938  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40939  # in executable.'
40940  USING_BROKEN_SUSE_LD=no
40941  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40943$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40944    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40945    $ECHO "int main() { }" > main.c
40946    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40948$as_echo "no" >&6; }
40949      USING_BROKEN_SUSE_LD=no
40950    else
40951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40952$as_echo "yes" >&6; }
40953      USING_BROKEN_SUSE_LD=yes
40954    fi
40955    rm -rf version-script.map main.c a.out
40956  fi
40957
40958
40959
40960# Setup the JTReg Regression Test Harness.
40961
40962
40963# Check whether --with-jtreg was given.
40964if test "${with_jtreg+set}" = set; then :
40965  withval=$with_jtreg;
40966else
40967  with_jtreg=no
40968fi
40969
40970
40971  if test "x$with_jtreg" = xno; then
40972    # jtreg disabled
40973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40974$as_echo_n "checking for jtreg... " >&6; }
40975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40976$as_echo "no" >&6; }
40977  else
40978    if test "x$with_jtreg" != xyes; then
40979      # with path specified.
40980      JT_HOME="$with_jtreg"
40981    fi
40982
40983    if test "x$JT_HOME" != x; then
40984      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40985$as_echo_n "checking for jtreg... " >&6; }
40986
40987      # use JT_HOME enviroment var.
40988
40989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40990
40991  # Input might be given as Windows format, start by converting to
40992  # unix format.
40993  path="$JT_HOME"
40994  new_path=`$CYGPATH -u "$path"`
40995
40996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40999  # "foo.exe" is OK but "foo" is an error.
41000  #
41001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41002  # It is also a way to make sure we got the proper file name for the real test later on.
41003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41004  if test "x$test_shortpath" = x; then
41005    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41006$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41007    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41008  fi
41009
41010  # Call helper function which possibly converts this using DOS-style short mode.
41011  # If so, the updated path is stored in $new_path.
41012
41013  input_path="$new_path"
41014  # Check if we need to convert this using DOS-style short mode. If the path
41015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41016  # take no chances and rewrite it.
41017  # Note: m4 eats our [], so we need to use [ and ] instead.
41018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41019  if test "x$has_forbidden_chars" != x; then
41020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41024      # Going to short mode and back again did indeed matter. Since short mode is
41025      # case insensitive, let's make it lowercase to improve readability.
41026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41027      # Now convert it back to Unix-stile (cygpath)
41028      input_path=`$CYGPATH -u "$shortmode_path"`
41029      new_path="$input_path"
41030    fi
41031  fi
41032
41033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41034  if test "x$test_cygdrive_prefix" = x; then
41035    # As a simple fix, exclude /usr/bin since it's not a real path.
41036    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41038      # a path prefixed by /cygdrive for fixpath to work.
41039      new_path="$CYGWIN_ROOT_PATH$input_path"
41040    fi
41041  fi
41042
41043
41044  if test "x$path" != "x$new_path"; then
41045    JT_HOME="$new_path"
41046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41047$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41048  fi
41049
41050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41051
41052  path="$JT_HOME"
41053  has_colon=`$ECHO $path | $GREP ^.:`
41054  new_path="$path"
41055  if test "x$has_colon" = x; then
41056    # Not in mixed or Windows style, start by that.
41057    new_path=`cmd //c echo $path`
41058  fi
41059
41060
41061  input_path="$new_path"
41062  # Check if we need to convert this using DOS-style short mode. If the path
41063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41064  # take no chances and rewrite it.
41065  # Note: m4 eats our [], so we need to use [ and ] instead.
41066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41067  if test "x$has_forbidden_chars" != x; then
41068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41070  fi
41071
41072
41073  windows_path="$new_path"
41074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41075    unix_path=`$CYGPATH -u "$windows_path"`
41076    new_path="$unix_path"
41077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41079    new_path="$unix_path"
41080  fi
41081
41082  if test "x$path" != "x$new_path"; then
41083    JT_HOME="$new_path"
41084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41085$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41086  fi
41087
41088  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41089  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41090
41091  else
41092    # We're on a unix platform. Hooray! :)
41093    path="$JT_HOME"
41094    has_space=`$ECHO "$path" | $GREP " "`
41095    if test "x$has_space" != x; then
41096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41097$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41098      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41099    fi
41100
41101    # Use eval to expand a potential ~
41102    eval path="$path"
41103    if test ! -f "$path" && test ! -d "$path"; then
41104      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41105    fi
41106
41107    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41108  fi
41109
41110
41111      # jtreg win32 script works for everybody
41112      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41113
41114      if test ! -f "$JTREGEXE"; then
41115        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41116      fi
41117
41118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41119$as_echo "$JTREGEXE" >&6; }
41120    else
41121      # try to find jtreg on path
41122
41123
41124
41125  # Publish this variable in the help.
41126
41127
41128  if test "x$JTREGEXE" = x; then
41129    # The variable is not set by user, try to locate tool using the code snippet
41130    for ac_prog in jtreg
41131do
41132  # Extract the first word of "$ac_prog", so it can be a program name with args.
41133set dummy $ac_prog; ac_word=$2
41134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41135$as_echo_n "checking for $ac_word... " >&6; }
41136if ${ac_cv_path_JTREGEXE+:} false; then :
41137  $as_echo_n "(cached) " >&6
41138else
41139  case $JTREGEXE in
41140  [\\/]* | ?:[\\/]*)
41141  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41142  ;;
41143  *)
41144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41145for as_dir in $PATH
41146do
41147  IFS=$as_save_IFS
41148  test -z "$as_dir" && as_dir=.
41149    for ac_exec_ext in '' $ac_executable_extensions; do
41150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41151    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41153    break 2
41154  fi
41155done
41156  done
41157IFS=$as_save_IFS
41158
41159  ;;
41160esac
41161fi
41162JTREGEXE=$ac_cv_path_JTREGEXE
41163if test -n "$JTREGEXE"; then
41164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41165$as_echo "$JTREGEXE" >&6; }
41166else
41167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41168$as_echo "no" >&6; }
41169fi
41170
41171
41172  test -n "$JTREGEXE" && break
41173done
41174
41175  else
41176    # The variable is set, but is it from the command line or the environment?
41177
41178    # Try to remove the string !JTREGEXE! from our list.
41179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41181      # If it failed, the variable was not from the command line. Ignore it,
41182      # but warn the user (except for BASH, which is always set by the calling BASH).
41183      if test "xJTREGEXE" != xBASH; then
41184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41185$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41186      fi
41187      # Try to locate tool using the code snippet
41188      for ac_prog in jtreg
41189do
41190  # Extract the first word of "$ac_prog", so it can be a program name with args.
41191set dummy $ac_prog; ac_word=$2
41192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41193$as_echo_n "checking for $ac_word... " >&6; }
41194if ${ac_cv_path_JTREGEXE+:} false; then :
41195  $as_echo_n "(cached) " >&6
41196else
41197  case $JTREGEXE in
41198  [\\/]* | ?:[\\/]*)
41199  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41200  ;;
41201  *)
41202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41203for as_dir in $PATH
41204do
41205  IFS=$as_save_IFS
41206  test -z "$as_dir" && as_dir=.
41207    for ac_exec_ext in '' $ac_executable_extensions; do
41208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41209    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41211    break 2
41212  fi
41213done
41214  done
41215IFS=$as_save_IFS
41216
41217  ;;
41218esac
41219fi
41220JTREGEXE=$ac_cv_path_JTREGEXE
41221if test -n "$JTREGEXE"; then
41222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41223$as_echo "$JTREGEXE" >&6; }
41224else
41225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41226$as_echo "no" >&6; }
41227fi
41228
41229
41230  test -n "$JTREGEXE" && break
41231done
41232
41233    else
41234      # If it succeeded, then it was overridden by the user. We will use it
41235      # for the tool.
41236
41237      # First remove it from the list of overridden variables, so we can test
41238      # for unknown variables in the end.
41239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41240
41241      # Check if the provided tool contains a complete path.
41242      tool_specified="$JTREGEXE"
41243      tool_basename="${tool_specified##*/}"
41244      if test "x$tool_basename" = "x$tool_specified"; then
41245        # A command without a complete path is provided, search $PATH.
41246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41247$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41248        # Extract the first word of "$tool_basename", so it can be a program name with args.
41249set dummy $tool_basename; ac_word=$2
41250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41251$as_echo_n "checking for $ac_word... " >&6; }
41252if ${ac_cv_path_JTREGEXE+:} false; then :
41253  $as_echo_n "(cached) " >&6
41254else
41255  case $JTREGEXE in
41256  [\\/]* | ?:[\\/]*)
41257  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41258  ;;
41259  *)
41260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41261for as_dir in $PATH
41262do
41263  IFS=$as_save_IFS
41264  test -z "$as_dir" && as_dir=.
41265    for ac_exec_ext in '' $ac_executable_extensions; do
41266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41267    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41269    break 2
41270  fi
41271done
41272  done
41273IFS=$as_save_IFS
41274
41275  ;;
41276esac
41277fi
41278JTREGEXE=$ac_cv_path_JTREGEXE
41279if test -n "$JTREGEXE"; then
41280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41281$as_echo "$JTREGEXE" >&6; }
41282else
41283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41284$as_echo "no" >&6; }
41285fi
41286
41287
41288        if test "x$JTREGEXE" = x; then
41289          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41290        fi
41291      else
41292        # Otherwise we believe it is a complete path. Use it as it is.
41293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41294$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41296$as_echo_n "checking for JTREGEXE... " >&6; }
41297        if test ! -x "$tool_specified"; then
41298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41299$as_echo "not found" >&6; }
41300          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41301        fi
41302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41303$as_echo "$tool_specified" >&6; }
41304      fi
41305    fi
41306  fi
41307
41308
41309
41310  if test "x$JTREGEXE" = x; then
41311    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41312  fi
41313
41314
41315      JT_HOME="`$DIRNAME $JTREGEXE`"
41316    fi
41317  fi
41318
41319
41320
41321
41322
41323
41324  # Option used to tell the compiler whether to create 32- or 64-bit executables
41325  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41326    COMPILER_TARGET_BITS_FLAG="-q"
41327  else
41328    COMPILER_TARGET_BITS_FLAG="-m"
41329  fi
41330
41331
41332  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41333  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41334    ARFLAGS="-r"
41335  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41336    ARFLAGS="-X64"
41337  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41338    # lib.exe is used as AR to create static libraries.
41339    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41340  else
41341    ARFLAGS=""
41342  fi
41343
41344
41345  ## Setup strip.
41346  # FIXME: should this really be per platform, or should it be per toolchain type?
41347  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41348  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41349  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41350    STRIPFLAGS="-g"
41351  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41352    STRIPFLAGS="-x"
41353  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41354    STRIPFLAGS="-S"
41355  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41356    STRIPFLAGS="-X32_64"
41357  fi
41358
41359  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41360    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41361  fi
41362
41363
41364  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41365    # FIXME: break out into MCSFLAGS
41366    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41367  fi
41368
41369
41370  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41371    CC_OUT_OPTION=-Fo
41372    EXE_OUT_OPTION=-out:
41373    LD_OUT_OPTION=-out:
41374    AR_OUT_OPTION=-out:
41375  else
41376    # The option used to specify the target .o,.a or .so file.
41377    # When compiling, how to specify the to be created object file.
41378    CC_OUT_OPTION='-o$(SPACE)'
41379    # When linking, how to specify the to be created executable.
41380    EXE_OUT_OPTION='-o$(SPACE)'
41381    # When linking, how to specify the to be created dynamically linkable library.
41382    LD_OUT_OPTION='-o$(SPACE)'
41383    # When archiving, how to specify the to be create static archive for object files.
41384    AR_OUT_OPTION='rcs$(SPACE)'
41385  fi
41386
41387
41388
41389
41390
41391  # On Windows, we need to set RC flags.
41392  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41393    RC_FLAGS="-nologo -l0x409"
41394    if test "x$VARIANT" = xOPT; then
41395      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41396    fi
41397
41398    # The version variables used to create RC_FLAGS may be overridden
41399    # in a custom configure script, or possibly the command line.
41400    # Let those variables be expanded at make time in spec.gmk.
41401    # The \$ are escaped to the shell, and the $(...) variables
41402    # are evaluated by make.
41403    RC_FLAGS="$RC_FLAGS \
41404        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41405        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41406        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41407        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41408        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41409        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41410        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41411  fi
41412
41413
41414  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41415    # silence copyright notice and other headers.
41416    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41417  fi
41418
41419  if test "x$SYSROOT" != "x"; then
41420    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41421      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41422        # Solaris Studio does not have a concept of sysroot. Instead we must
41423        # make sure the default include and lib dirs are appended to each
41424        # compile and link command line.
41425        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41426        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41427            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41428            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41429      fi
41430    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41431      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41432      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41433      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41434    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41435      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41436      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41437    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41438      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41439      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41440    fi
41441    # Propagate the sysroot args to hotspot
41442    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41443    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41444    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41445  fi
41446
41447  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41448  # set this here so it doesn't have to be peppered throughout the forest
41449  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41450    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41451    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41452  fi
41453
41454
41455
41456
41457
41458# FIXME: Currently we must test this after toolchain but before flags. Fix!
41459
41460# Now we can test some aspects on the target using configure macros.
41461
41462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41463$as_echo_n "checking for ANSI C header files... " >&6; }
41464if ${ac_cv_header_stdc+:} false; then :
41465  $as_echo_n "(cached) " >&6
41466else
41467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41468/* end confdefs.h.  */
41469#include <stdlib.h>
41470#include <stdarg.h>
41471#include <string.h>
41472#include <float.h>
41473
41474int
41475main ()
41476{
41477
41478  ;
41479  return 0;
41480}
41481_ACEOF
41482if ac_fn_cxx_try_compile "$LINENO"; then :
41483  ac_cv_header_stdc=yes
41484else
41485  ac_cv_header_stdc=no
41486fi
41487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41488
41489if test $ac_cv_header_stdc = yes; then
41490  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41492/* end confdefs.h.  */
41493#include <string.h>
41494
41495_ACEOF
41496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41497  $EGREP "memchr" >/dev/null 2>&1; then :
41498
41499else
41500  ac_cv_header_stdc=no
41501fi
41502rm -f conftest*
41503
41504fi
41505
41506if test $ac_cv_header_stdc = yes; then
41507  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41509/* end confdefs.h.  */
41510#include <stdlib.h>
41511
41512_ACEOF
41513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41514  $EGREP "free" >/dev/null 2>&1; then :
41515
41516else
41517  ac_cv_header_stdc=no
41518fi
41519rm -f conftest*
41520
41521fi
41522
41523if test $ac_cv_header_stdc = yes; then
41524  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41525  if test "$cross_compiling" = yes; then :
41526  :
41527else
41528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41529/* end confdefs.h.  */
41530#include <ctype.h>
41531#include <stdlib.h>
41532#if ((' ' & 0x0FF) == 0x020)
41533# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41534# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41535#else
41536# define ISLOWER(c) \
41537		   (('a' <= (c) && (c) <= 'i') \
41538		     || ('j' <= (c) && (c) <= 'r') \
41539		     || ('s' <= (c) && (c) <= 'z'))
41540# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41541#endif
41542
41543#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41544int
41545main ()
41546{
41547  int i;
41548  for (i = 0; i < 256; i++)
41549    if (XOR (islower (i), ISLOWER (i))
41550	|| toupper (i) != TOUPPER (i))
41551      return 2;
41552  return 0;
41553}
41554_ACEOF
41555if ac_fn_cxx_try_run "$LINENO"; then :
41556
41557else
41558  ac_cv_header_stdc=no
41559fi
41560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41561  conftest.$ac_objext conftest.beam conftest.$ac_ext
41562fi
41563
41564fi
41565fi
41566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41567$as_echo "$ac_cv_header_stdc" >&6; }
41568if test $ac_cv_header_stdc = yes; then
41569
41570$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41571
41572fi
41573
41574# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41575for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41576		  inttypes.h stdint.h unistd.h
41577do :
41578  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41579ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41580"
41581if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41582  cat >>confdefs.h <<_ACEOF
41583#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41584_ACEOF
41585
41586fi
41587
41588done
41589
41590
41591
41592  ###############################################################################
41593  #
41594  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41595  # (The JVM can use 32 or 64 bit Java pointers but that decision
41596  # is made at runtime.)
41597  #
41598
41599  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41600    # Always specify -m flag on Solaris
41601    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41602
41603  # When we add flags to the "official" CFLAGS etc, we need to
41604  # keep track of these additions in ADDED_CFLAGS etc. These
41605  # will later be checked to make sure only controlled additions
41606  # have been made to CFLAGS etc.
41607  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41608  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41609  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41610
41611  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41612  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41613  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41614
41615  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41616  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41617  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41618
41619  elif test "x$COMPILE_TYPE" = xreduced; then
41620    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41621      # Specify -m if running reduced on unix platforms
41622
41623  # When we add flags to the "official" CFLAGS etc, we need to
41624  # keep track of these additions in ADDED_CFLAGS etc. These
41625  # will later be checked to make sure only controlled additions
41626  # have been made to CFLAGS etc.
41627  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41628  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41629  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41630
41631  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41632  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41633  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41634
41635  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41636  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41637  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41638
41639    fi
41640  fi
41641
41642  # Make compilation sanity check
41643  for ac_header in stdio.h
41644do :
41645  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41646if test "x$ac_cv_header_stdio_h" = xyes; then :
41647  cat >>confdefs.h <<_ACEOF
41648#define HAVE_STDIO_H 1
41649_ACEOF
41650
41651else
41652
41653    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41654$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41655    if test "x$COMPILE_TYPE" = xreduced; then
41656      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41657$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41658    elif test "x$COMPILE_TYPE" = xcross; then
41659      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41660$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41661    fi
41662    as_fn_error $? "Cannot continue." "$LINENO" 5
41663
41664fi
41665
41666done
41667
41668
41669  # The cast to long int works around a bug in the HP C Compiler
41670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41672# This bug is HP SR number 8606223364.
41673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41674$as_echo_n "checking size of int *... " >&6; }
41675if ${ac_cv_sizeof_int_p+:} false; then :
41676  $as_echo_n "(cached) " >&6
41677else
41678  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41679
41680else
41681  if test "$ac_cv_type_int_p" = yes; then
41682     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41684as_fn_error 77 "cannot compute sizeof (int *)
41685See \`config.log' for more details" "$LINENO" 5; }
41686   else
41687     ac_cv_sizeof_int_p=0
41688   fi
41689fi
41690
41691fi
41692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41693$as_echo "$ac_cv_sizeof_int_p" >&6; }
41694
41695
41696
41697cat >>confdefs.h <<_ACEOF
41698#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41699_ACEOF
41700
41701
41702
41703  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41704  if test "x$ac_cv_sizeof_int_p" = x; then
41705    # The test failed, lets stick to the assumed value.
41706    { $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
41707$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41708  else
41709    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41710
41711    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41712      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41713      # Let's try to implicitely set the compilers target architecture and retry the test
41714      { $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
41715$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;}
41716      { $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
41717$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;}
41718
41719  # When we add flags to the "official" CFLAGS etc, we need to
41720  # keep track of these additions in ADDED_CFLAGS etc. These
41721  # will later be checked to make sure only controlled additions
41722  # have been made to CFLAGS etc.
41723  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41724  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41725  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41726
41727  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41728  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41729  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41730
41731  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41732  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41733  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41734
41735
41736      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41737      unset ac_cv_sizeof_int_p
41738      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41739      cat >>confdefs.h <<_ACEOF
41740#undef SIZEOF_INT_P
41741_ACEOF
41742
41743      # The cast to long int works around a bug in the HP C Compiler
41744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41746# This bug is HP SR number 8606223364.
41747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41748$as_echo_n "checking size of int *... " >&6; }
41749if ${ac_cv_sizeof_int_p+:} false; then :
41750  $as_echo_n "(cached) " >&6
41751else
41752  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41753
41754else
41755  if test "$ac_cv_type_int_p" = yes; then
41756     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41758as_fn_error 77 "cannot compute sizeof (int *)
41759See \`config.log' for more details" "$LINENO" 5; }
41760   else
41761     ac_cv_sizeof_int_p=0
41762   fi
41763fi
41764
41765fi
41766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41767$as_echo "$ac_cv_sizeof_int_p" >&6; }
41768
41769
41770
41771cat >>confdefs.h <<_ACEOF
41772#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41773_ACEOF
41774
41775
41776
41777      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41778
41779      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41780        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
41781      fi
41782    fi
41783  fi
41784
41785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41786$as_echo_n "checking for target address size... " >&6; }
41787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41788$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41789
41790
41791  ###############################################################################
41792  #
41793  # Is the target little of big endian?
41794  #
41795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41796$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41797if ${ac_cv_c_bigendian+:} false; then :
41798  $as_echo_n "(cached) " >&6
41799else
41800  ac_cv_c_bigendian=unknown
41801    # See if we're dealing with a universal compiler.
41802    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41803/* end confdefs.h.  */
41804#ifndef __APPLE_CC__
41805	       not a universal capable compiler
41806	     #endif
41807	     typedef int dummy;
41808
41809_ACEOF
41810if ac_fn_cxx_try_compile "$LINENO"; then :
41811
41812	# Check for potential -arch flags.  It is not universal unless
41813	# there are at least two -arch flags with different values.
41814	ac_arch=
41815	ac_prev=
41816	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41817	 if test -n "$ac_prev"; then
41818	   case $ac_word in
41819	     i?86 | x86_64 | ppc | ppc64)
41820	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41821		 ac_arch=$ac_word
41822	       else
41823		 ac_cv_c_bigendian=universal
41824		 break
41825	       fi
41826	       ;;
41827	   esac
41828	   ac_prev=
41829	 elif test "x$ac_word" = "x-arch"; then
41830	   ac_prev=arch
41831	 fi
41832       done
41833fi
41834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41835    if test $ac_cv_c_bigendian = unknown; then
41836      # See if sys/param.h defines the BYTE_ORDER macro.
41837      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41838/* end confdefs.h.  */
41839#include <sys/types.h>
41840	     #include <sys/param.h>
41841
41842int
41843main ()
41844{
41845#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41846		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41847		     && LITTLE_ENDIAN)
41848	      bogus endian macros
41849	     #endif
41850
41851  ;
41852  return 0;
41853}
41854_ACEOF
41855if ac_fn_cxx_try_compile "$LINENO"; then :
41856  # It does; now see whether it defined to BIG_ENDIAN or not.
41857	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41858/* end confdefs.h.  */
41859#include <sys/types.h>
41860		#include <sys/param.h>
41861
41862int
41863main ()
41864{
41865#if BYTE_ORDER != BIG_ENDIAN
41866		 not big endian
41867		#endif
41868
41869  ;
41870  return 0;
41871}
41872_ACEOF
41873if ac_fn_cxx_try_compile "$LINENO"; then :
41874  ac_cv_c_bigendian=yes
41875else
41876  ac_cv_c_bigendian=no
41877fi
41878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41879fi
41880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41881    fi
41882    if test $ac_cv_c_bigendian = unknown; then
41883      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41884      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41885/* end confdefs.h.  */
41886#include <limits.h>
41887
41888int
41889main ()
41890{
41891#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41892	      bogus endian macros
41893	     #endif
41894
41895  ;
41896  return 0;
41897}
41898_ACEOF
41899if ac_fn_cxx_try_compile "$LINENO"; then :
41900  # It does; now see whether it defined to _BIG_ENDIAN or not.
41901	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41902/* end confdefs.h.  */
41903#include <limits.h>
41904
41905int
41906main ()
41907{
41908#ifndef _BIG_ENDIAN
41909		 not big endian
41910		#endif
41911
41912  ;
41913  return 0;
41914}
41915_ACEOF
41916if ac_fn_cxx_try_compile "$LINENO"; then :
41917  ac_cv_c_bigendian=yes
41918else
41919  ac_cv_c_bigendian=no
41920fi
41921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41922fi
41923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41924    fi
41925    if test $ac_cv_c_bigendian = unknown; then
41926      # Compile a test program.
41927      if test "$cross_compiling" = yes; then :
41928  # Try to guess by grepping values from an object file.
41929	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41930/* end confdefs.h.  */
41931short int ascii_mm[] =
41932		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41933		short int ascii_ii[] =
41934		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41935		int use_ascii (int i) {
41936		  return ascii_mm[i] + ascii_ii[i];
41937		}
41938		short int ebcdic_ii[] =
41939		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41940		short int ebcdic_mm[] =
41941		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41942		int use_ebcdic (int i) {
41943		  return ebcdic_mm[i] + ebcdic_ii[i];
41944		}
41945		extern int foo;
41946
41947int
41948main ()
41949{
41950return use_ascii (foo) == use_ebcdic (foo);
41951  ;
41952  return 0;
41953}
41954_ACEOF
41955if ac_fn_cxx_try_compile "$LINENO"; then :
41956  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41957	      ac_cv_c_bigendian=yes
41958	    fi
41959	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41960	      if test "$ac_cv_c_bigendian" = unknown; then
41961		ac_cv_c_bigendian=no
41962	      else
41963		# finding both strings is unlikely to happen, but who knows?
41964		ac_cv_c_bigendian=unknown
41965	      fi
41966	    fi
41967fi
41968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41969else
41970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41971/* end confdefs.h.  */
41972$ac_includes_default
41973int
41974main ()
41975{
41976
41977	     /* Are we little or big endian?  From Harbison&Steele.  */
41978	     union
41979	     {
41980	       long int l;
41981	       char c[sizeof (long int)];
41982	     } u;
41983	     u.l = 1;
41984	     return u.c[sizeof (long int) - 1] == 1;
41985
41986  ;
41987  return 0;
41988}
41989_ACEOF
41990if ac_fn_cxx_try_run "$LINENO"; then :
41991  ac_cv_c_bigendian=no
41992else
41993  ac_cv_c_bigendian=yes
41994fi
41995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41996  conftest.$ac_objext conftest.beam conftest.$ac_ext
41997fi
41998
41999    fi
42000fi
42001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42002$as_echo "$ac_cv_c_bigendian" >&6; }
42003 case $ac_cv_c_bigendian in #(
42004   yes)
42005     ENDIAN="big";; #(
42006   no)
42007     ENDIAN="little" ;; #(
42008   universal)
42009     ENDIAN="universal_endianness"
42010     ;; #(
42011   *)
42012     ENDIAN="unknown" ;;
42013 esac
42014
42015
42016  if test "x$ENDIAN" = xuniversal_endianness; then
42017    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42018  fi
42019  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42020    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
42021  fi
42022
42023
42024# Configure flags for the tools
42025
42026  ###############################################################################
42027  #
42028  # How to compile shared libraries.
42029  #
42030
42031  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42032    PICFLAG="-fPIC"
42033    C_FLAG_REORDER=''
42034    CXX_FLAG_REORDER=''
42035
42036    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42037      # Linking is different on MacOSX
42038      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42039      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42040      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42041      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42042      SET_SHARED_LIBRARY_MAPFILE=''
42043    else
42044      # Default works for linux, might work on other platforms as well.
42045      SHARED_LIBRARY_FLAGS='-shared'
42046      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42047      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42048      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42049      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42050    fi
42051  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42052    PICFLAG=''
42053    C_FLAG_REORDER=''
42054    CXX_FLAG_REORDER=''
42055
42056    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42057      # Linking is different on MacOSX
42058      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42059      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42060      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42061      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42062      SET_SHARED_LIBRARY_MAPFILE=''
42063    else
42064      # Default works for linux, might work on other platforms as well.
42065      SHARED_LIBRARY_FLAGS='-shared'
42066      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42067      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42068      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42069      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42070    fi
42071  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42072    PICFLAG="-KPIC"
42073    C_FLAG_REORDER='-xF'
42074    CXX_FLAG_REORDER='-xF'
42075    SHARED_LIBRARY_FLAGS="-G"
42076    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42077    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42078    SET_SHARED_LIBRARY_NAME=''
42079    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42080  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42081    PICFLAG="-qpic=large"
42082    C_FLAG_REORDER=''
42083    CXX_FLAG_REORDER=''
42084    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42085    SET_EXECUTABLE_ORIGIN=""
42086    SET_SHARED_LIBRARY_ORIGIN=''
42087    SET_SHARED_LIBRARY_NAME=''
42088    SET_SHARED_LIBRARY_MAPFILE=''
42089  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42090    PICFLAG=""
42091    C_FLAG_REORDER=''
42092    CXX_FLAG_REORDER=''
42093    SHARED_LIBRARY_FLAGS="-LD"
42094    SET_EXECUTABLE_ORIGIN=''
42095    SET_SHARED_LIBRARY_ORIGIN=''
42096    SET_SHARED_LIBRARY_NAME=''
42097    SET_SHARED_LIBRARY_MAPFILE=''
42098  fi
42099
42100
42101
42102
42103
42104
42105
42106
42107
42108  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42109    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42110    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42111    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42112  fi
42113  # The (cross) compiler is now configured, we can now test capabilities
42114  # of the target platform.
42115
42116
42117
42118  ###############################################################################
42119  #
42120  # Setup the opt flags for different compilers
42121  # and different operating systems.
42122  #
42123
42124  # FIXME: this was indirectly the old default, but just inherited.
42125  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42126  #   C_FLAG_DEPS="-MMD -MF"
42127  # fi
42128
42129  # Generate make dependency files
42130  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42131    C_FLAG_DEPS="-MMD -MF"
42132  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42133    C_FLAG_DEPS="-MMD -MF"
42134  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42135    C_FLAG_DEPS="-xMMD -xMF"
42136  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42137    C_FLAG_DEPS="-qmakedep=gcc -MF"
42138  fi
42139  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42140
42141
42142
42143  # Debug symbols
42144  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42145    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42146      # reduce from default "-g2" option to save space
42147      CFLAGS_DEBUG_SYMBOLS="-g1"
42148      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42149    else
42150      CFLAGS_DEBUG_SYMBOLS="-g"
42151      CXXFLAGS_DEBUG_SYMBOLS="-g"
42152    fi
42153  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42154    CFLAGS_DEBUG_SYMBOLS="-g"
42155    CXXFLAGS_DEBUG_SYMBOLS="-g"
42156  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42157    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42158    # FIXME: likely a bug, this disables debug symbols rather than enables them
42159    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42160  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42161    CFLAGS_DEBUG_SYMBOLS="-g"
42162    CXXFLAGS_DEBUG_SYMBOLS="-g"
42163  fi
42164
42165
42166
42167  # bounds, memory and behavior checking options
42168  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42169    case $DEBUG_LEVEL in
42170    release )
42171      # no adjustment
42172      ;;
42173    fastdebug )
42174      # no adjustment
42175      ;;
42176    slowdebug )
42177      # Add runtime stack smashing and undefined behavior checks
42178      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42179      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42180      ;;
42181    esac
42182  fi
42183
42184
42185
42186  # Optimization levels
42187  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42188    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42189
42190    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42191      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42192      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42193      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42194      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42195      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42196      C_O_FLAG_NONE="-xregs=no%frameptr"
42197      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42198      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42199      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42200      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42201      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42202      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42203        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42204        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42205      fi
42206    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42207      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42208      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42209      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42210      C_O_FLAG_DEBUG=""
42211      C_O_FLAG_NONE=""
42212      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42213      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42214      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42215      C_O_FLAG_DEBUG=""
42216      CXX_O_FLAG_NONE=""
42217    fi
42218  else
42219    # The remaining toolchains share opt flags between CC and CXX;
42220    # setup for C and duplicate afterwards.
42221    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42222      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42223        # On MacOSX we optimize for size, something
42224        # we should do for all platforms?
42225        C_O_FLAG_HIGHEST="-Os"
42226        C_O_FLAG_HI="-Os"
42227        C_O_FLAG_NORM="-Os"
42228      else
42229        C_O_FLAG_HIGHEST="-O3"
42230        C_O_FLAG_HI="-O3"
42231        C_O_FLAG_NORM="-O2"
42232      fi
42233      C_O_FLAG_DEBUG="-O0"
42234      C_O_FLAG_NONE="-O0"
42235    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42236      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42237        # On MacOSX we optimize for size, something
42238        # we should do for all platforms?
42239        C_O_FLAG_HIGHEST="-Os"
42240        C_O_FLAG_HI="-Os"
42241        C_O_FLAG_NORM="-Os"
42242      else
42243        C_O_FLAG_HIGHEST="-O3"
42244        C_O_FLAG_HI="-O3"
42245        C_O_FLAG_NORM="-O2"
42246      fi
42247      C_O_FLAG_DEBUG="-O0"
42248      C_O_FLAG_NONE="-O0"
42249    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42250      C_O_FLAG_HIGHEST="-O3"
42251      C_O_FLAG_HI="-O3 -qstrict"
42252      C_O_FLAG_NORM="-O2"
42253      C_O_FLAG_DEBUG="-qnoopt"
42254      C_O_FLAG_NONE="-qnoop"
42255    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42256      C_O_FLAG_HIGHEST="-O2"
42257      C_O_FLAG_HI="-O1"
42258      C_O_FLAG_NORM="-O1"
42259      C_O_FLAG_DEBUG="-Od"
42260      C_O_FLAG_NONE="-Od"
42261    fi
42262    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42263    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42264    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42265    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42266    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42267  fi
42268
42269  # Adjust optimization flags according to debug level.
42270  case $DEBUG_LEVEL in
42271    release )
42272      # no adjustment
42273      ;;
42274    fastdebug )
42275      # Not quite so much optimization
42276      C_O_FLAG_HI="$C_O_FLAG_NORM"
42277      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42278      ;;
42279    slowdebug )
42280      # Disable optimization
42281      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42282      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42283      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42284      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42285      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42286      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42287      ;;
42288  esac
42289
42290
42291
42292
42293
42294
42295
42296
42297
42298
42299
42300
42301
42302  # Special extras...
42303  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42304    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42305      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42306      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42307    fi
42308  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42309    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42310    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42311    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42312  fi
42313
42314  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42315    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42316$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42317  fi
42318
42319  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42320    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42321$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42322  fi
42323
42324  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42325    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42326$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42327  fi
42328
42329
42330# Check whether --with-extra-cflags was given.
42331if test "${with_extra_cflags+set}" = set; then :
42332  withval=$with_extra_cflags;
42333fi
42334
42335
42336
42337# Check whether --with-extra-cxxflags was given.
42338if test "${with_extra_cxxflags+set}" = set; then :
42339  withval=$with_extra_cxxflags;
42340fi
42341
42342
42343
42344# Check whether --with-extra-ldflags was given.
42345if test "${with_extra_ldflags+set}" = set; then :
42346  withval=$with_extra_ldflags;
42347fi
42348
42349
42350  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42351  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42352  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42353
42354  # Hotspot needs these set in their legacy form
42355  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42356  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42357  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42358
42359
42360
42361
42362
42363  ###############################################################################
42364  #
42365  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42366  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42367  #
42368
42369  # Setup compiler/platform specific flags into
42370  #    CFLAGS_JDK    - C Compiler flags
42371  #    CXXFLAGS_JDK  - C++ Compiler flags
42372  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42373  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42374    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42375        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42376    case $OPENJDK_TARGET_CPU_ARCH in
42377      arm )
42378        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42379        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42380        ;;
42381      ppc )
42382        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42383        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42384        ;;
42385      * )
42386        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42387        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42388        ;;
42389    esac
42390  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42391    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42392    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42393      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42394      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42395    fi
42396
42397    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42398    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42399  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42400    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42401    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42402  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42403    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42404    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42405    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42406    -DWIN32 -DIAL"
42407    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42408      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42409    else
42410      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42411    fi
42412  fi
42413
42414  ###############################################################################
42415
42416  # Adjust flags according to debug level.
42417  case $DEBUG_LEVEL in
42418    fastdebug | slowdebug )
42419      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42420      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42421      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42422      ;;
42423    release )
42424      ;;
42425    * )
42426      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42427      ;;
42428  esac
42429
42430  # Setup LP64
42431  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42432
42433  # Set some common defines. These works for all compilers, but assume
42434  # -D is universally accepted.
42435
42436  # Setup endianness
42437  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42438    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42439    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42440    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42441    #   Note: -Dmacro         is the same as    #define macro 1
42442    #         -Dmacro=        is the same as    #define macro
42443    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42444      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42445    else
42446      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42447    fi
42448  else
42449    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42450    # are defined in the system?
42451    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42452      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42453    else
42454      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42455    fi
42456  fi
42457
42458  # Setup target OS define. Use OS target name but in upper case.
42459  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42460  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42461
42462  # Setup target CPU
42463  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42464
42465  # Setup debug/release defines
42466  if test "x$DEBUG_LEVEL" = xrelease; then
42467    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42468    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42469      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42470    fi
42471  else
42472    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42473  fi
42474
42475  # Setup release name
42476  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42477
42478
42479  # Set some additional per-OS defines.
42480  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42481    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42482  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42483    # FIXME: PPC64 should not be here.
42484    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42485  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42486    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42487  fi
42488
42489  # Additional macosx handling
42490  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42491    # Setting these parameters makes it an error to link to macosx APIs that are
42492    # newer than the given OS version and makes the linked binaries compatible
42493    # even if built on a newer version of the OS.
42494    # The expected format is X.Y.Z
42495    MACOSX_VERSION_MIN=10.7.0
42496
42497
42498    # The macro takes the version with no dots, ex: 1070
42499    # Let the flags variables get resolved in make for easier override on make
42500    # command line.
42501    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42502    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42503  fi
42504
42505  # Setup some hard coded includes
42506  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42507      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42508      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42509      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42510
42511  # The shared libraries are compiled using the picflag.
42512  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42513  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42514
42515  # Executable flags
42516  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42517  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42518
42519
42520
42521
42522
42523
42524  # Setup LDFLAGS et al.
42525  #
42526
42527  # Now this is odd. The JDK native libraries have to link against libjvm.so
42528  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42529  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42530  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42531  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42532  # libraries will link to whatever is in memory. Yuck.
42533  #
42534  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42535  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42536    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42537    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42538      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42539    fi
42540    # TODO: make -debug optional "--disable-full-debug-symbols"
42541    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42542  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42543    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42544    # We have previously set HAS_GNU_HASH if this is the case
42545    if test -n "$HAS_GNU_HASH"; then
42546      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42547    fi
42548    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42549      # And since we now know that the linker is gnu, then add -z defs, to forbid
42550      # undefined symbols in object files.
42551      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42552      case $DEBUG_LEVEL in
42553        release )
42554          # tell linker to optimize libraries.
42555          # Should this be supplied to the OSS linker as well?
42556          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42557          ;;
42558        slowdebug )
42559          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42560            # do relocations at load
42561            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42562            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42563          fi
42564          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42565            # mark relocations read only
42566            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42567            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42568          fi
42569          ;;
42570        fastdebug )
42571          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42572            # mark relocations read only
42573            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42574            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42575          fi
42576          ;;
42577        * )
42578          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42579          ;;
42580        esac
42581    fi
42582  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42583    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42584    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42585  fi
42586
42587  # Customize LDFLAGS for executables
42588
42589  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42590
42591  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42592    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42593      LDFLAGS_STACK_SIZE=1048576
42594    else
42595      LDFLAGS_STACK_SIZE=327680
42596    fi
42597    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42598  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42599    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42600  fi
42601
42602  # Customize LDFLAGS for libs
42603  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42604
42605  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42606    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42607    LDFLAGS_JDKLIB_SUFFIX=""
42608  else
42609    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42610        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42611
42612    # On some platforms (mac) the linker warns about non existing -L dirs.
42613    # Add server first if available. Linking aginst client does not always produce the same results.
42614    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42615    # Default to server for other variants.
42616    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42617      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42618    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42619      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42620    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42621      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42622    else
42623      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42624    fi
42625
42626    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42627    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42628      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42629    fi
42630  fi
42631
42632
42633
42634
42635
42636
42637
42638
42639  # Some Zero and Shark settings.
42640  # ZERO_ARCHFLAG tells the compiler which mode to build for
42641  case "${OPENJDK_TARGET_CPU}" in
42642    s390)
42643      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42644      ;;
42645    *)
42646      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42647  esac
42648
42649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42650$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42651  supports=yes
42652
42653  saved_cflags="$CFLAGS"
42654  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42655  ac_ext=c
42656ac_cpp='$CPP $CPPFLAGS'
42657ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42658ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42659ac_compiler_gnu=$ac_cv_c_compiler_gnu
42660
42661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42662/* end confdefs.h.  */
42663int i;
42664_ACEOF
42665if ac_fn_c_try_compile "$LINENO"; then :
42666
42667else
42668  supports=no
42669fi
42670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42671  ac_ext=cpp
42672ac_cpp='$CXXCPP $CPPFLAGS'
42673ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42674ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42675ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42676
42677  CFLAGS="$saved_cflags"
42678
42679  saved_cxxflags="$CXXFLAGS"
42680  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42681  ac_ext=cpp
42682ac_cpp='$CXXCPP $CPPFLAGS'
42683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42686
42687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42688/* end confdefs.h.  */
42689int i;
42690_ACEOF
42691if ac_fn_cxx_try_compile "$LINENO"; then :
42692
42693else
42694  supports=no
42695fi
42696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42697  ac_ext=cpp
42698ac_cpp='$CXXCPP $CPPFLAGS'
42699ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42700ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42701ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42702
42703  CXXFLAGS="$saved_cxxflags"
42704
42705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42706$as_echo "$supports" >&6; }
42707  if test "x$supports" = "xyes" ; then
42708    :
42709  else
42710    ZERO_ARCHFLAG=""
42711  fi
42712
42713
42714
42715  # Check that the compiler supports -mX (or -qX on AIX) flags
42716  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42717
42718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42719$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42720  supports=yes
42721
42722  saved_cflags="$CFLAGS"
42723  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42724  ac_ext=c
42725ac_cpp='$CPP $CPPFLAGS'
42726ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42727ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42728ac_compiler_gnu=$ac_cv_c_compiler_gnu
42729
42730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42731/* end confdefs.h.  */
42732int i;
42733_ACEOF
42734if ac_fn_c_try_compile "$LINENO"; then :
42735
42736else
42737  supports=no
42738fi
42739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42740  ac_ext=cpp
42741ac_cpp='$CXXCPP $CPPFLAGS'
42742ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42743ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42744ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42745
42746  CFLAGS="$saved_cflags"
42747
42748  saved_cxxflags="$CXXFLAGS"
42749  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42750  ac_ext=cpp
42751ac_cpp='$CXXCPP $CPPFLAGS'
42752ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42753ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42754ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42755
42756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42757/* end confdefs.h.  */
42758int i;
42759_ACEOF
42760if ac_fn_cxx_try_compile "$LINENO"; then :
42761
42762else
42763  supports=no
42764fi
42765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42766  ac_ext=cpp
42767ac_cpp='$CXXCPP $CPPFLAGS'
42768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42771
42772  CXXFLAGS="$saved_cxxflags"
42773
42774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42775$as_echo "$supports" >&6; }
42776  if test "x$supports" = "xyes" ; then
42777    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42778  else
42779    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42780  fi
42781
42782
42783
42784  case "${TOOLCHAIN_TYPE}" in
42785    microsoft)
42786      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42787      ;;
42788    solstudio)
42789      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42790      ;;
42791    gcc)
42792      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42793      ;;
42794    clang)
42795      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42796      ;;
42797  esac
42798
42799
42800
42801# Setup debug symbols (need objcopy from the toolchain for that)
42802
42803  #
42804  # ENABLE_DEBUG_SYMBOLS
42805  # This must be done after the toolchain is setup, since we're looking at objcopy.
42806  #
42807  # Check whether --enable-debug-symbols was given.
42808if test "${enable_debug_symbols+set}" = set; then :
42809  enableval=$enable_debug_symbols;
42810fi
42811
42812
42813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42814$as_echo_n "checking if we should generate debug symbols... " >&6; }
42815
42816  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42817    # explicit enabling of enable-debug-symbols and can't find objcopy
42818    #   this is an error
42819    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42820  fi
42821
42822  if test "x$enable_debug_symbols" = "xyes"; then
42823    ENABLE_DEBUG_SYMBOLS=true
42824  elif test "x$enable_debug_symbols" = "xno"; then
42825    ENABLE_DEBUG_SYMBOLS=false
42826  else
42827    # Default is on if objcopy is found
42828    if test "x$OBJCOPY" != x; then
42829      ENABLE_DEBUG_SYMBOLS=true
42830    # MacOS X and Windows don't use objcopy but default is on for those OSes
42831    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42832      ENABLE_DEBUG_SYMBOLS=true
42833    else
42834      ENABLE_DEBUG_SYMBOLS=false
42835    fi
42836  fi
42837
42838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42839$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42840
42841  #
42842  # ZIP_DEBUGINFO_FILES
42843  #
42844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42845$as_echo_n "checking if we should zip debug-info files... " >&6; }
42846  # Check whether --enable-zip-debug-info was given.
42847if test "${enable_zip_debug_info+set}" = set; then :
42848  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42849else
42850  enable_zip_debug_info="yes"
42851fi
42852
42853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42854$as_echo "${enable_zip_debug_info}" >&6; }
42855
42856  if test "x${enable_zip_debug_info}" = "xno"; then
42857    ZIP_DEBUGINFO_FILES=false
42858  else
42859    ZIP_DEBUGINFO_FILES=true
42860  fi
42861
42862
42863
42864
42865
42866###############################################################################
42867#
42868# Check dependencies for external and internal libraries.
42869#
42870###############################################################################
42871
42872# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42873
42874  # When using cygwin or msys, we need a wrapper binary that renames
42875  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42876  # @files and rewrites these too! This wrapper binary is
42877  # called fixpath.
42878  FIXPATH=
42879  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42881$as_echo_n "checking if fixpath can be created... " >&6; }
42882    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42883    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42884    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42885      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42886      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42887      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42888      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42889    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42890      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42891      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42892
42893      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42894      # @ was chosen as separator to minimize risk of other tools messing around with it
42895      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42896      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42897
42898      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42899    fi
42900    rm -f $OUTPUT_ROOT/fixpath*
42901    cd $OUTPUT_ROOT
42902    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42903    cd $CURDIR
42904
42905    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42907$as_echo "no" >&6; }
42908      cat $OUTPUT_ROOT/fixpath1.log
42909      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42910    fi
42911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42912$as_echo "yes" >&6; }
42913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42914$as_echo_n "checking if fixpath.exe works... " >&6; }
42915    cd $OUTPUT_ROOT
42916    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42917    cd $CURDIR
42918    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42920$as_echo "no" >&6; }
42921      cat $OUTPUT_ROOT/fixpath2.log
42922      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42923    fi
42924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42925$as_echo "yes" >&6; }
42926    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42927  fi
42928
42929
42930
42931
42932
42933
42934  ###############################################################################
42935  #
42936  # OS specific settings that we never will need to probe.
42937  #
42938  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42940$as_echo_n "checking what is not needed on Linux?... " >&6; }
42941    PULSE_NOT_NEEDED=yes
42942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42943$as_echo "pulse" >&6; }
42944  fi
42945
42946  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42948$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42949    ALSA_NOT_NEEDED=yes
42950    PULSE_NOT_NEEDED=yes
42951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42952$as_echo "alsa pulse" >&6; }
42953  fi
42954
42955  if test "x$OPENJDK_TARGET_OS" = xaix; then
42956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42957$as_echo_n "checking what is not needed on AIX?... " >&6; }
42958    ALSA_NOT_NEEDED=yes
42959    PULSE_NOT_NEEDED=yes
42960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42961$as_echo "alsa pulse" >&6; }
42962  fi
42963
42964
42965  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42967$as_echo_n "checking what is not needed on Windows?... " >&6; }
42968    CUPS_NOT_NEEDED=yes
42969    ALSA_NOT_NEEDED=yes
42970    PULSE_NOT_NEEDED=yes
42971    X11_NOT_NEEDED=yes
42972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42973$as_echo "alsa cups pulse x11" >&6; }
42974  fi
42975
42976  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42978$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42979    ALSA_NOT_NEEDED=yes
42980    PULSE_NOT_NEEDED=yes
42981    X11_NOT_NEEDED=yes
42982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42983$as_echo "alsa pulse x11" >&6; }
42984  fi
42985
42986  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42988$as_echo_n "checking what is not needed on bsd?... " >&6; }
42989    ALSA_NOT_NEEDED=yes
42990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42991$as_echo "alsa" >&6; }
42992  fi
42993
42994  if test "x$OPENJDK" = "xfalse"; then
42995    FREETYPE_NOT_NEEDED=yes
42996  fi
42997
42998  if test "x$SUPPORT_HEADFUL" = xno; then
42999    X11_NOT_NEEDED=yes
43000  fi
43001
43002
43003
43004  ###############################################################################
43005  #
43006  # Check for X Windows
43007  #
43008
43009  if test "x$X11_NOT_NEEDED" = xyes; then
43010    if test "x${with_x}" != x; then
43011      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43012$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43013    fi
43014    X_CFLAGS=
43015    X_LIBS=
43016  else
43017    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43018    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43019    # --x-libraries for the sysroot, if that seems to be correct.
43020    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43021      if test "x$SYSROOT" != "x"; then
43022        if test "x$x_includes" = xNONE; then
43023          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43024            x_includes="$SYSROOT/usr/X11R6/include"
43025          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43026            x_includes="$SYSROOT/usr/include"
43027          fi
43028        fi
43029        if test "x$x_libraries" = xNONE; then
43030          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43031            x_libraries="$SYSROOT/usr/X11R6/lib"
43032          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43033            x_libraries="$SYSROOT/usr/lib64"
43034          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43035            x_libraries="$SYSROOT/usr/lib"
43036          fi
43037        fi
43038      fi
43039    fi
43040
43041    # Now let autoconf do it's magic
43042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43043$as_echo_n "checking for X... " >&6; }
43044
43045
43046# Check whether --with-x was given.
43047if test "${with_x+set}" = set; then :
43048  withval=$with_x;
43049fi
43050
43051# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43052if test "x$with_x" = xno; then
43053  # The user explicitly disabled X.
43054  have_x=disabled
43055else
43056  case $x_includes,$x_libraries in #(
43057    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43058    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43059  $as_echo_n "(cached) " >&6
43060else
43061  # One or both of the vars are not set, and there is no cached value.
43062ac_x_includes=no ac_x_libraries=no
43063rm -f -r conftest.dir
43064if mkdir conftest.dir; then
43065  cd conftest.dir
43066  cat >Imakefile <<'_ACEOF'
43067incroot:
43068	@echo incroot='${INCROOT}'
43069usrlibdir:
43070	@echo usrlibdir='${USRLIBDIR}'
43071libdir:
43072	@echo libdir='${LIBDIR}'
43073_ACEOF
43074  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43075    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43076    for ac_var in incroot usrlibdir libdir; do
43077      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43078    done
43079    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43080    for ac_extension in a so sl dylib la dll; do
43081      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43082	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43083	ac_im_usrlibdir=$ac_im_libdir; break
43084      fi
43085    done
43086    # Screen out bogus values from the imake configuration.  They are
43087    # bogus both because they are the default anyway, and because
43088    # using them would break gcc on systems where it needs fixed includes.
43089    case $ac_im_incroot in
43090	/usr/include) ac_x_includes= ;;
43091	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43092    esac
43093    case $ac_im_usrlibdir in
43094	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43095	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43096    esac
43097  fi
43098  cd ..
43099  rm -f -r conftest.dir
43100fi
43101
43102# Standard set of common directories for X headers.
43103# Check X11 before X11Rn because it is often a symlink to the current release.
43104ac_x_header_dirs='
43105/usr/X11/include
43106/usr/X11R7/include
43107/usr/X11R6/include
43108/usr/X11R5/include
43109/usr/X11R4/include
43110
43111/usr/include/X11
43112/usr/include/X11R7
43113/usr/include/X11R6
43114/usr/include/X11R5
43115/usr/include/X11R4
43116
43117/usr/local/X11/include
43118/usr/local/X11R7/include
43119/usr/local/X11R6/include
43120/usr/local/X11R5/include
43121/usr/local/X11R4/include
43122
43123/usr/local/include/X11
43124/usr/local/include/X11R7
43125/usr/local/include/X11R6
43126/usr/local/include/X11R5
43127/usr/local/include/X11R4
43128
43129/usr/X386/include
43130/usr/x386/include
43131/usr/XFree86/include/X11
43132
43133/usr/include
43134/usr/local/include
43135/usr/unsupported/include
43136/usr/athena/include
43137/usr/local/x11r5/include
43138/usr/lpp/Xamples/include
43139
43140/usr/openwin/include
43141/usr/openwin/share/include'
43142
43143if test "$ac_x_includes" = no; then
43144  # Guess where to find include files, by looking for Xlib.h.
43145  # First, try using that file with no special directory specified.
43146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43147/* end confdefs.h.  */
43148#include <X11/Xlib.h>
43149_ACEOF
43150if ac_fn_cxx_try_cpp "$LINENO"; then :
43151  # We can compile using X headers with no special include directory.
43152ac_x_includes=
43153else
43154  for ac_dir in $ac_x_header_dirs; do
43155  if test -r "$ac_dir/X11/Xlib.h"; then
43156    ac_x_includes=$ac_dir
43157    break
43158  fi
43159done
43160fi
43161rm -f conftest.err conftest.i conftest.$ac_ext
43162fi # $ac_x_includes = no
43163
43164if test "$ac_x_libraries" = no; then
43165  # Check for the libraries.
43166  # See if we find them without any special options.
43167  # Don't add to $LIBS permanently.
43168  ac_save_LIBS=$LIBS
43169  LIBS="-lX11 $LIBS"
43170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43171/* end confdefs.h.  */
43172#include <X11/Xlib.h>
43173int
43174main ()
43175{
43176XrmInitialize ()
43177  ;
43178  return 0;
43179}
43180_ACEOF
43181if ac_fn_cxx_try_link "$LINENO"; then :
43182  LIBS=$ac_save_LIBS
43183# We can link X programs with no special library path.
43184ac_x_libraries=
43185else
43186  LIBS=$ac_save_LIBS
43187for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43188do
43189  # Don't even attempt the hair of trying to link an X program!
43190  for ac_extension in a so sl dylib la dll; do
43191    if test -r "$ac_dir/libX11.$ac_extension"; then
43192      ac_x_libraries=$ac_dir
43193      break 2
43194    fi
43195  done
43196done
43197fi
43198rm -f core conftest.err conftest.$ac_objext \
43199    conftest$ac_exeext conftest.$ac_ext
43200fi # $ac_x_libraries = no
43201
43202case $ac_x_includes,$ac_x_libraries in #(
43203  no,* | *,no | *\'*)
43204    # Didn't find X, or a directory has "'" in its name.
43205    ac_cv_have_x="have_x=no";; #(
43206  *)
43207    # Record where we found X for the cache.
43208    ac_cv_have_x="have_x=yes\
43209	ac_x_includes='$ac_x_includes'\
43210	ac_x_libraries='$ac_x_libraries'"
43211esac
43212fi
43213;; #(
43214    *) have_x=yes;;
43215  esac
43216  eval "$ac_cv_have_x"
43217fi # $with_x != no
43218
43219if test "$have_x" != yes; then
43220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43221$as_echo "$have_x" >&6; }
43222  no_x=yes
43223else
43224  # If each of the values was on the command line, it overrides each guess.
43225  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43226  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43227  # Update the cache value to reflect the command line values.
43228  ac_cv_have_x="have_x=yes\
43229	ac_x_includes='$x_includes'\
43230	ac_x_libraries='$x_libraries'"
43231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43232$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43233fi
43234
43235    if test "$no_x" = yes; then
43236  # Not all programs may use this symbol, but it does not hurt to define it.
43237
43238$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43239
43240  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43241else
43242  if test -n "$x_includes"; then
43243    X_CFLAGS="$X_CFLAGS -I$x_includes"
43244  fi
43245
43246  # It would also be nice to do this for all -L options, not just this one.
43247  if test -n "$x_libraries"; then
43248    X_LIBS="$X_LIBS -L$x_libraries"
43249    # For Solaris; some versions of Sun CC require a space after -R and
43250    # others require no space.  Words are not sufficient . . . .
43251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43252$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43253    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43254    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43255    ac_cxx_werror_flag=yes
43256    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43257/* end confdefs.h.  */
43258
43259int
43260main ()
43261{
43262
43263  ;
43264  return 0;
43265}
43266_ACEOF
43267if ac_fn_cxx_try_link "$LINENO"; then :
43268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43269$as_echo "no" >&6; }
43270       X_LIBS="$X_LIBS -R$x_libraries"
43271else
43272  LIBS="$ac_xsave_LIBS -R $x_libraries"
43273       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43274/* end confdefs.h.  */
43275
43276int
43277main ()
43278{
43279
43280  ;
43281  return 0;
43282}
43283_ACEOF
43284if ac_fn_cxx_try_link "$LINENO"; then :
43285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43286$as_echo "yes" >&6; }
43287	  X_LIBS="$X_LIBS -R $x_libraries"
43288else
43289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43290$as_echo "neither works" >&6; }
43291fi
43292rm -f core conftest.err conftest.$ac_objext \
43293    conftest$ac_exeext conftest.$ac_ext
43294fi
43295rm -f core conftest.err conftest.$ac_objext \
43296    conftest$ac_exeext conftest.$ac_ext
43297    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43298    LIBS=$ac_xsave_LIBS
43299  fi
43300
43301  # Check for system-dependent libraries X programs must link with.
43302  # Do this before checking for the system-independent R6 libraries
43303  # (-lICE), since we may need -lsocket or whatever for X linking.
43304
43305  if test "$ISC" = yes; then
43306    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43307  else
43308    # Martyn Johnson says this is needed for Ultrix, if the X
43309    # libraries were built with DECnet support.  And Karl Berry says
43310    # the Alpha needs dnet_stub (dnet does not exist).
43311    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43312    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43313/* end confdefs.h.  */
43314
43315/* Override any GCC internal prototype to avoid an error.
43316   Use char because int might match the return type of a GCC
43317   builtin and then its argument prototype would still apply.  */
43318#ifdef __cplusplus
43319extern "C"
43320#endif
43321char XOpenDisplay ();
43322int
43323main ()
43324{
43325return XOpenDisplay ();
43326  ;
43327  return 0;
43328}
43329_ACEOF
43330if ac_fn_cxx_try_link "$LINENO"; then :
43331
43332else
43333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43334$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43335if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43336  $as_echo_n "(cached) " >&6
43337else
43338  ac_check_lib_save_LIBS=$LIBS
43339LIBS="-ldnet  $LIBS"
43340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43341/* end confdefs.h.  */
43342
43343/* Override any GCC internal prototype to avoid an error.
43344   Use char because int might match the return type of a GCC
43345   builtin and then its argument prototype would still apply.  */
43346#ifdef __cplusplus
43347extern "C"
43348#endif
43349char dnet_ntoa ();
43350int
43351main ()
43352{
43353return dnet_ntoa ();
43354  ;
43355  return 0;
43356}
43357_ACEOF
43358if ac_fn_cxx_try_link "$LINENO"; then :
43359  ac_cv_lib_dnet_dnet_ntoa=yes
43360else
43361  ac_cv_lib_dnet_dnet_ntoa=no
43362fi
43363rm -f core conftest.err conftest.$ac_objext \
43364    conftest$ac_exeext conftest.$ac_ext
43365LIBS=$ac_check_lib_save_LIBS
43366fi
43367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43368$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43369if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43370  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43371fi
43372
43373    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43374      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43375$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43376if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43377  $as_echo_n "(cached) " >&6
43378else
43379  ac_check_lib_save_LIBS=$LIBS
43380LIBS="-ldnet_stub  $LIBS"
43381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43382/* end confdefs.h.  */
43383
43384/* Override any GCC internal prototype to avoid an error.
43385   Use char because int might match the return type of a GCC
43386   builtin and then its argument prototype would still apply.  */
43387#ifdef __cplusplus
43388extern "C"
43389#endif
43390char dnet_ntoa ();
43391int
43392main ()
43393{
43394return dnet_ntoa ();
43395  ;
43396  return 0;
43397}
43398_ACEOF
43399if ac_fn_cxx_try_link "$LINENO"; then :
43400  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43401else
43402  ac_cv_lib_dnet_stub_dnet_ntoa=no
43403fi
43404rm -f core conftest.err conftest.$ac_objext \
43405    conftest$ac_exeext conftest.$ac_ext
43406LIBS=$ac_check_lib_save_LIBS
43407fi
43408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43409$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43410if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43411  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43412fi
43413
43414    fi
43415fi
43416rm -f core conftest.err conftest.$ac_objext \
43417    conftest$ac_exeext conftest.$ac_ext
43418    LIBS="$ac_xsave_LIBS"
43419
43420    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43421    # to get the SysV transport functions.
43422    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43423    # needs -lnsl.
43424    # The nsl library prevents programs from opening the X display
43425    # on Irix 5.2, according to T.E. Dickey.
43426    # The functions gethostbyname, getservbyname, and inet_addr are
43427    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43428    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43429if test "x$ac_cv_func_gethostbyname" = xyes; then :
43430
43431fi
43432
43433    if test $ac_cv_func_gethostbyname = no; then
43434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43435$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43436if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43437  $as_echo_n "(cached) " >&6
43438else
43439  ac_check_lib_save_LIBS=$LIBS
43440LIBS="-lnsl  $LIBS"
43441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43442/* end confdefs.h.  */
43443
43444/* Override any GCC internal prototype to avoid an error.
43445   Use char because int might match the return type of a GCC
43446   builtin and then its argument prototype would still apply.  */
43447#ifdef __cplusplus
43448extern "C"
43449#endif
43450char gethostbyname ();
43451int
43452main ()
43453{
43454return gethostbyname ();
43455  ;
43456  return 0;
43457}
43458_ACEOF
43459if ac_fn_cxx_try_link "$LINENO"; then :
43460  ac_cv_lib_nsl_gethostbyname=yes
43461else
43462  ac_cv_lib_nsl_gethostbyname=no
43463fi
43464rm -f core conftest.err conftest.$ac_objext \
43465    conftest$ac_exeext conftest.$ac_ext
43466LIBS=$ac_check_lib_save_LIBS
43467fi
43468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43469$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43470if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43471  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43472fi
43473
43474      if test $ac_cv_lib_nsl_gethostbyname = no; then
43475	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43476$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43477if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43478  $as_echo_n "(cached) " >&6
43479else
43480  ac_check_lib_save_LIBS=$LIBS
43481LIBS="-lbsd  $LIBS"
43482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43483/* end confdefs.h.  */
43484
43485/* Override any GCC internal prototype to avoid an error.
43486   Use char because int might match the return type of a GCC
43487   builtin and then its argument prototype would still apply.  */
43488#ifdef __cplusplus
43489extern "C"
43490#endif
43491char gethostbyname ();
43492int
43493main ()
43494{
43495return gethostbyname ();
43496  ;
43497  return 0;
43498}
43499_ACEOF
43500if ac_fn_cxx_try_link "$LINENO"; then :
43501  ac_cv_lib_bsd_gethostbyname=yes
43502else
43503  ac_cv_lib_bsd_gethostbyname=no
43504fi
43505rm -f core conftest.err conftest.$ac_objext \
43506    conftest$ac_exeext conftest.$ac_ext
43507LIBS=$ac_check_lib_save_LIBS
43508fi
43509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43510$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43511if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43512  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43513fi
43514
43515      fi
43516    fi
43517
43518    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43519    # socket/setsockopt and other routines are undefined under SCO ODT
43520    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43521    # on later versions), says Simon Leinen: it contains gethostby*
43522    # variants that don't use the name server (or something).  -lsocket
43523    # must be given before -lnsl if both are needed.  We assume that
43524    # if connect needs -lnsl, so does gethostbyname.
43525    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43526if test "x$ac_cv_func_connect" = xyes; then :
43527
43528fi
43529
43530    if test $ac_cv_func_connect = no; then
43531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43532$as_echo_n "checking for connect in -lsocket... " >&6; }
43533if ${ac_cv_lib_socket_connect+:} false; then :
43534  $as_echo_n "(cached) " >&6
43535else
43536  ac_check_lib_save_LIBS=$LIBS
43537LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43539/* end confdefs.h.  */
43540
43541/* Override any GCC internal prototype to avoid an error.
43542   Use char because int might match the return type of a GCC
43543   builtin and then its argument prototype would still apply.  */
43544#ifdef __cplusplus
43545extern "C"
43546#endif
43547char connect ();
43548int
43549main ()
43550{
43551return connect ();
43552  ;
43553  return 0;
43554}
43555_ACEOF
43556if ac_fn_cxx_try_link "$LINENO"; then :
43557  ac_cv_lib_socket_connect=yes
43558else
43559  ac_cv_lib_socket_connect=no
43560fi
43561rm -f core conftest.err conftest.$ac_objext \
43562    conftest$ac_exeext conftest.$ac_ext
43563LIBS=$ac_check_lib_save_LIBS
43564fi
43565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43566$as_echo "$ac_cv_lib_socket_connect" >&6; }
43567if test "x$ac_cv_lib_socket_connect" = xyes; then :
43568  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43569fi
43570
43571    fi
43572
43573    # Guillermo Gomez says -lposix is necessary on A/UX.
43574    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43575if test "x$ac_cv_func_remove" = xyes; then :
43576
43577fi
43578
43579    if test $ac_cv_func_remove = no; then
43580      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43581$as_echo_n "checking for remove in -lposix... " >&6; }
43582if ${ac_cv_lib_posix_remove+:} false; then :
43583  $as_echo_n "(cached) " >&6
43584else
43585  ac_check_lib_save_LIBS=$LIBS
43586LIBS="-lposix  $LIBS"
43587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43588/* end confdefs.h.  */
43589
43590/* Override any GCC internal prototype to avoid an error.
43591   Use char because int might match the return type of a GCC
43592   builtin and then its argument prototype would still apply.  */
43593#ifdef __cplusplus
43594extern "C"
43595#endif
43596char remove ();
43597int
43598main ()
43599{
43600return remove ();
43601  ;
43602  return 0;
43603}
43604_ACEOF
43605if ac_fn_cxx_try_link "$LINENO"; then :
43606  ac_cv_lib_posix_remove=yes
43607else
43608  ac_cv_lib_posix_remove=no
43609fi
43610rm -f core conftest.err conftest.$ac_objext \
43611    conftest$ac_exeext conftest.$ac_ext
43612LIBS=$ac_check_lib_save_LIBS
43613fi
43614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43615$as_echo "$ac_cv_lib_posix_remove" >&6; }
43616if test "x$ac_cv_lib_posix_remove" = xyes; then :
43617  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43618fi
43619
43620    fi
43621
43622    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43623    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43624if test "x$ac_cv_func_shmat" = xyes; then :
43625
43626fi
43627
43628    if test $ac_cv_func_shmat = no; then
43629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43630$as_echo_n "checking for shmat in -lipc... " >&6; }
43631if ${ac_cv_lib_ipc_shmat+:} false; then :
43632  $as_echo_n "(cached) " >&6
43633else
43634  ac_check_lib_save_LIBS=$LIBS
43635LIBS="-lipc  $LIBS"
43636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43637/* end confdefs.h.  */
43638
43639/* Override any GCC internal prototype to avoid an error.
43640   Use char because int might match the return type of a GCC
43641   builtin and then its argument prototype would still apply.  */
43642#ifdef __cplusplus
43643extern "C"
43644#endif
43645char shmat ();
43646int
43647main ()
43648{
43649return shmat ();
43650  ;
43651  return 0;
43652}
43653_ACEOF
43654if ac_fn_cxx_try_link "$LINENO"; then :
43655  ac_cv_lib_ipc_shmat=yes
43656else
43657  ac_cv_lib_ipc_shmat=no
43658fi
43659rm -f core conftest.err conftest.$ac_objext \
43660    conftest$ac_exeext conftest.$ac_ext
43661LIBS=$ac_check_lib_save_LIBS
43662fi
43663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43664$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43665if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43666  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43667fi
43668
43669    fi
43670  fi
43671
43672  # Check for libraries that X11R6 Xt/Xaw programs need.
43673  ac_save_LDFLAGS=$LDFLAGS
43674  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43675  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43676  # check for ICE first), but we must link in the order -lSM -lICE or
43677  # we get undefined symbols.  So assume we have SM if we have ICE.
43678  # These have to be linked with before -lX11, unlike the other
43679  # libraries we check for below, so use a different variable.
43680  # John Interrante, Karl Berry
43681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43682$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43683if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43684  $as_echo_n "(cached) " >&6
43685else
43686  ac_check_lib_save_LIBS=$LIBS
43687LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43689/* end confdefs.h.  */
43690
43691/* Override any GCC internal prototype to avoid an error.
43692   Use char because int might match the return type of a GCC
43693   builtin and then its argument prototype would still apply.  */
43694#ifdef __cplusplus
43695extern "C"
43696#endif
43697char IceConnectionNumber ();
43698int
43699main ()
43700{
43701return IceConnectionNumber ();
43702  ;
43703  return 0;
43704}
43705_ACEOF
43706if ac_fn_cxx_try_link "$LINENO"; then :
43707  ac_cv_lib_ICE_IceConnectionNumber=yes
43708else
43709  ac_cv_lib_ICE_IceConnectionNumber=no
43710fi
43711rm -f core conftest.err conftest.$ac_objext \
43712    conftest$ac_exeext conftest.$ac_ext
43713LIBS=$ac_check_lib_save_LIBS
43714fi
43715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43716$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43717if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43718  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43719fi
43720
43721  LDFLAGS=$ac_save_LDFLAGS
43722
43723fi
43724
43725
43726    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43727    # this doesn't make sense so we remove it.
43728    if test "x$COMPILE_TYPE" = xcross; then
43729      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43730    fi
43731
43732    if test "x$no_x" = xyes; then
43733
43734  # Print a helpful message on how to acquire the necessary build dependency.
43735  # x11 is the help tag: freetype, cups, pulse, alsa etc
43736  MISSING_DEPENDENCY=x11
43737
43738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43739    cygwin_help $MISSING_DEPENDENCY
43740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43741    msys_help $MISSING_DEPENDENCY
43742  else
43743    PKGHANDLER_COMMAND=
43744
43745    case $PKGHANDLER in
43746      apt-get)
43747        apt_help     $MISSING_DEPENDENCY ;;
43748      yum)
43749        yum_help     $MISSING_DEPENDENCY ;;
43750      port)
43751        port_help    $MISSING_DEPENDENCY ;;
43752      pkgutil)
43753        pkgutil_help $MISSING_DEPENDENCY ;;
43754      pkgadd)
43755        pkgadd_help  $MISSING_DEPENDENCY ;;
43756    esac
43757
43758    if test "x$PKGHANDLER_COMMAND" != x; then
43759      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43760    fi
43761  fi
43762
43763      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43764    fi
43765
43766    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43767      OPENWIN_HOME="/usr/openwin"
43768      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43769      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43770          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43771          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43772          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43773    fi
43774
43775    ac_ext=c
43776ac_cpp='$CPP $CPPFLAGS'
43777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43779ac_compiler_gnu=$ac_cv_c_compiler_gnu
43780
43781    OLD_CFLAGS="$CFLAGS"
43782    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43783
43784    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43785    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43786do :
43787  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43788ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43789          # include <X11/Xlib.h>
43790          # include <X11/Xutil.h>
43791
43792
43793"
43794if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43795  cat >>confdefs.h <<_ACEOF
43796#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43797_ACEOF
43798 X11_HEADERS_OK=yes
43799else
43800  X11_HEADERS_OK=no; break
43801fi
43802
43803done
43804
43805
43806    if test "x$X11_HEADERS_OK" = xno; then
43807
43808  # Print a helpful message on how to acquire the necessary build dependency.
43809  # x11 is the help tag: freetype, cups, pulse, alsa etc
43810  MISSING_DEPENDENCY=x11
43811
43812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43813    cygwin_help $MISSING_DEPENDENCY
43814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43815    msys_help $MISSING_DEPENDENCY
43816  else
43817    PKGHANDLER_COMMAND=
43818
43819    case $PKGHANDLER in
43820      apt-get)
43821        apt_help     $MISSING_DEPENDENCY ;;
43822      yum)
43823        yum_help     $MISSING_DEPENDENCY ;;
43824      port)
43825        port_help    $MISSING_DEPENDENCY ;;
43826      pkgutil)
43827        pkgutil_help $MISSING_DEPENDENCY ;;
43828      pkgadd)
43829        pkgadd_help  $MISSING_DEPENDENCY ;;
43830    esac
43831
43832    if test "x$PKGHANDLER_COMMAND" != x; then
43833      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43834    fi
43835  fi
43836
43837      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43838    fi
43839
43840    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43841    # defined in libawt_xawt.
43842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43843$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43844    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43845/* end confdefs.h.  */
43846#include <X11/extensions/Xrender.h>
43847int
43848main ()
43849{
43850XLinearGradient x;
43851  ;
43852  return 0;
43853}
43854_ACEOF
43855if ac_fn_c_try_compile "$LINENO"; then :
43856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43857$as_echo "yes" >&6; }
43858else
43859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43860$as_echo "no" >&6; }
43861         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43862fi
43863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43864
43865    CFLAGS="$OLD_CFLAGS"
43866    ac_ext=cpp
43867ac_cpp='$CXXCPP $CPPFLAGS'
43868ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43869ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43870ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43871
43872  fi # X11_NOT_NEEDED
43873
43874
43875
43876
43877
43878
43879  ###############################################################################
43880  #
43881  # The common unix printing system cups is used to print from java.
43882  #
43883
43884# Check whether --with-cups was given.
43885if test "${with_cups+set}" = set; then :
43886  withval=$with_cups;
43887fi
43888
43889
43890# Check whether --with-cups-include was given.
43891if test "${with_cups_include+set}" = set; then :
43892  withval=$with_cups_include;
43893fi
43894
43895
43896  if test "x$CUPS_NOT_NEEDED" = xyes; then
43897    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43898      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43899$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43900    fi
43901    CUPS_CFLAGS=
43902  else
43903    CUPS_FOUND=no
43904
43905    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43906      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43907    fi
43908
43909    if test "x${with_cups}" != x; then
43910      CUPS_CFLAGS="-I${with_cups}/include"
43911      CUPS_FOUND=yes
43912    fi
43913    if test "x${with_cups_include}" != x; then
43914      CUPS_CFLAGS="-I${with_cups_include}"
43915      CUPS_FOUND=yes
43916    fi
43917    if test "x$CUPS_FOUND" = xno; then
43918
43919
43920  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43921    # Source the builddeps file again, to make sure it uses the latest variables!
43922    . $builddepsfile
43923    # Look for a target and build machine specific resource!
43924    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43925    if test "x$resource" = x; then
43926      # Ok, lets instead look for a target specific resource
43927      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43928    fi
43929    if test "x$resource" = x; then
43930      # Ok, lets instead look for a build specific resource
43931      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43932    fi
43933    if test "x$resource" = x; then
43934      # Ok, lets instead look for a generic resource
43935      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43936      resource=${builddep_cups}
43937    fi
43938    if test "x$resource" != x; then
43939      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43940$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43941      # If the resource in the builddeps.conf file is an existing directory,
43942      # for example /java/linux/cups
43943      if test -d ${resource}; then
43944        depdir=${resource}
43945      else
43946
43947  # cups is for example mymodule
43948  # $resource is for example libs/general/libmymod_1_2_3.zip
43949  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43950  # $with_builddeps_dir is for example /localhome/builddeps
43951  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43952  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43953  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43954  filename=`basename $resource`
43955  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43956  filebase=${filename%%.*}
43957  extension=${filename#*.}
43958  installdir=$with_builddeps_dir/$filebase
43959  if test ! -f $installdir/$filename.unpacked; then
43960    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43961$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43962    if test ! -d $installdir; then
43963      mkdir -p $installdir
43964    fi
43965    if test ! -d $installdir; then
43966      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43967    fi
43968    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43969    touch $tmpfile
43970    if test ! -f $tmpfile; then
43971      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43972    fi
43973
43974  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43975  # $tmpfile is the local file name for the downloaded file.
43976  VALID_TOOL=no
43977  if test "x$BDEPS_FTP" = xwget; then
43978    VALID_TOOL=yes
43979    wget -O $tmpfile $with_builddeps_server/$resource
43980  fi
43981  if test "x$BDEPS_FTP" = xlftp; then
43982    VALID_TOOL=yes
43983    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43984  fi
43985  if test "x$BDEPS_FTP" = xftp; then
43986    VALID_TOOL=yes
43987    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43988    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43989    FTPUSERPWD=${FTPSERVER%%@*}
43990    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43991      FTPUSER=${userpwd%%:*}
43992      FTPPWD=${userpwd#*@}
43993      FTPSERVER=${FTPSERVER#*@}
43994    else
43995      FTPUSER=ftp
43996      FTPPWD=ftp
43997    fi
43998    # the "pass" command does not work on some
43999    # ftp clients (read ftp.exe) but if it works,
44000    # passive mode is better!
44001    ( \
44002        echo "user $FTPUSER $FTPPWD"        ; \
44003        echo "pass"                         ; \
44004        echo "bin"                          ; \
44005        echo "get $FTPPATH $tmpfile"              ; \
44006    ) | ftp -in $FTPSERVER
44007  fi
44008  if test "x$VALID_TOOL" != xyes; then
44009    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44010  fi
44011
44012    mv $tmpfile $installdir/$filename
44013    if test ! -s $installdir/$filename; then
44014      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44015    fi
44016    case "$extension" in
44017      zip)  echo "Unzipping $installdir/$filename..."
44018        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44019        ;;
44020      tar.gz) echo "Untaring $installdir/$filename..."
44021        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44022        ;;
44023      tgz) echo "Untaring $installdir/$filename..."
44024        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44025        ;;
44026      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44027        ;;
44028    esac
44029  fi
44030  if test -f $installdir/$filename.unpacked; then
44031    depdir=$installdir
44032  fi
44033
44034      fi
44035      # Source the builddeps file again, because in the previous command, the depdir
44036      # was updated to point at the current build dependency install directory.
44037      . $builddepsfile
44038      # Now extract variables from the builddeps.conf files.
44039      theroot=${builddep_cups_ROOT}
44040      thecflags=${builddep_cups_CFLAGS}
44041      thelibs=${builddep_cups_LIBS}
44042      if test "x$depdir" = x; then
44043        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44044      fi
44045      CUPS=$depdir
44046      if test "x$theroot" != x; then
44047        CUPS="$theroot"
44048      fi
44049      if test "x$thecflags" != x; then
44050        CUPS_CFLAGS="$thecflags"
44051      fi
44052      if test "x$thelibs" != x; then
44053        CUPS_LIBS="$thelibs"
44054      fi
44055      CUPS_FOUND=yes
44056
44057    fi
44058
44059  fi
44060
44061    fi
44062    if test "x$CUPS_FOUND" = xno; then
44063      # Are the cups headers installed in the default /usr/include location?
44064      for ac_header in cups/cups.h cups/ppd.h
44065do :
44066  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44067ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44068if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44069  cat >>confdefs.h <<_ACEOF
44070#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44071_ACEOF
44072
44073            CUPS_FOUND=yes
44074            CUPS_CFLAGS=
44075            DEFAULT_CUPS=yes
44076
44077
44078fi
44079
44080done
44081
44082    fi
44083    if test "x$CUPS_FOUND" = xno; then
44084      # Getting nervous now? Lets poke around for standard Solaris third-party
44085      # package installation locations.
44086      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44087$as_echo_n "checking for cups headers... " >&6; }
44088      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44089        # An SFW package seems to be installed!
44090        CUPS_FOUND=yes
44091        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44092      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44093        # A CSW package seems to be installed!
44094        CUPS_FOUND=yes
44095        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44096      fi
44097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44098$as_echo "$CUPS_FOUND" >&6; }
44099    fi
44100    if test "x$CUPS_FOUND" = xno; then
44101
44102  # Print a helpful message on how to acquire the necessary build dependency.
44103  # cups is the help tag: freetype, cups, pulse, alsa etc
44104  MISSING_DEPENDENCY=cups
44105
44106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44107    cygwin_help $MISSING_DEPENDENCY
44108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44109    msys_help $MISSING_DEPENDENCY
44110  else
44111    PKGHANDLER_COMMAND=
44112
44113    case $PKGHANDLER in
44114      apt-get)
44115        apt_help     $MISSING_DEPENDENCY ;;
44116      yum)
44117        yum_help     $MISSING_DEPENDENCY ;;
44118      port)
44119        port_help    $MISSING_DEPENDENCY ;;
44120      pkgutil)
44121        pkgutil_help $MISSING_DEPENDENCY ;;
44122      pkgadd)
44123        pkgadd_help  $MISSING_DEPENDENCY ;;
44124    esac
44125
44126    if test "x$PKGHANDLER_COMMAND" != x; then
44127      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44128    fi
44129  fi
44130
44131      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44132    fi
44133  fi
44134
44135
44136
44137
44138
44139
44140  ###############################################################################
44141  #
44142  # The ubiquitous freetype library is used to render fonts.
44143  #
44144
44145# Check whether --with-freetype was given.
44146if test "${with_freetype+set}" = set; then :
44147  withval=$with_freetype;
44148fi
44149
44150
44151# Check whether --with-freetype-include was given.
44152if test "${with_freetype_include+set}" = set; then :
44153  withval=$with_freetype_include;
44154fi
44155
44156
44157# Check whether --with-freetype-lib was given.
44158if test "${with_freetype_lib+set}" = set; then :
44159  withval=$with_freetype_lib;
44160fi
44161
44162
44163# Check whether --with-freetype-src was given.
44164if test "${with_freetype_src+set}" = set; then :
44165  withval=$with_freetype_src;
44166fi
44167
44168  # Check whether --enable-freetype-bundling was given.
44169if test "${enable_freetype_bundling+set}" = set; then :
44170  enableval=$enable_freetype_bundling;
44171fi
44172
44173
44174  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44175  FREETYPE_BASE_NAME=freetype
44176  FREETYPE_CFLAGS=
44177  FREETYPE_LIBS=
44178  FREETYPE_BUNDLE_LIB_PATH=
44179
44180  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44181    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
44182      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44183$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44184    fi
44185    if test "x$enable_freetype_bundling" != x; then
44186      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44187$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44188    fi
44189  else
44190    # freetype is needed to build; go get it!
44191
44192    BUNDLE_FREETYPE="$enable_freetype_bundling"
44193
44194    if  test "x$with_freetype_src" != x; then
44195      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44196        # Try to build freetype if --with-freetype-src was given on Windows
44197
44198  FREETYPE_SRC_PATH="$with_freetype_src"
44199  BUILD_FREETYPE=yes
44200
44201  # Check if the freetype sources are acessible..
44202  if ! test -d $FREETYPE_SRC_PATH; then
44203    { $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
44204$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44205    BUILD_FREETYPE=no
44206  fi
44207  # ..and contain a vc2010 project file
44208  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44209  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44210    { $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
44211$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44212    BUILD_FREETYPE=no
44213  fi
44214  # Now check if configure found a version of 'msbuild.exe'
44215  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44216    { $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
44217$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;}
44218    BUILD_FREETYPE=no
44219  fi
44220
44221  # Ready to go..
44222  if test "x$BUILD_FREETYPE" = xyes; then
44223
44224    # msbuild requires trailing slashes for output directories
44225    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44226    freetype_lib_path_unix="$freetype_lib_path"
44227    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44228
44229  unix_path="$vcxproj_path"
44230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44231    windows_path=`$CYGPATH -m "$unix_path"`
44232    vcxproj_path="$windows_path"
44233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44234    windows_path=`cmd //c echo $unix_path`
44235    vcxproj_path="$windows_path"
44236  fi
44237
44238
44239  unix_path="$freetype_lib_path"
44240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44241    windows_path=`$CYGPATH -m "$unix_path"`
44242    freetype_lib_path="$windows_path"
44243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44244    windows_path=`cmd //c echo $unix_path`
44245    freetype_lib_path="$windows_path"
44246  fi
44247
44248
44249  unix_path="$freetype_obj_path"
44250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44251    windows_path=`$CYGPATH -m "$unix_path"`
44252    freetype_obj_path="$windows_path"
44253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44254    windows_path=`cmd //c echo $unix_path`
44255    freetype_obj_path="$windows_path"
44256  fi
44257
44258    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44259      freetype_platform=x64
44260    else
44261      freetype_platform=win32
44262    fi
44263
44264    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44265    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44266    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44267    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44268    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44269$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44270
44271    # First we try to build the freetype.dll
44272    $ECHO -e "@echo off\n"\
44273	     "$MSBUILD $vcxproj_path "\
44274		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44275		       "/p:Configuration=\"Release Multithreaded\" "\
44276		       "/p:Platform=$freetype_platform "\
44277		       "/p:ConfigurationType=DynamicLibrary "\
44278		       "/p:TargetName=freetype "\
44279		       "/p:OutDir=\"$freetype_lib_path\" "\
44280		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44281    cmd /c freetype.bat
44282
44283    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44284      # If that succeeds we also build freetype.lib
44285      $ECHO -e "@echo off\n"\
44286	       "$MSBUILD $vcxproj_path "\
44287			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44288			 "/p:Configuration=\"Release Multithreaded\" "\
44289			 "/p:Platform=$freetype_platform "\
44290			 "/p:ConfigurationType=StaticLibrary "\
44291			 "/p:TargetName=freetype "\
44292			 "/p:OutDir=\"$freetype_lib_path\" "\
44293			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44294      cmd /c freetype.bat
44295
44296      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44297	# Once we build both, lib and dll, set freetype lib and include path appropriately
44298	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44299	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44300	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44301$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44302      else
44303	BUILD_FREETYPE=no
44304      fi
44305    else
44306      BUILD_FREETYPE=no
44307    fi
44308  fi
44309
44310        if test "x$BUILD_FREETYPE" = xyes; then
44311          # Okay, we built it. Check that it works.
44312
44313  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44314  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44315  METHOD="--with-freetype-src"
44316
44317  # Let's start with an optimistic view of the world :-)
44318  FOUND_FREETYPE=yes
44319
44320  # First look for the canonical freetype main include file ft2build.h.
44321  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44322    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44323    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44324    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44325      # Fail.
44326      FOUND_FREETYPE=no
44327    fi
44328  fi
44329
44330  if test "x$FOUND_FREETYPE" = xyes; then
44331    # Include file found, let's continue the sanity check.
44332    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44333$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44334
44335    # Reset to default value
44336    FREETYPE_BASE_NAME=freetype
44337    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44338    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44339      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44340          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44341        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44342        # for the .6 version explicitly.
44343        FREETYPE_BASE_NAME=freetype.6
44344        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44345        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44346$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44347      else
44348        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44349$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44350        FOUND_FREETYPE=no
44351      fi
44352    else
44353      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44354        # On Windows, we will need both .lib and .dll file.
44355        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44356          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44357$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44358          FOUND_FREETYPE=no
44359        fi
44360      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44361          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44362        # Found lib in isa dir, use that instead.
44363        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44364        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44365$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44366      fi
44367    fi
44368  fi
44369
44370  if test "x$FOUND_FREETYPE" = xyes; then
44371
44372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44373
44374  # Input might be given as Windows format, start by converting to
44375  # unix format.
44376  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44377  new_path=`$CYGPATH -u "$path"`
44378
44379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44382  # "foo.exe" is OK but "foo" is an error.
44383  #
44384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44385  # It is also a way to make sure we got the proper file name for the real test later on.
44386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44387  if test "x$test_shortpath" = x; then
44388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44389$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44390    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44391  fi
44392
44393  # Call helper function which possibly converts this using DOS-style short mode.
44394  # If so, the updated path is stored in $new_path.
44395
44396  input_path="$new_path"
44397  # Check if we need to convert this using DOS-style short mode. If the path
44398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44399  # take no chances and rewrite it.
44400  # Note: m4 eats our [], so we need to use [ and ] instead.
44401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44402  if test "x$has_forbidden_chars" != x; then
44403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44407      # Going to short mode and back again did indeed matter. Since short mode is
44408      # case insensitive, let's make it lowercase to improve readability.
44409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44410      # Now convert it back to Unix-stile (cygpath)
44411      input_path=`$CYGPATH -u "$shortmode_path"`
44412      new_path="$input_path"
44413    fi
44414  fi
44415
44416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44417  if test "x$test_cygdrive_prefix" = x; then
44418    # As a simple fix, exclude /usr/bin since it's not a real path.
44419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44421      # a path prefixed by /cygdrive for fixpath to work.
44422      new_path="$CYGWIN_ROOT_PATH$input_path"
44423    fi
44424  fi
44425
44426
44427  if test "x$path" != "x$new_path"; then
44428    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44430$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44431  fi
44432
44433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44434
44435  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44436  has_colon=`$ECHO $path | $GREP ^.:`
44437  new_path="$path"
44438  if test "x$has_colon" = x; then
44439    # Not in mixed or Windows style, start by that.
44440    new_path=`cmd //c echo $path`
44441  fi
44442
44443
44444  input_path="$new_path"
44445  # Check if we need to convert this using DOS-style short mode. If the path
44446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44447  # take no chances and rewrite it.
44448  # Note: m4 eats our [], so we need to use [ and ] instead.
44449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44450  if test "x$has_forbidden_chars" != x; then
44451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44453  fi
44454
44455
44456  windows_path="$new_path"
44457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44458    unix_path=`$CYGPATH -u "$windows_path"`
44459    new_path="$unix_path"
44460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44462    new_path="$unix_path"
44463  fi
44464
44465  if test "x$path" != "x$new_path"; then
44466    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44469  fi
44470
44471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44473
44474  else
44475    # We're on a unix platform. Hooray! :)
44476    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44477    has_space=`$ECHO "$path" | $GREP " "`
44478    if test "x$has_space" != x; then
44479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44480$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44481      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44482    fi
44483
44484    # Use eval to expand a potential ~
44485    eval path="$path"
44486    if test ! -f "$path" && test ! -d "$path"; then
44487      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44488    fi
44489
44490    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44491  fi
44492
44493
44494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44495
44496  # Input might be given as Windows format, start by converting to
44497  # unix format.
44498  path="$POTENTIAL_FREETYPE_LIB_PATH"
44499  new_path=`$CYGPATH -u "$path"`
44500
44501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44504  # "foo.exe" is OK but "foo" is an error.
44505  #
44506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44507  # It is also a way to make sure we got the proper file name for the real test later on.
44508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44509  if test "x$test_shortpath" = x; then
44510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44512    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44513  fi
44514
44515  # Call helper function which possibly converts this using DOS-style short mode.
44516  # If so, the updated path is stored in $new_path.
44517
44518  input_path="$new_path"
44519  # Check if we need to convert this using DOS-style short mode. If the path
44520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44521  # take no chances and rewrite it.
44522  # Note: m4 eats our [], so we need to use [ and ] instead.
44523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44524  if test "x$has_forbidden_chars" != x; then
44525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44529      # Going to short mode and back again did indeed matter. Since short mode is
44530      # case insensitive, let's make it lowercase to improve readability.
44531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44532      # Now convert it back to Unix-stile (cygpath)
44533      input_path=`$CYGPATH -u "$shortmode_path"`
44534      new_path="$input_path"
44535    fi
44536  fi
44537
44538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44539  if test "x$test_cygdrive_prefix" = x; then
44540    # As a simple fix, exclude /usr/bin since it's not a real path.
44541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44543      # a path prefixed by /cygdrive for fixpath to work.
44544      new_path="$CYGWIN_ROOT_PATH$input_path"
44545    fi
44546  fi
44547
44548
44549  if test "x$path" != "x$new_path"; then
44550    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44553  fi
44554
44555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44556
44557  path="$POTENTIAL_FREETYPE_LIB_PATH"
44558  has_colon=`$ECHO $path | $GREP ^.:`
44559  new_path="$path"
44560  if test "x$has_colon" = x; then
44561    # Not in mixed or Windows style, start by that.
44562    new_path=`cmd //c echo $path`
44563  fi
44564
44565
44566  input_path="$new_path"
44567  # Check if we need to convert this using DOS-style short mode. If the path
44568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44569  # take no chances and rewrite it.
44570  # Note: m4 eats our [], so we need to use [ and ] instead.
44571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44572  if test "x$has_forbidden_chars" != x; then
44573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44575  fi
44576
44577
44578  windows_path="$new_path"
44579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44580    unix_path=`$CYGPATH -u "$windows_path"`
44581    new_path="$unix_path"
44582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44584    new_path="$unix_path"
44585  fi
44586
44587  if test "x$path" != "x$new_path"; then
44588    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44590$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44591  fi
44592
44593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44595
44596  else
44597    # We're on a unix platform. Hooray! :)
44598    path="$POTENTIAL_FREETYPE_LIB_PATH"
44599    has_space=`$ECHO "$path" | $GREP " "`
44600    if test "x$has_space" != x; then
44601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44602$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44603      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44604    fi
44605
44606    # Use eval to expand a potential ~
44607    eval path="$path"
44608    if test ! -f "$path" && test ! -d "$path"; then
44609      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44610    fi
44611
44612    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44613  fi
44614
44615
44616    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44618$as_echo_n "checking for freetype includes... " >&6; }
44619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44620$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44621    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44623$as_echo_n "checking for freetype libraries... " >&6; }
44624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44625$as_echo "$FREETYPE_LIB_PATH" >&6; }
44626  fi
44627
44628          if test "x$FOUND_FREETYPE" != xyes; then
44629            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44630          fi
44631        else
44632          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44633$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44634          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44635        fi
44636      else
44637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44638$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44639      fi
44640    fi
44641
44642    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44643      # User has specified settings
44644
44645      if test "x$BUNDLE_FREETYPE" = x; then
44646        # If not specified, default is to bundle freetype
44647        BUNDLE_FREETYPE=yes
44648      fi
44649
44650      if test "x$with_freetype" != x; then
44651        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44652        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44653      fi
44654
44655      # Allow --with-freetype-lib and --with-freetype-include to override
44656      if test "x$with_freetype_include" != x; then
44657        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44658      fi
44659      if test "x$with_freetype_lib" != x; then
44660        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44661      fi
44662
44663      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44664        # Okay, we got it. Check that it works.
44665
44666  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44667  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44668  METHOD="--with-freetype"
44669
44670  # Let's start with an optimistic view of the world :-)
44671  FOUND_FREETYPE=yes
44672
44673  # First look for the canonical freetype main include file ft2build.h.
44674  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44675    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44676    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44677    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44678      # Fail.
44679      FOUND_FREETYPE=no
44680    fi
44681  fi
44682
44683  if test "x$FOUND_FREETYPE" = xyes; then
44684    # Include file found, let's continue the sanity check.
44685    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44686$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44687
44688    # Reset to default value
44689    FREETYPE_BASE_NAME=freetype
44690    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44691    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44692      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44693          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44694        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44695        # for the .6 version explicitly.
44696        FREETYPE_BASE_NAME=freetype.6
44697        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44698        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44699$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44700      else
44701        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44702$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44703        FOUND_FREETYPE=no
44704      fi
44705    else
44706      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44707        # On Windows, we will need both .lib and .dll file.
44708        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44709          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44710$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44711          FOUND_FREETYPE=no
44712        fi
44713      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44714          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44715        # Found lib in isa dir, use that instead.
44716        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44717        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44718$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44719      fi
44720    fi
44721  fi
44722
44723  if test "x$FOUND_FREETYPE" = xyes; then
44724
44725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44726
44727  # Input might be given as Windows format, start by converting to
44728  # unix format.
44729  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44730  new_path=`$CYGPATH -u "$path"`
44731
44732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44735  # "foo.exe" is OK but "foo" is an error.
44736  #
44737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44738  # It is also a way to make sure we got the proper file name for the real test later on.
44739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44740  if test "x$test_shortpath" = x; then
44741    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44742$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44743    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44744  fi
44745
44746  # Call helper function which possibly converts this using DOS-style short mode.
44747  # If so, the updated path is stored in $new_path.
44748
44749  input_path="$new_path"
44750  # Check if we need to convert this using DOS-style short mode. If the path
44751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44752  # take no chances and rewrite it.
44753  # Note: m4 eats our [], so we need to use [ and ] instead.
44754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44755  if test "x$has_forbidden_chars" != x; then
44756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44760      # Going to short mode and back again did indeed matter. Since short mode is
44761      # case insensitive, let's make it lowercase to improve readability.
44762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44763      # Now convert it back to Unix-stile (cygpath)
44764      input_path=`$CYGPATH -u "$shortmode_path"`
44765      new_path="$input_path"
44766    fi
44767  fi
44768
44769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44770  if test "x$test_cygdrive_prefix" = x; then
44771    # As a simple fix, exclude /usr/bin since it's not a real path.
44772    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44774      # a path prefixed by /cygdrive for fixpath to work.
44775      new_path="$CYGWIN_ROOT_PATH$input_path"
44776    fi
44777  fi
44778
44779
44780  if test "x$path" != "x$new_path"; then
44781    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44783$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44784  fi
44785
44786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44787
44788  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44789  has_colon=`$ECHO $path | $GREP ^.:`
44790  new_path="$path"
44791  if test "x$has_colon" = x; then
44792    # Not in mixed or Windows style, start by that.
44793    new_path=`cmd //c echo $path`
44794  fi
44795
44796
44797  input_path="$new_path"
44798  # Check if we need to convert this using DOS-style short mode. If the path
44799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44800  # take no chances and rewrite it.
44801  # Note: m4 eats our [], so we need to use [ and ] instead.
44802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44803  if test "x$has_forbidden_chars" != x; then
44804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44806  fi
44807
44808
44809  windows_path="$new_path"
44810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44811    unix_path=`$CYGPATH -u "$windows_path"`
44812    new_path="$unix_path"
44813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44815    new_path="$unix_path"
44816  fi
44817
44818  if test "x$path" != "x$new_path"; then
44819    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44821$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44822  fi
44823
44824  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44825  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44826
44827  else
44828    # We're on a unix platform. Hooray! :)
44829    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44830    has_space=`$ECHO "$path" | $GREP " "`
44831    if test "x$has_space" != x; then
44832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44833$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44834      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44835    fi
44836
44837    # Use eval to expand a potential ~
44838    eval path="$path"
44839    if test ! -f "$path" && test ! -d "$path"; then
44840      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44841    fi
44842
44843    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44844  fi
44845
44846
44847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44848
44849  # Input might be given as Windows format, start by converting to
44850  # unix format.
44851  path="$POTENTIAL_FREETYPE_LIB_PATH"
44852  new_path=`$CYGPATH -u "$path"`
44853
44854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44857  # "foo.exe" is OK but "foo" is an error.
44858  #
44859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44860  # It is also a way to make sure we got the proper file name for the real test later on.
44861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44862  if test "x$test_shortpath" = x; then
44863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44864$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44865    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44866  fi
44867
44868  # Call helper function which possibly converts this using DOS-style short mode.
44869  # If so, the updated path is stored in $new_path.
44870
44871  input_path="$new_path"
44872  # Check if we need to convert this using DOS-style short mode. If the path
44873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44874  # take no chances and rewrite it.
44875  # Note: m4 eats our [], so we need to use [ and ] instead.
44876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44877  if test "x$has_forbidden_chars" != x; then
44878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44882      # Going to short mode and back again did indeed matter. Since short mode is
44883      # case insensitive, let's make it lowercase to improve readability.
44884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44885      # Now convert it back to Unix-stile (cygpath)
44886      input_path=`$CYGPATH -u "$shortmode_path"`
44887      new_path="$input_path"
44888    fi
44889  fi
44890
44891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44892  if test "x$test_cygdrive_prefix" = x; then
44893    # As a simple fix, exclude /usr/bin since it's not a real path.
44894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44896      # a path prefixed by /cygdrive for fixpath to work.
44897      new_path="$CYGWIN_ROOT_PATH$input_path"
44898    fi
44899  fi
44900
44901
44902  if test "x$path" != "x$new_path"; then
44903    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44905$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44906  fi
44907
44908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44909
44910  path="$POTENTIAL_FREETYPE_LIB_PATH"
44911  has_colon=`$ECHO $path | $GREP ^.:`
44912  new_path="$path"
44913  if test "x$has_colon" = x; then
44914    # Not in mixed or Windows style, start by that.
44915    new_path=`cmd //c echo $path`
44916  fi
44917
44918
44919  input_path="$new_path"
44920  # Check if we need to convert this using DOS-style short mode. If the path
44921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44922  # take no chances and rewrite it.
44923  # Note: m4 eats our [], so we need to use [ and ] instead.
44924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44925  if test "x$has_forbidden_chars" != x; then
44926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44928  fi
44929
44930
44931  windows_path="$new_path"
44932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44933    unix_path=`$CYGPATH -u "$windows_path"`
44934    new_path="$unix_path"
44935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44937    new_path="$unix_path"
44938  fi
44939
44940  if test "x$path" != "x$new_path"; then
44941    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44944  fi
44945
44946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44948
44949  else
44950    # We're on a unix platform. Hooray! :)
44951    path="$POTENTIAL_FREETYPE_LIB_PATH"
44952    has_space=`$ECHO "$path" | $GREP " "`
44953    if test "x$has_space" != x; then
44954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44955$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44956      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44957    fi
44958
44959    # Use eval to expand a potential ~
44960    eval path="$path"
44961    if test ! -f "$path" && test ! -d "$path"; then
44962      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44963    fi
44964
44965    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44966  fi
44967
44968
44969    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44971$as_echo_n "checking for freetype includes... " >&6; }
44972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44973$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44974    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44976$as_echo_n "checking for freetype libraries... " >&6; }
44977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44978$as_echo "$FREETYPE_LIB_PATH" >&6; }
44979  fi
44980
44981        if test "x$FOUND_FREETYPE" != xyes; then
44982          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44983        fi
44984      else
44985        # User specified only one of lib or include. This is an error.
44986        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44987          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44988$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44989          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44990        else
44991          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44992$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44993          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44994        fi
44995      fi
44996    else
44997      # User did not specify settings, but we need freetype. Try to locate it.
44998
44999      if test "x$BUNDLE_FREETYPE" = x; then
45000        # If not specified, default is to bundle freetype only on windows
45001        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45002          BUNDLE_FREETYPE=yes
45003        else
45004          BUNDLE_FREETYPE=no
45005        fi
45006      fi
45007
45008      if test "x$FOUND_FREETYPE" != xyes; then
45009        # Check builddeps
45010
45011
45012  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45013    # Source the builddeps file again, to make sure it uses the latest variables!
45014    . $builddepsfile
45015    # Look for a target and build machine specific resource!
45016    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45017    if test "x$resource" = x; then
45018      # Ok, lets instead look for a target specific resource
45019      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45020    fi
45021    if test "x$resource" = x; then
45022      # Ok, lets instead look for a build specific resource
45023      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45024    fi
45025    if test "x$resource" = x; then
45026      # Ok, lets instead look for a generic resource
45027      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45028      resource=${builddep_freetype2}
45029    fi
45030    if test "x$resource" != x; then
45031      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45032$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45033      # If the resource in the builddeps.conf file is an existing directory,
45034      # for example /java/linux/cups
45035      if test -d ${resource}; then
45036        depdir=${resource}
45037      else
45038
45039  # freetype2 is for example mymodule
45040  # $resource is for example libs/general/libmymod_1_2_3.zip
45041  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45042  # $with_builddeps_dir is for example /localhome/builddeps
45043  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45044  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45045  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45046  filename=`basename $resource`
45047  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45048  filebase=${filename%%.*}
45049  extension=${filename#*.}
45050  installdir=$with_builddeps_dir/$filebase
45051  if test ! -f $installdir/$filename.unpacked; then
45052    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45053$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45054    if test ! -d $installdir; then
45055      mkdir -p $installdir
45056    fi
45057    if test ! -d $installdir; then
45058      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45059    fi
45060    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45061    touch $tmpfile
45062    if test ! -f $tmpfile; then
45063      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45064    fi
45065
45066  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45067  # $tmpfile is the local file name for the downloaded file.
45068  VALID_TOOL=no
45069  if test "x$BDEPS_FTP" = xwget; then
45070    VALID_TOOL=yes
45071    wget -O $tmpfile $with_builddeps_server/$resource
45072  fi
45073  if test "x$BDEPS_FTP" = xlftp; then
45074    VALID_TOOL=yes
45075    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45076  fi
45077  if test "x$BDEPS_FTP" = xftp; then
45078    VALID_TOOL=yes
45079    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45080    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45081    FTPUSERPWD=${FTPSERVER%%@*}
45082    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45083      FTPUSER=${userpwd%%:*}
45084      FTPPWD=${userpwd#*@}
45085      FTPSERVER=${FTPSERVER#*@}
45086    else
45087      FTPUSER=ftp
45088      FTPPWD=ftp
45089    fi
45090    # the "pass" command does not work on some
45091    # ftp clients (read ftp.exe) but if it works,
45092    # passive mode is better!
45093    ( \
45094        echo "user $FTPUSER $FTPPWD"        ; \
45095        echo "pass"                         ; \
45096        echo "bin"                          ; \
45097        echo "get $FTPPATH $tmpfile"              ; \
45098    ) | ftp -in $FTPSERVER
45099  fi
45100  if test "x$VALID_TOOL" != xyes; then
45101    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45102  fi
45103
45104    mv $tmpfile $installdir/$filename
45105    if test ! -s $installdir/$filename; then
45106      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45107    fi
45108    case "$extension" in
45109      zip)  echo "Unzipping $installdir/$filename..."
45110        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45111        ;;
45112      tar.gz) echo "Untaring $installdir/$filename..."
45113        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45114        ;;
45115      tgz) echo "Untaring $installdir/$filename..."
45116        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45117        ;;
45118      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45119        ;;
45120    esac
45121  fi
45122  if test -f $installdir/$filename.unpacked; then
45123    depdir=$installdir
45124  fi
45125
45126      fi
45127      # Source the builddeps file again, because in the previous command, the depdir
45128      # was updated to point at the current build dependency install directory.
45129      . $builddepsfile
45130      # Now extract variables from the builddeps.conf files.
45131      theroot=${builddep_freetype2_ROOT}
45132      thecflags=${builddep_freetype2_CFLAGS}
45133      thelibs=${builddep_freetype2_LIBS}
45134      if test "x$depdir" = x; then
45135        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45136      fi
45137      FREETYPE=$depdir
45138      if test "x$theroot" != x; then
45139        FREETYPE="$theroot"
45140      fi
45141      if test "x$thecflags" != x; then
45142        FREETYPE_CFLAGS="$thecflags"
45143      fi
45144      if test "x$thelibs" != x; then
45145        FREETYPE_LIBS="$thelibs"
45146      fi
45147      FOUND_FREETYPE=yes
45148      else FOUND_FREETYPE=no
45149
45150    fi
45151    else FOUND_FREETYPE=no
45152
45153  fi
45154
45155        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45156        if test "x$FOUND_FREETYPE" = xyes; then
45157          if test "x$BUNDLE_FREETYPE" = xyes; then
45158            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45159$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45160            FOUND_FREETYPE=no
45161          else
45162            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45163$as_echo_n "checking for freetype... " >&6; }
45164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45165$as_echo "yes (using builddeps)" >&6; }
45166          fi
45167        fi
45168      fi
45169
45170      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45171      if test "x$SYSROOT" = x; then
45172        if test "x$FOUND_FREETYPE" != xyes; then
45173          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45174          if test "x$PKG_CONFIG" != x; then
45175
45176pkg_failed=no
45177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45178$as_echo_n "checking for FREETYPE... " >&6; }
45179
45180if test -n "$FREETYPE_CFLAGS"; then
45181    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45182 elif test -n "$PKG_CONFIG"; then
45183    if test -n "$PKG_CONFIG" && \
45184    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45185  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45186  ac_status=$?
45187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45188  test $ac_status = 0; }; then
45189  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45190else
45191  pkg_failed=yes
45192fi
45193 else
45194    pkg_failed=untried
45195fi
45196if test -n "$FREETYPE_LIBS"; then
45197    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45198 elif test -n "$PKG_CONFIG"; then
45199    if test -n "$PKG_CONFIG" && \
45200    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45201  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45202  ac_status=$?
45203  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45204  test $ac_status = 0; }; then
45205  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45206else
45207  pkg_failed=yes
45208fi
45209 else
45210    pkg_failed=untried
45211fi
45212
45213
45214
45215if test $pkg_failed = yes; then
45216
45217if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45218        _pkg_short_errors_supported=yes
45219else
45220        _pkg_short_errors_supported=no
45221fi
45222        if test $_pkg_short_errors_supported = yes; then
45223	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45224        else
45225	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45226        fi
45227	# Put the nasty error message in config.log where it belongs
45228	echo "$FREETYPE_PKG_ERRORS" >&5
45229
45230	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45231$as_echo "no" >&6; }
45232                FOUND_FREETYPE=no
45233elif test $pkg_failed = untried; then
45234	FOUND_FREETYPE=no
45235else
45236	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45237	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45239$as_echo "yes" >&6; }
45240	FOUND_FREETYPE=yes
45241fi
45242            if test "x$FOUND_FREETYPE" = xyes; then
45243              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45244              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45245              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45246              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45247                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45248              fi
45249              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45250              if test "x$BUNDLE_FREETYPE" = xyes; then
45251                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45252$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45253                FOUND_FREETYPE=no
45254              else
45255                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45256$as_echo_n "checking for freetype... " >&6; }
45257                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45258$as_echo "yes (using pkg-config)" >&6; }
45259              fi
45260            fi
45261          fi
45262        fi
45263      fi
45264
45265      if test "x$FOUND_FREETYPE" != xyes; then
45266        # Check in well-known locations
45267        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45268          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45269
45270  windows_path="$FREETYPE_BASE_DIR"
45271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45272    unix_path=`$CYGPATH -u "$windows_path"`
45273    FREETYPE_BASE_DIR="$unix_path"
45274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45276    FREETYPE_BASE_DIR="$unix_path"
45277  fi
45278
45279
45280  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45281  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45282  METHOD="well-known location"
45283
45284  # Let's start with an optimistic view of the world :-)
45285  FOUND_FREETYPE=yes
45286
45287  # First look for the canonical freetype main include file ft2build.h.
45288  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45289    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45290    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45291    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45292      # Fail.
45293      FOUND_FREETYPE=no
45294    fi
45295  fi
45296
45297  if test "x$FOUND_FREETYPE" = xyes; then
45298    # Include file found, let's continue the sanity check.
45299    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45300$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45301
45302    # Reset to default value
45303    FREETYPE_BASE_NAME=freetype
45304    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45305    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45306      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45307          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45308        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45309        # for the .6 version explicitly.
45310        FREETYPE_BASE_NAME=freetype.6
45311        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45312        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45313$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45314      else
45315        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45316$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45317        FOUND_FREETYPE=no
45318      fi
45319    else
45320      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45321        # On Windows, we will need both .lib and .dll file.
45322        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45323          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45324$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45325          FOUND_FREETYPE=no
45326        fi
45327      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45328          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45329        # Found lib in isa dir, use that instead.
45330        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45331        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45332$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45333      fi
45334    fi
45335  fi
45336
45337  if test "x$FOUND_FREETYPE" = xyes; then
45338
45339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45340
45341  # Input might be given as Windows format, start by converting to
45342  # unix format.
45343  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45344  new_path=`$CYGPATH -u "$path"`
45345
45346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45349  # "foo.exe" is OK but "foo" is an error.
45350  #
45351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45352  # It is also a way to make sure we got the proper file name for the real test later on.
45353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45354  if test "x$test_shortpath" = x; then
45355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45357    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45358  fi
45359
45360  # Call helper function which possibly converts this using DOS-style short mode.
45361  # If so, the updated path is stored in $new_path.
45362
45363  input_path="$new_path"
45364  # Check if we need to convert this using DOS-style short mode. If the path
45365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45366  # take no chances and rewrite it.
45367  # Note: m4 eats our [], so we need to use [ and ] instead.
45368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45369  if test "x$has_forbidden_chars" != x; then
45370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45374      # Going to short mode and back again did indeed matter. Since short mode is
45375      # case insensitive, let's make it lowercase to improve readability.
45376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45377      # Now convert it back to Unix-stile (cygpath)
45378      input_path=`$CYGPATH -u "$shortmode_path"`
45379      new_path="$input_path"
45380    fi
45381  fi
45382
45383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45384  if test "x$test_cygdrive_prefix" = x; then
45385    # As a simple fix, exclude /usr/bin since it's not a real path.
45386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45388      # a path prefixed by /cygdrive for fixpath to work.
45389      new_path="$CYGWIN_ROOT_PATH$input_path"
45390    fi
45391  fi
45392
45393
45394  if test "x$path" != "x$new_path"; then
45395    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45398  fi
45399
45400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45401
45402  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45403  has_colon=`$ECHO $path | $GREP ^.:`
45404  new_path="$path"
45405  if test "x$has_colon" = x; then
45406    # Not in mixed or Windows style, start by that.
45407    new_path=`cmd //c echo $path`
45408  fi
45409
45410
45411  input_path="$new_path"
45412  # Check if we need to convert this using DOS-style short mode. If the path
45413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45414  # take no chances and rewrite it.
45415  # Note: m4 eats our [], so we need to use [ and ] instead.
45416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45417  if test "x$has_forbidden_chars" != x; then
45418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45420  fi
45421
45422
45423  windows_path="$new_path"
45424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45425    unix_path=`$CYGPATH -u "$windows_path"`
45426    new_path="$unix_path"
45427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45429    new_path="$unix_path"
45430  fi
45431
45432  if test "x$path" != "x$new_path"; then
45433    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45435$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45436  fi
45437
45438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45440
45441  else
45442    # We're on a unix platform. Hooray! :)
45443    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45444    has_space=`$ECHO "$path" | $GREP " "`
45445    if test "x$has_space" != x; then
45446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45448      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45449    fi
45450
45451    # Use eval to expand a potential ~
45452    eval path="$path"
45453    if test ! -f "$path" && test ! -d "$path"; then
45454      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45455    fi
45456
45457    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45458  fi
45459
45460
45461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45462
45463  # Input might be given as Windows format, start by converting to
45464  # unix format.
45465  path="$POTENTIAL_FREETYPE_LIB_PATH"
45466  new_path=`$CYGPATH -u "$path"`
45467
45468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45471  # "foo.exe" is OK but "foo" is an error.
45472  #
45473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45474  # It is also a way to make sure we got the proper file name for the real test later on.
45475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45476  if test "x$test_shortpath" = x; then
45477    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45478$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45479    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45480  fi
45481
45482  # Call helper function which possibly converts this using DOS-style short mode.
45483  # If so, the updated path is stored in $new_path.
45484
45485  input_path="$new_path"
45486  # Check if we need to convert this using DOS-style short mode. If the path
45487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45488  # take no chances and rewrite it.
45489  # Note: m4 eats our [], so we need to use [ and ] instead.
45490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45491  if test "x$has_forbidden_chars" != x; then
45492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45496      # Going to short mode and back again did indeed matter. Since short mode is
45497      # case insensitive, let's make it lowercase to improve readability.
45498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45499      # Now convert it back to Unix-stile (cygpath)
45500      input_path=`$CYGPATH -u "$shortmode_path"`
45501      new_path="$input_path"
45502    fi
45503  fi
45504
45505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45506  if test "x$test_cygdrive_prefix" = x; then
45507    # As a simple fix, exclude /usr/bin since it's not a real path.
45508    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45510      # a path prefixed by /cygdrive for fixpath to work.
45511      new_path="$CYGWIN_ROOT_PATH$input_path"
45512    fi
45513  fi
45514
45515
45516  if test "x$path" != "x$new_path"; then
45517    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45519$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45520  fi
45521
45522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45523
45524  path="$POTENTIAL_FREETYPE_LIB_PATH"
45525  has_colon=`$ECHO $path | $GREP ^.:`
45526  new_path="$path"
45527  if test "x$has_colon" = x; then
45528    # Not in mixed or Windows style, start by that.
45529    new_path=`cmd //c echo $path`
45530  fi
45531
45532
45533  input_path="$new_path"
45534  # Check if we need to convert this using DOS-style short mode. If the path
45535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45536  # take no chances and rewrite it.
45537  # Note: m4 eats our [], so we need to use [ and ] instead.
45538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45539  if test "x$has_forbidden_chars" != x; then
45540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45542  fi
45543
45544
45545  windows_path="$new_path"
45546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45547    unix_path=`$CYGPATH -u "$windows_path"`
45548    new_path="$unix_path"
45549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45551    new_path="$unix_path"
45552  fi
45553
45554  if test "x$path" != "x$new_path"; then
45555    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45557$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45558  fi
45559
45560  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45561  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45562
45563  else
45564    # We're on a unix platform. Hooray! :)
45565    path="$POTENTIAL_FREETYPE_LIB_PATH"
45566    has_space=`$ECHO "$path" | $GREP " "`
45567    if test "x$has_space" != x; then
45568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45569$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45570      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45571    fi
45572
45573    # Use eval to expand a potential ~
45574    eval path="$path"
45575    if test ! -f "$path" && test ! -d "$path"; then
45576      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45577    fi
45578
45579    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45580  fi
45581
45582
45583    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45585$as_echo_n "checking for freetype includes... " >&6; }
45586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45587$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45588    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45590$as_echo_n "checking for freetype libraries... " >&6; }
45591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45592$as_echo "$FREETYPE_LIB_PATH" >&6; }
45593  fi
45594
45595          if test "x$FOUND_FREETYPE" != xyes; then
45596            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45597
45598  windows_path="$FREETYPE_BASE_DIR"
45599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45600    unix_path=`$CYGPATH -u "$windows_path"`
45601    FREETYPE_BASE_DIR="$unix_path"
45602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45604    FREETYPE_BASE_DIR="$unix_path"
45605  fi
45606
45607
45608  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45609  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45610  METHOD="well-known location"
45611
45612  # Let's start with an optimistic view of the world :-)
45613  FOUND_FREETYPE=yes
45614
45615  # First look for the canonical freetype main include file ft2build.h.
45616  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45617    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45618    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45619    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45620      # Fail.
45621      FOUND_FREETYPE=no
45622    fi
45623  fi
45624
45625  if test "x$FOUND_FREETYPE" = xyes; then
45626    # Include file found, let's continue the sanity check.
45627    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45628$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45629
45630    # Reset to default value
45631    FREETYPE_BASE_NAME=freetype
45632    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45633    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45634      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45635          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45636        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45637        # for the .6 version explicitly.
45638        FREETYPE_BASE_NAME=freetype.6
45639        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45640        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45641$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45642      else
45643        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45644$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45645        FOUND_FREETYPE=no
45646      fi
45647    else
45648      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45649        # On Windows, we will need both .lib and .dll file.
45650        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45651          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45652$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45653          FOUND_FREETYPE=no
45654        fi
45655      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45656          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45657        # Found lib in isa dir, use that instead.
45658        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45659        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45660$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45661      fi
45662    fi
45663  fi
45664
45665  if test "x$FOUND_FREETYPE" = xyes; then
45666
45667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45668
45669  # Input might be given as Windows format, start by converting to
45670  # unix format.
45671  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45672  new_path=`$CYGPATH -u "$path"`
45673
45674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45677  # "foo.exe" is OK but "foo" is an error.
45678  #
45679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45680  # It is also a way to make sure we got the proper file name for the real test later on.
45681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45682  if test "x$test_shortpath" = x; then
45683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45685    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45686  fi
45687
45688  # Call helper function which possibly converts this using DOS-style short mode.
45689  # If so, the updated path is stored in $new_path.
45690
45691  input_path="$new_path"
45692  # Check if we need to convert this using DOS-style short mode. If the path
45693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45694  # take no chances and rewrite it.
45695  # Note: m4 eats our [], so we need to use [ and ] instead.
45696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45697  if test "x$has_forbidden_chars" != x; then
45698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45702      # Going to short mode and back again did indeed matter. Since short mode is
45703      # case insensitive, let's make it lowercase to improve readability.
45704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45705      # Now convert it back to Unix-stile (cygpath)
45706      input_path=`$CYGPATH -u "$shortmode_path"`
45707      new_path="$input_path"
45708    fi
45709  fi
45710
45711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45712  if test "x$test_cygdrive_prefix" = x; then
45713    # As a simple fix, exclude /usr/bin since it's not a real path.
45714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45716      # a path prefixed by /cygdrive for fixpath to work.
45717      new_path="$CYGWIN_ROOT_PATH$input_path"
45718    fi
45719  fi
45720
45721
45722  if test "x$path" != "x$new_path"; then
45723    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45726  fi
45727
45728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45729
45730  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45731  has_colon=`$ECHO $path | $GREP ^.:`
45732  new_path="$path"
45733  if test "x$has_colon" = x; then
45734    # Not in mixed or Windows style, start by that.
45735    new_path=`cmd //c echo $path`
45736  fi
45737
45738
45739  input_path="$new_path"
45740  # Check if we need to convert this using DOS-style short mode. If the path
45741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45742  # take no chances and rewrite it.
45743  # Note: m4 eats our [], so we need to use [ and ] instead.
45744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45745  if test "x$has_forbidden_chars" != x; then
45746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45748  fi
45749
45750
45751  windows_path="$new_path"
45752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45753    unix_path=`$CYGPATH -u "$windows_path"`
45754    new_path="$unix_path"
45755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45757    new_path="$unix_path"
45758  fi
45759
45760  if test "x$path" != "x$new_path"; then
45761    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45764  fi
45765
45766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45768
45769  else
45770    # We're on a unix platform. Hooray! :)
45771    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45772    has_space=`$ECHO "$path" | $GREP " "`
45773    if test "x$has_space" != x; then
45774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45776      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45777    fi
45778
45779    # Use eval to expand a potential ~
45780    eval path="$path"
45781    if test ! -f "$path" && test ! -d "$path"; then
45782      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45783    fi
45784
45785    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45786  fi
45787
45788
45789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45790
45791  # Input might be given as Windows format, start by converting to
45792  # unix format.
45793  path="$POTENTIAL_FREETYPE_LIB_PATH"
45794  new_path=`$CYGPATH -u "$path"`
45795
45796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45799  # "foo.exe" is OK but "foo" is an error.
45800  #
45801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45802  # It is also a way to make sure we got the proper file name for the real test later on.
45803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45804  if test "x$test_shortpath" = x; then
45805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45806$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45807    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45808  fi
45809
45810  # Call helper function which possibly converts this using DOS-style short mode.
45811  # If so, the updated path is stored in $new_path.
45812
45813  input_path="$new_path"
45814  # Check if we need to convert this using DOS-style short mode. If the path
45815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45816  # take no chances and rewrite it.
45817  # Note: m4 eats our [], so we need to use [ and ] instead.
45818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45819  if test "x$has_forbidden_chars" != x; then
45820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45824      # Going to short mode and back again did indeed matter. Since short mode is
45825      # case insensitive, let's make it lowercase to improve readability.
45826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45827      # Now convert it back to Unix-stile (cygpath)
45828      input_path=`$CYGPATH -u "$shortmode_path"`
45829      new_path="$input_path"
45830    fi
45831  fi
45832
45833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45834  if test "x$test_cygdrive_prefix" = x; then
45835    # As a simple fix, exclude /usr/bin since it's not a real path.
45836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45838      # a path prefixed by /cygdrive for fixpath to work.
45839      new_path="$CYGWIN_ROOT_PATH$input_path"
45840    fi
45841  fi
45842
45843
45844  if test "x$path" != "x$new_path"; then
45845    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45848  fi
45849
45850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45851
45852  path="$POTENTIAL_FREETYPE_LIB_PATH"
45853  has_colon=`$ECHO $path | $GREP ^.:`
45854  new_path="$path"
45855  if test "x$has_colon" = x; then
45856    # Not in mixed or Windows style, start by that.
45857    new_path=`cmd //c echo $path`
45858  fi
45859
45860
45861  input_path="$new_path"
45862  # Check if we need to convert this using DOS-style short mode. If the path
45863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45864  # take no chances and rewrite it.
45865  # Note: m4 eats our [], so we need to use [ and ] instead.
45866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45867  if test "x$has_forbidden_chars" != x; then
45868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45870  fi
45871
45872
45873  windows_path="$new_path"
45874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45875    unix_path=`$CYGPATH -u "$windows_path"`
45876    new_path="$unix_path"
45877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45879    new_path="$unix_path"
45880  fi
45881
45882  if test "x$path" != "x$new_path"; then
45883    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45886  fi
45887
45888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45890
45891  else
45892    # We're on a unix platform. Hooray! :)
45893    path="$POTENTIAL_FREETYPE_LIB_PATH"
45894    has_space=`$ECHO "$path" | $GREP " "`
45895    if test "x$has_space" != x; then
45896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45898      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45899    fi
45900
45901    # Use eval to expand a potential ~
45902    eval path="$path"
45903    if test ! -f "$path" && test ! -d "$path"; then
45904      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45905    fi
45906
45907    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45908  fi
45909
45910
45911    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45913$as_echo_n "checking for freetype includes... " >&6; }
45914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45915$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45916    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45918$as_echo_n "checking for freetype libraries... " >&6; }
45919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45920$as_echo "$FREETYPE_LIB_PATH" >&6; }
45921  fi
45922
45923          fi
45924        else
45925          FREETYPE_BASE_DIR="$SYSROOT/usr"
45926
45927  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45928  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45929  METHOD="well-known location"
45930
45931  # Let's start with an optimistic view of the world :-)
45932  FOUND_FREETYPE=yes
45933
45934  # First look for the canonical freetype main include file ft2build.h.
45935  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45936    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45937    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45938    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45939      # Fail.
45940      FOUND_FREETYPE=no
45941    fi
45942  fi
45943
45944  if test "x$FOUND_FREETYPE" = xyes; then
45945    # Include file found, let's continue the sanity check.
45946    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45947$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45948
45949    # Reset to default value
45950    FREETYPE_BASE_NAME=freetype
45951    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45952    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45953      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45954          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45955        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45956        # for the .6 version explicitly.
45957        FREETYPE_BASE_NAME=freetype.6
45958        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45959        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45960$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45961      else
45962        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45963$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45964        FOUND_FREETYPE=no
45965      fi
45966    else
45967      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45968        # On Windows, we will need both .lib and .dll file.
45969        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45970          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45971$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45972          FOUND_FREETYPE=no
45973        fi
45974      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45975          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45976        # Found lib in isa dir, use that instead.
45977        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45978        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45979$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45980      fi
45981    fi
45982  fi
45983
45984  if test "x$FOUND_FREETYPE" = xyes; then
45985
45986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45987
45988  # Input might be given as Windows format, start by converting to
45989  # unix format.
45990  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45991  new_path=`$CYGPATH -u "$path"`
45992
45993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45996  # "foo.exe" is OK but "foo" is an error.
45997  #
45998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45999  # It is also a way to make sure we got the proper file name for the real test later on.
46000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46001  if test "x$test_shortpath" = x; then
46002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46004    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46005  fi
46006
46007  # Call helper function which possibly converts this using DOS-style short mode.
46008  # If so, the updated path is stored in $new_path.
46009
46010  input_path="$new_path"
46011  # Check if we need to convert this using DOS-style short mode. If the path
46012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46013  # take no chances and rewrite it.
46014  # Note: m4 eats our [], so we need to use [ and ] instead.
46015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46016  if test "x$has_forbidden_chars" != x; then
46017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46021      # Going to short mode and back again did indeed matter. Since short mode is
46022      # case insensitive, let's make it lowercase to improve readability.
46023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46024      # Now convert it back to Unix-stile (cygpath)
46025      input_path=`$CYGPATH -u "$shortmode_path"`
46026      new_path="$input_path"
46027    fi
46028  fi
46029
46030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46031  if test "x$test_cygdrive_prefix" = x; then
46032    # As a simple fix, exclude /usr/bin since it's not a real path.
46033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46035      # a path prefixed by /cygdrive for fixpath to work.
46036      new_path="$CYGWIN_ROOT_PATH$input_path"
46037    fi
46038  fi
46039
46040
46041  if test "x$path" != "x$new_path"; then
46042    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46044$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46045  fi
46046
46047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46048
46049  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46050  has_colon=`$ECHO $path | $GREP ^.:`
46051  new_path="$path"
46052  if test "x$has_colon" = x; then
46053    # Not in mixed or Windows style, start by that.
46054    new_path=`cmd //c echo $path`
46055  fi
46056
46057
46058  input_path="$new_path"
46059  # Check if we need to convert this using DOS-style short mode. If the path
46060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46061  # take no chances and rewrite it.
46062  # Note: m4 eats our [], so we need to use [ and ] instead.
46063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46064  if test "x$has_forbidden_chars" != x; then
46065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46067  fi
46068
46069
46070  windows_path="$new_path"
46071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46072    unix_path=`$CYGPATH -u "$windows_path"`
46073    new_path="$unix_path"
46074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46076    new_path="$unix_path"
46077  fi
46078
46079  if test "x$path" != "x$new_path"; then
46080    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46083  fi
46084
46085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46087
46088  else
46089    # We're on a unix platform. Hooray! :)
46090    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46091    has_space=`$ECHO "$path" | $GREP " "`
46092    if test "x$has_space" != x; then
46093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46095      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46096    fi
46097
46098    # Use eval to expand a potential ~
46099    eval path="$path"
46100    if test ! -f "$path" && test ! -d "$path"; then
46101      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46102    fi
46103
46104    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46105  fi
46106
46107
46108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46109
46110  # Input might be given as Windows format, start by converting to
46111  # unix format.
46112  path="$POTENTIAL_FREETYPE_LIB_PATH"
46113  new_path=`$CYGPATH -u "$path"`
46114
46115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46118  # "foo.exe" is OK but "foo" is an error.
46119  #
46120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46121  # It is also a way to make sure we got the proper file name for the real test later on.
46122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46123  if test "x$test_shortpath" = x; then
46124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46125$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46126    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46127  fi
46128
46129  # Call helper function which possibly converts this using DOS-style short mode.
46130  # If so, the updated path is stored in $new_path.
46131
46132  input_path="$new_path"
46133  # Check if we need to convert this using DOS-style short mode. If the path
46134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46135  # take no chances and rewrite it.
46136  # Note: m4 eats our [], so we need to use [ and ] instead.
46137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46138  if test "x$has_forbidden_chars" != x; then
46139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46143      # Going to short mode and back again did indeed matter. Since short mode is
46144      # case insensitive, let's make it lowercase to improve readability.
46145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46146      # Now convert it back to Unix-stile (cygpath)
46147      input_path=`$CYGPATH -u "$shortmode_path"`
46148      new_path="$input_path"
46149    fi
46150  fi
46151
46152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46153  if test "x$test_cygdrive_prefix" = x; then
46154    # As a simple fix, exclude /usr/bin since it's not a real path.
46155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46157      # a path prefixed by /cygdrive for fixpath to work.
46158      new_path="$CYGWIN_ROOT_PATH$input_path"
46159    fi
46160  fi
46161
46162
46163  if test "x$path" != "x$new_path"; then
46164    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46166$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46167  fi
46168
46169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46170
46171  path="$POTENTIAL_FREETYPE_LIB_PATH"
46172  has_colon=`$ECHO $path | $GREP ^.:`
46173  new_path="$path"
46174  if test "x$has_colon" = x; then
46175    # Not in mixed or Windows style, start by that.
46176    new_path=`cmd //c echo $path`
46177  fi
46178
46179
46180  input_path="$new_path"
46181  # Check if we need to convert this using DOS-style short mode. If the path
46182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46183  # take no chances and rewrite it.
46184  # Note: m4 eats our [], so we need to use [ and ] instead.
46185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46186  if test "x$has_forbidden_chars" != x; then
46187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46188    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46189  fi
46190
46191
46192  windows_path="$new_path"
46193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46194    unix_path=`$CYGPATH -u "$windows_path"`
46195    new_path="$unix_path"
46196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46198    new_path="$unix_path"
46199  fi
46200
46201  if test "x$path" != "x$new_path"; then
46202    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46204$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46205  fi
46206
46207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46209
46210  else
46211    # We're on a unix platform. Hooray! :)
46212    path="$POTENTIAL_FREETYPE_LIB_PATH"
46213    has_space=`$ECHO "$path" | $GREP " "`
46214    if test "x$has_space" != x; then
46215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46216$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46217      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46218    fi
46219
46220    # Use eval to expand a potential ~
46221    eval path="$path"
46222    if test ! -f "$path" && test ! -d "$path"; then
46223      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46224    fi
46225
46226    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46227  fi
46228
46229
46230    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46232$as_echo_n "checking for freetype includes... " >&6; }
46233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46234$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46235    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46237$as_echo_n "checking for freetype libraries... " >&6; }
46238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46239$as_echo "$FREETYPE_LIB_PATH" >&6; }
46240  fi
46241
46242
46243          if test "x$FOUND_FREETYPE" != xyes; then
46244            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46245
46246  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46247  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46248  METHOD="well-known location"
46249
46250  # Let's start with an optimistic view of the world :-)
46251  FOUND_FREETYPE=yes
46252
46253  # First look for the canonical freetype main include file ft2build.h.
46254  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46255    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46256    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46257    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46258      # Fail.
46259      FOUND_FREETYPE=no
46260    fi
46261  fi
46262
46263  if test "x$FOUND_FREETYPE" = xyes; then
46264    # Include file found, let's continue the sanity check.
46265    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46266$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46267
46268    # Reset to default value
46269    FREETYPE_BASE_NAME=freetype
46270    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46271    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46272      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46273          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46274        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46275        # for the .6 version explicitly.
46276        FREETYPE_BASE_NAME=freetype.6
46277        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46278        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46279$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46280      else
46281        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46282$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46283        FOUND_FREETYPE=no
46284      fi
46285    else
46286      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46287        # On Windows, we will need both .lib and .dll file.
46288        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46289          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46290$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46291          FOUND_FREETYPE=no
46292        fi
46293      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46294          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46295        # Found lib in isa dir, use that instead.
46296        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46297        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46298$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46299      fi
46300    fi
46301  fi
46302
46303  if test "x$FOUND_FREETYPE" = xyes; then
46304
46305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46306
46307  # Input might be given as Windows format, start by converting to
46308  # unix format.
46309  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46310  new_path=`$CYGPATH -u "$path"`
46311
46312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46315  # "foo.exe" is OK but "foo" is an error.
46316  #
46317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46318  # It is also a way to make sure we got the proper file name for the real test later on.
46319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46320  if test "x$test_shortpath" = x; then
46321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46322$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46323    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46324  fi
46325
46326  # Call helper function which possibly converts this using DOS-style short mode.
46327  # If so, the updated path is stored in $new_path.
46328
46329  input_path="$new_path"
46330  # Check if we need to convert this using DOS-style short mode. If the path
46331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46332  # take no chances and rewrite it.
46333  # Note: m4 eats our [], so we need to use [ and ] instead.
46334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46335  if test "x$has_forbidden_chars" != x; then
46336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46340      # Going to short mode and back again did indeed matter. Since short mode is
46341      # case insensitive, let's make it lowercase to improve readability.
46342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46343      # Now convert it back to Unix-stile (cygpath)
46344      input_path=`$CYGPATH -u "$shortmode_path"`
46345      new_path="$input_path"
46346    fi
46347  fi
46348
46349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46350  if test "x$test_cygdrive_prefix" = x; then
46351    # As a simple fix, exclude /usr/bin since it's not a real path.
46352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46354      # a path prefixed by /cygdrive for fixpath to work.
46355      new_path="$CYGWIN_ROOT_PATH$input_path"
46356    fi
46357  fi
46358
46359
46360  if test "x$path" != "x$new_path"; then
46361    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46363$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46364  fi
46365
46366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46367
46368  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46369  has_colon=`$ECHO $path | $GREP ^.:`
46370  new_path="$path"
46371  if test "x$has_colon" = x; then
46372    # Not in mixed or Windows style, start by that.
46373    new_path=`cmd //c echo $path`
46374  fi
46375
46376
46377  input_path="$new_path"
46378  # Check if we need to convert this using DOS-style short mode. If the path
46379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46380  # take no chances and rewrite it.
46381  # Note: m4 eats our [], so we need to use [ and ] instead.
46382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46383  if test "x$has_forbidden_chars" != x; then
46384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46386  fi
46387
46388
46389  windows_path="$new_path"
46390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46391    unix_path=`$CYGPATH -u "$windows_path"`
46392    new_path="$unix_path"
46393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46395    new_path="$unix_path"
46396  fi
46397
46398  if test "x$path" != "x$new_path"; then
46399    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46401$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46402  fi
46403
46404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46406
46407  else
46408    # We're on a unix platform. Hooray! :)
46409    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46410    has_space=`$ECHO "$path" | $GREP " "`
46411    if test "x$has_space" != x; then
46412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46413$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46414      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46415    fi
46416
46417    # Use eval to expand a potential ~
46418    eval path="$path"
46419    if test ! -f "$path" && test ! -d "$path"; then
46420      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46421    fi
46422
46423    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46424  fi
46425
46426
46427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46428
46429  # Input might be given as Windows format, start by converting to
46430  # unix format.
46431  path="$POTENTIAL_FREETYPE_LIB_PATH"
46432  new_path=`$CYGPATH -u "$path"`
46433
46434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46437  # "foo.exe" is OK but "foo" is an error.
46438  #
46439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46440  # It is also a way to make sure we got the proper file name for the real test later on.
46441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46442  if test "x$test_shortpath" = x; then
46443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46445    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46446  fi
46447
46448  # Call helper function which possibly converts this using DOS-style short mode.
46449  # If so, the updated path is stored in $new_path.
46450
46451  input_path="$new_path"
46452  # Check if we need to convert this using DOS-style short mode. If the path
46453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46454  # take no chances and rewrite it.
46455  # Note: m4 eats our [], so we need to use [ and ] instead.
46456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46457  if test "x$has_forbidden_chars" != x; then
46458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46462      # Going to short mode and back again did indeed matter. Since short mode is
46463      # case insensitive, let's make it lowercase to improve readability.
46464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46465      # Now convert it back to Unix-stile (cygpath)
46466      input_path=`$CYGPATH -u "$shortmode_path"`
46467      new_path="$input_path"
46468    fi
46469  fi
46470
46471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46472  if test "x$test_cygdrive_prefix" = x; then
46473    # As a simple fix, exclude /usr/bin since it's not a real path.
46474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46476      # a path prefixed by /cygdrive for fixpath to work.
46477      new_path="$CYGWIN_ROOT_PATH$input_path"
46478    fi
46479  fi
46480
46481
46482  if test "x$path" != "x$new_path"; then
46483    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46485$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46486  fi
46487
46488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46489
46490  path="$POTENTIAL_FREETYPE_LIB_PATH"
46491  has_colon=`$ECHO $path | $GREP ^.:`
46492  new_path="$path"
46493  if test "x$has_colon" = x; then
46494    # Not in mixed or Windows style, start by that.
46495    new_path=`cmd //c echo $path`
46496  fi
46497
46498
46499  input_path="$new_path"
46500  # Check if we need to convert this using DOS-style short mode. If the path
46501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46502  # take no chances and rewrite it.
46503  # Note: m4 eats our [], so we need to use [ and ] instead.
46504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46505  if test "x$has_forbidden_chars" != x; then
46506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46508  fi
46509
46510
46511  windows_path="$new_path"
46512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46513    unix_path=`$CYGPATH -u "$windows_path"`
46514    new_path="$unix_path"
46515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46517    new_path="$unix_path"
46518  fi
46519
46520  if test "x$path" != "x$new_path"; then
46521    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46523$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46524  fi
46525
46526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46528
46529  else
46530    # We're on a unix platform. Hooray! :)
46531    path="$POTENTIAL_FREETYPE_LIB_PATH"
46532    has_space=`$ECHO "$path" | $GREP " "`
46533    if test "x$has_space" != x; then
46534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46536      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46537    fi
46538
46539    # Use eval to expand a potential ~
46540    eval path="$path"
46541    if test ! -f "$path" && test ! -d "$path"; then
46542      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46543    fi
46544
46545    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46546  fi
46547
46548
46549    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46551$as_echo_n "checking for freetype includes... " >&6; }
46552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46553$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46554    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46556$as_echo_n "checking for freetype libraries... " >&6; }
46557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46558$as_echo "$FREETYPE_LIB_PATH" >&6; }
46559  fi
46560
46561          fi
46562
46563          if test "x$FOUND_FREETYPE" != xyes; then
46564            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46565
46566  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46567  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46568  METHOD="well-known location"
46569
46570  # Let's start with an optimistic view of the world :-)
46571  FOUND_FREETYPE=yes
46572
46573  # First look for the canonical freetype main include file ft2build.h.
46574  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46575    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46576    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46577    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46578      # Fail.
46579      FOUND_FREETYPE=no
46580    fi
46581  fi
46582
46583  if test "x$FOUND_FREETYPE" = xyes; then
46584    # Include file found, let's continue the sanity check.
46585    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46586$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46587
46588    # Reset to default value
46589    FREETYPE_BASE_NAME=freetype
46590    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46591    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46592      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46593          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46594        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46595        # for the .6 version explicitly.
46596        FREETYPE_BASE_NAME=freetype.6
46597        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46598        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46599$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46600      else
46601        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46602$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46603        FOUND_FREETYPE=no
46604      fi
46605    else
46606      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46607        # On Windows, we will need both .lib and .dll file.
46608        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46609          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46610$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46611          FOUND_FREETYPE=no
46612        fi
46613      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46614          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46615        # Found lib in isa dir, use that instead.
46616        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46617        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46618$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46619      fi
46620    fi
46621  fi
46622
46623  if test "x$FOUND_FREETYPE" = xyes; then
46624
46625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46626
46627  # Input might be given as Windows format, start by converting to
46628  # unix format.
46629  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46630  new_path=`$CYGPATH -u "$path"`
46631
46632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46635  # "foo.exe" is OK but "foo" is an error.
46636  #
46637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46638  # It is also a way to make sure we got the proper file name for the real test later on.
46639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46640  if test "x$test_shortpath" = x; then
46641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46643    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46644  fi
46645
46646  # Call helper function which possibly converts this using DOS-style short mode.
46647  # If so, the updated path is stored in $new_path.
46648
46649  input_path="$new_path"
46650  # Check if we need to convert this using DOS-style short mode. If the path
46651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46652  # take no chances and rewrite it.
46653  # Note: m4 eats our [], so we need to use [ and ] instead.
46654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46655  if test "x$has_forbidden_chars" != x; then
46656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46660      # Going to short mode and back again did indeed matter. Since short mode is
46661      # case insensitive, let's make it lowercase to improve readability.
46662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46663      # Now convert it back to Unix-stile (cygpath)
46664      input_path=`$CYGPATH -u "$shortmode_path"`
46665      new_path="$input_path"
46666    fi
46667  fi
46668
46669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46670  if test "x$test_cygdrive_prefix" = x; then
46671    # As a simple fix, exclude /usr/bin since it's not a real path.
46672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46674      # a path prefixed by /cygdrive for fixpath to work.
46675      new_path="$CYGWIN_ROOT_PATH$input_path"
46676    fi
46677  fi
46678
46679
46680  if test "x$path" != "x$new_path"; then
46681    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46684  fi
46685
46686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46687
46688  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46689  has_colon=`$ECHO $path | $GREP ^.:`
46690  new_path="$path"
46691  if test "x$has_colon" = x; then
46692    # Not in mixed or Windows style, start by that.
46693    new_path=`cmd //c echo $path`
46694  fi
46695
46696
46697  input_path="$new_path"
46698  # Check if we need to convert this using DOS-style short mode. If the path
46699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46700  # take no chances and rewrite it.
46701  # Note: m4 eats our [], so we need to use [ and ] instead.
46702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46703  if test "x$has_forbidden_chars" != x; then
46704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46706  fi
46707
46708
46709  windows_path="$new_path"
46710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46711    unix_path=`$CYGPATH -u "$windows_path"`
46712    new_path="$unix_path"
46713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46715    new_path="$unix_path"
46716  fi
46717
46718  if test "x$path" != "x$new_path"; then
46719    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46722  fi
46723
46724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46726
46727  else
46728    # We're on a unix platform. Hooray! :)
46729    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46730    has_space=`$ECHO "$path" | $GREP " "`
46731    if test "x$has_space" != x; then
46732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46734      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46735    fi
46736
46737    # Use eval to expand a potential ~
46738    eval path="$path"
46739    if test ! -f "$path" && test ! -d "$path"; then
46740      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46741    fi
46742
46743    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46744  fi
46745
46746
46747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46748
46749  # Input might be given as Windows format, start by converting to
46750  # unix format.
46751  path="$POTENTIAL_FREETYPE_LIB_PATH"
46752  new_path=`$CYGPATH -u "$path"`
46753
46754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46757  # "foo.exe" is OK but "foo" is an error.
46758  #
46759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46760  # It is also a way to make sure we got the proper file name for the real test later on.
46761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46762  if test "x$test_shortpath" = x; then
46763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46765    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46766  fi
46767
46768  # Call helper function which possibly converts this using DOS-style short mode.
46769  # If so, the updated path is stored in $new_path.
46770
46771  input_path="$new_path"
46772  # Check if we need to convert this using DOS-style short mode. If the path
46773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46774  # take no chances and rewrite it.
46775  # Note: m4 eats our [], so we need to use [ and ] instead.
46776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46777  if test "x$has_forbidden_chars" != x; then
46778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46782      # Going to short mode and back again did indeed matter. Since short mode is
46783      # case insensitive, let's make it lowercase to improve readability.
46784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46785      # Now convert it back to Unix-stile (cygpath)
46786      input_path=`$CYGPATH -u "$shortmode_path"`
46787      new_path="$input_path"
46788    fi
46789  fi
46790
46791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46792  if test "x$test_cygdrive_prefix" = x; then
46793    # As a simple fix, exclude /usr/bin since it's not a real path.
46794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46796      # a path prefixed by /cygdrive for fixpath to work.
46797      new_path="$CYGWIN_ROOT_PATH$input_path"
46798    fi
46799  fi
46800
46801
46802  if test "x$path" != "x$new_path"; then
46803    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46805$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46806  fi
46807
46808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46809
46810  path="$POTENTIAL_FREETYPE_LIB_PATH"
46811  has_colon=`$ECHO $path | $GREP ^.:`
46812  new_path="$path"
46813  if test "x$has_colon" = x; then
46814    # Not in mixed or Windows style, start by that.
46815    new_path=`cmd //c echo $path`
46816  fi
46817
46818
46819  input_path="$new_path"
46820  # Check if we need to convert this using DOS-style short mode. If the path
46821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46822  # take no chances and rewrite it.
46823  # Note: m4 eats our [], so we need to use [ and ] instead.
46824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46825  if test "x$has_forbidden_chars" != x; then
46826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46828  fi
46829
46830
46831  windows_path="$new_path"
46832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46833    unix_path=`$CYGPATH -u "$windows_path"`
46834    new_path="$unix_path"
46835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46837    new_path="$unix_path"
46838  fi
46839
46840  if test "x$path" != "x$new_path"; then
46841    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46843$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46844  fi
46845
46846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46848
46849  else
46850    # We're on a unix platform. Hooray! :)
46851    path="$POTENTIAL_FREETYPE_LIB_PATH"
46852    has_space=`$ECHO "$path" | $GREP " "`
46853    if test "x$has_space" != x; then
46854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46855$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46856      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46857    fi
46858
46859    # Use eval to expand a potential ~
46860    eval path="$path"
46861    if test ! -f "$path" && test ! -d "$path"; then
46862      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46863    fi
46864
46865    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46866  fi
46867
46868
46869    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46871$as_echo_n "checking for freetype includes... " >&6; }
46872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46873$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46874    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46875    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46876$as_echo_n "checking for freetype libraries... " >&6; }
46877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46878$as_echo "$FREETYPE_LIB_PATH" >&6; }
46879  fi
46880
46881          fi
46882
46883          if test "x$FOUND_FREETYPE" != xyes; then
46884            FREETYPE_BASE_DIR="$SYSROOT/usr"
46885            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46886
46887  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46888  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46889  METHOD="well-known location"
46890
46891  # Let's start with an optimistic view of the world :-)
46892  FOUND_FREETYPE=yes
46893
46894  # First look for the canonical freetype main include file ft2build.h.
46895  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46896    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46897    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46898    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46899      # Fail.
46900      FOUND_FREETYPE=no
46901    fi
46902  fi
46903
46904  if test "x$FOUND_FREETYPE" = xyes; then
46905    # Include file found, let's continue the sanity check.
46906    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46907$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46908
46909    # Reset to default value
46910    FREETYPE_BASE_NAME=freetype
46911    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46912    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46913      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46914          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46915        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46916        # for the .6 version explicitly.
46917        FREETYPE_BASE_NAME=freetype.6
46918        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46919        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46920$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46921      else
46922        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46923$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46924        FOUND_FREETYPE=no
46925      fi
46926    else
46927      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46928        # On Windows, we will need both .lib and .dll file.
46929        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46930          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46931$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46932          FOUND_FREETYPE=no
46933        fi
46934      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46935          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46936        # Found lib in isa dir, use that instead.
46937        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46938        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46939$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46940      fi
46941    fi
46942  fi
46943
46944  if test "x$FOUND_FREETYPE" = xyes; then
46945
46946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46947
46948  # Input might be given as Windows format, start by converting to
46949  # unix format.
46950  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46951  new_path=`$CYGPATH -u "$path"`
46952
46953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46956  # "foo.exe" is OK but "foo" is an error.
46957  #
46958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46959  # It is also a way to make sure we got the proper file name for the real test later on.
46960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46961  if test "x$test_shortpath" = x; then
46962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46964    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46965  fi
46966
46967  # Call helper function which possibly converts this using DOS-style short mode.
46968  # If so, the updated path is stored in $new_path.
46969
46970  input_path="$new_path"
46971  # Check if we need to convert this using DOS-style short mode. If the path
46972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46973  # take no chances and rewrite it.
46974  # Note: m4 eats our [], so we need to use [ and ] instead.
46975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46976  if test "x$has_forbidden_chars" != x; then
46977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46981      # Going to short mode and back again did indeed matter. Since short mode is
46982      # case insensitive, let's make it lowercase to improve readability.
46983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46984      # Now convert it back to Unix-stile (cygpath)
46985      input_path=`$CYGPATH -u "$shortmode_path"`
46986      new_path="$input_path"
46987    fi
46988  fi
46989
46990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46991  if test "x$test_cygdrive_prefix" = x; then
46992    # As a simple fix, exclude /usr/bin since it's not a real path.
46993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46995      # a path prefixed by /cygdrive for fixpath to work.
46996      new_path="$CYGWIN_ROOT_PATH$input_path"
46997    fi
46998  fi
46999
47000
47001  if test "x$path" != "x$new_path"; then
47002    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47005  fi
47006
47007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47008
47009  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47010  has_colon=`$ECHO $path | $GREP ^.:`
47011  new_path="$path"
47012  if test "x$has_colon" = x; then
47013    # Not in mixed or Windows style, start by that.
47014    new_path=`cmd //c echo $path`
47015  fi
47016
47017
47018  input_path="$new_path"
47019  # Check if we need to convert this using DOS-style short mode. If the path
47020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47021  # take no chances and rewrite it.
47022  # Note: m4 eats our [], so we need to use [ and ] instead.
47023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47024  if test "x$has_forbidden_chars" != x; then
47025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47027  fi
47028
47029
47030  windows_path="$new_path"
47031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47032    unix_path=`$CYGPATH -u "$windows_path"`
47033    new_path="$unix_path"
47034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47036    new_path="$unix_path"
47037  fi
47038
47039  if test "x$path" != "x$new_path"; then
47040    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47042$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47043  fi
47044
47045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47047
47048  else
47049    # We're on a unix platform. Hooray! :)
47050    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47051    has_space=`$ECHO "$path" | $GREP " "`
47052    if test "x$has_space" != x; then
47053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47054$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47055      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47056    fi
47057
47058    # Use eval to expand a potential ~
47059    eval path="$path"
47060    if test ! -f "$path" && test ! -d "$path"; then
47061      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47062    fi
47063
47064    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47065  fi
47066
47067
47068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47069
47070  # Input might be given as Windows format, start by converting to
47071  # unix format.
47072  path="$POTENTIAL_FREETYPE_LIB_PATH"
47073  new_path=`$CYGPATH -u "$path"`
47074
47075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47078  # "foo.exe" is OK but "foo" is an error.
47079  #
47080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47081  # It is also a way to make sure we got the proper file name for the real test later on.
47082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47083  if test "x$test_shortpath" = x; then
47084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47085$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47086    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47087  fi
47088
47089  # Call helper function which possibly converts this using DOS-style short mode.
47090  # If so, the updated path is stored in $new_path.
47091
47092  input_path="$new_path"
47093  # Check if we need to convert this using DOS-style short mode. If the path
47094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47095  # take no chances and rewrite it.
47096  # Note: m4 eats our [], so we need to use [ and ] instead.
47097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47098  if test "x$has_forbidden_chars" != x; then
47099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47103      # Going to short mode and back again did indeed matter. Since short mode is
47104      # case insensitive, let's make it lowercase to improve readability.
47105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47106      # Now convert it back to Unix-stile (cygpath)
47107      input_path=`$CYGPATH -u "$shortmode_path"`
47108      new_path="$input_path"
47109    fi
47110  fi
47111
47112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47113  if test "x$test_cygdrive_prefix" = x; then
47114    # As a simple fix, exclude /usr/bin since it's not a real path.
47115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47117      # a path prefixed by /cygdrive for fixpath to work.
47118      new_path="$CYGWIN_ROOT_PATH$input_path"
47119    fi
47120  fi
47121
47122
47123  if test "x$path" != "x$new_path"; then
47124    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47126$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47127  fi
47128
47129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47130
47131  path="$POTENTIAL_FREETYPE_LIB_PATH"
47132  has_colon=`$ECHO $path | $GREP ^.:`
47133  new_path="$path"
47134  if test "x$has_colon" = x; then
47135    # Not in mixed or Windows style, start by that.
47136    new_path=`cmd //c echo $path`
47137  fi
47138
47139
47140  input_path="$new_path"
47141  # Check if we need to convert this using DOS-style short mode. If the path
47142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47143  # take no chances and rewrite it.
47144  # Note: m4 eats our [], so we need to use [ and ] instead.
47145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47146  if test "x$has_forbidden_chars" != x; then
47147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47149  fi
47150
47151
47152  windows_path="$new_path"
47153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47154    unix_path=`$CYGPATH -u "$windows_path"`
47155    new_path="$unix_path"
47156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47158    new_path="$unix_path"
47159  fi
47160
47161  if test "x$path" != "x$new_path"; then
47162    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47164$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47165  fi
47166
47167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47169
47170  else
47171    # We're on a unix platform. Hooray! :)
47172    path="$POTENTIAL_FREETYPE_LIB_PATH"
47173    has_space=`$ECHO "$path" | $GREP " "`
47174    if test "x$has_space" != x; then
47175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47176$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47177      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47178    fi
47179
47180    # Use eval to expand a potential ~
47181    eval path="$path"
47182    if test ! -f "$path" && test ! -d "$path"; then
47183      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47184    fi
47185
47186    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47187  fi
47188
47189
47190    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47192$as_echo_n "checking for freetype includes... " >&6; }
47193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47194$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47195    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47197$as_echo_n "checking for freetype libraries... " >&6; }
47198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47199$as_echo "$FREETYPE_LIB_PATH" >&6; }
47200  fi
47201
47202            else
47203
47204  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47205  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47206  METHOD="well-known location"
47207
47208  # Let's start with an optimistic view of the world :-)
47209  FOUND_FREETYPE=yes
47210
47211  # First look for the canonical freetype main include file ft2build.h.
47212  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47213    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47214    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47215    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47216      # Fail.
47217      FOUND_FREETYPE=no
47218    fi
47219  fi
47220
47221  if test "x$FOUND_FREETYPE" = xyes; then
47222    # Include file found, let's continue the sanity check.
47223    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47224$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47225
47226    # Reset to default value
47227    FREETYPE_BASE_NAME=freetype
47228    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47229    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47230      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47231          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47232        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47233        # for the .6 version explicitly.
47234        FREETYPE_BASE_NAME=freetype.6
47235        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47236        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47237$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47238      else
47239        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47240$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47241        FOUND_FREETYPE=no
47242      fi
47243    else
47244      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47245        # On Windows, we will need both .lib and .dll file.
47246        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47247          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47248$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47249          FOUND_FREETYPE=no
47250        fi
47251      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47252          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47253        # Found lib in isa dir, use that instead.
47254        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47255        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47256$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47257      fi
47258    fi
47259  fi
47260
47261  if test "x$FOUND_FREETYPE" = xyes; then
47262
47263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47264
47265  # Input might be given as Windows format, start by converting to
47266  # unix format.
47267  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47268  new_path=`$CYGPATH -u "$path"`
47269
47270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47273  # "foo.exe" is OK but "foo" is an error.
47274  #
47275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47276  # It is also a way to make sure we got the proper file name for the real test later on.
47277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47278  if test "x$test_shortpath" = x; then
47279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47280$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47281    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47282  fi
47283
47284  # Call helper function which possibly converts this using DOS-style short mode.
47285  # If so, the updated path is stored in $new_path.
47286
47287  input_path="$new_path"
47288  # Check if we need to convert this using DOS-style short mode. If the path
47289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47290  # take no chances and rewrite it.
47291  # Note: m4 eats our [], so we need to use [ and ] instead.
47292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47293  if test "x$has_forbidden_chars" != x; then
47294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47298      # Going to short mode and back again did indeed matter. Since short mode is
47299      # case insensitive, let's make it lowercase to improve readability.
47300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47301      # Now convert it back to Unix-stile (cygpath)
47302      input_path=`$CYGPATH -u "$shortmode_path"`
47303      new_path="$input_path"
47304    fi
47305  fi
47306
47307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47308  if test "x$test_cygdrive_prefix" = x; then
47309    # As a simple fix, exclude /usr/bin since it's not a real path.
47310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47312      # a path prefixed by /cygdrive for fixpath to work.
47313      new_path="$CYGWIN_ROOT_PATH$input_path"
47314    fi
47315  fi
47316
47317
47318  if test "x$path" != "x$new_path"; then
47319    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47321$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47322  fi
47323
47324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47325
47326  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47327  has_colon=`$ECHO $path | $GREP ^.:`
47328  new_path="$path"
47329  if test "x$has_colon" = x; then
47330    # Not in mixed or Windows style, start by that.
47331    new_path=`cmd //c echo $path`
47332  fi
47333
47334
47335  input_path="$new_path"
47336  # Check if we need to convert this using DOS-style short mode. If the path
47337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47338  # take no chances and rewrite it.
47339  # Note: m4 eats our [], so we need to use [ and ] instead.
47340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47341  if test "x$has_forbidden_chars" != x; then
47342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47344  fi
47345
47346
47347  windows_path="$new_path"
47348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47349    unix_path=`$CYGPATH -u "$windows_path"`
47350    new_path="$unix_path"
47351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47353    new_path="$unix_path"
47354  fi
47355
47356  if test "x$path" != "x$new_path"; then
47357    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47360  fi
47361
47362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47364
47365  else
47366    # We're on a unix platform. Hooray! :)
47367    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47368    has_space=`$ECHO "$path" | $GREP " "`
47369    if test "x$has_space" != x; then
47370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47371$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47372      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47373    fi
47374
47375    # Use eval to expand a potential ~
47376    eval path="$path"
47377    if test ! -f "$path" && test ! -d "$path"; then
47378      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47379    fi
47380
47381    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47382  fi
47383
47384
47385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47386
47387  # Input might be given as Windows format, start by converting to
47388  # unix format.
47389  path="$POTENTIAL_FREETYPE_LIB_PATH"
47390  new_path=`$CYGPATH -u "$path"`
47391
47392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47395  # "foo.exe" is OK but "foo" is an error.
47396  #
47397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47398  # It is also a way to make sure we got the proper file name for the real test later on.
47399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47400  if test "x$test_shortpath" = x; then
47401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47402$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47403    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47404  fi
47405
47406  # Call helper function which possibly converts this using DOS-style short mode.
47407  # If so, the updated path is stored in $new_path.
47408
47409  input_path="$new_path"
47410  # Check if we need to convert this using DOS-style short mode. If the path
47411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47412  # take no chances and rewrite it.
47413  # Note: m4 eats our [], so we need to use [ and ] instead.
47414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47415  if test "x$has_forbidden_chars" != x; then
47416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47420      # Going to short mode and back again did indeed matter. Since short mode is
47421      # case insensitive, let's make it lowercase to improve readability.
47422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47423      # Now convert it back to Unix-stile (cygpath)
47424      input_path=`$CYGPATH -u "$shortmode_path"`
47425      new_path="$input_path"
47426    fi
47427  fi
47428
47429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47430  if test "x$test_cygdrive_prefix" = x; then
47431    # As a simple fix, exclude /usr/bin since it's not a real path.
47432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47434      # a path prefixed by /cygdrive for fixpath to work.
47435      new_path="$CYGWIN_ROOT_PATH$input_path"
47436    fi
47437  fi
47438
47439
47440  if test "x$path" != "x$new_path"; then
47441    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47443$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47444  fi
47445
47446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47447
47448  path="$POTENTIAL_FREETYPE_LIB_PATH"
47449  has_colon=`$ECHO $path | $GREP ^.:`
47450  new_path="$path"
47451  if test "x$has_colon" = x; then
47452    # Not in mixed or Windows style, start by that.
47453    new_path=`cmd //c echo $path`
47454  fi
47455
47456
47457  input_path="$new_path"
47458  # Check if we need to convert this using DOS-style short mode. If the path
47459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47460  # take no chances and rewrite it.
47461  # Note: m4 eats our [], so we need to use [ and ] instead.
47462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47463  if test "x$has_forbidden_chars" != x; then
47464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47466  fi
47467
47468
47469  windows_path="$new_path"
47470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47471    unix_path=`$CYGPATH -u "$windows_path"`
47472    new_path="$unix_path"
47473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47475    new_path="$unix_path"
47476  fi
47477
47478  if test "x$path" != "x$new_path"; then
47479    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47481$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47482  fi
47483
47484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47486
47487  else
47488    # We're on a unix platform. Hooray! :)
47489    path="$POTENTIAL_FREETYPE_LIB_PATH"
47490    has_space=`$ECHO "$path" | $GREP " "`
47491    if test "x$has_space" != x; then
47492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47493$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47494      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47495    fi
47496
47497    # Use eval to expand a potential ~
47498    eval path="$path"
47499    if test ! -f "$path" && test ! -d "$path"; then
47500      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47501    fi
47502
47503    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47504  fi
47505
47506
47507    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47509$as_echo_n "checking for freetype includes... " >&6; }
47510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47511$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47512    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47514$as_echo_n "checking for freetype libraries... " >&6; }
47515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47516$as_echo "$FREETYPE_LIB_PATH" >&6; }
47517  fi
47518
47519              if test "x$FOUND_FREETYPE" != xyes; then
47520
47521  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47522  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47523  METHOD="well-known location"
47524
47525  # Let's start with an optimistic view of the world :-)
47526  FOUND_FREETYPE=yes
47527
47528  # First look for the canonical freetype main include file ft2build.h.
47529  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47530    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47531    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47532    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47533      # Fail.
47534      FOUND_FREETYPE=no
47535    fi
47536  fi
47537
47538  if test "x$FOUND_FREETYPE" = xyes; then
47539    # Include file found, let's continue the sanity check.
47540    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47541$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47542
47543    # Reset to default value
47544    FREETYPE_BASE_NAME=freetype
47545    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47546    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47547      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47548          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47549        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47550        # for the .6 version explicitly.
47551        FREETYPE_BASE_NAME=freetype.6
47552        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47553        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47554$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47555      else
47556        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47557$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47558        FOUND_FREETYPE=no
47559      fi
47560    else
47561      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47562        # On Windows, we will need both .lib and .dll file.
47563        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47564          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47565$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47566          FOUND_FREETYPE=no
47567        fi
47568      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47569          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47570        # Found lib in isa dir, use that instead.
47571        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47572        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47573$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47574      fi
47575    fi
47576  fi
47577
47578  if test "x$FOUND_FREETYPE" = xyes; then
47579
47580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47581
47582  # Input might be given as Windows format, start by converting to
47583  # unix format.
47584  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47585  new_path=`$CYGPATH -u "$path"`
47586
47587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47590  # "foo.exe" is OK but "foo" is an error.
47591  #
47592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47593  # It is also a way to make sure we got the proper file name for the real test later on.
47594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47595  if test "x$test_shortpath" = x; then
47596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47598    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47599  fi
47600
47601  # Call helper function which possibly converts this using DOS-style short mode.
47602  # If so, the updated path is stored in $new_path.
47603
47604  input_path="$new_path"
47605  # Check if we need to convert this using DOS-style short mode. If the path
47606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47607  # take no chances and rewrite it.
47608  # Note: m4 eats our [], so we need to use [ and ] instead.
47609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47610  if test "x$has_forbidden_chars" != x; then
47611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47615      # Going to short mode and back again did indeed matter. Since short mode is
47616      # case insensitive, let's make it lowercase to improve readability.
47617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47618      # Now convert it back to Unix-stile (cygpath)
47619      input_path=`$CYGPATH -u "$shortmode_path"`
47620      new_path="$input_path"
47621    fi
47622  fi
47623
47624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47625  if test "x$test_cygdrive_prefix" = x; then
47626    # As a simple fix, exclude /usr/bin since it's not a real path.
47627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47629      # a path prefixed by /cygdrive for fixpath to work.
47630      new_path="$CYGWIN_ROOT_PATH$input_path"
47631    fi
47632  fi
47633
47634
47635  if test "x$path" != "x$new_path"; then
47636    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47639  fi
47640
47641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47642
47643  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47644  has_colon=`$ECHO $path | $GREP ^.:`
47645  new_path="$path"
47646  if test "x$has_colon" = x; then
47647    # Not in mixed or Windows style, start by that.
47648    new_path=`cmd //c echo $path`
47649  fi
47650
47651
47652  input_path="$new_path"
47653  # Check if we need to convert this using DOS-style short mode. If the path
47654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47655  # take no chances and rewrite it.
47656  # Note: m4 eats our [], so we need to use [ and ] instead.
47657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47658  if test "x$has_forbidden_chars" != x; then
47659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47661  fi
47662
47663
47664  windows_path="$new_path"
47665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47666    unix_path=`$CYGPATH -u "$windows_path"`
47667    new_path="$unix_path"
47668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47670    new_path="$unix_path"
47671  fi
47672
47673  if test "x$path" != "x$new_path"; then
47674    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47676$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47677  fi
47678
47679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47681
47682  else
47683    # We're on a unix platform. Hooray! :)
47684    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47685    has_space=`$ECHO "$path" | $GREP " "`
47686    if test "x$has_space" != x; then
47687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47689      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47690    fi
47691
47692    # Use eval to expand a potential ~
47693    eval path="$path"
47694    if test ! -f "$path" && test ! -d "$path"; then
47695      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47696    fi
47697
47698    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47699  fi
47700
47701
47702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47703
47704  # Input might be given as Windows format, start by converting to
47705  # unix format.
47706  path="$POTENTIAL_FREETYPE_LIB_PATH"
47707  new_path=`$CYGPATH -u "$path"`
47708
47709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47712  # "foo.exe" is OK but "foo" is an error.
47713  #
47714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47715  # It is also a way to make sure we got the proper file name for the real test later on.
47716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47717  if test "x$test_shortpath" = x; then
47718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47719$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47720    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47721  fi
47722
47723  # Call helper function which possibly converts this using DOS-style short mode.
47724  # If so, the updated path is stored in $new_path.
47725
47726  input_path="$new_path"
47727  # Check if we need to convert this using DOS-style short mode. If the path
47728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47729  # take no chances and rewrite it.
47730  # Note: m4 eats our [], so we need to use [ and ] instead.
47731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47732  if test "x$has_forbidden_chars" != x; then
47733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47737      # Going to short mode and back again did indeed matter. Since short mode is
47738      # case insensitive, let's make it lowercase to improve readability.
47739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47740      # Now convert it back to Unix-stile (cygpath)
47741      input_path=`$CYGPATH -u "$shortmode_path"`
47742      new_path="$input_path"
47743    fi
47744  fi
47745
47746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47747  if test "x$test_cygdrive_prefix" = x; then
47748    # As a simple fix, exclude /usr/bin since it's not a real path.
47749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47751      # a path prefixed by /cygdrive for fixpath to work.
47752      new_path="$CYGWIN_ROOT_PATH$input_path"
47753    fi
47754  fi
47755
47756
47757  if test "x$path" != "x$new_path"; then
47758    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47760$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47761  fi
47762
47763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47764
47765  path="$POTENTIAL_FREETYPE_LIB_PATH"
47766  has_colon=`$ECHO $path | $GREP ^.:`
47767  new_path="$path"
47768  if test "x$has_colon" = x; then
47769    # Not in mixed or Windows style, start by that.
47770    new_path=`cmd //c echo $path`
47771  fi
47772
47773
47774  input_path="$new_path"
47775  # Check if we need to convert this using DOS-style short mode. If the path
47776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47777  # take no chances and rewrite it.
47778  # Note: m4 eats our [], so we need to use [ and ] instead.
47779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47780  if test "x$has_forbidden_chars" != x; then
47781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47783  fi
47784
47785
47786  windows_path="$new_path"
47787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47788    unix_path=`$CYGPATH -u "$windows_path"`
47789    new_path="$unix_path"
47790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47792    new_path="$unix_path"
47793  fi
47794
47795  if test "x$path" != "x$new_path"; then
47796    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47798$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47799  fi
47800
47801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47803
47804  else
47805    # We're on a unix platform. Hooray! :)
47806    path="$POTENTIAL_FREETYPE_LIB_PATH"
47807    has_space=`$ECHO "$path" | $GREP " "`
47808    if test "x$has_space" != x; then
47809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47811      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47812    fi
47813
47814    # Use eval to expand a potential ~
47815    eval path="$path"
47816    if test ! -f "$path" && test ! -d "$path"; then
47817      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47818    fi
47819
47820    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47821  fi
47822
47823
47824    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47826$as_echo_n "checking for freetype includes... " >&6; }
47827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47828$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47829    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47831$as_echo_n "checking for freetype libraries... " >&6; }
47832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47833$as_echo "$FREETYPE_LIB_PATH" >&6; }
47834  fi
47835
47836              fi
47837            fi
47838          fi
47839        fi
47840      fi # end check in well-known locations
47841
47842      if test "x$FOUND_FREETYPE" != xyes; then
47843
47844  # Print a helpful message on how to acquire the necessary build dependency.
47845  # freetype is the help tag: freetype, cups, pulse, alsa etc
47846  MISSING_DEPENDENCY=freetype
47847
47848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47849    cygwin_help $MISSING_DEPENDENCY
47850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47851    msys_help $MISSING_DEPENDENCY
47852  else
47853    PKGHANDLER_COMMAND=
47854
47855    case $PKGHANDLER in
47856      apt-get)
47857        apt_help     $MISSING_DEPENDENCY ;;
47858      yum)
47859        yum_help     $MISSING_DEPENDENCY ;;
47860      port)
47861        port_help    $MISSING_DEPENDENCY ;;
47862      pkgutil)
47863        pkgutil_help $MISSING_DEPENDENCY ;;
47864      pkgadd)
47865        pkgadd_help  $MISSING_DEPENDENCY ;;
47866    esac
47867
47868    if test "x$PKGHANDLER_COMMAND" != x; then
47869      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47870    fi
47871  fi
47872
47873        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47874      fi
47875    fi # end user specified settings
47876
47877    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47878    if test "x$FREETYPE_CFLAGS" = x; then
47879
47880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47881
47882  # Input might be given as Windows format, start by converting to
47883  # unix format.
47884  path="$FREETYPE_INCLUDE_PATH"
47885  new_path=`$CYGPATH -u "$path"`
47886
47887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47890  # "foo.exe" is OK but "foo" is an error.
47891  #
47892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47893  # It is also a way to make sure we got the proper file name for the real test later on.
47894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47895  if test "x$test_shortpath" = x; then
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47897$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47898    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47899  fi
47900
47901  # Call helper function which possibly converts this using DOS-style short mode.
47902  # If so, the updated path is stored in $new_path.
47903
47904  input_path="$new_path"
47905  # Check if we need to convert this using DOS-style short mode. If the path
47906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47907  # take no chances and rewrite it.
47908  # Note: m4 eats our [], so we need to use [ and ] instead.
47909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47910  if test "x$has_forbidden_chars" != x; then
47911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47915      # Going to short mode and back again did indeed matter. Since short mode is
47916      # case insensitive, let's make it lowercase to improve readability.
47917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47918      # Now convert it back to Unix-stile (cygpath)
47919      input_path=`$CYGPATH -u "$shortmode_path"`
47920      new_path="$input_path"
47921    fi
47922  fi
47923
47924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47925  if test "x$test_cygdrive_prefix" = x; then
47926    # As a simple fix, exclude /usr/bin since it's not a real path.
47927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47929      # a path prefixed by /cygdrive for fixpath to work.
47930      new_path="$CYGWIN_ROOT_PATH$input_path"
47931    fi
47932  fi
47933
47934
47935  if test "x$path" != "x$new_path"; then
47936    FREETYPE_INCLUDE_PATH="$new_path"
47937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47938$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47939  fi
47940
47941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47942
47943  path="$FREETYPE_INCLUDE_PATH"
47944  has_colon=`$ECHO $path | $GREP ^.:`
47945  new_path="$path"
47946  if test "x$has_colon" = x; then
47947    # Not in mixed or Windows style, start by that.
47948    new_path=`cmd //c echo $path`
47949  fi
47950
47951
47952  input_path="$new_path"
47953  # Check if we need to convert this using DOS-style short mode. If the path
47954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47955  # take no chances and rewrite it.
47956  # Note: m4 eats our [], so we need to use [ and ] instead.
47957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47958  if test "x$has_forbidden_chars" != x; then
47959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47961  fi
47962
47963
47964  windows_path="$new_path"
47965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47966    unix_path=`$CYGPATH -u "$windows_path"`
47967    new_path="$unix_path"
47968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47970    new_path="$unix_path"
47971  fi
47972
47973  if test "x$path" != "x$new_path"; then
47974    FREETYPE_INCLUDE_PATH="$new_path"
47975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47976$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47977  fi
47978
47979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47981
47982  else
47983    # We're on a unix platform. Hooray! :)
47984    path="$FREETYPE_INCLUDE_PATH"
47985    has_space=`$ECHO "$path" | $GREP " "`
47986    if test "x$has_space" != x; then
47987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47988$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47989      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47990    fi
47991
47992    # Use eval to expand a potential ~
47993    eval path="$path"
47994    if test ! -f "$path" && test ! -d "$path"; then
47995      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47996    fi
47997
47998    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47999  fi
48000
48001      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48002        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48003      else
48004        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48005      fi
48006    fi
48007
48008    if test "x$FREETYPE_LIBS" = x; then
48009
48010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48011
48012  # Input might be given as Windows format, start by converting to
48013  # unix format.
48014  path="$FREETYPE_LIB_PATH"
48015  new_path=`$CYGPATH -u "$path"`
48016
48017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48020  # "foo.exe" is OK but "foo" is an error.
48021  #
48022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48023  # It is also a way to make sure we got the proper file name for the real test later on.
48024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48025  if test "x$test_shortpath" = x; then
48026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48027$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48028    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48029  fi
48030
48031  # Call helper function which possibly converts this using DOS-style short mode.
48032  # If so, the updated path is stored in $new_path.
48033
48034  input_path="$new_path"
48035  # Check if we need to convert this using DOS-style short mode. If the path
48036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48037  # take no chances and rewrite it.
48038  # Note: m4 eats our [], so we need to use [ and ] instead.
48039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48040  if test "x$has_forbidden_chars" != x; then
48041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48045      # Going to short mode and back again did indeed matter. Since short mode is
48046      # case insensitive, let's make it lowercase to improve readability.
48047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48048      # Now convert it back to Unix-stile (cygpath)
48049      input_path=`$CYGPATH -u "$shortmode_path"`
48050      new_path="$input_path"
48051    fi
48052  fi
48053
48054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48055  if test "x$test_cygdrive_prefix" = x; then
48056    # As a simple fix, exclude /usr/bin since it's not a real path.
48057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48059      # a path prefixed by /cygdrive for fixpath to work.
48060      new_path="$CYGWIN_ROOT_PATH$input_path"
48061    fi
48062  fi
48063
48064
48065  if test "x$path" != "x$new_path"; then
48066    FREETYPE_LIB_PATH="$new_path"
48067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48068$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48069  fi
48070
48071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48072
48073  path="$FREETYPE_LIB_PATH"
48074  has_colon=`$ECHO $path | $GREP ^.:`
48075  new_path="$path"
48076  if test "x$has_colon" = x; then
48077    # Not in mixed or Windows style, start by that.
48078    new_path=`cmd //c echo $path`
48079  fi
48080
48081
48082  input_path="$new_path"
48083  # Check if we need to convert this using DOS-style short mode. If the path
48084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48085  # take no chances and rewrite it.
48086  # Note: m4 eats our [], so we need to use [ and ] instead.
48087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48088  if test "x$has_forbidden_chars" != x; then
48089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48091  fi
48092
48093
48094  windows_path="$new_path"
48095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48096    unix_path=`$CYGPATH -u "$windows_path"`
48097    new_path="$unix_path"
48098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48100    new_path="$unix_path"
48101  fi
48102
48103  if test "x$path" != "x$new_path"; then
48104    FREETYPE_LIB_PATH="$new_path"
48105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48106$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48107  fi
48108
48109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48111
48112  else
48113    # We're on a unix platform. Hooray! :)
48114    path="$FREETYPE_LIB_PATH"
48115    has_space=`$ECHO "$path" | $GREP " "`
48116    if test "x$has_space" != x; then
48117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48118$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48119      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48120    fi
48121
48122    # Use eval to expand a potential ~
48123    eval path="$path"
48124    if test ! -f "$path" && test ! -d "$path"; then
48125      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48126    fi
48127
48128    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48129  fi
48130
48131      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48132        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48133      else
48134        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48135      fi
48136    fi
48137
48138    # Try to compile it
48139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48140$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48141    ac_ext=cpp
48142ac_cpp='$CXXCPP $CPPFLAGS'
48143ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48144ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48145ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48146
48147    PREV_CXXCFLAGS="$CXXFLAGS"
48148    PREV_LIBS="$LIBS"
48149    PREV_CXX="$CXX"
48150    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48151    LIBS="$LIBS $FREETYPE_LIBS"
48152    CXX="$FIXPATH $CXX"
48153    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48154/* end confdefs.h.  */
48155
48156          #include<ft2build.h>
48157          #include FT_FREETYPE_H
48158          int main () {
48159            FT_Init_FreeType(NULL);
48160            return 0;
48161          }
48162
48163_ACEOF
48164if ac_fn_cxx_try_link "$LINENO"; then :
48165
48166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48167$as_echo "yes" >&6; }
48168
48169else
48170
48171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48172$as_echo "no" >&6; }
48173          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48174$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48175          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48176$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48177
48178
48179  # Print a helpful message on how to acquire the necessary build dependency.
48180  # freetype is the help tag: freetype, cups, pulse, alsa etc
48181  MISSING_DEPENDENCY=freetype
48182
48183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48184    cygwin_help $MISSING_DEPENDENCY
48185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48186    msys_help $MISSING_DEPENDENCY
48187  else
48188    PKGHANDLER_COMMAND=
48189
48190    case $PKGHANDLER in
48191      apt-get)
48192        apt_help     $MISSING_DEPENDENCY ;;
48193      yum)
48194        yum_help     $MISSING_DEPENDENCY ;;
48195      port)
48196        port_help    $MISSING_DEPENDENCY ;;
48197      pkgutil)
48198        pkgutil_help $MISSING_DEPENDENCY ;;
48199      pkgadd)
48200        pkgadd_help  $MISSING_DEPENDENCY ;;
48201    esac
48202
48203    if test "x$PKGHANDLER_COMMAND" != x; then
48204      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48205    fi
48206  fi
48207
48208
48209          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48210
48211
48212fi
48213rm -f core conftest.err conftest.$ac_objext \
48214    conftest$ac_exeext conftest.$ac_ext
48215    CXXCFLAGS="$PREV_CXXFLAGS"
48216    LIBS="$PREV_LIBS"
48217    CXX="$PREV_CXX"
48218    ac_ext=cpp
48219ac_cpp='$CXXCPP $CPPFLAGS'
48220ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48221ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48222ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48223
48224
48225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48226$as_echo_n "checking if we should bundle freetype... " >&6; }
48227    if test "x$BUNDLE_FREETYPE" = xyes; then
48228      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48229    fi
48230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48231$as_echo "$BUNDLE_FREETYPE" >&6; }
48232
48233  fi # end freetype needed
48234
48235
48236
48237
48238
48239
48240
48241  ###############################################################################
48242  #
48243  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48244  #
48245
48246# Check whether --with-alsa was given.
48247if test "${with_alsa+set}" = set; then :
48248  withval=$with_alsa;
48249fi
48250
48251
48252# Check whether --with-alsa-include was given.
48253if test "${with_alsa_include+set}" = set; then :
48254  withval=$with_alsa_include;
48255fi
48256
48257
48258# Check whether --with-alsa-lib was given.
48259if test "${with_alsa_lib+set}" = set; then :
48260  withval=$with_alsa_lib;
48261fi
48262
48263
48264  if test "x$ALSA_NOT_NEEDED" = xyes; then
48265    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48266      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48267$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48268    fi
48269    ALSA_CFLAGS=
48270    ALSA_LIBS=
48271  else
48272    ALSA_FOUND=no
48273
48274    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48275      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48276    fi
48277
48278    if test "x${with_alsa}" != x; then
48279      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48280      ALSA_CFLAGS="-I${with_alsa}/include"
48281      ALSA_FOUND=yes
48282    fi
48283    if test "x${with_alsa_include}" != x; then
48284      ALSA_CFLAGS="-I${with_alsa_include}"
48285      ALSA_FOUND=yes
48286    fi
48287    if test "x${with_alsa_lib}" != x; then
48288      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48289      ALSA_FOUND=yes
48290    fi
48291    if test "x$ALSA_FOUND" = xno; then
48292
48293
48294  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48295    # Source the builddeps file again, to make sure it uses the latest variables!
48296    . $builddepsfile
48297    # Look for a target and build machine specific resource!
48298    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48299    if test "x$resource" = x; then
48300      # Ok, lets instead look for a target specific resource
48301      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48302    fi
48303    if test "x$resource" = x; then
48304      # Ok, lets instead look for a build specific resource
48305      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48306    fi
48307    if test "x$resource" = x; then
48308      # Ok, lets instead look for a generic resource
48309      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48310      resource=${builddep_alsa}
48311    fi
48312    if test "x$resource" != x; then
48313      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48314$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48315      # If the resource in the builddeps.conf file is an existing directory,
48316      # for example /java/linux/cups
48317      if test -d ${resource}; then
48318        depdir=${resource}
48319      else
48320
48321  # alsa is for example mymodule
48322  # $resource is for example libs/general/libmymod_1_2_3.zip
48323  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48324  # $with_builddeps_dir is for example /localhome/builddeps
48325  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48326  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48327  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48328  filename=`basename $resource`
48329  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48330  filebase=${filename%%.*}
48331  extension=${filename#*.}
48332  installdir=$with_builddeps_dir/$filebase
48333  if test ! -f $installdir/$filename.unpacked; then
48334    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48335$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48336    if test ! -d $installdir; then
48337      mkdir -p $installdir
48338    fi
48339    if test ! -d $installdir; then
48340      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48341    fi
48342    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48343    touch $tmpfile
48344    if test ! -f $tmpfile; then
48345      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48346    fi
48347
48348  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48349  # $tmpfile is the local file name for the downloaded file.
48350  VALID_TOOL=no
48351  if test "x$BDEPS_FTP" = xwget; then
48352    VALID_TOOL=yes
48353    wget -O $tmpfile $with_builddeps_server/$resource
48354  fi
48355  if test "x$BDEPS_FTP" = xlftp; then
48356    VALID_TOOL=yes
48357    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48358  fi
48359  if test "x$BDEPS_FTP" = xftp; then
48360    VALID_TOOL=yes
48361    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48362    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48363    FTPUSERPWD=${FTPSERVER%%@*}
48364    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48365      FTPUSER=${userpwd%%:*}
48366      FTPPWD=${userpwd#*@}
48367      FTPSERVER=${FTPSERVER#*@}
48368    else
48369      FTPUSER=ftp
48370      FTPPWD=ftp
48371    fi
48372    # the "pass" command does not work on some
48373    # ftp clients (read ftp.exe) but if it works,
48374    # passive mode is better!
48375    ( \
48376        echo "user $FTPUSER $FTPPWD"        ; \
48377        echo "pass"                         ; \
48378        echo "bin"                          ; \
48379        echo "get $FTPPATH $tmpfile"              ; \
48380    ) | ftp -in $FTPSERVER
48381  fi
48382  if test "x$VALID_TOOL" != xyes; then
48383    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48384  fi
48385
48386    mv $tmpfile $installdir/$filename
48387    if test ! -s $installdir/$filename; then
48388      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48389    fi
48390    case "$extension" in
48391      zip)  echo "Unzipping $installdir/$filename..."
48392        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48393        ;;
48394      tar.gz) echo "Untaring $installdir/$filename..."
48395        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48396        ;;
48397      tgz) echo "Untaring $installdir/$filename..."
48398        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48399        ;;
48400      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48401        ;;
48402    esac
48403  fi
48404  if test -f $installdir/$filename.unpacked; then
48405    depdir=$installdir
48406  fi
48407
48408      fi
48409      # Source the builddeps file again, because in the previous command, the depdir
48410      # was updated to point at the current build dependency install directory.
48411      . $builddepsfile
48412      # Now extract variables from the builddeps.conf files.
48413      theroot=${builddep_alsa_ROOT}
48414      thecflags=${builddep_alsa_CFLAGS}
48415      thelibs=${builddep_alsa_LIBS}
48416      if test "x$depdir" = x; then
48417        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48418      fi
48419      ALSA=$depdir
48420      if test "x$theroot" != x; then
48421        ALSA="$theroot"
48422      fi
48423      if test "x$thecflags" != x; then
48424        ALSA_CFLAGS="$thecflags"
48425      fi
48426      if test "x$thelibs" != x; then
48427        ALSA_LIBS="$thelibs"
48428      fi
48429      ALSA_FOUND=yes
48430      else ALSA_FOUND=no
48431
48432    fi
48433    else ALSA_FOUND=no
48434
48435  fi
48436
48437    fi
48438    # Do not try pkg-config if we have a sysroot set.
48439    if test "x$SYSROOT" = x; then
48440      if test "x$ALSA_FOUND" = xno; then
48441
48442pkg_failed=no
48443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48444$as_echo_n "checking for ALSA... " >&6; }
48445
48446if test -n "$ALSA_CFLAGS"; then
48447    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48448 elif test -n "$PKG_CONFIG"; then
48449    if test -n "$PKG_CONFIG" && \
48450    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48451  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48452  ac_status=$?
48453  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48454  test $ac_status = 0; }; then
48455  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48456else
48457  pkg_failed=yes
48458fi
48459 else
48460    pkg_failed=untried
48461fi
48462if test -n "$ALSA_LIBS"; then
48463    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48464 elif test -n "$PKG_CONFIG"; then
48465    if test -n "$PKG_CONFIG" && \
48466    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48467  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48468  ac_status=$?
48469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48470  test $ac_status = 0; }; then
48471  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48472else
48473  pkg_failed=yes
48474fi
48475 else
48476    pkg_failed=untried
48477fi
48478
48479
48480
48481if test $pkg_failed = yes; then
48482
48483if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48484        _pkg_short_errors_supported=yes
48485else
48486        _pkg_short_errors_supported=no
48487fi
48488        if test $_pkg_short_errors_supported = yes; then
48489	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48490        else
48491	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48492        fi
48493	# Put the nasty error message in config.log where it belongs
48494	echo "$ALSA_PKG_ERRORS" >&5
48495
48496	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48497$as_echo "no" >&6; }
48498                ALSA_FOUND=no
48499elif test $pkg_failed = untried; then
48500	ALSA_FOUND=no
48501else
48502	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48503	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48505$as_echo "yes" >&6; }
48506	ALSA_FOUND=yes
48507fi
48508      fi
48509    fi
48510    if test "x$ALSA_FOUND" = xno; then
48511      for ac_header in alsa/asoundlib.h
48512do :
48513  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48514if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48515  cat >>confdefs.h <<_ACEOF
48516#define HAVE_ALSA_ASOUNDLIB_H 1
48517_ACEOF
48518
48519            ALSA_FOUND=yes
48520            ALSA_CFLAGS=-Iignoreme
48521            ALSA_LIBS=-lasound
48522            DEFAULT_ALSA=yes
48523
48524else
48525  ALSA_FOUND=no
48526fi
48527
48528done
48529
48530    fi
48531    if test "x$ALSA_FOUND" = xno; then
48532
48533  # Print a helpful message on how to acquire the necessary build dependency.
48534  # alsa is the help tag: freetype, cups, pulse, alsa etc
48535  MISSING_DEPENDENCY=alsa
48536
48537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48538    cygwin_help $MISSING_DEPENDENCY
48539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48540    msys_help $MISSING_DEPENDENCY
48541  else
48542    PKGHANDLER_COMMAND=
48543
48544    case $PKGHANDLER in
48545      apt-get)
48546        apt_help     $MISSING_DEPENDENCY ;;
48547      yum)
48548        yum_help     $MISSING_DEPENDENCY ;;
48549      port)
48550        port_help    $MISSING_DEPENDENCY ;;
48551      pkgutil)
48552        pkgutil_help $MISSING_DEPENDENCY ;;
48553      pkgadd)
48554        pkgadd_help  $MISSING_DEPENDENCY ;;
48555    esac
48556
48557    if test "x$PKGHANDLER_COMMAND" != x; then
48558      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48559    fi
48560  fi
48561
48562      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48563    fi
48564  fi
48565
48566
48567
48568
48569
48570
48571  ###############################################################################
48572  #
48573  # Check for the jpeg library
48574  #
48575
48576
48577# Check whether --with-libjpeg was given.
48578if test "${with_libjpeg+set}" = set; then :
48579  withval=$with_libjpeg;
48580fi
48581
48582
48583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48584$as_echo_n "checking for which libjpeg to use... " >&6; }
48585
48586  # default is bundled
48587  DEFAULT_LIBJPEG=bundled
48588
48589  #
48590  # if user didn't specify, use DEFAULT_LIBJPEG
48591  #
48592  if test "x${with_libjpeg}" = "x"; then
48593    with_libjpeg=${DEFAULT_LIBJPEG}
48594  fi
48595
48596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48597$as_echo "${with_libjpeg}" >&6; }
48598
48599  if test "x${with_libjpeg}" = "xbundled"; then
48600    USE_EXTERNAL_LIBJPEG=false
48601  elif test "x${with_libjpeg}" = "xsystem"; then
48602    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48603if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48604
48605else
48606   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48607fi
48608
48609
48610    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48611$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48612if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48613  $as_echo_n "(cached) " >&6
48614else
48615  ac_check_lib_save_LIBS=$LIBS
48616LIBS="-ljpeg  $LIBS"
48617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48618/* end confdefs.h.  */
48619
48620/* Override any GCC internal prototype to avoid an error.
48621   Use char because int might match the return type of a GCC
48622   builtin and then its argument prototype would still apply.  */
48623#ifdef __cplusplus
48624extern "C"
48625#endif
48626char jpeg_CreateDecompress ();
48627int
48628main ()
48629{
48630return jpeg_CreateDecompress ();
48631  ;
48632  return 0;
48633}
48634_ACEOF
48635if ac_fn_cxx_try_link "$LINENO"; then :
48636  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48637else
48638  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48639fi
48640rm -f core conftest.err conftest.$ac_objext \
48641    conftest$ac_exeext conftest.$ac_ext
48642LIBS=$ac_check_lib_save_LIBS
48643fi
48644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48645$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48646if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48647  cat >>confdefs.h <<_ACEOF
48648#define HAVE_LIBJPEG 1
48649_ACEOF
48650
48651  LIBS="-ljpeg $LIBS"
48652
48653else
48654   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48655fi
48656
48657
48658    USE_EXTERNAL_LIBJPEG=true
48659  else
48660    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48661  fi
48662
48663
48664
48665  ###############################################################################
48666  #
48667  # Check for the gif library
48668  #
48669
48670
48671# Check whether --with-giflib was given.
48672if test "${with_giflib+set}" = set; then :
48673  withval=$with_giflib;
48674fi
48675
48676
48677
48678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48679$as_echo_n "checking for which giflib to use... " >&6; }
48680
48681  # default is bundled
48682  DEFAULT_GIFLIB=bundled
48683
48684  #
48685  # if user didn't specify, use DEFAULT_GIFLIB
48686  #
48687  if test "x${with_giflib}" = "x"; then
48688    with_giflib=${DEFAULT_GIFLIB}
48689  fi
48690
48691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48692$as_echo "${with_giflib}" >&6; }
48693
48694  if test "x${with_giflib}" = "xbundled"; then
48695    USE_EXTERNAL_LIBGIF=false
48696  elif test "x${with_giflib}" = "xsystem"; then
48697    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48698if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48699
48700else
48701   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48702fi
48703
48704
48705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48706$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48707if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48708  $as_echo_n "(cached) " >&6
48709else
48710  ac_check_lib_save_LIBS=$LIBS
48711LIBS="-lgif  $LIBS"
48712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48713/* end confdefs.h.  */
48714
48715/* Override any GCC internal prototype to avoid an error.
48716   Use char because int might match the return type of a GCC
48717   builtin and then its argument prototype would still apply.  */
48718#ifdef __cplusplus
48719extern "C"
48720#endif
48721char DGifGetCode ();
48722int
48723main ()
48724{
48725return DGifGetCode ();
48726  ;
48727  return 0;
48728}
48729_ACEOF
48730if ac_fn_cxx_try_link "$LINENO"; then :
48731  ac_cv_lib_gif_DGifGetCode=yes
48732else
48733  ac_cv_lib_gif_DGifGetCode=no
48734fi
48735rm -f core conftest.err conftest.$ac_objext \
48736    conftest$ac_exeext conftest.$ac_ext
48737LIBS=$ac_check_lib_save_LIBS
48738fi
48739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48740$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48741if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48742  cat >>confdefs.h <<_ACEOF
48743#define HAVE_LIBGIF 1
48744_ACEOF
48745
48746  LIBS="-lgif $LIBS"
48747
48748else
48749   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48750fi
48751
48752
48753    USE_EXTERNAL_LIBGIF=true
48754  else
48755    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48756  fi
48757
48758
48759  ###############################################################################
48760  #
48761  # Check for the lcms2 library
48762  #
48763
48764
48765# Check whether --with-lcms was given.
48766if test "${with_lcms+set}" = set; then :
48767  withval=$with_lcms;
48768fi
48769
48770
48771  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48772$as_echo_n "checking for which lcms to use... " >&6; }
48773
48774  DEFAULT_LCMS=bundled
48775
48776  #
48777  # If user didn't specify, use DEFAULT_LCMS
48778  #
48779  if test "x${with_lcms}" = "x"; then
48780      with_lcms=${DEFAULT_LCMS}
48781  fi
48782
48783  if test "x${with_lcms}" = "xbundled"; then
48784    USE_EXTERNAL_LCMS=false
48785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48786$as_echo "bundled" >&6; }
48787  elif test "x${with_lcms}" = "xsystem"; then
48788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48789$as_echo "system" >&6; }
48790
48791pkg_failed=no
48792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48793$as_echo_n "checking for LCMS... " >&6; }
48794
48795if test -n "$LCMS_CFLAGS"; then
48796    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48797 elif test -n "$PKG_CONFIG"; then
48798    if test -n "$PKG_CONFIG" && \
48799    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48800  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48801  ac_status=$?
48802  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48803  test $ac_status = 0; }; then
48804  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48805else
48806  pkg_failed=yes
48807fi
48808 else
48809    pkg_failed=untried
48810fi
48811if test -n "$LCMS_LIBS"; then
48812    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48813 elif test -n "$PKG_CONFIG"; then
48814    if test -n "$PKG_CONFIG" && \
48815    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48816  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48817  ac_status=$?
48818  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48819  test $ac_status = 0; }; then
48820  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48821else
48822  pkg_failed=yes
48823fi
48824 else
48825    pkg_failed=untried
48826fi
48827
48828
48829
48830if test $pkg_failed = yes; then
48831
48832if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48833        _pkg_short_errors_supported=yes
48834else
48835        _pkg_short_errors_supported=no
48836fi
48837        if test $_pkg_short_errors_supported = yes; then
48838	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48839        else
48840	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48841        fi
48842	# Put the nasty error message in config.log where it belongs
48843	echo "$LCMS_PKG_ERRORS" >&5
48844
48845	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48846$as_echo "no" >&6; }
48847                LCMS_FOUND=no
48848elif test $pkg_failed = untried; then
48849	LCMS_FOUND=no
48850else
48851	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48852	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48853        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48854$as_echo "yes" >&6; }
48855	LCMS_FOUND=yes
48856fi
48857    if test "x${LCMS_FOUND}" = "xyes"; then
48858      USE_EXTERNAL_LCMS=true
48859    else
48860      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48861    fi
48862  else
48863    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48864  fi
48865
48866
48867
48868  ###############################################################################
48869  #
48870  # Check for the png library
48871  #
48872
48873
48874# Check whether --with-libpng was given.
48875if test "${with_libpng+set}" = set; then :
48876  withval=$with_libpng;
48877fi
48878
48879
48880
48881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48882$as_echo_n "checking for which libpng to use... " >&6; }
48883
48884  # default is bundled
48885  DEFAULT_LIBPNG=bundled
48886
48887  #
48888  # if user didn't specify, use DEFAULT_LIBPNG
48889  #
48890  if test "x${with_libpng}" = "x"; then
48891      with_libpng=${DEFAULT_LIBPNG}
48892  fi
48893
48894  if test "x${with_libpng}" = "xbundled"; then
48895      USE_EXTERNAL_LIBPNG=false
48896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48897$as_echo "bundled" >&6; }
48898  elif test "x${with_libpng}" = "xsystem"; then
48899
48900pkg_failed=no
48901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48902$as_echo_n "checking for PNG... " >&6; }
48903
48904if test -n "$PNG_CFLAGS"; then
48905    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48906 elif test -n "$PKG_CONFIG"; then
48907    if test -n "$PKG_CONFIG" && \
48908    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48909  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48910  ac_status=$?
48911  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48912  test $ac_status = 0; }; then
48913  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48914else
48915  pkg_failed=yes
48916fi
48917 else
48918    pkg_failed=untried
48919fi
48920if test -n "$PNG_LIBS"; then
48921    pkg_cv_PNG_LIBS="$PNG_LIBS"
48922 elif test -n "$PKG_CONFIG"; then
48923    if test -n "$PKG_CONFIG" && \
48924    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48925  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48926  ac_status=$?
48927  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48928  test $ac_status = 0; }; then
48929  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48930else
48931  pkg_failed=yes
48932fi
48933 else
48934    pkg_failed=untried
48935fi
48936
48937
48938
48939if test $pkg_failed = yes; then
48940
48941if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48942        _pkg_short_errors_supported=yes
48943else
48944        _pkg_short_errors_supported=no
48945fi
48946        if test $_pkg_short_errors_supported = yes; then
48947	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48948        else
48949	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48950        fi
48951	# Put the nasty error message in config.log where it belongs
48952	echo "$PNG_PKG_ERRORS" >&5
48953
48954	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48955$as_echo "no" >&6; }
48956                 LIBPNG_FOUND=no
48957elif test $pkg_failed = untried; then
48958	 LIBPNG_FOUND=no
48959else
48960	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48961	PNG_LIBS=$pkg_cv_PNG_LIBS
48962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48963$as_echo "yes" >&6; }
48964	 LIBPNG_FOUND=yes
48965fi
48966      if test "x${LIBPNG_FOUND}" = "xyes"; then
48967          USE_EXTERNAL_LIBPNG=true
48968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48969$as_echo "system" >&6; }
48970      else
48971          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48972$as_echo "system not found" >&6; }
48973          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48974      fi
48975  else
48976      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48977  fi
48978
48979
48980  ###############################################################################
48981  #
48982  # Check for the zlib library
48983  #
48984
48985
48986# Check whether --with-zlib was given.
48987if test "${with_zlib+set}" = set; then :
48988  withval=$with_zlib;
48989fi
48990
48991
48992  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48993$as_echo_n "checking for compress in -lz... " >&6; }
48994if ${ac_cv_lib_z_compress+:} false; then :
48995  $as_echo_n "(cached) " >&6
48996else
48997  ac_check_lib_save_LIBS=$LIBS
48998LIBS="-lz  $LIBS"
48999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49000/* end confdefs.h.  */
49001
49002/* Override any GCC internal prototype to avoid an error.
49003   Use char because int might match the return type of a GCC
49004   builtin and then its argument prototype would still apply.  */
49005#ifdef __cplusplus
49006extern "C"
49007#endif
49008char compress ();
49009int
49010main ()
49011{
49012return compress ();
49013  ;
49014  return 0;
49015}
49016_ACEOF
49017if ac_fn_cxx_try_link "$LINENO"; then :
49018  ac_cv_lib_z_compress=yes
49019else
49020  ac_cv_lib_z_compress=no
49021fi
49022rm -f core conftest.err conftest.$ac_objext \
49023    conftest$ac_exeext conftest.$ac_ext
49024LIBS=$ac_check_lib_save_LIBS
49025fi
49026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49027$as_echo "$ac_cv_lib_z_compress" >&6; }
49028if test "x$ac_cv_lib_z_compress" = xyes; then :
49029   ZLIB_FOUND=yes
49030else
49031   ZLIB_FOUND=no
49032fi
49033
49034
49035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49036$as_echo_n "checking for which zlib to use... " >&6; }
49037
49038  DEFAULT_ZLIB=bundled
49039  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49040    #
49041    # On macosx default is system...on others default is
49042    #
49043    DEFAULT_ZLIB=system
49044  fi
49045
49046  if test "x${ZLIB_FOUND}" != "xyes"; then
49047    #
49048    # If we don't find any system...set default to bundled
49049    #
49050    DEFAULT_ZLIB=bundled
49051  fi
49052
49053  #
49054  # If user didn't specify, use DEFAULT_ZLIB
49055  #
49056  if test "x${with_zlib}" = "x"; then
49057    with_zlib=${DEFAULT_ZLIB}
49058  fi
49059
49060  if test "x${with_zlib}" = "xbundled"; then
49061    USE_EXTERNAL_LIBZ=false
49062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49063$as_echo "bundled" >&6; }
49064  elif test "x${with_zlib}" = "xsystem"; then
49065    if test "x${ZLIB_FOUND}" = "xyes"; then
49066      USE_EXTERNAL_LIBZ=true
49067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49068$as_echo "system" >&6; }
49069    else
49070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49071$as_echo "system not found" >&6; }
49072      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49073    fi
49074  else
49075    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49076  fi
49077
49078
49079
49080  ###############################################################################
49081  LIBZIP_CAN_USE_MMAP=true
49082
49083
49084
49085  ###############################################################################
49086  #
49087  # Check if altzone exists in time.h
49088  #
49089
49090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49091/* end confdefs.h.  */
49092#include <time.h>
49093int
49094main ()
49095{
49096return (int)altzone;
49097  ;
49098  return 0;
49099}
49100_ACEOF
49101if ac_fn_cxx_try_link "$LINENO"; then :
49102  has_altzone=yes
49103else
49104  has_altzone=no
49105fi
49106rm -f core conftest.err conftest.$ac_objext \
49107    conftest$ac_exeext conftest.$ac_ext
49108  if test "x$has_altzone" = xyes; then
49109
49110$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49111
49112  fi
49113
49114  ###############################################################################
49115  #
49116  # Check the maths library
49117  #
49118
49119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49120$as_echo_n "checking for cos in -lm... " >&6; }
49121if ${ac_cv_lib_m_cos+:} false; then :
49122  $as_echo_n "(cached) " >&6
49123else
49124  ac_check_lib_save_LIBS=$LIBS
49125LIBS="-lm  $LIBS"
49126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49127/* end confdefs.h.  */
49128
49129/* Override any GCC internal prototype to avoid an error.
49130   Use char because int might match the return type of a GCC
49131   builtin and then its argument prototype would still apply.  */
49132#ifdef __cplusplus
49133extern "C"
49134#endif
49135char cos ();
49136int
49137main ()
49138{
49139return cos ();
49140  ;
49141  return 0;
49142}
49143_ACEOF
49144if ac_fn_cxx_try_link "$LINENO"; then :
49145  ac_cv_lib_m_cos=yes
49146else
49147  ac_cv_lib_m_cos=no
49148fi
49149rm -f core conftest.err conftest.$ac_objext \
49150    conftest$ac_exeext conftest.$ac_ext
49151LIBS=$ac_check_lib_save_LIBS
49152fi
49153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49154$as_echo "$ac_cv_lib_m_cos" >&6; }
49155if test "x$ac_cv_lib_m_cos" = xyes; then :
49156  cat >>confdefs.h <<_ACEOF
49157#define HAVE_LIBM 1
49158_ACEOF
49159
49160  LIBS="-lm $LIBS"
49161
49162else
49163
49164        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49165$as_echo "$as_me: Maths library was not found" >&6;}
49166
49167
49168fi
49169
49170
49171
49172  ###############################################################################
49173  #
49174  # Check for libdl.so
49175
49176  save_LIBS="$LIBS"
49177  LIBS=""
49178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49179$as_echo_n "checking for dlopen in -ldl... " >&6; }
49180if ${ac_cv_lib_dl_dlopen+:} false; then :
49181  $as_echo_n "(cached) " >&6
49182else
49183  ac_check_lib_save_LIBS=$LIBS
49184LIBS="-ldl  $LIBS"
49185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49186/* end confdefs.h.  */
49187
49188/* Override any GCC internal prototype to avoid an error.
49189   Use char because int might match the return type of a GCC
49190   builtin and then its argument prototype would still apply.  */
49191#ifdef __cplusplus
49192extern "C"
49193#endif
49194char dlopen ();
49195int
49196main ()
49197{
49198return dlopen ();
49199  ;
49200  return 0;
49201}
49202_ACEOF
49203if ac_fn_cxx_try_link "$LINENO"; then :
49204  ac_cv_lib_dl_dlopen=yes
49205else
49206  ac_cv_lib_dl_dlopen=no
49207fi
49208rm -f core conftest.err conftest.$ac_objext \
49209    conftest$ac_exeext conftest.$ac_ext
49210LIBS=$ac_check_lib_save_LIBS
49211fi
49212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49213$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49214if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49215  cat >>confdefs.h <<_ACEOF
49216#define HAVE_LIBDL 1
49217_ACEOF
49218
49219  LIBS="-ldl $LIBS"
49220
49221fi
49222
49223  LIBDL="$LIBS"
49224
49225  LIBS="$save_LIBS"
49226
49227
49228  ###############################################################################
49229  #
49230  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49231  # dynamic build is configured on command line.
49232  #
49233
49234# Check whether --with-stdc++lib was given.
49235if test "${with_stdc__lib+set}" = set; then :
49236  withval=$with_stdc__lib;
49237        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49238                && test "x$with_stdc__lib" != xdefault; then
49239          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49240        fi
49241
49242else
49243  with_stdc__lib=default
49244
49245fi
49246
49247
49248  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49249    # Test if -lstdc++ works.
49250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49251$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49252    ac_ext=cpp
49253ac_cpp='$CXXCPP $CPPFLAGS'
49254ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49255ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49256ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49257
49258    OLD_CXXFLAGS="$CXXFLAGS"
49259    CXXFLAGS="$CXXFLAGS -lstdc++"
49260    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49261/* end confdefs.h.  */
49262
49263int
49264main ()
49265{
49266return 0;
49267  ;
49268  return 0;
49269}
49270_ACEOF
49271if ac_fn_cxx_try_link "$LINENO"; then :
49272  has_dynamic_libstdcxx=yes
49273else
49274  has_dynamic_libstdcxx=no
49275fi
49276rm -f core conftest.err conftest.$ac_objext \
49277    conftest$ac_exeext conftest.$ac_ext
49278    CXXFLAGS="$OLD_CXXFLAGS"
49279    ac_ext=cpp
49280ac_cpp='$CXXCPP $CPPFLAGS'
49281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49284
49285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49286$as_echo "$has_dynamic_libstdcxx" >&6; }
49287
49288    # Test if stdc++ can be linked statically.
49289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49290$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49291    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49292    ac_ext=cpp
49293ac_cpp='$CXXCPP $CPPFLAGS'
49294ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49295ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49296ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49297
49298    OLD_LIBS="$LIBS"
49299    OLD_CXX="$CXX"
49300    LIBS="$STATIC_STDCXX_FLAGS"
49301    CXX="$CC"
49302    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49303/* end confdefs.h.  */
49304
49305int
49306main ()
49307{
49308return 0;
49309  ;
49310  return 0;
49311}
49312_ACEOF
49313if ac_fn_cxx_try_link "$LINENO"; then :
49314  has_static_libstdcxx=yes
49315else
49316  has_static_libstdcxx=no
49317fi
49318rm -f core conftest.err conftest.$ac_objext \
49319    conftest$ac_exeext conftest.$ac_ext
49320    LIBS="$OLD_LIBS"
49321    CXX="$OLD_CXX"
49322    ac_ext=cpp
49323ac_cpp='$CXXCPP $CPPFLAGS'
49324ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49325ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49326ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49327
49328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49329$as_echo "$has_static_libstdcxx" >&6; }
49330
49331    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49332      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49333    fi
49334
49335    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49336      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49337    fi
49338
49339    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49340      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49341    fi
49342
49343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49344$as_echo_n "checking how to link with libstdc++... " >&6; }
49345    # If dynamic was requested, it's available since it would fail above otherwise.
49346    # If dynamic wasn't requested, go with static unless it isn't available.
49347    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49348      LIBCXX="$LIBCXX -lstdc++"
49349      LDCXX="$CXX"
49350      STATIC_CXX_SETTING="STATIC_CXX=false"
49351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49352$as_echo "dynamic" >&6; }
49353    else
49354      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49355      LDCXX="$CC"
49356      STATIC_CXX_SETTING="STATIC_CXX=true"
49357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49358$as_echo "static" >&6; }
49359    fi
49360  fi
49361
49362
49363  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49364    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49365
49366pkg_failed=no
49367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49368$as_echo_n "checking for LIBFFI... " >&6; }
49369
49370if test -n "$LIBFFI_CFLAGS"; then
49371    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49372 elif test -n "$PKG_CONFIG"; then
49373    if test -n "$PKG_CONFIG" && \
49374    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49375  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49376  ac_status=$?
49377  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49378  test $ac_status = 0; }; then
49379  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49380else
49381  pkg_failed=yes
49382fi
49383 else
49384    pkg_failed=untried
49385fi
49386if test -n "$LIBFFI_LIBS"; then
49387    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49388 elif test -n "$PKG_CONFIG"; then
49389    if test -n "$PKG_CONFIG" && \
49390    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49391  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49392  ac_status=$?
49393  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49394  test $ac_status = 0; }; then
49395  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49396else
49397  pkg_failed=yes
49398fi
49399 else
49400    pkg_failed=untried
49401fi
49402
49403
49404
49405if test $pkg_failed = yes; then
49406
49407if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49408        _pkg_short_errors_supported=yes
49409else
49410        _pkg_short_errors_supported=no
49411fi
49412        if test $_pkg_short_errors_supported = yes; then
49413	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49414        else
49415	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49416        fi
49417	# Put the nasty error message in config.log where it belongs
49418	echo "$LIBFFI_PKG_ERRORS" >&5
49419
49420	as_fn_error $? "Package requirements (libffi) were not met:
49421
49422$LIBFFI_PKG_ERRORS
49423
49424Consider adjusting the PKG_CONFIG_PATH environment variable if you
49425installed software in a non-standard prefix.
49426
49427Alternatively, you may set the environment variables LIBFFI_CFLAGS
49428and LIBFFI_LIBS to avoid the need to call pkg-config.
49429See the pkg-config man page for more details.
49430" "$LINENO" 5
49431elif test $pkg_failed = untried; then
49432	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49434as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49435is in your PATH or set the PKG_CONFIG environment variable to the full
49436path to pkg-config.
49437
49438Alternatively, you may set the environment variables LIBFFI_CFLAGS
49439and LIBFFI_LIBS to avoid the need to call pkg-config.
49440See the pkg-config man page for more details.
49441
49442To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49443See \`config.log' for more details" "$LINENO" 5; }
49444else
49445	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49446	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49448$as_echo "yes" >&6; }
49449	:
49450fi
49451
49452  fi
49453
49454  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49455    # Extract the first word of "llvm-config", so it can be a program name with args.
49456set dummy llvm-config; ac_word=$2
49457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49458$as_echo_n "checking for $ac_word... " >&6; }
49459if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49460  $as_echo_n "(cached) " >&6
49461else
49462  if test -n "$LLVM_CONFIG"; then
49463  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49464else
49465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49466for as_dir in $PATH
49467do
49468  IFS=$as_save_IFS
49469  test -z "$as_dir" && as_dir=.
49470    for ac_exec_ext in '' $ac_executable_extensions; do
49471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49472    ac_cv_prog_LLVM_CONFIG="llvm-config"
49473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49474    break 2
49475  fi
49476done
49477  done
49478IFS=$as_save_IFS
49479
49480fi
49481fi
49482LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49483if test -n "$LLVM_CONFIG"; then
49484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49485$as_echo "$LLVM_CONFIG" >&6; }
49486else
49487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49488$as_echo "no" >&6; }
49489fi
49490
49491
49492
49493    if test "x$LLVM_CONFIG" != xllvm-config; then
49494      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49495    fi
49496
49497    llvm_components="jit mcjit engine nativecodegen native"
49498    unset LLVM_CFLAGS
49499    for flag in $("$LLVM_CONFIG" --cxxflags); do
49500      if echo "${flag}" | grep -q '^-[ID]'; then
49501        if test "${flag}" != "-D_DEBUG" ; then
49502          if test "${LLVM_CFLAGS}" != "" ; then
49503            LLVM_CFLAGS="${LLVM_CFLAGS} "
49504          fi
49505          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49506        fi
49507      fi
49508    done
49509    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49510    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49511
49512    unset LLVM_LDFLAGS
49513    for flag in $("${LLVM_CONFIG}" --ldflags); do
49514      if echo "${flag}" | grep -q '^-L'; then
49515        if test "${LLVM_LDFLAGS}" != ""; then
49516          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49517        fi
49518        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49519      fi
49520    done
49521
49522    unset LLVM_LIBS
49523    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49524      if echo "${flag}" | grep -q '^-l'; then
49525        if test "${LLVM_LIBS}" != ""; then
49526          LLVM_LIBS="${LLVM_LIBS} "
49527        fi
49528        LLVM_LIBS="${LLVM_LIBS}${flag}"
49529      fi
49530    done
49531
49532
49533
49534
49535  fi
49536
49537  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49538  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49539    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49540  fi
49541
49542  # TODO better (platform agnostic) test
49543  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49544    LIBCXX="-lstdc++"
49545  fi
49546
49547
49548
49549
49550  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49551
49552
49553# Check whether --with-msvcr-dll was given.
49554if test "${with_msvcr_dll+set}" = set; then :
49555  withval=$with_msvcr_dll;
49556fi
49557
49558
49559  if test "x$with_msvcr_dll" != x; then
49560    # If given explicitely by user, do not probe. If not present, fail directly.
49561
49562  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49563  METHOD="--with-msvcr-dll"
49564  if test -e "$POSSIBLE_MSVCR_DLL"; then
49565    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49566$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49567
49568    # Need to check if the found msvcr is correct architecture
49569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49570$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49571    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49573      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49574      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49575      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49576        CORRECT_MSVCR_ARCH="PE32 executable"
49577      else
49578        CORRECT_MSVCR_ARCH="PE32+ executable"
49579      fi
49580    else
49581      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49582        CORRECT_MSVCR_ARCH=386
49583      else
49584        CORRECT_MSVCR_ARCH=x86-64
49585      fi
49586    fi
49587    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49589$as_echo "ok" >&6; }
49590      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49591      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49592$as_echo_n "checking for msvcr100.dll... " >&6; }
49593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49594$as_echo "$MSVCR_DLL" >&6; }
49595    else
49596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49597$as_echo "incorrect, ignoring" >&6; }
49598      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49599$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49600    fi
49601  fi
49602
49603    if test "x$MSVCR_DLL" = x; then
49604      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49605    fi
49606  fi
49607
49608  if test "x$MSVCR_DLL" = x; then
49609    # Probe: Using well-known location from Visual Studio 10.0
49610    if test "x$VCINSTALLDIR" != x; then
49611      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49612
49613  windows_path="$CYGWIN_VC_INSTALL_DIR"
49614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49615    unix_path=`$CYGPATH -u "$windows_path"`
49616    CYGWIN_VC_INSTALL_DIR="$unix_path"
49617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49619    CYGWIN_VC_INSTALL_DIR="$unix_path"
49620  fi
49621
49622      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49623        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49624      else
49625        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49626      fi
49627
49628  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49629  METHOD="well-known location in VCINSTALLDIR"
49630  if test -e "$POSSIBLE_MSVCR_DLL"; then
49631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49632$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49633
49634    # Need to check if the found msvcr is correct architecture
49635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49636$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49637    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49639      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49640      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49641      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49642        CORRECT_MSVCR_ARCH="PE32 executable"
49643      else
49644        CORRECT_MSVCR_ARCH="PE32+ executable"
49645      fi
49646    else
49647      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49648        CORRECT_MSVCR_ARCH=386
49649      else
49650        CORRECT_MSVCR_ARCH=x86-64
49651      fi
49652    fi
49653    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49655$as_echo "ok" >&6; }
49656      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49657      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49658$as_echo_n "checking for msvcr100.dll... " >&6; }
49659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49660$as_echo "$MSVCR_DLL" >&6; }
49661    else
49662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49663$as_echo "incorrect, ignoring" >&6; }
49664      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49665$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49666    fi
49667  fi
49668
49669    fi
49670  fi
49671
49672  if test "x$MSVCR_DLL" = x; then
49673    # Probe: Check in the Boot JDK directory.
49674    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49675
49676  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49677  METHOD="well-known location in Boot JDK"
49678  if test -e "$POSSIBLE_MSVCR_DLL"; then
49679    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49680$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49681
49682    # Need to check if the found msvcr is correct architecture
49683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49684$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49685    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49687      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49688      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49689      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49690        CORRECT_MSVCR_ARCH="PE32 executable"
49691      else
49692        CORRECT_MSVCR_ARCH="PE32+ executable"
49693      fi
49694    else
49695      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49696        CORRECT_MSVCR_ARCH=386
49697      else
49698        CORRECT_MSVCR_ARCH=x86-64
49699      fi
49700    fi
49701    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49703$as_echo "ok" >&6; }
49704      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49706$as_echo_n "checking for msvcr100.dll... " >&6; }
49707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49708$as_echo "$MSVCR_DLL" >&6; }
49709    else
49710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49711$as_echo "incorrect, ignoring" >&6; }
49712      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49713$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49714    fi
49715  fi
49716
49717  fi
49718
49719  if test "x$MSVCR_DLL" = x; then
49720    # Probe: Look in the Windows system32 directory
49721    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49722
49723  windows_path="$CYGWIN_SYSTEMROOT"
49724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49725    unix_path=`$CYGPATH -u "$windows_path"`
49726    CYGWIN_SYSTEMROOT="$unix_path"
49727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49729    CYGWIN_SYSTEMROOT="$unix_path"
49730  fi
49731
49732    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49733
49734  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49735  METHOD="well-known location in SYSTEMROOT"
49736  if test -e "$POSSIBLE_MSVCR_DLL"; then
49737    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49738$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49739
49740    # Need to check if the found msvcr is correct architecture
49741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49742$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49743    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49745      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49746      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49747      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49748        CORRECT_MSVCR_ARCH="PE32 executable"
49749      else
49750        CORRECT_MSVCR_ARCH="PE32+ executable"
49751      fi
49752    else
49753      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49754        CORRECT_MSVCR_ARCH=386
49755      else
49756        CORRECT_MSVCR_ARCH=x86-64
49757      fi
49758    fi
49759    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49761$as_echo "ok" >&6; }
49762      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49764$as_echo_n "checking for msvcr100.dll... " >&6; }
49765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49766$as_echo "$MSVCR_DLL" >&6; }
49767    else
49768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49769$as_echo "incorrect, ignoring" >&6; }
49770      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49771$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49772    fi
49773  fi
49774
49775  fi
49776
49777  if test "x$MSVCR_DLL" = x; then
49778    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49779    if test "x$VS100COMNTOOLS" != x; then
49780      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49781
49782  windows_path="$CYGWIN_VS_TOOLS_DIR"
49783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49784    unix_path=`$CYGPATH -u "$windows_path"`
49785    CYGWIN_VS_TOOLS_DIR="$unix_path"
49786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49788    CYGWIN_VS_TOOLS_DIR="$unix_path"
49789  fi
49790
49791      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49792        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49793      else
49794        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49795      fi
49796
49797  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49798  METHOD="search of VS100COMNTOOLS"
49799  if test -e "$POSSIBLE_MSVCR_DLL"; then
49800    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49801$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49802
49803    # Need to check if the found msvcr is correct architecture
49804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49805$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49806    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49808      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49809      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49810      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49811        CORRECT_MSVCR_ARCH="PE32 executable"
49812      else
49813        CORRECT_MSVCR_ARCH="PE32+ executable"
49814      fi
49815    else
49816      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49817        CORRECT_MSVCR_ARCH=386
49818      else
49819        CORRECT_MSVCR_ARCH=x86-64
49820      fi
49821    fi
49822    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49824$as_echo "ok" >&6; }
49825      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49827$as_echo_n "checking for msvcr100.dll... " >&6; }
49828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49829$as_echo "$MSVCR_DLL" >&6; }
49830    else
49831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49832$as_echo "incorrect, ignoring" >&6; }
49833      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49834$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49835    fi
49836  fi
49837
49838    fi
49839  fi
49840
49841  if test "x$MSVCR_DLL" = x; then
49842    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49843    # (This was the original behaviour; kept since it might turn up something)
49844    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49845      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49846        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49847      else
49848        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49849        if test "x$POSSIBLE_MSVCR_DLL" = x; then
49850          # We're grasping at straws now...
49851          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49852        fi
49853      fi
49854
49855
49856  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49857  METHOD="search of VCINSTALLDIR"
49858  if test -e "$POSSIBLE_MSVCR_DLL"; then
49859    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49860$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49861
49862    # Need to check if the found msvcr is correct architecture
49863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49864$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49865    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49867      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49868      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49869      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49870        CORRECT_MSVCR_ARCH="PE32 executable"
49871      else
49872        CORRECT_MSVCR_ARCH="PE32+ executable"
49873      fi
49874    else
49875      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49876        CORRECT_MSVCR_ARCH=386
49877      else
49878        CORRECT_MSVCR_ARCH=x86-64
49879      fi
49880    fi
49881    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49883$as_echo "ok" >&6; }
49884      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49886$as_echo_n "checking for msvcr100.dll... " >&6; }
49887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49888$as_echo "$MSVCR_DLL" >&6; }
49889    else
49890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49891$as_echo "incorrect, ignoring" >&6; }
49892      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49893$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49894    fi
49895  fi
49896
49897    fi
49898  fi
49899
49900  if test "x$MSVCR_DLL" = x; then
49901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49902$as_echo_n "checking for msvcr100.dll... " >&6; }
49903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49904$as_echo "no" >&6; }
49905    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49906  fi
49907
49908
49909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49910
49911  # Input might be given as Windows format, start by converting to
49912  # unix format.
49913  path="$MSVCR_DLL"
49914  new_path=`$CYGPATH -u "$path"`
49915
49916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49919  # "foo.exe" is OK but "foo" is an error.
49920  #
49921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49922  # It is also a way to make sure we got the proper file name for the real test later on.
49923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49924  if test "x$test_shortpath" = x; then
49925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49926$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49927    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49928  fi
49929
49930  # Call helper function which possibly converts this using DOS-style short mode.
49931  # If so, the updated path is stored in $new_path.
49932
49933  input_path="$new_path"
49934  # Check if we need to convert this using DOS-style short mode. If the path
49935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49936  # take no chances and rewrite it.
49937  # Note: m4 eats our [], so we need to use [ and ] instead.
49938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49939  if test "x$has_forbidden_chars" != x; then
49940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49944      # Going to short mode and back again did indeed matter. Since short mode is
49945      # case insensitive, let's make it lowercase to improve readability.
49946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49947      # Now convert it back to Unix-stile (cygpath)
49948      input_path=`$CYGPATH -u "$shortmode_path"`
49949      new_path="$input_path"
49950    fi
49951  fi
49952
49953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49954  if test "x$test_cygdrive_prefix" = x; then
49955    # As a simple fix, exclude /usr/bin since it's not a real path.
49956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49958      # a path prefixed by /cygdrive for fixpath to work.
49959      new_path="$CYGWIN_ROOT_PATH$input_path"
49960    fi
49961  fi
49962
49963
49964  if test "x$path" != "x$new_path"; then
49965    MSVCR_DLL="$new_path"
49966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49967$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49968  fi
49969
49970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49971
49972  path="$MSVCR_DLL"
49973  has_colon=`$ECHO $path | $GREP ^.:`
49974  new_path="$path"
49975  if test "x$has_colon" = x; then
49976    # Not in mixed or Windows style, start by that.
49977    new_path=`cmd //c echo $path`
49978  fi
49979
49980
49981  input_path="$new_path"
49982  # Check if we need to convert this using DOS-style short mode. If the path
49983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49984  # take no chances and rewrite it.
49985  # Note: m4 eats our [], so we need to use [ and ] instead.
49986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49987  if test "x$has_forbidden_chars" != x; then
49988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49990  fi
49991
49992
49993  windows_path="$new_path"
49994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49995    unix_path=`$CYGPATH -u "$windows_path"`
49996    new_path="$unix_path"
49997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49999    new_path="$unix_path"
50000  fi
50001
50002  if test "x$path" != "x$new_path"; then
50003    MSVCR_DLL="$new_path"
50004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50005$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50006  fi
50007
50008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50010
50011  else
50012    # We're on a unix platform. Hooray! :)
50013    path="$MSVCR_DLL"
50014    has_space=`$ECHO "$path" | $GREP " "`
50015    if test "x$has_space" != x; then
50016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50017$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50018      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50019    fi
50020
50021    # Use eval to expand a potential ~
50022    eval path="$path"
50023    if test ! -f "$path" && test ! -d "$path"; then
50024      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50025    fi
50026
50027    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50028  fi
50029
50030
50031
50032
50033# Check whether --with-dxsdk was given.
50034if test "${with_dxsdk+set}" = set; then :
50035  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50036$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50037fi
50038
50039
50040
50041
50042# Check whether --with-dxsdk-lib was given.
50043if test "${with_dxsdk_lib+set}" = set; then :
50044  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50045$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50046fi
50047
50048
50049
50050
50051# Check whether --with-dxsdk-include was given.
50052if test "${with_dxsdk_include+set}" = set; then :
50053  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50054$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50055fi
50056
50057
50058  fi
50059
50060
50061
50062###############################################################################
50063#
50064# We need to do some final tweaking, when everything else is done.
50065#
50066###############################################################################
50067
50068
50069  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50070
50071
50072  # The name of the Service Agent jar.
50073  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50074  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50075    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50076  fi
50077
50078
50079
50080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50081$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50082
50083    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50084      ENABLE_INTREE_EC=yes
50085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50086$as_echo "yes" >&6; }
50087    else
50088      ENABLE_INTREE_EC=no
50089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50090$as_echo "no" >&6; }
50091    fi
50092
50093
50094
50095
50096###############################################################################
50097#
50098# Configure parts of the build that only affect the build performance,
50099# not the result.
50100#
50101###############################################################################
50102
50103
50104  # How many cores do we have on this build system?
50105
50106# Check whether --with-num-cores was given.
50107if test "${with_num_cores+set}" = set; then :
50108  withval=$with_num_cores;
50109fi
50110
50111  if test "x$with_num_cores" = x; then
50112    # The number of cores were not specified, try to probe them.
50113
50114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50115$as_echo_n "checking for number of cores... " >&6; }
50116  NUM_CORES=1
50117  FOUND_CORES=no
50118
50119  if test -f /proc/cpuinfo; then
50120    # Looks like a Linux (or cygwin) system
50121    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50122    FOUND_CORES=yes
50123  elif test -x /usr/sbin/psrinfo; then
50124    # Looks like a Solaris system
50125    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50126    FOUND_CORES=yes
50127  elif test -x /usr/sbin/system_profiler; then
50128    # Looks like a MacOSX system
50129    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50130    FOUND_CORES=yes
50131  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50132    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50133    FOUND_CORES=yes
50134  elif test -n "$NUMBER_OF_PROCESSORS"; then
50135    # On windows, look in the env
50136    NUM_CORES=$NUMBER_OF_PROCESSORS
50137    FOUND_CORES=yes
50138  fi
50139
50140  if test "x$FOUND_CORES" = xyes; then
50141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50142$as_echo "$NUM_CORES" >&6; }
50143  else
50144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50145$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50146    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50147$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50148  fi
50149
50150  else
50151    NUM_CORES=$with_num_cores
50152  fi
50153
50154
50155
50156  # How much memory do we have on this build system?
50157
50158# Check whether --with-memory-size was given.
50159if test "${with_memory_size+set}" = set; then :
50160  withval=$with_memory_size;
50161fi
50162
50163  if test "x$with_memory_size" = x; then
50164    # The memory size was not specified, try to probe it.
50165
50166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50167$as_echo_n "checking for memory size... " >&6; }
50168  # Default to 1024 MB
50169  MEMORY_SIZE=1024
50170  FOUND_MEM=no
50171
50172  if test -f /proc/meminfo; then
50173    # Looks like a Linux (or cygwin) system
50174    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50175    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50176    FOUND_MEM=yes
50177  elif test -x /usr/sbin/prtconf; then
50178    # Looks like a Solaris or AIX system
50179    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50180    FOUND_MEM=yes
50181  elif test -x /usr/sbin/system_profiler; then
50182    # Looks like a MacOSX system
50183    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50184    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50185    FOUND_MEM=yes
50186  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50187    # Windows, but without cygwin
50188    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50189    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50190    FOUND_MEM=yes
50191  fi
50192
50193  if test "x$FOUND_MEM" = xyes; then
50194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50195$as_echo "$MEMORY_SIZE MB" >&6; }
50196  else
50197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50198$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50199    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50200$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50201  fi
50202
50203  else
50204    MEMORY_SIZE=$with_memory_size
50205  fi
50206
50207
50208
50209  # Provide a decent default number of parallel jobs for make depending on
50210  # number of cores, amount of memory and machine architecture.
50211
50212# Check whether --with-jobs was given.
50213if test "${with_jobs+set}" = set; then :
50214  withval=$with_jobs;
50215fi
50216
50217  if test "x$with_jobs" = x; then
50218    # Number of jobs was not specified, calculate.
50219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50220$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50221    # Approximate memory in GB.
50222    memory_gb=`expr $MEMORY_SIZE / 1024`
50223    # Pick the lowest of memory in gb and number of cores.
50224    if test "$memory_gb" -lt "$NUM_CORES"; then
50225      JOBS="$memory_gb"
50226    else
50227      JOBS="$NUM_CORES"
50228      # On bigger machines, leave some room for other processes to run
50229      if test "$JOBS" -gt "4"; then
50230        JOBS=`expr $JOBS '*' 90 / 100`
50231      fi
50232    fi
50233    # Cap number of jobs to 16
50234    if test "$JOBS" -gt "16"; then
50235      JOBS=16
50236    fi
50237    if test "$JOBS" -eq "0"; then
50238      JOBS=1
50239    fi
50240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50241$as_echo "$JOBS" >&6; }
50242  else
50243    JOBS=$with_jobs
50244  fi
50245
50246
50247
50248# Setup arguments for the boot jdk (after cores and memory have been setup)
50249
50250  ##############################################################################
50251  #
50252  # Specify jvm options for anything that is run with the Boot JDK.
50253  # Not all JVM:s accept the same arguments on the command line.
50254  #
50255
50256# Check whether --with-boot-jdk-jvmargs was given.
50257if test "${with_boot_jdk_jvmargs+set}" = set; then :
50258  withval=$with_boot_jdk_jvmargs;
50259fi
50260
50261
50262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50263$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50264
50265  # Disable special log output when a debug build is used as Boot JDK...
50266
50267  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50268  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50269  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50270  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50271  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50272  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50273    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50274    JVM_ARG_OK=true
50275  else
50276    $ECHO "Arg failed:" >&5
50277    $ECHO "$OUTPUT" >&5
50278    JVM_ARG_OK=false
50279  fi
50280
50281
50282  # Apply user provided options.
50283
50284  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50285  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50286  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50287  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50288  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50289  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50290    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50291    JVM_ARG_OK=true
50292  else
50293    $ECHO "Arg failed:" >&5
50294    $ECHO "$OUTPUT" >&5
50295    JVM_ARG_OK=false
50296  fi
50297
50298
50299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50300$as_echo "$boot_jdk_jvmargs" >&6; }
50301
50302  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50303  JAVA_FLAGS=$boot_jdk_jvmargs
50304
50305
50306
50307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50308$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50309
50310  # Starting amount of heap memory.
50311
50312  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50313  $ECHO "Command: $JAVA -Xms64M -version" >&5
50314  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50315  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50316  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50317  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50318    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50319    JVM_ARG_OK=true
50320  else
50321    $ECHO "Arg failed:" >&5
50322    $ECHO "$OUTPUT" >&5
50323    JVM_ARG_OK=false
50324  fi
50325
50326
50327  # Maximum amount of heap memory.
50328  # Maximum stack size.
50329  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50330  if test "x$BUILD_NUM_BITS" = x32; then
50331    if test "$JVM_MAX_HEAP" -gt "1100"; then
50332      JVM_MAX_HEAP=1100
50333    elif test "$JVM_MAX_HEAP" -lt "512"; then
50334      JVM_MAX_HEAP=512
50335    fi
50336    STACK_SIZE=768
50337  else
50338    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50339    # pointers are used. Apparently, we need to increase the heap and stack
50340    # space for the jvm. More specifically, when running javac to build huge
50341    # jdk batch
50342    if test "$JVM_MAX_HEAP" -gt "1600"; then
50343      JVM_MAX_HEAP=1600
50344    elif test "$JVM_MAX_HEAP" -lt "512"; then
50345      JVM_MAX_HEAP=512
50346    fi
50347    STACK_SIZE=1536
50348  fi
50349
50350  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50351  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50352  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50353  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50354  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50355  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50356    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50357    JVM_ARG_OK=true
50358  else
50359    $ECHO "Arg failed:" >&5
50360    $ECHO "$OUTPUT" >&5
50361    JVM_ARG_OK=false
50362  fi
50363
50364
50365  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50366  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50367  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50368  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50369  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50370  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50371    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50372    JVM_ARG_OK=true
50373  else
50374    $ECHO "Arg failed:" >&5
50375    $ECHO "$OUTPUT" >&5
50376    JVM_ARG_OK=false
50377  fi
50378
50379
50380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50381$as_echo "$boot_jdk_jvmargs_big" >&6; }
50382
50383  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50384
50385
50386
50387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50388$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50389
50390  # Use serial gc for small short lived tools if possible
50391
50392  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50393  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50394  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50395  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50396  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50397  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50398    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50399    JVM_ARG_OK=true
50400  else
50401    $ECHO "Arg failed:" >&5
50402    $ECHO "$OUTPUT" >&5
50403    JVM_ARG_OK=false
50404  fi
50405
50406
50407  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50408  $ECHO "Command: $JAVA -Xms32M -version" >&5
50409  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50410  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50411  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50412  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50413    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50414    JVM_ARG_OK=true
50415  else
50416    $ECHO "Arg failed:" >&5
50417    $ECHO "$OUTPUT" >&5
50418    JVM_ARG_OK=false
50419  fi
50420
50421
50422  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50423  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50424  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50425  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50426  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50427  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50428    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50429    JVM_ARG_OK=true
50430  else
50431    $ECHO "Arg failed:" >&5
50432    $ECHO "$OUTPUT" >&5
50433    JVM_ARG_OK=false
50434  fi
50435
50436
50437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50438$as_echo "$boot_jdk_jvmargs_small" >&6; }
50439
50440  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50441
50442
50443  JAVA_TOOL_FLAGS_SMALL=""
50444  for f in $JAVA_FLAGS_SMALL; do
50445    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50446  done
50447
50448
50449
50450# Setup smart javac (after cores and memory have been setup)
50451
50452
50453# Check whether --with-sjavac-server-java was given.
50454if test "${with_sjavac_server_java+set}" = set; then :
50455  withval=$with_sjavac_server_java;
50456fi
50457
50458
50459  if test "x$with_sjavac_server_java" != x; then
50460    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50461    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50462    if test "x$FOUND_VERSION" = x; then
50463      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50464    fi
50465  else
50466    SJAVAC_SERVER_JAVA="$JAVA"
50467  fi
50468
50469
50470  if test "$MEMORY_SIZE" -gt "3000"; then
50471
50472  $ECHO "Check if jvm arg is ok: -d64" >&5
50473  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50474  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50475  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50476  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50477  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50478    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50479    JVM_ARG_OK=true
50480  else
50481    $ECHO "Arg failed:" >&5
50482    $ECHO "$OUTPUT" >&5
50483    JVM_ARG_OK=false
50484  fi
50485
50486    if test "$JVM_ARG_OK" = true; then
50487      JVM_64BIT=true
50488      JVM_ARG_OK=false
50489    fi
50490  fi
50491
50492  MX_VALUE=`expr $MEMORY_SIZE / 2`
50493  if test "$JVM_64BIT" = true; then
50494    # Set ms lower than mx since more than one instance of the server might
50495    # get launched at the same time before they figure out which instance won.
50496    MS_VALUE=512
50497    if test "$MX_VALUE" -gt "2048"; then
50498      MX_VALUE=2048
50499    fi
50500  else
50501    MS_VALUE=256
50502    if test "$MX_VALUE" -gt "1500"; then
50503      MX_VALUE=1500
50504    fi
50505  fi
50506  if test "$MX_VALUE" -lt "512"; then
50507    MX_VALUE=512
50508  fi
50509
50510  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50511  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50512  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50513  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50514  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50515  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50516    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50517    JVM_ARG_OK=true
50518  else
50519    $ECHO "Arg failed:" >&5
50520    $ECHO "$OUTPUT" >&5
50521    JVM_ARG_OK=false
50522  fi
50523
50524
50525
50526  # Check whether --enable-sjavac was given.
50527if test "${enable_sjavac+set}" = set; then :
50528  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50529else
50530  ENABLE_SJAVAC='no'
50531fi
50532
50533  if test "x$JVM_ARG_OK" = "xfalse"; then
50534    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50535$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50536    ENABLE_SJAVAC=no;
50537  fi
50538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50539$as_echo_n "checking whether to use sjavac... " >&6; }
50540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50541$as_echo "$ENABLE_SJAVAC" >&6; }
50542
50543
50544  if test "x$ENABLE_SJAVAC" = xyes; then
50545    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50546  else
50547    SJAVAC_SERVER_DIR=
50548  fi
50549
50550
50551
50552# Can the C/C++ compiler use precompiled headers?
50553
50554
50555  ###############################################################################
50556  #
50557  # Can the C/C++ compiler use precompiled headers?
50558  #
50559  # Check whether --enable-precompiled-headers was given.
50560if test "${enable_precompiled_headers+set}" = set; then :
50561  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50562else
50563  ENABLE_PRECOMPH=yes
50564fi
50565
50566
50567  USE_PRECOMPILED_HEADER=1
50568  if test "x$ENABLE_PRECOMPH" = xno; then
50569    USE_PRECOMPILED_HEADER=0
50570  fi
50571
50572  if test "x$ENABLE_PRECOMPH" = xyes; then
50573    # Check that the compiler actually supports precomp headers.
50574    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50575      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50576$as_echo_n "checking that precompiled headers work... " >&6; }
50577      echo "int alfa();" > conftest.h
50578      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50579      if test ! -f conftest.hpp.gch; then
50580        USE_PRECOMPILED_HEADER=0
50581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50582$as_echo "no" >&6; }
50583      else
50584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50585$as_echo "yes" >&6; }
50586      fi
50587      rm -f conftest.h conftest.hpp.gch
50588    fi
50589  fi
50590
50591
50592
50593
50594# Setup use of ccache, if available
50595
50596  # Check whether --enable-ccache was given.
50597if test "${enable_ccache+set}" = set; then :
50598  enableval=$enable_ccache;
50599fi
50600
50601
50602  CCACHE=
50603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50604$as_echo_n "checking is ccache enabled... " >&6; }
50605  ENABLE_CCACHE=$enable_ccache
50606  if test "x$enable_ccache" = xyes; then
50607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50608$as_echo "yes" >&6; }
50609    OLD_PATH="$PATH"
50610    if test "x$TOOLCHAIN_PATH" != x; then
50611      PATH=$TOOLCHAIN_PATH:$PATH
50612    fi
50613
50614
50615
50616  # Publish this variable in the help.
50617
50618
50619  if test "x$CCACHE" = x; then
50620    # The variable is not set by user, try to locate tool using the code snippet
50621    for ac_prog in ccache
50622do
50623  # Extract the first word of "$ac_prog", so it can be a program name with args.
50624set dummy $ac_prog; ac_word=$2
50625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50626$as_echo_n "checking for $ac_word... " >&6; }
50627if ${ac_cv_path_CCACHE+:} false; then :
50628  $as_echo_n "(cached) " >&6
50629else
50630  case $CCACHE in
50631  [\\/]* | ?:[\\/]*)
50632  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50633  ;;
50634  *)
50635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50636for as_dir in $PATH
50637do
50638  IFS=$as_save_IFS
50639  test -z "$as_dir" && as_dir=.
50640    for ac_exec_ext in '' $ac_executable_extensions; do
50641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50642    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50644    break 2
50645  fi
50646done
50647  done
50648IFS=$as_save_IFS
50649
50650  ;;
50651esac
50652fi
50653CCACHE=$ac_cv_path_CCACHE
50654if test -n "$CCACHE"; then
50655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50656$as_echo "$CCACHE" >&6; }
50657else
50658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50659$as_echo "no" >&6; }
50660fi
50661
50662
50663  test -n "$CCACHE" && break
50664done
50665
50666  else
50667    # The variable is set, but is it from the command line or the environment?
50668
50669    # Try to remove the string !CCACHE! from our list.
50670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50672      # If it failed, the variable was not from the command line. Ignore it,
50673      # but warn the user (except for BASH, which is always set by the calling BASH).
50674      if test "xCCACHE" != xBASH; then
50675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50676$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50677      fi
50678      # Try to locate tool using the code snippet
50679      for ac_prog in ccache
50680do
50681  # Extract the first word of "$ac_prog", so it can be a program name with args.
50682set dummy $ac_prog; ac_word=$2
50683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50684$as_echo_n "checking for $ac_word... " >&6; }
50685if ${ac_cv_path_CCACHE+:} false; then :
50686  $as_echo_n "(cached) " >&6
50687else
50688  case $CCACHE in
50689  [\\/]* | ?:[\\/]*)
50690  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50691  ;;
50692  *)
50693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50694for as_dir in $PATH
50695do
50696  IFS=$as_save_IFS
50697  test -z "$as_dir" && as_dir=.
50698    for ac_exec_ext in '' $ac_executable_extensions; do
50699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50700    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50702    break 2
50703  fi
50704done
50705  done
50706IFS=$as_save_IFS
50707
50708  ;;
50709esac
50710fi
50711CCACHE=$ac_cv_path_CCACHE
50712if test -n "$CCACHE"; then
50713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50714$as_echo "$CCACHE" >&6; }
50715else
50716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50717$as_echo "no" >&6; }
50718fi
50719
50720
50721  test -n "$CCACHE" && break
50722done
50723
50724    else
50725      # If it succeeded, then it was overridden by the user. We will use it
50726      # for the tool.
50727
50728      # First remove it from the list of overridden variables, so we can test
50729      # for unknown variables in the end.
50730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50731
50732      # Check if the provided tool contains a complete path.
50733      tool_specified="$CCACHE"
50734      tool_basename="${tool_specified##*/}"
50735      if test "x$tool_basename" = "x$tool_specified"; then
50736        # A command without a complete path is provided, search $PATH.
50737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50738$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50739        # Extract the first word of "$tool_basename", so it can be a program name with args.
50740set dummy $tool_basename; ac_word=$2
50741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50742$as_echo_n "checking for $ac_word... " >&6; }
50743if ${ac_cv_path_CCACHE+:} false; then :
50744  $as_echo_n "(cached) " >&6
50745else
50746  case $CCACHE in
50747  [\\/]* | ?:[\\/]*)
50748  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50749  ;;
50750  *)
50751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50752for as_dir in $PATH
50753do
50754  IFS=$as_save_IFS
50755  test -z "$as_dir" && as_dir=.
50756    for ac_exec_ext in '' $ac_executable_extensions; do
50757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50758    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50760    break 2
50761  fi
50762done
50763  done
50764IFS=$as_save_IFS
50765
50766  ;;
50767esac
50768fi
50769CCACHE=$ac_cv_path_CCACHE
50770if test -n "$CCACHE"; then
50771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50772$as_echo "$CCACHE" >&6; }
50773else
50774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50775$as_echo "no" >&6; }
50776fi
50777
50778
50779        if test "x$CCACHE" = x; then
50780          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50781        fi
50782      else
50783        # Otherwise we believe it is a complete path. Use it as it is.
50784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50785$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50787$as_echo_n "checking for CCACHE... " >&6; }
50788        if test ! -x "$tool_specified"; then
50789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50790$as_echo "not found" >&6; }
50791          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50792        fi
50793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50794$as_echo "$tool_specified" >&6; }
50795      fi
50796    fi
50797  fi
50798
50799
50800
50801  if test "x$CCACHE" = x; then
50802    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50803  fi
50804
50805
50806    CCACHE_STATUS="enabled"
50807    PATH="$OLD_PATH"
50808  elif test "x$enable_ccache" = xno; then
50809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50810$as_echo "no, explicitly disabled" >&6; }
50811  elif test "x$enable_ccache" = x; then
50812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50813$as_echo "no" >&6; }
50814  else
50815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50816$as_echo "unknown" >&6; }
50817    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50818  fi
50819
50820
50821
50822# Check whether --with-ccache-dir was given.
50823if test "${with_ccache_dir+set}" = set; then :
50824  withval=$with_ccache_dir;
50825fi
50826
50827
50828  if test "x$with_ccache_dir" != x; then
50829    # When using a non home ccache directory, assume the use is to share ccache files
50830    # with other users. Thus change the umask.
50831    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50832    if test "x$CCACHE" = x; then
50833      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50834$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50835    fi
50836  fi
50837
50838  if test "x$CCACHE" != x; then
50839
50840  if test "x$CCACHE" != x; then
50841    # Only use ccache if it is 3.1.4 or later, which supports
50842    # precompiled headers.
50843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50844$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50845    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50846    if test "x$HAS_GOOD_CCACHE" = x; then
50847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50848$as_echo "no, disabling ccache" >&6; }
50849      CCACHE=
50850      CCACHE_STATUS="disabled"
50851    else
50852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50853$as_echo "yes" >&6; }
50854      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50855$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50856      PUSHED_FLAGS="$CXXFLAGS"
50857      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50858      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50859/* end confdefs.h.  */
50860
50861int
50862main ()
50863{
50864
50865  ;
50866  return 0;
50867}
50868_ACEOF
50869if ac_fn_cxx_try_compile "$LINENO"; then :
50870  CC_KNOWS_CCACHE_TRICK=yes
50871else
50872  CC_KNOWS_CCACHE_TRICK=no
50873fi
50874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50875      CXXFLAGS="$PUSHED_FLAGS"
50876      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50878$as_echo "yes" >&6; }
50879      else
50880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50881$as_echo "no, disabling ccaching of precompiled headers" >&6; }
50882        CCACHE=
50883        CCACHE_STATUS="disabled"
50884      fi
50885    fi
50886  fi
50887
50888  if test "x$CCACHE" != x; then
50889    CCACHE_SLOPPINESS=time_macros
50890    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50891    CCACHE_FLAGS=-fpch-preprocess
50892
50893    if test "x$SET_CCACHE_DIR" != x; then
50894      mkdir -p $CCACHE_DIR > /dev/null 2>&1
50895      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50896    fi
50897  fi
50898
50899  fi
50900
50901
50902###############################################################################
50903#
50904# And now the finish...
50905#
50906###############################################################################
50907
50908# Check for some common pitfalls
50909
50910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50911    file_to_test="$SRC_ROOT/LICENSE"
50912    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50913      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
50914    fi
50915  fi
50916
50917
50918  # Did user specify any unknown variables?
50919
50920  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50921    # Replace the separating ! with spaces before presenting for end user.
50922    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50924$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50925  fi
50926
50927
50928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50929$as_echo_n "checking if build directory is on local disk... " >&6; }
50930
50931  # df -l lists only local disks; if the given directory is not found then
50932  # a non-zero exit code is given
50933  if test "x$DF" = x; then
50934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50935      # msys does not have df; use Windows "net use" instead.
50936      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50937      if test "x$IS_NETWORK_DISK" = x; then
50938        OUTPUT_DIR_IS_LOCAL="yes"
50939      else
50940        OUTPUT_DIR_IS_LOCAL="no"
50941      fi
50942    else
50943      # No df here, say it's local
50944      OUTPUT_DIR_IS_LOCAL="yes"
50945    fi
50946  else
50947    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50948      OUTPUT_DIR_IS_LOCAL="yes"
50949    else
50950      OUTPUT_DIR_IS_LOCAL="no"
50951    fi
50952  fi
50953
50954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50955$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50956
50957
50958
50959  # Check if the user has any old-style ALT_ variables set.
50960  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50961
50962  # Before generating output files, test if they exist. If they do, this is a reconfigure.
50963  # Since we can't properly handle the dependencies for this, warn the user about the situation
50964  if test -e $OUTPUT_ROOT/spec.gmk; then
50965    IS_RECONFIGURE=yes
50966  else
50967    IS_RECONFIGURE=no
50968  fi
50969
50970
50971# At the end, call the custom hook. (Dummy macro if no custom sources available)
50972
50973
50974# We're messing a bit with internal autoconf variables to put the config.status
50975# in the output directory instead of the current directory.
50976CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50977
50978# Create the actual output files. Now the main work of configure is done.
50979cat >confcache <<\_ACEOF
50980# This file is a shell script that caches the results of configure
50981# tests run on this system so they can be shared between configure
50982# scripts and configure runs, see configure's option --config-cache.
50983# It is not useful on other systems.  If it contains results you don't
50984# want to keep, you may remove or edit it.
50985#
50986# config.status only pays attention to the cache file if you give it
50987# the --recheck option to rerun configure.
50988#
50989# `ac_cv_env_foo' variables (set or unset) will be overridden when
50990# loading this file, other *unset* `ac_cv_foo' will be assigned the
50991# following values.
50992
50993_ACEOF
50994
50995# The following way of writing the cache mishandles newlines in values,
50996# but we know of no workaround that is simple, portable, and efficient.
50997# So, we kill variables containing newlines.
50998# Ultrix sh set writes to stderr and can't be redirected directly,
50999# and sets the high bit in the cache file unless we assign to the vars.
51000(
51001  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51002    eval ac_val=\$$ac_var
51003    case $ac_val in #(
51004    *${as_nl}*)
51005      case $ac_var in #(
51006      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51007$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51008      esac
51009      case $ac_var in #(
51010      _ | IFS | as_nl) ;; #(
51011      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51012      *) { eval $ac_var=; unset $ac_var;} ;;
51013      esac ;;
51014    esac
51015  done
51016
51017  (set) 2>&1 |
51018    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51019    *${as_nl}ac_space=\ *)
51020      # `set' does not quote correctly, so add quotes: double-quote
51021      # substitution turns \\\\ into \\, and sed turns \\ into \.
51022      sed -n \
51023	"s/'/'\\\\''/g;
51024	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51025      ;; #(
51026    *)
51027      # `set' quotes correctly as required by POSIX, so do not add quotes.
51028      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51029      ;;
51030    esac |
51031    sort
51032) |
51033  sed '
51034     /^ac_cv_env_/b end
51035     t clear
51036     :clear
51037     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51038     t end
51039     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51040     :end' >>confcache
51041if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51042  if test -w "$cache_file"; then
51043    if test "x$cache_file" != "x/dev/null"; then
51044      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51045$as_echo "$as_me: updating cache $cache_file" >&6;}
51046      if test ! -f "$cache_file" || test -h "$cache_file"; then
51047	cat confcache >"$cache_file"
51048      else
51049        case $cache_file in #(
51050        */* | ?:*)
51051	  mv -f confcache "$cache_file"$$ &&
51052	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51053        *)
51054	  mv -f confcache "$cache_file" ;;
51055	esac
51056      fi
51057    fi
51058  else
51059    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51060$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51061  fi
51062fi
51063rm -f confcache
51064
51065test "x$prefix" = xNONE && prefix=$ac_default_prefix
51066# Let make expand exec_prefix.
51067test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51068
51069# Transform confdefs.h into DEFS.
51070# Protect against shell expansion while executing Makefile rules.
51071# Protect against Makefile macro expansion.
51072#
51073# If the first sed substitution is executed (which looks for macros that
51074# take arguments), then branch to the quote section.  Otherwise,
51075# look for a macro that doesn't take arguments.
51076ac_script='
51077:mline
51078/\\$/{
51079 N
51080 s,\\\n,,
51081 b mline
51082}
51083t clear
51084:clear
51085s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51086t quote
51087s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51088t quote
51089b any
51090:quote
51091s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51092s/\[/\\&/g
51093s/\]/\\&/g
51094s/\$/$$/g
51095H
51096:any
51097${
51098	g
51099	s/^\n//
51100	s/\n/ /g
51101	p
51102}
51103'
51104DEFS=`sed -n "$ac_script" confdefs.h`
51105
51106
51107ac_libobjs=
51108ac_ltlibobjs=
51109U=
51110for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51111  # 1. Remove the extension, and $U if already installed.
51112  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51113  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51114  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51115  #    will be set to the directory where LIBOBJS objects are built.
51116  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51117  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51118done
51119LIBOBJS=$ac_libobjs
51120
51121LTLIBOBJS=$ac_ltlibobjs
51122
51123
51124
51125: "${CONFIG_STATUS=./config.status}"
51126ac_write_fail=0
51127ac_clean_files_save=$ac_clean_files
51128ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51129{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51130$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51131as_write_fail=0
51132cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51133#! $SHELL
51134# Generated by $as_me.
51135# Run this file to recreate the current configuration.
51136# Compiler output produced by configure, useful for debugging
51137# configure, is in config.log if it exists.
51138
51139debug=false
51140ac_cs_recheck=false
51141ac_cs_silent=false
51142
51143SHELL=\${CONFIG_SHELL-$SHELL}
51144export SHELL
51145_ASEOF
51146cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51147## -------------------- ##
51148## M4sh Initialization. ##
51149## -------------------- ##
51150
51151# Be more Bourne compatible
51152DUALCASE=1; export DUALCASE # for MKS sh
51153if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51154  emulate sh
51155  NULLCMD=:
51156  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51157  # is contrary to our usage.  Disable this feature.
51158  alias -g '${1+"$@"}'='"$@"'
51159  setopt NO_GLOB_SUBST
51160else
51161  case `(set -o) 2>/dev/null` in #(
51162  *posix*) :
51163    set -o posix ;; #(
51164  *) :
51165     ;;
51166esac
51167fi
51168
51169
51170as_nl='
51171'
51172export as_nl
51173# Printing a long string crashes Solaris 7 /usr/bin/printf.
51174as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51175as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51176as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51177# Prefer a ksh shell builtin over an external printf program on Solaris,
51178# but without wasting forks for bash or zsh.
51179if test -z "$BASH_VERSION$ZSH_VERSION" \
51180    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51181  as_echo='print -r --'
51182  as_echo_n='print -rn --'
51183elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51184  as_echo='printf %s\n'
51185  as_echo_n='printf %s'
51186else
51187  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51188    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51189    as_echo_n='/usr/ucb/echo -n'
51190  else
51191    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51192    as_echo_n_body='eval
51193      arg=$1;
51194      case $arg in #(
51195      *"$as_nl"*)
51196	expr "X$arg" : "X\\(.*\\)$as_nl";
51197	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51198      esac;
51199      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51200    '
51201    export as_echo_n_body
51202    as_echo_n='sh -c $as_echo_n_body as_echo'
51203  fi
51204  export as_echo_body
51205  as_echo='sh -c $as_echo_body as_echo'
51206fi
51207
51208# The user is always right.
51209if test "${PATH_SEPARATOR+set}" != set; then
51210  PATH_SEPARATOR=:
51211  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51212    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51213      PATH_SEPARATOR=';'
51214  }
51215fi
51216
51217
51218# IFS
51219# We need space, tab and new line, in precisely that order.  Quoting is
51220# there to prevent editors from complaining about space-tab.
51221# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51222# splitting by setting IFS to empty value.)
51223IFS=" ""	$as_nl"
51224
51225# Find who we are.  Look in the path if we contain no directory separator.
51226as_myself=
51227case $0 in #((
51228  *[\\/]* ) as_myself=$0 ;;
51229  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51230for as_dir in $PATH
51231do
51232  IFS=$as_save_IFS
51233  test -z "$as_dir" && as_dir=.
51234    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51235  done
51236IFS=$as_save_IFS
51237
51238     ;;
51239esac
51240# We did not find ourselves, most probably we were run as `sh COMMAND'
51241# in which case we are not to be found in the path.
51242if test "x$as_myself" = x; then
51243  as_myself=$0
51244fi
51245if test ! -f "$as_myself"; then
51246  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51247  exit 1
51248fi
51249
51250# Unset variables that we do not need and which cause bugs (e.g. in
51251# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51252# suppresses any "Segmentation fault" message there.  '((' could
51253# trigger a bug in pdksh 5.2.14.
51254for as_var in BASH_ENV ENV MAIL MAILPATH
51255do eval test x\${$as_var+set} = xset \
51256  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51257done
51258PS1='$ '
51259PS2='> '
51260PS4='+ '
51261
51262# NLS nuisances.
51263LC_ALL=C
51264export LC_ALL
51265LANGUAGE=C
51266export LANGUAGE
51267
51268# CDPATH.
51269(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51270
51271
51272# as_fn_error STATUS ERROR [LINENO LOG_FD]
51273# ----------------------------------------
51274# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51275# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51276# script with STATUS, using 1 if that was 0.
51277as_fn_error ()
51278{
51279  as_status=$1; test $as_status -eq 0 && as_status=1
51280  if test "$4"; then
51281    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51282    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51283  fi
51284  $as_echo "$as_me: error: $2" >&2
51285  as_fn_exit $as_status
51286} # as_fn_error
51287
51288
51289# as_fn_set_status STATUS
51290# -----------------------
51291# Set $? to STATUS, without forking.
51292as_fn_set_status ()
51293{
51294  return $1
51295} # as_fn_set_status
51296
51297# as_fn_exit STATUS
51298# -----------------
51299# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51300as_fn_exit ()
51301{
51302  set +e
51303  as_fn_set_status $1
51304  exit $1
51305} # as_fn_exit
51306
51307# as_fn_unset VAR
51308# ---------------
51309# Portably unset VAR.
51310as_fn_unset ()
51311{
51312  { eval $1=; unset $1;}
51313}
51314as_unset=as_fn_unset
51315# as_fn_append VAR VALUE
51316# ----------------------
51317# Append the text in VALUE to the end of the definition contained in VAR. Take
51318# advantage of any shell optimizations that allow amortized linear growth over
51319# repeated appends, instead of the typical quadratic growth present in naive
51320# implementations.
51321if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51322  eval 'as_fn_append ()
51323  {
51324    eval $1+=\$2
51325  }'
51326else
51327  as_fn_append ()
51328  {
51329    eval $1=\$$1\$2
51330  }
51331fi # as_fn_append
51332
51333# as_fn_arith ARG...
51334# ------------------
51335# Perform arithmetic evaluation on the ARGs, and store the result in the
51336# global $as_val. Take advantage of shells that can avoid forks. The arguments
51337# must be portable across $(()) and expr.
51338if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51339  eval 'as_fn_arith ()
51340  {
51341    as_val=$(( $* ))
51342  }'
51343else
51344  as_fn_arith ()
51345  {
51346    as_val=`expr "$@" || test $? -eq 1`
51347  }
51348fi # as_fn_arith
51349
51350
51351if expr a : '\(a\)' >/dev/null 2>&1 &&
51352   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51353  as_expr=expr
51354else
51355  as_expr=false
51356fi
51357
51358if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51359  as_basename=basename
51360else
51361  as_basename=false
51362fi
51363
51364if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51365  as_dirname=dirname
51366else
51367  as_dirname=false
51368fi
51369
51370as_me=`$as_basename -- "$0" ||
51371$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51372	 X"$0" : 'X\(//\)$' \| \
51373	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51374$as_echo X/"$0" |
51375    sed '/^.*\/\([^/][^/]*\)\/*$/{
51376	    s//\1/
51377	    q
51378	  }
51379	  /^X\/\(\/\/\)$/{
51380	    s//\1/
51381	    q
51382	  }
51383	  /^X\/\(\/\).*/{
51384	    s//\1/
51385	    q
51386	  }
51387	  s/.*/./; q'`
51388
51389# Avoid depending upon Character Ranges.
51390as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51391as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51392as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51393as_cr_digits='0123456789'
51394as_cr_alnum=$as_cr_Letters$as_cr_digits
51395
51396ECHO_C= ECHO_N= ECHO_T=
51397case `echo -n x` in #(((((
51398-n*)
51399  case `echo 'xy\c'` in
51400  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51401  xy)  ECHO_C='\c';;
51402  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51403       ECHO_T='	';;
51404  esac;;
51405*)
51406  ECHO_N='-n';;
51407esac
51408
51409rm -f conf$$ conf$$.exe conf$$.file
51410if test -d conf$$.dir; then
51411  rm -f conf$$.dir/conf$$.file
51412else
51413  rm -f conf$$.dir
51414  mkdir conf$$.dir 2>/dev/null
51415fi
51416if (echo >conf$$.file) 2>/dev/null; then
51417  if ln -s conf$$.file conf$$ 2>/dev/null; then
51418    as_ln_s='ln -s'
51419    # ... but there are two gotchas:
51420    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51421    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51422    # In both cases, we have to default to `cp -pR'.
51423    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51424      as_ln_s='cp -pR'
51425  elif ln conf$$.file conf$$ 2>/dev/null; then
51426    as_ln_s=ln
51427  else
51428    as_ln_s='cp -pR'
51429  fi
51430else
51431  as_ln_s='cp -pR'
51432fi
51433rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51434rmdir conf$$.dir 2>/dev/null
51435
51436
51437# as_fn_mkdir_p
51438# -------------
51439# Create "$as_dir" as a directory, including parents if necessary.
51440as_fn_mkdir_p ()
51441{
51442
51443  case $as_dir in #(
51444  -*) as_dir=./$as_dir;;
51445  esac
51446  test -d "$as_dir" || eval $as_mkdir_p || {
51447    as_dirs=
51448    while :; do
51449      case $as_dir in #(
51450      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51451      *) as_qdir=$as_dir;;
51452      esac
51453      as_dirs="'$as_qdir' $as_dirs"
51454      as_dir=`$as_dirname -- "$as_dir" ||
51455$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51456	 X"$as_dir" : 'X\(//\)[^/]' \| \
51457	 X"$as_dir" : 'X\(//\)$' \| \
51458	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51459$as_echo X"$as_dir" |
51460    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51461	    s//\1/
51462	    q
51463	  }
51464	  /^X\(\/\/\)[^/].*/{
51465	    s//\1/
51466	    q
51467	  }
51468	  /^X\(\/\/\)$/{
51469	    s//\1/
51470	    q
51471	  }
51472	  /^X\(\/\).*/{
51473	    s//\1/
51474	    q
51475	  }
51476	  s/.*/./; q'`
51477      test -d "$as_dir" && break
51478    done
51479    test -z "$as_dirs" || eval "mkdir $as_dirs"
51480  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51481
51482
51483} # as_fn_mkdir_p
51484if mkdir -p . 2>/dev/null; then
51485  as_mkdir_p='mkdir -p "$as_dir"'
51486else
51487  test -d ./-p && rmdir ./-p
51488  as_mkdir_p=false
51489fi
51490
51491
51492# as_fn_executable_p FILE
51493# -----------------------
51494# Test if FILE is an executable regular file.
51495as_fn_executable_p ()
51496{
51497  test -f "$1" && test -x "$1"
51498} # as_fn_executable_p
51499as_test_x='test -x'
51500as_executable_p=as_fn_executable_p
51501
51502# Sed expression to map a string onto a valid CPP name.
51503as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51504
51505# Sed expression to map a string onto a valid variable name.
51506as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51507
51508
51509exec 6>&1
51510## ----------------------------------- ##
51511## Main body of $CONFIG_STATUS script. ##
51512## ----------------------------------- ##
51513_ASEOF
51514test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51515
51516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51517# Save the log message, to keep $0 and so on meaningful, and to
51518# report actual input values of CONFIG_FILES etc. instead of their
51519# values after options handling.
51520ac_log="
51521This file was extended by OpenJDK $as_me jdk9, which was
51522generated by GNU Autoconf 2.69.  Invocation command line was
51523
51524  CONFIG_FILES    = $CONFIG_FILES
51525  CONFIG_HEADERS  = $CONFIG_HEADERS
51526  CONFIG_LINKS    = $CONFIG_LINKS
51527  CONFIG_COMMANDS = $CONFIG_COMMANDS
51528  $ $0 $@
51529
51530on `(hostname || uname -n) 2>/dev/null | sed 1q`
51531"
51532
51533_ACEOF
51534
51535case $ac_config_files in *"
51536"*) set x $ac_config_files; shift; ac_config_files=$*;;
51537esac
51538
51539
51540
51541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51542# Files that config.status was made for.
51543config_files="$ac_config_files"
51544
51545_ACEOF
51546
51547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51548ac_cs_usage="\
51549\`$as_me' instantiates files and other configuration actions
51550from templates according to the current configuration.  Unless the files
51551and actions are specified as TAGs, all are instantiated by default.
51552
51553Usage: $0 [OPTION]... [TAG]...
51554
51555  -h, --help       print this help, then exit
51556  -V, --version    print version number and configuration settings, then exit
51557      --config     print configuration, then exit
51558  -q, --quiet, --silent
51559                   do not print progress messages
51560  -d, --debug      don't remove temporary files
51561      --recheck    update $as_me by reconfiguring in the same conditions
51562      --file=FILE[:TEMPLATE]
51563                   instantiate the configuration file FILE
51564
51565Configuration files:
51566$config_files
51567
51568Report bugs to <build-dev@openjdk.java.net>.
51569OpenJDK home page: <http://openjdk.java.net>."
51570
51571_ACEOF
51572cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51573ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51574ac_cs_version="\\
51575OpenJDK config.status jdk9
51576configured by $0, generated by GNU Autoconf 2.69,
51577  with options \\"\$ac_cs_config\\"
51578
51579Copyright (C) 2012 Free Software Foundation, Inc.
51580This config.status script is free software; the Free Software Foundation
51581gives unlimited permission to copy, distribute and modify it."
51582
51583ac_pwd='$ac_pwd'
51584srcdir='$srcdir'
51585AWK='$AWK'
51586test -n "\$AWK" || AWK=awk
51587_ACEOF
51588
51589cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51590# The default lists apply if the user does not specify any file.
51591ac_need_defaults=:
51592while test $# != 0
51593do
51594  case $1 in
51595  --*=?*)
51596    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51597    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51598    ac_shift=:
51599    ;;
51600  --*=)
51601    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51602    ac_optarg=
51603    ac_shift=:
51604    ;;
51605  *)
51606    ac_option=$1
51607    ac_optarg=$2
51608    ac_shift=shift
51609    ;;
51610  esac
51611
51612  case $ac_option in
51613  # Handling of the options.
51614  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51615    ac_cs_recheck=: ;;
51616  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51617    $as_echo "$ac_cs_version"; exit ;;
51618  --config | --confi | --conf | --con | --co | --c )
51619    $as_echo "$ac_cs_config"; exit ;;
51620  --debug | --debu | --deb | --de | --d | -d )
51621    debug=: ;;
51622  --file | --fil | --fi | --f )
51623    $ac_shift
51624    case $ac_optarg in
51625    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51626    '') as_fn_error $? "missing file argument" ;;
51627    esac
51628    as_fn_append CONFIG_FILES " '$ac_optarg'"
51629    ac_need_defaults=false;;
51630  --he | --h |  --help | --hel | -h )
51631    $as_echo "$ac_cs_usage"; exit ;;
51632  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51633  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51634    ac_cs_silent=: ;;
51635
51636  # This is an error.
51637  -*) as_fn_error $? "unrecognized option: \`$1'
51638Try \`$0 --help' for more information." ;;
51639
51640  *) as_fn_append ac_config_targets " $1"
51641     ac_need_defaults=false ;;
51642
51643  esac
51644  shift
51645done
51646
51647ac_configure_extra_args=
51648
51649if $ac_cs_silent; then
51650  exec 6>/dev/null
51651  ac_configure_extra_args="$ac_configure_extra_args --silent"
51652fi
51653
51654_ACEOF
51655cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51656if \$ac_cs_recheck; then
51657  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51658  shift
51659  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51660  CONFIG_SHELL='$SHELL'
51661  export CONFIG_SHELL
51662  exec "\$@"
51663fi
51664
51665_ACEOF
51666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51667exec 5>>config.log
51668{
51669  echo
51670  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51671## Running $as_me. ##
51672_ASBOX
51673  $as_echo "$ac_log"
51674} >&5
51675
51676_ACEOF
51677cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51678_ACEOF
51679
51680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51681
51682# Handling of arguments.
51683for ac_config_target in $ac_config_targets
51684do
51685  case $ac_config_target in
51686    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51687    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51688    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51689    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51690    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51691
51692  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51693  esac
51694done
51695
51696
51697# If the user did not use the arguments to specify the items to instantiate,
51698# then the envvar interface is used.  Set only those that are not.
51699# We use the long form for the default assignment because of an extremely
51700# bizarre bug on SunOS 4.1.3.
51701if $ac_need_defaults; then
51702  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51703fi
51704
51705# Have a temporary directory for convenience.  Make it in the build tree
51706# simply because there is no reason against having it here, and in addition,
51707# creating and moving files from /tmp can sometimes cause problems.
51708# Hook for its removal unless debugging.
51709# Note that there is a small window in which the directory will not be cleaned:
51710# after its creation but before its name has been assigned to `$tmp'.
51711$debug ||
51712{
51713  tmp= ac_tmp=
51714  trap 'exit_status=$?
51715  : "${ac_tmp:=$tmp}"
51716  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51717' 0
51718  trap 'as_fn_exit 1' 1 2 13 15
51719}
51720# Create a (secure) tmp directory for tmp files.
51721
51722{
51723  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51724  test -d "$tmp"
51725}  ||
51726{
51727  tmp=./conf$$-$RANDOM
51728  (umask 077 && mkdir "$tmp")
51729} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51730ac_tmp=$tmp
51731
51732# Set up the scripts for CONFIG_FILES section.
51733# No need to generate them if there are no CONFIG_FILES.
51734# This happens for instance with `./config.status config.h'.
51735if test -n "$CONFIG_FILES"; then
51736
51737
51738ac_cr=`echo X | tr X '\015'`
51739# On cygwin, bash can eat \r inside `` if the user requested igncr.
51740# But we know of no other shell where ac_cr would be empty at this
51741# point, so we can use a bashism as a fallback.
51742if test "x$ac_cr" = x; then
51743  eval ac_cr=\$\'\\r\'
51744fi
51745ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51746if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51747  ac_cs_awk_cr='\\r'
51748else
51749  ac_cs_awk_cr=$ac_cr
51750fi
51751
51752echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51753_ACEOF
51754
51755
51756{
51757  echo "cat >conf$$subs.awk <<_ACEOF" &&
51758  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51759  echo "_ACEOF"
51760} >conf$$subs.sh ||
51761  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51762ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51763ac_delim='%!_!# '
51764for ac_last_try in false false false false false :; do
51765  . ./conf$$subs.sh ||
51766    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51767
51768  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51769  if test $ac_delim_n = $ac_delim_num; then
51770    break
51771  elif $ac_last_try; then
51772    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51773  else
51774    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51775  fi
51776done
51777rm -f conf$$subs.sh
51778
51779cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51780cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51781_ACEOF
51782sed -n '
51783h
51784s/^/S["/; s/!.*/"]=/
51785p
51786g
51787s/^[^!]*!//
51788:repl
51789t repl
51790s/'"$ac_delim"'$//
51791t delim
51792:nl
51793h
51794s/\(.\{148\}\)..*/\1/
51795t more1
51796s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51797p
51798n
51799b repl
51800:more1
51801s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51802p
51803g
51804s/.\{148\}//
51805t nl
51806:delim
51807h
51808s/\(.\{148\}\)..*/\1/
51809t more2
51810s/["\\]/\\&/g; s/^/"/; s/$/"/
51811p
51812b
51813:more2
51814s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51815p
51816g
51817s/.\{148\}//
51818t delim
51819' <conf$$subs.awk | sed '
51820/^[^""]/{
51821  N
51822  s/\n//
51823}
51824' >>$CONFIG_STATUS || ac_write_fail=1
51825rm -f conf$$subs.awk
51826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51827_ACAWK
51828cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51829  for (key in S) S_is_set[key] = 1
51830  FS = ""
51831
51832}
51833{
51834  line = $ 0
51835  nfields = split(line, field, "@")
51836  substed = 0
51837  len = length(field[1])
51838  for (i = 2; i < nfields; i++) {
51839    key = field[i]
51840    keylen = length(key)
51841    if (S_is_set[key]) {
51842      value = S[key]
51843      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51844      len += length(value) + length(field[++i])
51845      substed = 1
51846    } else
51847      len += 1 + keylen
51848  }
51849
51850  print line
51851}
51852
51853_ACAWK
51854_ACEOF
51855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51856if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51857  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51858else
51859  cat
51860fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51861  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51862_ACEOF
51863
51864# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51865# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51866# trailing colons and then remove the whole line if VPATH becomes empty
51867# (actually we leave an empty line to preserve line numbers).
51868if test "x$srcdir" = x.; then
51869  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
51870h
51871s///
51872s/^/:/
51873s/[	 ]*$/:/
51874s/:\$(srcdir):/:/g
51875s/:\${srcdir}:/:/g
51876s/:@srcdir@:/:/g
51877s/^:*//
51878s/:*$//
51879x
51880s/\(=[	 ]*\).*/\1/
51881G
51882s/\n//
51883s/^[^=]*=[	 ]*$//
51884}'
51885fi
51886
51887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51888fi # test -n "$CONFIG_FILES"
51889
51890
51891eval set X "  :F $CONFIG_FILES      "
51892shift
51893for ac_tag
51894do
51895  case $ac_tag in
51896  :[FHLC]) ac_mode=$ac_tag; continue;;
51897  esac
51898  case $ac_mode$ac_tag in
51899  :[FHL]*:*);;
51900  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51901  :[FH]-) ac_tag=-:-;;
51902  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51903  esac
51904  ac_save_IFS=$IFS
51905  IFS=:
51906  set x $ac_tag
51907  IFS=$ac_save_IFS
51908  shift
51909  ac_file=$1
51910  shift
51911
51912  case $ac_mode in
51913  :L) ac_source=$1;;
51914  :[FH])
51915    ac_file_inputs=
51916    for ac_f
51917    do
51918      case $ac_f in
51919      -) ac_f="$ac_tmp/stdin";;
51920      *) # Look for the file first in the build tree, then in the source tree
51921	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
51922	 # because $ac_f cannot contain `:'.
51923	 test -f "$ac_f" ||
51924	   case $ac_f in
51925	   [\\/$]*) false;;
51926	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51927	   esac ||
51928	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51929      esac
51930      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51931      as_fn_append ac_file_inputs " '$ac_f'"
51932    done
51933
51934    # Let's still pretend it is `configure' which instantiates (i.e., don't
51935    # use $as_me), people would be surprised to read:
51936    #    /* config.h.  Generated by config.status.  */
51937    configure_input='Generated from '`
51938	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51939	`' by configure.'
51940    if test x"$ac_file" != x-; then
51941      configure_input="$ac_file.  $configure_input"
51942      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51943$as_echo "$as_me: creating $ac_file" >&6;}
51944    fi
51945    # Neutralize special characters interpreted by sed in replacement strings.
51946    case $configure_input in #(
51947    *\&* | *\|* | *\\* )
51948       ac_sed_conf_input=`$as_echo "$configure_input" |
51949       sed 's/[\\\\&|]/\\\\&/g'`;; #(
51950    *) ac_sed_conf_input=$configure_input;;
51951    esac
51952
51953    case $ac_tag in
51954    *:-:* | *:-) cat >"$ac_tmp/stdin" \
51955      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51956    esac
51957    ;;
51958  esac
51959
51960  ac_dir=`$as_dirname -- "$ac_file" ||
51961$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51962	 X"$ac_file" : 'X\(//\)[^/]' \| \
51963	 X"$ac_file" : 'X\(//\)$' \| \
51964	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51965$as_echo X"$ac_file" |
51966    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51967	    s//\1/
51968	    q
51969	  }
51970	  /^X\(\/\/\)[^/].*/{
51971	    s//\1/
51972	    q
51973	  }
51974	  /^X\(\/\/\)$/{
51975	    s//\1/
51976	    q
51977	  }
51978	  /^X\(\/\).*/{
51979	    s//\1/
51980	    q
51981	  }
51982	  s/.*/./; q'`
51983  as_dir="$ac_dir"; as_fn_mkdir_p
51984  ac_builddir=.
51985
51986case "$ac_dir" in
51987.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51988*)
51989  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51990  # A ".." for each directory in $ac_dir_suffix.
51991  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51992  case $ac_top_builddir_sub in
51993  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51994  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51995  esac ;;
51996esac
51997ac_abs_top_builddir=$ac_pwd
51998ac_abs_builddir=$ac_pwd$ac_dir_suffix
51999# for backward compatibility:
52000ac_top_builddir=$ac_top_build_prefix
52001
52002case $srcdir in
52003  .)  # We are building in place.
52004    ac_srcdir=.
52005    ac_top_srcdir=$ac_top_builddir_sub
52006    ac_abs_top_srcdir=$ac_pwd ;;
52007  [\\/]* | ?:[\\/]* )  # Absolute name.
52008    ac_srcdir=$srcdir$ac_dir_suffix;
52009    ac_top_srcdir=$srcdir
52010    ac_abs_top_srcdir=$srcdir ;;
52011  *) # Relative name.
52012    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52013    ac_top_srcdir=$ac_top_build_prefix$srcdir
52014    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52015esac
52016ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52017
52018
52019  case $ac_mode in
52020  :F)
52021  #
52022  # CONFIG_FILE
52023  #
52024
52025_ACEOF
52026
52027cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52028# If the template does not know about datarootdir, expand it.
52029# FIXME: This hack should be removed a few years after 2.60.
52030ac_datarootdir_hack=; ac_datarootdir_seen=
52031ac_sed_dataroot='
52032/datarootdir/ {
52033  p
52034  q
52035}
52036/@datadir@/p
52037/@docdir@/p
52038/@infodir@/p
52039/@localedir@/p
52040/@mandir@/p'
52041case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52042*datarootdir*) ac_datarootdir_seen=yes;;
52043*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52044  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52045$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52046_ACEOF
52047cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52048  ac_datarootdir_hack='
52049  s&@datadir@&$datadir&g
52050  s&@docdir@&$docdir&g
52051  s&@infodir@&$infodir&g
52052  s&@localedir@&$localedir&g
52053  s&@mandir@&$mandir&g
52054  s&\\\${datarootdir}&$datarootdir&g' ;;
52055esac
52056_ACEOF
52057
52058# Neutralize VPATH when `$srcdir' = `.'.
52059# Shell code in configure.ac might set extrasub.
52060# FIXME: do we really want to maintain this feature?
52061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52062ac_sed_extra="$ac_vpsub
52063$extrasub
52064_ACEOF
52065cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52066:t
52067/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52068s|@configure_input@|$ac_sed_conf_input|;t t
52069s&@top_builddir@&$ac_top_builddir_sub&;t t
52070s&@top_build_prefix@&$ac_top_build_prefix&;t t
52071s&@srcdir@&$ac_srcdir&;t t
52072s&@abs_srcdir@&$ac_abs_srcdir&;t t
52073s&@top_srcdir@&$ac_top_srcdir&;t t
52074s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52075s&@builddir@&$ac_builddir&;t t
52076s&@abs_builddir@&$ac_abs_builddir&;t t
52077s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52078$ac_datarootdir_hack
52079"
52080eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52081  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52082
52083test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52084  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52085  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52086      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52087  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52088which seems to be undefined.  Please make sure it is defined" >&5
52089$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52090which seems to be undefined.  Please make sure it is defined" >&2;}
52091
52092  rm -f "$ac_tmp/stdin"
52093  case $ac_file in
52094  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52095  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52096  esac \
52097  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52098 ;;
52099
52100
52101
52102  esac
52103
52104done # for ac_tag
52105
52106
52107as_fn_exit 0
52108_ACEOF
52109ac_clean_files=$ac_clean_files_save
52110
52111test $ac_write_fail = 0 ||
52112  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52113
52114
52115# configure is writing to config.log, and then calls config.status.
52116# config.status does its own redirection, appending to config.log.
52117# Unfortunately, on DOS this fails, as config.log is still kept open
52118# by configure, so config.status won't be able to write to it; its
52119# output is simply discarded.  So we exec the FD to /dev/null,
52120# effectively closing config.log, so it can be properly (re)opened and
52121# appended to by config.status.  When coming back to configure, we
52122# need to make the FD available again.
52123if test "$no_create" != yes; then
52124  ac_cs_success=:
52125  ac_config_status_args=
52126  test "$silent" = yes &&
52127    ac_config_status_args="$ac_config_status_args --quiet"
52128  exec 5>/dev/null
52129  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52130  exec 5>>config.log
52131  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52132  # would make configure fail if this is the last instruction.
52133  $ac_cs_success || as_fn_exit 1
52134fi
52135if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52136  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52137$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52138fi
52139
52140
52141# Try to move the config.log file to the output directory.
52142if test -e ./config.log; then
52143  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52144fi
52145
52146# Make the compare script executable
52147$CHMOD +x $OUTPUT_ROOT/compare.sh
52148
52149# Finally output some useful information to the user
52150
52151  # Finally output some useful information to the user
52152
52153  printf "\n"
52154  printf "====================================================\n"
52155  if test "x$no_create" != "xyes"; then
52156    if test "x$IS_RECONFIGURE" != "xyes"; then
52157      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52158    else
52159      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52160    fi
52161  else
52162    if test "x$IS_RECONFIGURE" != "xyes"; then
52163      printf "A configuration has been successfully checked but not created\n"
52164    else
52165      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52166    fi
52167  fi
52168  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52169    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52170  else
52171    printf "using default settings.\n"
52172  fi
52173
52174  printf "\n"
52175  printf "Configuration summary:\n"
52176  printf "* Debug level:    $DEBUG_LEVEL\n"
52177  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52178  printf "* JDK variant:    $JDK_VARIANT\n"
52179  printf "* JVM variants:   $with_jvm_variants\n"
52180  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52181
52182  printf "\n"
52183  printf "Tools summary:\n"
52184  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52185    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52186  fi
52187  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52188  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52189  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52190  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52191
52192  printf "\n"
52193  printf "Build performance summary:\n"
52194  printf "* Cores to use:   $JOBS\n"
52195  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52196  if test "x$CCACHE_STATUS" != "x"; then
52197    printf "* ccache status:  $CCACHE_STATUS\n"
52198  fi
52199  printf "\n"
52200
52201  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52202    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52203    printf "will result in longer build times.\n"
52204    printf "\n"
52205  fi
52206
52207  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52208    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52209    printf "These are not respected, and will be ignored. It is recommended\n"
52210    printf "that you clean your environment. The following variables are set:\n"
52211    printf "$FOUND_ALT_VARIABLES\n"
52212    printf "\n"
52213  fi
52214
52215  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52216    printf "WARNING: Your build output directory is not on a local disk.\n"
52217    printf "This will severely degrade build performance!\n"
52218    printf "It is recommended that you create an output directory on a local disk,\n"
52219    printf "and run the configure script again from that directory.\n"
52220    printf "\n"
52221  fi
52222
52223  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52224    printf "WARNING: The result of this configuration has overridden an older\n"
52225    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52226    printf "proper build. Failure to do so might result in strange build problems.\n"
52227    printf "\n"
52228  fi
52229
52230  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52231    printf "WARNING: The result of this configuration was not saved.\n"
52232    printf "You should run without '--no-create | -n' to create the configuration.\n"
52233    printf "\n"
52234  fi
52235
52236
52237
52238if test -e "$OUTPUT_ROOT/config.log"; then
52239  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52240  if test $? -eq 0; then
52241    printf "The following warnings were produced. Repeated here for convenience:\n"
52242    # We must quote sed expression (using []) to stop m4 from eating the [].
52243    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52244    printf "\n"
52245  fi
52246fi
52247
52248
52249