generated-configure.sh revision 1301:c1b2c69ee113
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
856BASH_ARGS
857CODESIGN
858XATTR
859DSYMUTIL
860IS_GNU_TIME
861TIME
862STAT
863HG
864READELF
865OTOOL
866LDD
867ZIP
868UNZIP
869FIND_DELETE
870OUTPUT_SYNC
871OUTPUT_SYNC_SUPPORTED
872MAKE
873CHECK_TOOLSDIR_MAKE
874CHECK_TOOLSDIR_GMAKE
875CHECK_MAKE
876CHECK_GMAKE
877PKGHANDLER
878OUTPUT_ROOT
879CONF_NAME
880SPEC
881SDKROOT
882XCODEBUILD
883BUILD_VARIANT_RELEASE
884DEBUG_CLASSFILES
885FASTDEBUG
886VARIANT
887DEBUG_LEVEL
888MACOSX_UNIVERSAL
889INCLUDE_SA
890JVM_VARIANT_CORE
891JVM_VARIANT_ZEROSHARK
892JVM_VARIANT_ZERO
893JVM_VARIANT_KERNEL
894JVM_VARIANT_MINIMAL1
895JVM_VARIANT_CLIENT
896JVM_VARIANT_SERVER
897JVM_VARIANTS
898JVM_INTERPRETER
899JDK_VARIANT
900SET_OPENJDK
901BUILD_LOG_WRAPPER
902BUILD_LOG_PREVIOUS
903BUILD_LOG
904TOPDIR
905PATH_SEP
906ZERO_ARCHDEF
907DEFINE_CROSS_COMPILE_ARCH
908LP64
909OPENJDK_TARGET_OS_EXPORT_DIR
910OPENJDK_TARGET_CPU_JLI_CFLAGS
911OPENJDK_TARGET_CPU_OSARCH
912OPENJDK_TARGET_CPU_ISADIR
913OPENJDK_TARGET_CPU_LIBDIR
914OPENJDK_TARGET_CPU_LEGACY_LIB
915OPENJDK_TARGET_CPU_LEGACY
916REQUIRED_OS_VERSION
917REQUIRED_OS_NAME
918COMPILE_TYPE
919OPENJDK_TARGET_CPU_ENDIAN
920OPENJDK_TARGET_CPU_BITS
921OPENJDK_TARGET_CPU_ARCH
922OPENJDK_TARGET_CPU
923OPENJDK_TARGET_OS_ENV
924OPENJDK_TARGET_OS_TYPE
925OPENJDK_TARGET_OS
926OPENJDK_BUILD_CPU_ENDIAN
927OPENJDK_BUILD_CPU_BITS
928OPENJDK_BUILD_CPU_ARCH
929OPENJDK_BUILD_CPU
930OPENJDK_BUILD_OS_ENV
931OPENJDK_BUILD_OS_TYPE
932OPENJDK_BUILD_OS
933OPENJDK_BUILD_AUTOCONF_NAME
934OPENJDK_TARGET_AUTOCONF_NAME
935target_os
936target_vendor
937target_cpu
938target
939host_os
940host_vendor
941host_cpu
942host
943build_os
944build_vendor
945build_cpu
946build
947CPIO
948SETFILE
949DF
950READLINK
951CYGPATH
952SED
953FGREP
954EGREP
955GREP
956AWK
957XARGS
958WHICH
959WC
960UNIQ
961UNAME
962TR
963TOUCH
964TEE
965TAR
966TAIL
967SORT
968SH
969RM
970PRINTF
971NAWK
972MV
973MKTEMP
974MKDIR
975LS
976LN
977HEAD
978FIND
979FILE
980EXPR
981ECHO
982DIRNAME
983DIFF
984DATE
985CUT
986CP
987COMM
988CMP
989CHMOD
990CAT
991BASH
992BASENAME
993DATE_WHEN_CONFIGURED
994CONFIGURE_COMMAND_LINE
995target_alias
996host_alias
997build_alias
998LIBS
999ECHO_T
1000ECHO_N
1001ECHO_C
1002DEFS
1003mandir
1004localedir
1005libdir
1006psdir
1007pdfdir
1008dvidir
1009htmldir
1010infodir
1011docdir
1012oldincludedir
1013includedir
1014localstatedir
1015sharedstatedir
1016sysconfdir
1017datadir
1018datarootdir
1019libexecdir
1020sbindir
1021bindir
1022program_transform_name
1023prefix
1024exec_prefix
1025PACKAGE_URL
1026PACKAGE_BUGREPORT
1027PACKAGE_STRING
1028PACKAGE_VERSION
1029PACKAGE_TARNAME
1030PACKAGE_NAME
1031PATH_SEPARATOR
1032SHELL'
1033ac_subst_files=''
1034ac_user_opts='
1035enable_option_checking
1036with_target_bits
1037enable_openjdk_only
1038with_custom_make_dir
1039with_jdk_variant
1040with_jvm_interpreter
1041with_jvm_variants
1042enable_debug
1043with_debug_level
1044with_devkit
1045with_sys_root
1046with_sysroot
1047with_tools_dir
1048with_toolchain_path
1049with_extra_path
1050with_sdk_name
1051with_conf_name
1052with_output_sync
1053with_builddeps_conf
1054with_builddeps_server
1055with_builddeps_dir
1056with_builddeps_group
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061enable_rmiconnector_iiop
1062with_milestone
1063with_update_version
1064with_user_release_suffix
1065with_build_number
1066with_copyright_year
1067with_boot_jdk
1068with_add_source_root
1069with_override_source_root
1070with_adds_and_overrides
1071with_override_langtools
1072with_override_corba
1073with_override_jaxp
1074with_override_jaxws
1075with_override_hotspot
1076with_override_nashorn
1077with_override_jdk
1078with_import_hotspot
1079with_toolchain_type
1080with_jtreg
1081with_extra_cflags
1082with_extra_cxxflags
1083with_extra_ldflags
1084enable_debug_symbols
1085enable_zip_debug_info
1086with_x
1087with_cups
1088with_cups_include
1089with_freetype
1090with_freetype_include
1091with_freetype_lib
1092with_freetype_src
1093enable_freetype_bundling
1094with_alsa
1095with_alsa_include
1096with_alsa_lib
1097with_libjpeg
1098with_giflib
1099with_lcms
1100with_libpng
1101with_zlib
1102with_stdc__lib
1103with_msvcr_dll
1104with_dxsdk
1105with_dxsdk_lib
1106with_dxsdk_include
1107with_num_cores
1108with_memory_size
1109with_jobs
1110with_boot_jdk_jvmargs
1111with_sjavac_server_java
1112enable_sjavac
1113enable_precompiled_headers
1114enable_ccache
1115with_ccache_dir
1116'
1117      ac_precious_vars='build_alias
1118host_alias
1119target_alias
1120BASENAME
1121BASH
1122CAT
1123CHMOD
1124CMP
1125COMM
1126CP
1127CUT
1128DATE
1129DIFF
1130DIRNAME
1131ECHO
1132EXPR
1133FILE
1134FIND
1135HEAD
1136LN
1137LS
1138MKDIR
1139MKTEMP
1140MV
1141NAWK
1142PRINTF
1143RM
1144SH
1145SORT
1146TAIL
1147TAR
1148TEE
1149TOUCH
1150TR
1151UNAME
1152UNIQ
1153WC
1154WHICH
1155XARGS
1156AWK
1157GREP
1158EGREP
1159FGREP
1160SED
1161CYGPATH
1162READLINK
1163DF
1164SETFILE
1165CPIO
1166UNZIP
1167ZIP
1168LDD
1169OTOOL
1170READELF
1171HG
1172STAT
1173TIME
1174DSYMUTIL
1175XATTR
1176CODESIGN
1177PKG_CONFIG
1178JAVA
1179JAVAC
1180JAVAH
1181JAR
1182NATIVE2ASCII
1183JARSIGNER
1184CC
1185CFLAGS
1186LDFLAGS
1187LIBS
1188CPPFLAGS
1189CXX
1190CXXFLAGS
1191CCC
1192CPP
1193CXXCPP
1194AS
1195AR
1196OBJC
1197OBJCFLAGS
1198LIPO
1199STRIP
1200NM
1201GNM
1202MCS
1203OBJCOPY
1204OBJDUMP
1205BUILD_CC
1206BUILD_CXX
1207BUILD_LD
1208JTREGEXE
1209XMKMF
1210FREETYPE_CFLAGS
1211FREETYPE_LIBS
1212ALSA_CFLAGS
1213ALSA_LIBS
1214LCMS_CFLAGS
1215LCMS_LIBS
1216PNG_CFLAGS
1217PNG_LIBS
1218LIBFFI_CFLAGS
1219LIBFFI_LIBS
1220CCACHE'
1221
1222
1223# Initialize some variables set by options.
1224ac_init_help=
1225ac_init_version=false
1226ac_unrecognized_opts=
1227ac_unrecognized_sep=
1228# The variables have the same names as the options, with
1229# dashes changed to underlines.
1230cache_file=/dev/null
1231exec_prefix=NONE
1232no_create=
1233no_recursion=
1234prefix=NONE
1235program_prefix=NONE
1236program_suffix=NONE
1237program_transform_name=s,x,x,
1238silent=
1239site=
1240srcdir=
1241verbose=
1242x_includes=NONE
1243x_libraries=NONE
1244
1245# Installation directory options.
1246# These are left unexpanded so users can "make install exec_prefix=/foo"
1247# and all the variables that are supposed to be based on exec_prefix
1248# by default will actually change.
1249# Use braces instead of parens because sh, perl, etc. also accept them.
1250# (The list follows the same order as the GNU Coding Standards.)
1251bindir='${exec_prefix}/bin'
1252sbindir='${exec_prefix}/sbin'
1253libexecdir='${exec_prefix}/libexec'
1254datarootdir='${prefix}/share'
1255datadir='${datarootdir}'
1256sysconfdir='${prefix}/etc'
1257sharedstatedir='${prefix}/com'
1258localstatedir='${prefix}/var'
1259includedir='${prefix}/include'
1260oldincludedir='/usr/include'
1261docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1262infodir='${datarootdir}/info'
1263htmldir='${docdir}'
1264dvidir='${docdir}'
1265pdfdir='${docdir}'
1266psdir='${docdir}'
1267libdir='${exec_prefix}/lib'
1268localedir='${datarootdir}/locale'
1269mandir='${datarootdir}/man'
1270
1271ac_prev=
1272ac_dashdash=
1273for ac_option
1274do
1275  # If the previous option needs an argument, assign it.
1276  if test -n "$ac_prev"; then
1277    eval $ac_prev=\$ac_option
1278    ac_prev=
1279    continue
1280  fi
1281
1282  case $ac_option in
1283  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1284  *=)   ac_optarg= ;;
1285  *)    ac_optarg=yes ;;
1286  esac
1287
1288  # Accept the important Cygnus configure options, so we can diagnose typos.
1289
1290  case $ac_dashdash$ac_option in
1291  --)
1292    ac_dashdash=yes ;;
1293
1294  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1295    ac_prev=bindir ;;
1296  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1297    bindir=$ac_optarg ;;
1298
1299  -build | --build | --buil | --bui | --bu)
1300    ac_prev=build_alias ;;
1301  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1302    build_alias=$ac_optarg ;;
1303
1304  -cache-file | --cache-file | --cache-fil | --cache-fi \
1305  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1306    ac_prev=cache_file ;;
1307  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1308  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1309    cache_file=$ac_optarg ;;
1310
1311  --config-cache | -C)
1312    cache_file=config.cache ;;
1313
1314  -datadir | --datadir | --datadi | --datad)
1315    ac_prev=datadir ;;
1316  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1317    datadir=$ac_optarg ;;
1318
1319  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1320  | --dataroo | --dataro | --datar)
1321    ac_prev=datarootdir ;;
1322  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1323  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1324    datarootdir=$ac_optarg ;;
1325
1326  -disable-* | --disable-*)
1327    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1328    # Reject names that are not valid shell variable names.
1329    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1330      as_fn_error $? "invalid feature name: $ac_useropt"
1331    ac_useropt_orig=$ac_useropt
1332    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1333    case $ac_user_opts in
1334      *"
1335"enable_$ac_useropt"
1336"*) ;;
1337      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1338	 ac_unrecognized_sep=', ';;
1339    esac
1340    eval enable_$ac_useropt=no ;;
1341
1342  -docdir | --docdir | --docdi | --doc | --do)
1343    ac_prev=docdir ;;
1344  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1345    docdir=$ac_optarg ;;
1346
1347  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1348    ac_prev=dvidir ;;
1349  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1350    dvidir=$ac_optarg ;;
1351
1352  -enable-* | --enable-*)
1353    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1354    # Reject names that are not valid shell variable names.
1355    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1356      as_fn_error $? "invalid feature name: $ac_useropt"
1357    ac_useropt_orig=$ac_useropt
1358    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1359    case $ac_user_opts in
1360      *"
1361"enable_$ac_useropt"
1362"*) ;;
1363      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1364	 ac_unrecognized_sep=', ';;
1365    esac
1366    eval enable_$ac_useropt=\$ac_optarg ;;
1367
1368  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1369  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1370  | --exec | --exe | --ex)
1371    ac_prev=exec_prefix ;;
1372  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1373  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1374  | --exec=* | --exe=* | --ex=*)
1375    exec_prefix=$ac_optarg ;;
1376
1377  -gas | --gas | --ga | --g)
1378    # Obsolete; use --with-gas.
1379    with_gas=yes ;;
1380
1381  -help | --help | --hel | --he | -h)
1382    ac_init_help=long ;;
1383  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1384    ac_init_help=recursive ;;
1385  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1386    ac_init_help=short ;;
1387
1388  -host | --host | --hos | --ho)
1389    ac_prev=host_alias ;;
1390  -host=* | --host=* | --hos=* | --ho=*)
1391    host_alias=$ac_optarg ;;
1392
1393  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1394    ac_prev=htmldir ;;
1395  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1396  | --ht=*)
1397    htmldir=$ac_optarg ;;
1398
1399  -includedir | --includedir | --includedi | --included | --include \
1400  | --includ | --inclu | --incl | --inc)
1401    ac_prev=includedir ;;
1402  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1403  | --includ=* | --inclu=* | --incl=* | --inc=*)
1404    includedir=$ac_optarg ;;
1405
1406  -infodir | --infodir | --infodi | --infod | --info | --inf)
1407    ac_prev=infodir ;;
1408  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1409    infodir=$ac_optarg ;;
1410
1411  -libdir | --libdir | --libdi | --libd)
1412    ac_prev=libdir ;;
1413  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1414    libdir=$ac_optarg ;;
1415
1416  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1417  | --libexe | --libex | --libe)
1418    ac_prev=libexecdir ;;
1419  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1420  | --libexe=* | --libex=* | --libe=*)
1421    libexecdir=$ac_optarg ;;
1422
1423  -localedir | --localedir | --localedi | --localed | --locale)
1424    ac_prev=localedir ;;
1425  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1426    localedir=$ac_optarg ;;
1427
1428  -localstatedir | --localstatedir | --localstatedi | --localstated \
1429  | --localstate | --localstat | --localsta | --localst | --locals)
1430    ac_prev=localstatedir ;;
1431  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1432  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1433    localstatedir=$ac_optarg ;;
1434
1435  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1436    ac_prev=mandir ;;
1437  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1438    mandir=$ac_optarg ;;
1439
1440  -nfp | --nfp | --nf)
1441    # Obsolete; use --without-fp.
1442    with_fp=no ;;
1443
1444  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1445  | --no-cr | --no-c | -n)
1446    no_create=yes ;;
1447
1448  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1449  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1450    no_recursion=yes ;;
1451
1452  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1453  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1454  | --oldin | --oldi | --old | --ol | --o)
1455    ac_prev=oldincludedir ;;
1456  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1457  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1458  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1459    oldincludedir=$ac_optarg ;;
1460
1461  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1462    ac_prev=prefix ;;
1463  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1464    prefix=$ac_optarg ;;
1465
1466  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1467  | --program-pre | --program-pr | --program-p)
1468    ac_prev=program_prefix ;;
1469  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1470  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1471    program_prefix=$ac_optarg ;;
1472
1473  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1474  | --program-suf | --program-su | --program-s)
1475    ac_prev=program_suffix ;;
1476  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1477  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1478    program_suffix=$ac_optarg ;;
1479
1480  -program-transform-name | --program-transform-name \
1481  | --program-transform-nam | --program-transform-na \
1482  | --program-transform-n | --program-transform- \
1483  | --program-transform | --program-transfor \
1484  | --program-transfo | --program-transf \
1485  | --program-trans | --program-tran \
1486  | --progr-tra | --program-tr | --program-t)
1487    ac_prev=program_transform_name ;;
1488  -program-transform-name=* | --program-transform-name=* \
1489  | --program-transform-nam=* | --program-transform-na=* \
1490  | --program-transform-n=* | --program-transform-=* \
1491  | --program-transform=* | --program-transfor=* \
1492  | --program-transfo=* | --program-transf=* \
1493  | --program-trans=* | --program-tran=* \
1494  | --progr-tra=* | --program-tr=* | --program-t=*)
1495    program_transform_name=$ac_optarg ;;
1496
1497  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1498    ac_prev=pdfdir ;;
1499  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1500    pdfdir=$ac_optarg ;;
1501
1502  -psdir | --psdir | --psdi | --psd | --ps)
1503    ac_prev=psdir ;;
1504  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1505    psdir=$ac_optarg ;;
1506
1507  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1508  | -silent | --silent | --silen | --sile | --sil)
1509    silent=yes ;;
1510
1511  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1512    ac_prev=sbindir ;;
1513  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1514  | --sbi=* | --sb=*)
1515    sbindir=$ac_optarg ;;
1516
1517  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1518  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1519  | --sharedst | --shareds | --shared | --share | --shar \
1520  | --sha | --sh)
1521    ac_prev=sharedstatedir ;;
1522  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1523  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1524  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1525  | --sha=* | --sh=*)
1526    sharedstatedir=$ac_optarg ;;
1527
1528  -site | --site | --sit)
1529    ac_prev=site ;;
1530  -site=* | --site=* | --sit=*)
1531    site=$ac_optarg ;;
1532
1533  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1534    ac_prev=srcdir ;;
1535  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1536    srcdir=$ac_optarg ;;
1537
1538  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1539  | --syscon | --sysco | --sysc | --sys | --sy)
1540    ac_prev=sysconfdir ;;
1541  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1542  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1543    sysconfdir=$ac_optarg ;;
1544
1545  -target | --target | --targe | --targ | --tar | --ta | --t)
1546    ac_prev=target_alias ;;
1547  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1548    target_alias=$ac_optarg ;;
1549
1550  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1551    verbose=yes ;;
1552
1553  -version | --version | --versio | --versi | --vers | -V)
1554    ac_init_version=: ;;
1555
1556  -with-* | --with-*)
1557    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1558    # Reject names that are not valid shell variable names.
1559    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1560      as_fn_error $? "invalid package name: $ac_useropt"
1561    ac_useropt_orig=$ac_useropt
1562    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1563    case $ac_user_opts in
1564      *"
1565"with_$ac_useropt"
1566"*) ;;
1567      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1568	 ac_unrecognized_sep=', ';;
1569    esac
1570    eval with_$ac_useropt=\$ac_optarg ;;
1571
1572  -without-* | --without-*)
1573    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1574    # Reject names that are not valid shell variable names.
1575    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1576      as_fn_error $? "invalid package name: $ac_useropt"
1577    ac_useropt_orig=$ac_useropt
1578    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1579    case $ac_user_opts in
1580      *"
1581"with_$ac_useropt"
1582"*) ;;
1583      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1584	 ac_unrecognized_sep=', ';;
1585    esac
1586    eval with_$ac_useropt=no ;;
1587
1588  --x)
1589    # Obsolete; use --with-x.
1590    with_x=yes ;;
1591
1592  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1593  | --x-incl | --x-inc | --x-in | --x-i)
1594    ac_prev=x_includes ;;
1595  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1596  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1597    x_includes=$ac_optarg ;;
1598
1599  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1600  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1601    ac_prev=x_libraries ;;
1602  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1603  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1604    x_libraries=$ac_optarg ;;
1605
1606  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1607Try \`$0 --help' for more information"
1608    ;;
1609
1610  *=*)
1611    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1612    # Reject names that are not valid shell variable names.
1613    case $ac_envvar in #(
1614      '' | [0-9]* | *[!_$as_cr_alnum]* )
1615      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1616    esac
1617    eval $ac_envvar=\$ac_optarg
1618    export $ac_envvar ;;
1619
1620  *)
1621    # FIXME: should be removed in autoconf 3.0.
1622    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1623    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1624      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1625    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1626    ;;
1627
1628  esac
1629done
1630
1631if test -n "$ac_prev"; then
1632  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1633  as_fn_error $? "missing argument to $ac_option"
1634fi
1635
1636if test -n "$ac_unrecognized_opts"; then
1637  case $enable_option_checking in
1638    no) ;;
1639    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1640    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1641  esac
1642fi
1643
1644# Check all directory arguments for consistency.
1645for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1646		datadir sysconfdir sharedstatedir localstatedir includedir \
1647		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1648		libdir localedir mandir
1649do
1650  eval ac_val=\$$ac_var
1651  # Remove trailing slashes.
1652  case $ac_val in
1653    */ )
1654      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1655      eval $ac_var=\$ac_val;;
1656  esac
1657  # Be sure to have absolute directory names.
1658  case $ac_val in
1659    [\\/$]* | ?:[\\/]* )  continue;;
1660    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1661  esac
1662  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1663done
1664
1665# There might be people who depend on the old broken behavior: `$host'
1666# used to hold the argument of --host etc.
1667# FIXME: To remove some day.
1668build=$build_alias
1669host=$host_alias
1670target=$target_alias
1671
1672# FIXME: To remove some day.
1673if test "x$host_alias" != x; then
1674  if test "x$build_alias" = x; then
1675    cross_compiling=maybe
1676  elif test "x$build_alias" != "x$host_alias"; then
1677    cross_compiling=yes
1678  fi
1679fi
1680
1681ac_tool_prefix=
1682test -n "$host_alias" && ac_tool_prefix=$host_alias-
1683
1684test "$silent" = yes && exec 6>/dev/null
1685
1686
1687ac_pwd=`pwd` && test -n "$ac_pwd" &&
1688ac_ls_di=`ls -di .` &&
1689ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1690  as_fn_error $? "working directory cannot be determined"
1691test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1692  as_fn_error $? "pwd does not report name of working directory"
1693
1694
1695# Find the source files, if location was not specified.
1696if test -z "$srcdir"; then
1697  ac_srcdir_defaulted=yes
1698  # Try the directory containing this script, then the parent directory.
1699  ac_confdir=`$as_dirname -- "$as_myself" ||
1700$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1701	 X"$as_myself" : 'X\(//\)[^/]' \| \
1702	 X"$as_myself" : 'X\(//\)$' \| \
1703	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1704$as_echo X"$as_myself" |
1705    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1706	    s//\1/
1707	    q
1708	  }
1709	  /^X\(\/\/\)[^/].*/{
1710	    s//\1/
1711	    q
1712	  }
1713	  /^X\(\/\/\)$/{
1714	    s//\1/
1715	    q
1716	  }
1717	  /^X\(\/\).*/{
1718	    s//\1/
1719	    q
1720	  }
1721	  s/.*/./; q'`
1722  srcdir=$ac_confdir
1723  if test ! -r "$srcdir/$ac_unique_file"; then
1724    srcdir=..
1725  fi
1726else
1727  ac_srcdir_defaulted=no
1728fi
1729if test ! -r "$srcdir/$ac_unique_file"; then
1730  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1731  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1732fi
1733ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1734ac_abs_confdir=`(
1735	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1736	pwd)`
1737# When building in place, set srcdir=.
1738if test "$ac_abs_confdir" = "$ac_pwd"; then
1739  srcdir=.
1740fi
1741# Remove unnecessary trailing slashes from srcdir.
1742# Double slashes in file names in object file debugging info
1743# mess up M-x gdb in Emacs.
1744case $srcdir in
1745*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1746esac
1747for ac_var in $ac_precious_vars; do
1748  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1749  eval ac_env_${ac_var}_value=\$${ac_var}
1750  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1751  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1752done
1753
1754#
1755# Report the --help message.
1756#
1757if test "$ac_init_help" = "long"; then
1758  # Omit some internal or obsolete options to make the list less imposing.
1759  # This message is too long to be a string in the A/UX 3.1 sh.
1760  cat <<_ACEOF
1761\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1762
1763Usage: $0 [OPTION]... [VAR=VALUE]...
1764
1765To assign environment variables (e.g., CC, CFLAGS...), specify them as
1766VAR=VALUE.  See below for descriptions of some of the useful variables.
1767
1768Defaults for the options are specified in brackets.
1769
1770Configuration:
1771  -h, --help              display this help and exit
1772      --help=short        display options specific to this package
1773      --help=recursive    display the short help of all the included packages
1774  -V, --version           display version information and exit
1775  -q, --quiet, --silent   do not print \`checking ...' messages
1776      --cache-file=FILE   cache test results in FILE [disabled]
1777  -C, --config-cache      alias for \`--cache-file=config.cache'
1778  -n, --no-create         do not create output files
1779      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1780
1781Installation directories:
1782  --prefix=PREFIX         install architecture-independent files in PREFIX
1783                          [$ac_default_prefix]
1784  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1785                          [PREFIX]
1786
1787By default, \`make install' will install all the files in
1788\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1789an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1790for instance \`--prefix=\$HOME'.
1791
1792For better control, use the options below.
1793
1794Fine tuning of the installation directories:
1795  --bindir=DIR            user executables [EPREFIX/bin]
1796  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1797  --libexecdir=DIR        program executables [EPREFIX/libexec]
1798  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1799  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1800  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1801  --libdir=DIR            object code libraries [EPREFIX/lib]
1802  --includedir=DIR        C header files [PREFIX/include]
1803  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1804  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1805  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1806  --infodir=DIR           info documentation [DATAROOTDIR/info]
1807  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1808  --mandir=DIR            man documentation [DATAROOTDIR/man]
1809  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1810  --htmldir=DIR           html documentation [DOCDIR]
1811  --dvidir=DIR            dvi documentation [DOCDIR]
1812  --pdfdir=DIR            pdf documentation [DOCDIR]
1813  --psdir=DIR             ps documentation [DOCDIR]
1814_ACEOF
1815
1816  cat <<\_ACEOF
1817
1818X features:
1819  --x-includes=DIR    X include files are in DIR
1820  --x-libraries=DIR   X library files are in DIR
1821
1822System types:
1823  --build=BUILD     configure for building on BUILD [guessed]
1824  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1825  --target=TARGET   configure for building compilers for TARGET [HOST]
1826_ACEOF
1827fi
1828
1829if test -n "$ac_init_help"; then
1830  case $ac_init_help in
1831     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1832   esac
1833  cat <<\_ACEOF
1834
1835Optional Features:
1836  --disable-option-checking  ignore unrecognized --enable/--with options
1837  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1838  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1839  --enable-openjdk-only   suppress building custom source even if present
1840                          [disabled]
1841  --enable-debug          set the debug level to fastdebug (shorthand for
1842                          --with-debug-level=fastdebug) [disabled]
1843  --disable-headful       disable building headful support (graphical UI
1844                          support) [enabled]
1845  --enable-hotspot-test-in-build
1846                          run the Queens test after Hotspot build [disabled]
1847  --enable-unlimited-crypto
1848                          Enable unlimited crypto policy [disabled]
1849  --enable-rmiconnector-iiop
1850                          enable the JMX RMIConnector iiop transport
1851                          [disabled]
1852  --disable-debug-symbols disable generation of debug symbols [enabled]
1853  --disable-zip-debug-info
1854                          disable zipping of debug-info files [enabled]
1855  --disable-freetype-bundling
1856                          disable bundling of the freetype library with the
1857                          build result [enabled on Windows or when using
1858                          --with-freetype, disabled otherwise]
1859  --enable-sjavac         use sjavac to do fast incremental compiles
1860                          [disabled]
1861  --disable-precompiled-headers
1862                          disable using precompiled headers when compiling C++
1863                          [enabled]
1864  --enable-ccache         enable using ccache to speed up recompilations
1865                          [disabled]
1866
1867Optional Packages:
1868  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1869  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1870  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1871                          support it), e.g. --with-target-bits=32 [guessed]
1872  --with-custom-make-dir  Deprecated. Option is kept for backwards
1873                          compatibility and is ignored
1874  --with-jdk-variant      JDK variant to build (normal) [normal]
1875  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1876  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1877                          client, minimal1, kernel, zero, zeroshark, core)
1878                          [server]
1879  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1880                          optimized (HotSpot build only)) [release]
1881  --with-devkit           use this devkit for compilers, tools and resources
1882  --with-sys-root         alias for --with-sysroot for backwards compatability
1883  --with-sysroot          use this directory as sysroot
1884  --with-tools-dir        alias for --with-toolchain-path for backwards
1885                          compatibility
1886  --with-toolchain-path   prepend these directories when searching for
1887                          toolchain binaries (compilers etc)
1888  --with-extra-path       prepend these directories to the default path
1889  --with-sdk-name         use the platform SDK of the given name. [macosx]
1890  --with-conf-name        use this as the name of the configuration [generated
1891                          from important configuration options]
1892  --with-output-sync      set make output sync type if supported by make.
1893                          [recurse]
1894  --with-builddeps-conf   use this configuration file for the builddeps
1895  --with-builddeps-server download and use build dependencies from this server
1896                          url
1897  --with-builddeps-dir    store downloaded build dependencies here
1898                          [/localhome/builddeps]
1899  --with-builddeps-group  chgrp the downloaded build dependencies to this
1900                          group
1901  --with-cacerts-file     specify alternative cacerts file
1902  --with-milestone        Set milestone value for build [internal]
1903  --with-update-version   Set update version value for build [b00]
1904  --with-user-release-suffix
1905                          Add a custom string to the version string if build
1906                          number is not set.[username_builddateb00]
1907  --with-build-number     Set build number value for build [b00]
1908  --with-copyright-year   Set copyright year value for build [current year]
1909  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1910  --with-add-source-root  for each and every source directory, look in this
1911                          additional source root for the same directory; if it
1912                          exists and have files in it, include it in the build
1913  --with-override-source-root
1914                          for each and every source directory, look in this
1915                          override source root for the same directory; if it
1916                          exists, use that directory instead and ignore the
1917                          directory in the original source root
1918  --with-adds-and-overrides
1919                          use the subdirs 'adds' and 'overrides' in the
1920                          specified directory as add-source-root and
1921                          override-source-root
1922  --with-override-langtools
1923                          use this langtools dir for the build
1924  --with-override-corba   use this corba dir for the build
1925  --with-override-jaxp    use this jaxp dir for the build
1926  --with-override-jaxws   use this jaxws dir for the build
1927  --with-override-hotspot use this hotspot dir for the build
1928  --with-override-nashorn use this nashorn dir for the build
1929  --with-override-jdk     use this jdk dir for the build
1930  --with-import-hotspot   import hotspot binaries from this jdk image or
1931                          hotspot build dist dir instead of building from
1932                          source
1933  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1934                          to show possible values [platform dependent]
1935  --with-jtreg            Regression Test Harness [probed]
1936  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1937  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1938  --with-extra-ldflags    extra flags to be used when linking jdk
1939  --with-x                use the X Window System
1940  --with-cups             specify prefix directory for the cups package
1941                          (expecting the headers under PATH/include)
1942  --with-cups-include     specify directory for the cups include files
1943  --with-freetype         specify prefix directory for the freetype package
1944                          (expecting the libraries under PATH/lib and the
1945                          headers under PATH/include)
1946  --with-freetype-include specify directory for the freetype include files
1947  --with-freetype-lib     specify directory for the freetype library
1948  --with-freetype-src     specify directory with freetype sources to
1949                          automatically build the library (experimental,
1950                          Windows-only)
1951  --with-alsa             specify prefix directory for the alsa package
1952                          (expecting the libraries under PATH/lib and the
1953                          headers under PATH/include)
1954  --with-alsa-include     specify directory for the alsa include files
1955  --with-alsa-lib         specify directory for the alsa library
1956  --with-libjpeg          use libjpeg from build system or OpenJDK source
1957                          (system, bundled) [bundled]
1958  --with-giflib           use giflib from build system or OpenJDK source
1959                          (system, bundled) [bundled]
1960  --with-lcms             use lcms2 from build system or OpenJDK source
1961                          (system, bundled) [bundled]
1962  --with-libpng           use libpng from build system or OpenJDK source
1963                          (system, bundled) [bundled]
1964  --with-zlib             use zlib from build system or OpenJDK source
1965                          (system, bundled) [bundled]
1966  --with-stdc++lib=<static>,<dynamic>,<default>
1967                          force linking of the C++ runtime on Linux to either
1968                          static or dynamic, default is static with dynamic as
1969                          fallback
1970  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1971                          only) [probed]
1972  --with-dxsdk            Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1975                          compatibility and is ignored
1976  --with-dxsdk-include    Deprecated. Option is kept for backwards
1977                          compatibility and is ignored
1978  --with-num-cores        number of cores in the build system, e.g.
1979                          --with-num-cores=8 [probed]
1980  --with-memory-size      memory (in MB) available in the build system, e.g.
1981                          --with-memory-size=1024 [probed]
1982  --with-jobs             number of parallel jobs to let make run [calculated
1983                          based on cores and memory]
1984  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1985                          invocations of boot JDK, overriding the default
1986                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1987                          -enableassertions"
1988  --with-sjavac-server-java
1989                          use this java binary for running the sjavac
1990                          background server [Boot JDK java]
1991  --with-ccache-dir       where to store ccache files [~/.ccache]
1992
1993Some influential environment variables:
1994  BASENAME    Override default value for BASENAME
1995  BASH        Override default value for BASH
1996  CAT         Override default value for CAT
1997  CHMOD       Override default value for CHMOD
1998  CMP         Override default value for CMP
1999  COMM        Override default value for COMM
2000  CP          Override default value for CP
2001  CUT         Override default value for CUT
2002  DATE        Override default value for DATE
2003  DIFF        Override default value for DIFF
2004  DIRNAME     Override default value for DIRNAME
2005  ECHO        Override default value for ECHO
2006  EXPR        Override default value for EXPR
2007  FILE        Override default value for FILE
2008  FIND        Override default value for FIND
2009  HEAD        Override default value for HEAD
2010  LN          Override default value for LN
2011  LS          Override default value for LS
2012  MKDIR       Override default value for MKDIR
2013  MKTEMP      Override default value for MKTEMP
2014  MV          Override default value for MV
2015  NAWK        Override default value for NAWK
2016  PRINTF      Override default value for PRINTF
2017  RM          Override default value for RM
2018  SH          Override default value for SH
2019  SORT        Override default value for SORT
2020  TAIL        Override default value for TAIL
2021  TAR         Override default value for TAR
2022  TEE         Override default value for TEE
2023  TOUCH       Override default value for TOUCH
2024  TR          Override default value for TR
2025  UNAME       Override default value for UNAME
2026  UNIQ        Override default value for UNIQ
2027  WC          Override default value for WC
2028  WHICH       Override default value for WHICH
2029  XARGS       Override default value for XARGS
2030  AWK         Override default value for AWK
2031  GREP        Override default value for GREP
2032  EGREP       Override default value for EGREP
2033  FGREP       Override default value for FGREP
2034  SED         Override default value for SED
2035  CYGPATH     Override default value for CYGPATH
2036  READLINK    Override default value for READLINK
2037  DF          Override default value for DF
2038  SETFILE     Override default value for SETFILE
2039  CPIO        Override default value for CPIO
2040  UNZIP       Override default value for UNZIP
2041  ZIP         Override default value for ZIP
2042  LDD         Override default value for LDD
2043  OTOOL       Override default value for OTOOL
2044  READELF     Override default value for READELF
2045  HG          Override default value for HG
2046  STAT        Override default value for STAT
2047  TIME        Override default value for TIME
2048  DSYMUTIL    Override default value for DSYMUTIL
2049  XATTR       Override default value for XATTR
2050  CODESIGN    Override default value for CODESIGN
2051  PKG_CONFIG  path to pkg-config utility
2052  JAVA        Override default value for JAVA
2053  JAVAC       Override default value for JAVAC
2054  JAVAH       Override default value for JAVAH
2055  JAR         Override default value for JAR
2056  NATIVE2ASCII
2057              Override default value for NATIVE2ASCII
2058  JARSIGNER   Override default value for JARSIGNER
2059  CC          C compiler command
2060  CFLAGS      C compiler flags
2061  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2062              nonstandard directory <lib dir>
2063  LIBS        libraries to pass to the linker, e.g. -l<library>
2064  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2065              you have headers in a nonstandard directory <include dir>
2066  CXX         C++ compiler command
2067  CXXFLAGS    C++ compiler flags
2068  CPP         C preprocessor
2069  CXXCPP      C++ preprocessor
2070  AS          Override default value for AS
2071  AR          Override default value for AR
2072  OBJC        Objective C compiler command
2073  OBJCFLAGS   Objective C compiler flags
2074  LIPO        Override default value for LIPO
2075  STRIP       Override default value for STRIP
2076  NM          Override default value for NM
2077  GNM         Override default value for GNM
2078  MCS         Override default value for MCS
2079  OBJCOPY     Override default value for OBJCOPY
2080  OBJDUMP     Override default value for OBJDUMP
2081  BUILD_CC    Override default value for BUILD_CC
2082  BUILD_CXX   Override default value for BUILD_CXX
2083  BUILD_LD    Override default value for BUILD_LD
2084  JTREGEXE    Override default value for JTREGEXE
2085  XMKMF       Path to xmkmf, Makefile generator for X Window System
2086  FREETYPE_CFLAGS
2087              C compiler flags for FREETYPE, overriding pkg-config
2088  FREETYPE_LIBS
2089              linker flags for FREETYPE, overriding pkg-config
2090  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2091  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2092  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2093  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2094  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2095  PNG_LIBS    linker flags for PNG, overriding pkg-config
2096  LIBFFI_CFLAGS
2097              C compiler flags for LIBFFI, overriding pkg-config
2098  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2099  CCACHE      Override default value for CCACHE
2100
2101Use these variables to override the choices made by `configure' or to help
2102it to find libraries and programs with nonstandard names/locations.
2103
2104Report bugs to <build-dev@openjdk.java.net>.
2105OpenJDK home page: <http://openjdk.java.net>.
2106_ACEOF
2107ac_status=$?
2108fi
2109
2110if test "$ac_init_help" = "recursive"; then
2111  # If there are subdirs, report their specific --help.
2112  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2113    test -d "$ac_dir" ||
2114      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2115      continue
2116    ac_builddir=.
2117
2118case "$ac_dir" in
2119.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2120*)
2121  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2122  # A ".." for each directory in $ac_dir_suffix.
2123  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2124  case $ac_top_builddir_sub in
2125  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2126  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2127  esac ;;
2128esac
2129ac_abs_top_builddir=$ac_pwd
2130ac_abs_builddir=$ac_pwd$ac_dir_suffix
2131# for backward compatibility:
2132ac_top_builddir=$ac_top_build_prefix
2133
2134case $srcdir in
2135  .)  # We are building in place.
2136    ac_srcdir=.
2137    ac_top_srcdir=$ac_top_builddir_sub
2138    ac_abs_top_srcdir=$ac_pwd ;;
2139  [\\/]* | ?:[\\/]* )  # Absolute name.
2140    ac_srcdir=$srcdir$ac_dir_suffix;
2141    ac_top_srcdir=$srcdir
2142    ac_abs_top_srcdir=$srcdir ;;
2143  *) # Relative name.
2144    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2145    ac_top_srcdir=$ac_top_build_prefix$srcdir
2146    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2147esac
2148ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2149
2150    cd "$ac_dir" || { ac_status=$?; continue; }
2151    # Check for guested configure.
2152    if test -f "$ac_srcdir/configure.gnu"; then
2153      echo &&
2154      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2155    elif test -f "$ac_srcdir/configure"; then
2156      echo &&
2157      $SHELL "$ac_srcdir/configure" --help=recursive
2158    else
2159      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2160    fi || ac_status=$?
2161    cd "$ac_pwd" || { ac_status=$?; break; }
2162  done
2163fi
2164
2165test -n "$ac_init_help" && exit $ac_status
2166if $ac_init_version; then
2167  cat <<\_ACEOF
2168OpenJDK configure jdk9
2169generated by GNU Autoconf 2.69
2170
2171Copyright (C) 2012 Free Software Foundation, Inc.
2172This configure script is free software; the Free Software Foundation
2173gives unlimited permission to copy, distribute and modify it.
2174_ACEOF
2175  exit
2176fi
2177
2178## ------------------------ ##
2179## Autoconf initialization. ##
2180## ------------------------ ##
2181
2182# ac_fn_c_try_compile LINENO
2183# --------------------------
2184# Try to compile conftest.$ac_ext, and return whether this succeeded.
2185ac_fn_c_try_compile ()
2186{
2187  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188  rm -f conftest.$ac_objext
2189  if { { ac_try="$ac_compile"
2190case "(($ac_try" in
2191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2192  *) ac_try_echo=$ac_try;;
2193esac
2194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2195$as_echo "$ac_try_echo"; } >&5
2196  (eval "$ac_compile") 2>conftest.err
2197  ac_status=$?
2198  if test -s conftest.err; then
2199    grep -v '^ *+' conftest.err >conftest.er1
2200    cat conftest.er1 >&5
2201    mv -f conftest.er1 conftest.err
2202  fi
2203  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2204  test $ac_status = 0; } && {
2205	 test -z "$ac_c_werror_flag" ||
2206	 test ! -s conftest.err
2207       } && test -s conftest.$ac_objext; then :
2208  ac_retval=0
2209else
2210  $as_echo "$as_me: failed program was:" >&5
2211sed 's/^/| /' conftest.$ac_ext >&5
2212
2213	ac_retval=1
2214fi
2215  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216  as_fn_set_status $ac_retval
2217
2218} # ac_fn_c_try_compile
2219
2220# ac_fn_cxx_try_compile LINENO
2221# ----------------------------
2222# Try to compile conftest.$ac_ext, and return whether this succeeded.
2223ac_fn_cxx_try_compile ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  rm -f conftest.$ac_objext
2227  if { { ac_try="$ac_compile"
2228case "(($ac_try" in
2229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230  *) ac_try_echo=$ac_try;;
2231esac
2232eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233$as_echo "$ac_try_echo"; } >&5
2234  (eval "$ac_compile") 2>conftest.err
2235  ac_status=$?
2236  if test -s conftest.err; then
2237    grep -v '^ *+' conftest.err >conftest.er1
2238    cat conftest.er1 >&5
2239    mv -f conftest.er1 conftest.err
2240  fi
2241  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2242  test $ac_status = 0; } && {
2243	 test -z "$ac_cxx_werror_flag" ||
2244	 test ! -s conftest.err
2245       } && test -s conftest.$ac_objext; then :
2246  ac_retval=0
2247else
2248  $as_echo "$as_me: failed program was:" >&5
2249sed 's/^/| /' conftest.$ac_ext >&5
2250
2251	ac_retval=1
2252fi
2253  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2254  as_fn_set_status $ac_retval
2255
2256} # ac_fn_cxx_try_compile
2257
2258# ac_fn_c_try_cpp LINENO
2259# ----------------------
2260# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2261ac_fn_c_try_cpp ()
2262{
2263  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2264  if { { ac_try="$ac_cpp conftest.$ac_ext"
2265case "(($ac_try" in
2266  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2267  *) ac_try_echo=$ac_try;;
2268esac
2269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2270$as_echo "$ac_try_echo"; } >&5
2271  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2272  ac_status=$?
2273  if test -s conftest.err; then
2274    grep -v '^ *+' conftest.err >conftest.er1
2275    cat conftest.er1 >&5
2276    mv -f conftest.er1 conftest.err
2277  fi
2278  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2279  test $ac_status = 0; } > conftest.i && {
2280	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2281	 test ! -s conftest.err
2282       }; then :
2283  ac_retval=0
2284else
2285  $as_echo "$as_me: failed program was:" >&5
2286sed 's/^/| /' conftest.$ac_ext >&5
2287
2288    ac_retval=1
2289fi
2290  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291  as_fn_set_status $ac_retval
2292
2293} # ac_fn_c_try_cpp
2294
2295# ac_fn_cxx_try_cpp LINENO
2296# ------------------------
2297# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2298ac_fn_cxx_try_cpp ()
2299{
2300  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301  if { { ac_try="$ac_cpp conftest.$ac_ext"
2302case "(($ac_try" in
2303  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2304  *) ac_try_echo=$ac_try;;
2305esac
2306eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2307$as_echo "$ac_try_echo"; } >&5
2308  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2309  ac_status=$?
2310  if test -s conftest.err; then
2311    grep -v '^ *+' conftest.err >conftest.er1
2312    cat conftest.er1 >&5
2313    mv -f conftest.er1 conftest.err
2314  fi
2315  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2316  test $ac_status = 0; } > conftest.i && {
2317	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2318	 test ! -s conftest.err
2319       }; then :
2320  ac_retval=0
2321else
2322  $as_echo "$as_me: failed program was:" >&5
2323sed 's/^/| /' conftest.$ac_ext >&5
2324
2325    ac_retval=1
2326fi
2327  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2328  as_fn_set_status $ac_retval
2329
2330} # ac_fn_cxx_try_cpp
2331
2332# ac_fn_objc_try_compile LINENO
2333# -----------------------------
2334# Try to compile conftest.$ac_ext, and return whether this succeeded.
2335ac_fn_objc_try_compile ()
2336{
2337  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338  rm -f conftest.$ac_objext
2339  if { { ac_try="$ac_compile"
2340case "(($ac_try" in
2341  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2342  *) ac_try_echo=$ac_try;;
2343esac
2344eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2345$as_echo "$ac_try_echo"; } >&5
2346  (eval "$ac_compile") 2>conftest.err
2347  ac_status=$?
2348  if test -s conftest.err; then
2349    grep -v '^ *+' conftest.err >conftest.er1
2350    cat conftest.er1 >&5
2351    mv -f conftest.er1 conftest.err
2352  fi
2353  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2354  test $ac_status = 0; } && {
2355	 test -z "$ac_objc_werror_flag" ||
2356	 test ! -s conftest.err
2357       } && test -s conftest.$ac_objext; then :
2358  ac_retval=0
2359else
2360  $as_echo "$as_me: failed program was:" >&5
2361sed 's/^/| /' conftest.$ac_ext >&5
2362
2363	ac_retval=1
2364fi
2365  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2366  as_fn_set_status $ac_retval
2367
2368} # ac_fn_objc_try_compile
2369
2370# ac_fn_c_try_link LINENO
2371# -----------------------
2372# Try to link conftest.$ac_ext, and return whether this succeeded.
2373ac_fn_c_try_link ()
2374{
2375  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376  rm -f conftest.$ac_objext conftest$ac_exeext
2377  if { { ac_try="$ac_link"
2378case "(($ac_try" in
2379  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2380  *) ac_try_echo=$ac_try;;
2381esac
2382eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2383$as_echo "$ac_try_echo"; } >&5
2384  (eval "$ac_link") 2>conftest.err
2385  ac_status=$?
2386  if test -s conftest.err; then
2387    grep -v '^ *+' conftest.err >conftest.er1
2388    cat conftest.er1 >&5
2389    mv -f conftest.er1 conftest.err
2390  fi
2391  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2392  test $ac_status = 0; } && {
2393	 test -z "$ac_c_werror_flag" ||
2394	 test ! -s conftest.err
2395       } && test -s conftest$ac_exeext && {
2396	 test "$cross_compiling" = yes ||
2397	 test -x conftest$ac_exeext
2398       }; then :
2399  ac_retval=0
2400else
2401  $as_echo "$as_me: failed program was:" >&5
2402sed 's/^/| /' conftest.$ac_ext >&5
2403
2404	ac_retval=1
2405fi
2406  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2407  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2408  # interfere with the next link command; also delete a directory that is
2409  # left behind by Apple's compiler.  We do this before executing the actions.
2410  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2411  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412  as_fn_set_status $ac_retval
2413
2414} # ac_fn_c_try_link
2415
2416# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2417# ---------------------------------------------------------
2418# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2419# the include files in INCLUDES and setting the cache variable VAR
2420# accordingly.
2421ac_fn_cxx_check_header_mongrel ()
2422{
2423  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424  if eval \${$3+:} false; then :
2425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2426$as_echo_n "checking for $2... " >&6; }
2427if eval \${$3+:} false; then :
2428  $as_echo_n "(cached) " >&6
2429fi
2430eval ac_res=\$$3
2431	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2432$as_echo "$ac_res" >&6; }
2433else
2434  # Is the header compilable?
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2436$as_echo_n "checking $2 usability... " >&6; }
2437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438/* end confdefs.h.  */
2439$4
2440#include <$2>
2441_ACEOF
2442if ac_fn_cxx_try_compile "$LINENO"; then :
2443  ac_header_compiler=yes
2444else
2445  ac_header_compiler=no
2446fi
2447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2449$as_echo "$ac_header_compiler" >&6; }
2450
2451# Is the header present?
2452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2453$as_echo_n "checking $2 presence... " >&6; }
2454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2455/* end confdefs.h.  */
2456#include <$2>
2457_ACEOF
2458if ac_fn_cxx_try_cpp "$LINENO"; then :
2459  ac_header_preproc=yes
2460else
2461  ac_header_preproc=no
2462fi
2463rm -f conftest.err conftest.i conftest.$ac_ext
2464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2465$as_echo "$ac_header_preproc" >&6; }
2466
2467# So?  What about this header?
2468case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2469  yes:no: )
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2471$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2473$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2474    ;;
2475  no:yes:* )
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2477$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2479$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2481$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2483$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2485$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2486( $as_echo "## ----------------------------------------- ##
2487## Report this to build-dev@openjdk.java.net ##
2488## ----------------------------------------- ##"
2489     ) | sed "s/^/$as_me: WARNING:     /" >&2
2490    ;;
2491esac
2492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493$as_echo_n "checking for $2... " >&6; }
2494if eval \${$3+:} false; then :
2495  $as_echo_n "(cached) " >&6
2496else
2497  eval "$3=\$ac_header_compiler"
2498fi
2499eval ac_res=\$$3
2500	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2501$as_echo "$ac_res" >&6; }
2502fi
2503  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2504
2505} # ac_fn_cxx_check_header_mongrel
2506
2507# ac_fn_cxx_try_run LINENO
2508# ------------------------
2509# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2510# that executables *can* be run.
2511ac_fn_cxx_try_run ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  if { { ac_try="$ac_link"
2515case "(($ac_try" in
2516  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517  *) ac_try_echo=$ac_try;;
2518esac
2519eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2520$as_echo "$ac_try_echo"; } >&5
2521  (eval "$ac_link") 2>&5
2522  ac_status=$?
2523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2524  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2525  { { case "(($ac_try" in
2526  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527  *) ac_try_echo=$ac_try;;
2528esac
2529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2530$as_echo "$ac_try_echo"; } >&5
2531  (eval "$ac_try") 2>&5
2532  ac_status=$?
2533  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534  test $ac_status = 0; }; }; then :
2535  ac_retval=0
2536else
2537  $as_echo "$as_me: program exited with status $ac_status" >&5
2538       $as_echo "$as_me: failed program was:" >&5
2539sed 's/^/| /' conftest.$ac_ext >&5
2540
2541       ac_retval=$ac_status
2542fi
2543  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2544  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545  as_fn_set_status $ac_retval
2546
2547} # ac_fn_cxx_try_run
2548
2549# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2550# ---------------------------------------------------------
2551# Tests whether HEADER exists and can be compiled using the include files in
2552# INCLUDES, setting the cache variable VAR accordingly.
2553ac_fn_cxx_check_header_compile ()
2554{
2555  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2557$as_echo_n "checking for $2... " >&6; }
2558if eval \${$3+:} false; then :
2559  $as_echo_n "(cached) " >&6
2560else
2561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h.  */
2563$4
2564#include <$2>
2565_ACEOF
2566if ac_fn_cxx_try_compile "$LINENO"; then :
2567  eval "$3=yes"
2568else
2569  eval "$3=no"
2570fi
2571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2572fi
2573eval ac_res=\$$3
2574	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2575$as_echo "$ac_res" >&6; }
2576  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577
2578} # ac_fn_cxx_check_header_compile
2579
2580# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2581# ----------------------------------------------
2582# Tries to find the compile-time value of EXPR in a program that includes
2583# INCLUDES, setting VAR accordingly. Returns whether the value could be
2584# computed
2585ac_fn_cxx_compute_int ()
2586{
2587  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588  if test "$cross_compiling" = yes; then
2589    # Depending upon the size, compute the lo and hi bounds.
2590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591/* end confdefs.h.  */
2592$4
2593int
2594main ()
2595{
2596static int test_array [1 - 2 * !(($2) >= 0)];
2597test_array [0] = 0;
2598return test_array [0];
2599
2600  ;
2601  return 0;
2602}
2603_ACEOF
2604if ac_fn_cxx_try_compile "$LINENO"; then :
2605  ac_lo=0 ac_mid=0
2606  while :; do
2607    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2608/* end confdefs.h.  */
2609$4
2610int
2611main ()
2612{
2613static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2614test_array [0] = 0;
2615return test_array [0];
2616
2617  ;
2618  return 0;
2619}
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_hi=$ac_mid; break
2623else
2624  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2625			if test $ac_lo -le $ac_mid; then
2626			  ac_lo= ac_hi=
2627			  break
2628			fi
2629			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2630fi
2631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2632  done
2633else
2634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2635/* end confdefs.h.  */
2636$4
2637int
2638main ()
2639{
2640static int test_array [1 - 2 * !(($2) < 0)];
2641test_array [0] = 0;
2642return test_array [0];
2643
2644  ;
2645  return 0;
2646}
2647_ACEOF
2648if ac_fn_cxx_try_compile "$LINENO"; then :
2649  ac_hi=-1 ac_mid=-1
2650  while :; do
2651    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2652/* end confdefs.h.  */
2653$4
2654int
2655main ()
2656{
2657static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2658test_array [0] = 0;
2659return test_array [0];
2660
2661  ;
2662  return 0;
2663}
2664_ACEOF
2665if ac_fn_cxx_try_compile "$LINENO"; then :
2666  ac_lo=$ac_mid; break
2667else
2668  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2669			if test $ac_mid -le $ac_hi; then
2670			  ac_lo= ac_hi=
2671			  break
2672			fi
2673			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2674fi
2675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2676  done
2677else
2678  ac_lo= ac_hi=
2679fi
2680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681fi
2682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2683# Binary search between lo and hi bounds.
2684while test "x$ac_lo" != "x$ac_hi"; do
2685  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687/* end confdefs.h.  */
2688$4
2689int
2690main ()
2691{
2692static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2693test_array [0] = 0;
2694return test_array [0];
2695
2696  ;
2697  return 0;
2698}
2699_ACEOF
2700if ac_fn_cxx_try_compile "$LINENO"; then :
2701  ac_hi=$ac_mid
2702else
2703  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2704fi
2705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2706done
2707case $ac_lo in #((
2708?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2709'') ac_retval=1 ;;
2710esac
2711  else
2712    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2713/* end confdefs.h.  */
2714$4
2715static long int longval () { return $2; }
2716static unsigned long int ulongval () { return $2; }
2717#include <stdio.h>
2718#include <stdlib.h>
2719int
2720main ()
2721{
2722
2723  FILE *f = fopen ("conftest.val", "w");
2724  if (! f)
2725    return 1;
2726  if (($2) < 0)
2727    {
2728      long int i = longval ();
2729      if (i != ($2))
2730	return 1;
2731      fprintf (f, "%ld", i);
2732    }
2733  else
2734    {
2735      unsigned long int i = ulongval ();
2736      if (i != ($2))
2737	return 1;
2738      fprintf (f, "%lu", i);
2739    }
2740  /* Do not output a trailing newline, as this causes \r\n confusion
2741     on some platforms.  */
2742  return ferror (f) || fclose (f) != 0;
2743
2744  ;
2745  return 0;
2746}
2747_ACEOF
2748if ac_fn_cxx_try_run "$LINENO"; then :
2749  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2750else
2751  ac_retval=1
2752fi
2753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2754  conftest.$ac_objext conftest.beam conftest.$ac_ext
2755rm -f conftest.val
2756
2757  fi
2758  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2759  as_fn_set_status $ac_retval
2760
2761} # ac_fn_cxx_compute_int
2762
2763# ac_fn_cxx_try_link LINENO
2764# -------------------------
2765# Try to link conftest.$ac_ext, and return whether this succeeded.
2766ac_fn_cxx_try_link ()
2767{
2768  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2769  rm -f conftest.$ac_objext conftest$ac_exeext
2770  if { { ac_try="$ac_link"
2771case "(($ac_try" in
2772  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2773  *) ac_try_echo=$ac_try;;
2774esac
2775eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2776$as_echo "$ac_try_echo"; } >&5
2777  (eval "$ac_link") 2>conftest.err
2778  ac_status=$?
2779  if test -s conftest.err; then
2780    grep -v '^ *+' conftest.err >conftest.er1
2781    cat conftest.er1 >&5
2782    mv -f conftest.er1 conftest.err
2783  fi
2784  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2785  test $ac_status = 0; } && {
2786	 test -z "$ac_cxx_werror_flag" ||
2787	 test ! -s conftest.err
2788       } && test -s conftest$ac_exeext && {
2789	 test "$cross_compiling" = yes ||
2790	 test -x conftest$ac_exeext
2791       }; then :
2792  ac_retval=0
2793else
2794  $as_echo "$as_me: failed program was:" >&5
2795sed 's/^/| /' conftest.$ac_ext >&5
2796
2797	ac_retval=1
2798fi
2799  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2800  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2801  # interfere with the next link command; also delete a directory that is
2802  # left behind by Apple's compiler.  We do this before executing the actions.
2803  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2804  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2805  as_fn_set_status $ac_retval
2806
2807} # ac_fn_cxx_try_link
2808
2809# ac_fn_cxx_check_func LINENO FUNC VAR
2810# ------------------------------------
2811# Tests whether FUNC exists, setting the cache variable VAR accordingly
2812ac_fn_cxx_check_func ()
2813{
2814  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2816$as_echo_n "checking for $2... " >&6; }
2817if eval \${$3+:} false; then :
2818  $as_echo_n "(cached) " >&6
2819else
2820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2821/* end confdefs.h.  */
2822/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2823   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2824#define $2 innocuous_$2
2825
2826/* System header to define __stub macros and hopefully few prototypes,
2827    which can conflict with char $2 (); below.
2828    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2829    <limits.h> exists even on freestanding compilers.  */
2830
2831#ifdef __STDC__
2832# include <limits.h>
2833#else
2834# include <assert.h>
2835#endif
2836
2837#undef $2
2838
2839/* Override any GCC internal prototype to avoid an error.
2840   Use char because int might match the return type of a GCC
2841   builtin and then its argument prototype would still apply.  */
2842#ifdef __cplusplus
2843extern "C"
2844#endif
2845char $2 ();
2846/* The GNU C library defines this for functions which it implements
2847    to always fail with ENOSYS.  Some functions are actually named
2848    something starting with __ and the normal name is an alias.  */
2849#if defined __stub_$2 || defined __stub___$2
2850choke me
2851#endif
2852
2853int
2854main ()
2855{
2856return $2 ();
2857  ;
2858  return 0;
2859}
2860_ACEOF
2861if ac_fn_cxx_try_link "$LINENO"; then :
2862  eval "$3=yes"
2863else
2864  eval "$3=no"
2865fi
2866rm -f core conftest.err conftest.$ac_objext \
2867    conftest$ac_exeext conftest.$ac_ext
2868fi
2869eval ac_res=\$$3
2870	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2871$as_echo "$ac_res" >&6; }
2872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873
2874} # ac_fn_cxx_check_func
2875
2876# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2877# -------------------------------------------------------
2878# Tests whether HEADER exists and can be compiled using the include files in
2879# INCLUDES, setting the cache variable VAR accordingly.
2880ac_fn_c_check_header_compile ()
2881{
2882  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2884$as_echo_n "checking for $2... " >&6; }
2885if eval \${$3+:} false; then :
2886  $as_echo_n "(cached) " >&6
2887else
2888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2889/* end confdefs.h.  */
2890$4
2891#include <$2>
2892_ACEOF
2893if ac_fn_c_try_compile "$LINENO"; then :
2894  eval "$3=yes"
2895else
2896  eval "$3=no"
2897fi
2898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899fi
2900eval ac_res=\$$3
2901	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2902$as_echo "$ac_res" >&6; }
2903  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2904
2905} # ac_fn_c_check_header_compile
2906cat >config.log <<_ACEOF
2907This file contains any messages produced by compilers while
2908running configure, to aid debugging if configure makes a mistake.
2909
2910It was created by OpenJDK $as_me jdk9, which was
2911generated by GNU Autoconf 2.69.  Invocation command line was
2912
2913  $ $0 $@
2914
2915_ACEOF
2916exec 5>>config.log
2917{
2918cat <<_ASUNAME
2919## --------- ##
2920## Platform. ##
2921## --------- ##
2922
2923hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2924uname -m = `(uname -m) 2>/dev/null || echo unknown`
2925uname -r = `(uname -r) 2>/dev/null || echo unknown`
2926uname -s = `(uname -s) 2>/dev/null || echo unknown`
2927uname -v = `(uname -v) 2>/dev/null || echo unknown`
2928
2929/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2930/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2931
2932/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2933/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2934/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2935/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2936/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2937/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2938/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2939
2940_ASUNAME
2941
2942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943for as_dir in $PATH
2944do
2945  IFS=$as_save_IFS
2946  test -z "$as_dir" && as_dir=.
2947    $as_echo "PATH: $as_dir"
2948  done
2949IFS=$as_save_IFS
2950
2951} >&5
2952
2953cat >&5 <<_ACEOF
2954
2955
2956## ----------- ##
2957## Core tests. ##
2958## ----------- ##
2959
2960_ACEOF
2961
2962
2963# Keep a trace of the command line.
2964# Strip out --no-create and --no-recursion so they do not pile up.
2965# Strip out --silent because we don't want to record it for future runs.
2966# Also quote any args containing shell meta-characters.
2967# Make two passes to allow for proper duplicate-argument suppression.
2968ac_configure_args=
2969ac_configure_args0=
2970ac_configure_args1=
2971ac_must_keep_next=false
2972for ac_pass in 1 2
2973do
2974  for ac_arg
2975  do
2976    case $ac_arg in
2977    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2978    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2979    | -silent | --silent | --silen | --sile | --sil)
2980      continue ;;
2981    *\'*)
2982      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2983    esac
2984    case $ac_pass in
2985    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2986    2)
2987      as_fn_append ac_configure_args1 " '$ac_arg'"
2988      if test $ac_must_keep_next = true; then
2989	ac_must_keep_next=false # Got value, back to normal.
2990      else
2991	case $ac_arg in
2992	  *=* | --config-cache | -C | -disable-* | --disable-* \
2993	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2994	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2995	  | -with-* | --with-* | -without-* | --without-* | --x)
2996	    case "$ac_configure_args0 " in
2997	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2998	    esac
2999	    ;;
3000	  -* ) ac_must_keep_next=true ;;
3001	esac
3002      fi
3003      as_fn_append ac_configure_args " '$ac_arg'"
3004      ;;
3005    esac
3006  done
3007done
3008{ ac_configure_args0=; unset ac_configure_args0;}
3009{ ac_configure_args1=; unset ac_configure_args1;}
3010
3011# When interrupted or exit'd, cleanup temporary files, and complete
3012# config.log.  We remove comments because anyway the quotes in there
3013# would cause problems or look ugly.
3014# WARNING: Use '\'' to represent an apostrophe within the trap.
3015# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3016trap 'exit_status=$?
3017  # Save into config.log some information that might help in debugging.
3018  {
3019    echo
3020
3021    $as_echo "## ---------------- ##
3022## Cache variables. ##
3023## ---------------- ##"
3024    echo
3025    # The following way of writing the cache mishandles newlines in values,
3026(
3027  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3028    eval ac_val=\$$ac_var
3029    case $ac_val in #(
3030    *${as_nl}*)
3031      case $ac_var in #(
3032      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3033$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3034      esac
3035      case $ac_var in #(
3036      _ | IFS | as_nl) ;; #(
3037      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3038      *) { eval $ac_var=; unset $ac_var;} ;;
3039      esac ;;
3040    esac
3041  done
3042  (set) 2>&1 |
3043    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3044    *${as_nl}ac_space=\ *)
3045      sed -n \
3046	"s/'\''/'\''\\\\'\'''\''/g;
3047	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3048      ;; #(
3049    *)
3050      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3051      ;;
3052    esac |
3053    sort
3054)
3055    echo
3056
3057    $as_echo "## ----------------- ##
3058## Output variables. ##
3059## ----------------- ##"
3060    echo
3061    for ac_var in $ac_subst_vars
3062    do
3063      eval ac_val=\$$ac_var
3064      case $ac_val in
3065      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3066      esac
3067      $as_echo "$ac_var='\''$ac_val'\''"
3068    done | sort
3069    echo
3070
3071    if test -n "$ac_subst_files"; then
3072      $as_echo "## ------------------- ##
3073## File substitutions. ##
3074## ------------------- ##"
3075      echo
3076      for ac_var in $ac_subst_files
3077      do
3078	eval ac_val=\$$ac_var
3079	case $ac_val in
3080	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3081	esac
3082	$as_echo "$ac_var='\''$ac_val'\''"
3083      done | sort
3084      echo
3085    fi
3086
3087    if test -s confdefs.h; then
3088      $as_echo "## ----------- ##
3089## confdefs.h. ##
3090## ----------- ##"
3091      echo
3092      cat confdefs.h
3093      echo
3094    fi
3095    test "$ac_signal" != 0 &&
3096      $as_echo "$as_me: caught signal $ac_signal"
3097    $as_echo "$as_me: exit $exit_status"
3098  } >&5
3099  rm -f core *.core core.conftest.* &&
3100    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3101    exit $exit_status
3102' 0
3103for ac_signal in 1 2 13 15; do
3104  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3105done
3106ac_signal=0
3107
3108# confdefs.h avoids OS command line length limits that DEFS can exceed.
3109rm -f -r conftest* confdefs.h
3110
3111$as_echo "/* confdefs.h */" > confdefs.h
3112
3113# Predefined preprocessor variables.
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_NAME "$PACKAGE_NAME"
3117_ACEOF
3118
3119cat >>confdefs.h <<_ACEOF
3120#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3121_ACEOF
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_VERSION "$PACKAGE_VERSION"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_STRING "$PACKAGE_STRING"
3129_ACEOF
3130
3131cat >>confdefs.h <<_ACEOF
3132#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3133_ACEOF
3134
3135cat >>confdefs.h <<_ACEOF
3136#define PACKAGE_URL "$PACKAGE_URL"
3137_ACEOF
3138
3139
3140# Let the site file select an alternate cache file if it wants to.
3141# Prefer an explicitly selected file to automatically selected ones.
3142ac_site_file1=NONE
3143ac_site_file2=NONE
3144if test -n "$CONFIG_SITE"; then
3145  # We do not want a PATH search for config.site.
3146  case $CONFIG_SITE in #((
3147    -*)  ac_site_file1=./$CONFIG_SITE;;
3148    */*) ac_site_file1=$CONFIG_SITE;;
3149    *)   ac_site_file1=./$CONFIG_SITE;;
3150  esac
3151elif test "x$prefix" != xNONE; then
3152  ac_site_file1=$prefix/share/config.site
3153  ac_site_file2=$prefix/etc/config.site
3154else
3155  ac_site_file1=$ac_default_prefix/share/config.site
3156  ac_site_file2=$ac_default_prefix/etc/config.site
3157fi
3158for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3159do
3160  test "x$ac_site_file" = xNONE && continue
3161  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3162    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3163$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3164    sed 's/^/| /' "$ac_site_file" >&5
3165    . "$ac_site_file" \
3166      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3168as_fn_error $? "failed to load site script $ac_site_file
3169See \`config.log' for more details" "$LINENO" 5; }
3170  fi
3171done
3172
3173if test -r "$cache_file"; then
3174  # Some versions of bash will fail to source /dev/null (special files
3175  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3176  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3177    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3178$as_echo "$as_me: loading cache $cache_file" >&6;}
3179    case $cache_file in
3180      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3181      *)                      . "./$cache_file";;
3182    esac
3183  fi
3184else
3185  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3186$as_echo "$as_me: creating cache $cache_file" >&6;}
3187  >$cache_file
3188fi
3189
3190# Check that the precious variables saved in the cache have kept the same
3191# value.
3192ac_cache_corrupted=false
3193for ac_var in $ac_precious_vars; do
3194  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3195  eval ac_new_set=\$ac_env_${ac_var}_set
3196  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3197  eval ac_new_val=\$ac_env_${ac_var}_value
3198  case $ac_old_set,$ac_new_set in
3199    set,)
3200      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3201$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3202      ac_cache_corrupted=: ;;
3203    ,set)
3204      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3205$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3206      ac_cache_corrupted=: ;;
3207    ,);;
3208    *)
3209      if test "x$ac_old_val" != "x$ac_new_val"; then
3210	# differences in whitespace do not lead to failure.
3211	ac_old_val_w=`echo x $ac_old_val`
3212	ac_new_val_w=`echo x $ac_new_val`
3213	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3214	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3215$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3216	  ac_cache_corrupted=:
3217	else
3218	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3219$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3220	  eval $ac_var=\$ac_old_val
3221	fi
3222	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3223$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3224	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3225$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3226      fi;;
3227  esac
3228  # Pass precious variables to config.status.
3229  if test "$ac_new_set" = set; then
3230    case $ac_new_val in
3231    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3232    *) ac_arg=$ac_var=$ac_new_val ;;
3233    esac
3234    case " $ac_configure_args " in
3235      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3236      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3237    esac
3238  fi
3239done
3240if $ac_cache_corrupted; then
3241  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3243  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3244$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3245  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3246fi
3247## -------------------- ##
3248## Main body of script. ##
3249## -------------------- ##
3250
3251ac_ext=c
3252ac_cpp='$CPP $CPPFLAGS'
3253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3255ac_compiler_gnu=$ac_cv_c_compiler_gnu
3256
3257
3258
3259ac_aux_dir=
3260for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3261  if test -f "$ac_dir/install-sh"; then
3262    ac_aux_dir=$ac_dir
3263    ac_install_sh="$ac_aux_dir/install-sh -c"
3264    break
3265  elif test -f "$ac_dir/install.sh"; then
3266    ac_aux_dir=$ac_dir
3267    ac_install_sh="$ac_aux_dir/install.sh -c"
3268    break
3269  elif test -f "$ac_dir/shtool"; then
3270    ac_aux_dir=$ac_dir
3271    ac_install_sh="$ac_aux_dir/shtool install -c"
3272    break
3273  fi
3274done
3275if test -z "$ac_aux_dir"; then
3276  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
3277fi
3278
3279# These three variables are undocumented and unsupported,
3280# and are intended to be withdrawn in a future Autoconf release.
3281# They can cause serious problems if a builder's source tree is in a directory
3282# whose full name contains unusual characters.
3283ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3284ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3285ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3286
3287
3288# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3289
3290#
3291# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3292# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3293#
3294# This code is free software; you can redistribute it and/or modify it
3295# under the terms of the GNU General Public License version 2 only, as
3296# published by the Free Software Foundation.  Oracle designates this
3297# particular file as subject to the "Classpath" exception as provided
3298# by Oracle in the LICENSE file that accompanied this code.
3299#
3300# This code is distributed in the hope that it will be useful, but WITHOUT
3301# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3302# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3303# version 2 for more details (a copy is included in the LICENSE file that
3304# accompanied this code).
3305#
3306# You should have received a copy of the GNU General Public License version
3307# 2 along with this work; if not, write to the Free Software Foundation,
3308# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3309#
3310# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3311# or visit www.oracle.com if you need additional information or have any
3312# questions.
3313#
3314
3315#
3316# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3317#
3318# This program is free software; you can redistribute it and/or modify
3319# it under the terms of the GNU General Public License as published by
3320# the Free Software Foundation; either version 2 of the License, or
3321# (at your option) any later version.
3322#
3323# This program is distributed in the hope that it will be useful, but
3324# WITHOUT ANY WARRANTY; without even the implied warranty of
3325# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3326# General Public License for more details.
3327#
3328# You should have received a copy of the GNU General Public License
3329# along with this program; if not, write to the Free Software
3330# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3331#
3332# As a special exception to the GNU General Public License, if you
3333# distribute this file as part of a program that contains a
3334# configuration script generated by Autoconf, you may include it under
3335# the same distribution terms that you use for the rest of that program.
3336
3337# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3338# ----------------------------------
3339# PKG_PROG_PKG_CONFIG
3340
3341# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3342#
3343# Check to see whether a particular set of modules exists.  Similar
3344# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3345#
3346#
3347# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3348# this or PKG_CHECK_MODULES is called, or make sure to call
3349# PKG_CHECK_EXISTS manually
3350# --------------------------------------------------------------
3351
3352
3353
3354# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3355# ---------------------------------------------
3356# _PKG_CONFIG
3357
3358# _PKG_SHORT_ERRORS_SUPPORTED
3359# -----------------------------
3360# _PKG_SHORT_ERRORS_SUPPORTED
3361
3362
3363# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3364# [ACTION-IF-NOT-FOUND])
3365#
3366#
3367# Note that if there is a possibility the first call to
3368# PKG_CHECK_MODULES might not happen, you should be sure to include an
3369# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3370#
3371#
3372# --------------------------------------------------------------
3373# PKG_CHECK_MODULES
3374
3375
3376# Include these first...
3377#
3378# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3380#
3381# This code is free software; you can redistribute it and/or modify it
3382# under the terms of the GNU General Public License version 2 only, as
3383# published by the Free Software Foundation.  Oracle designates this
3384# particular file as subject to the "Classpath" exception as provided
3385# by Oracle in the LICENSE file that accompanied this code.
3386#
3387# This code is distributed in the hope that it will be useful, but WITHOUT
3388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3390# version 2 for more details (a copy is included in the LICENSE file that
3391# accompanied this code).
3392#
3393# You should have received a copy of the GNU General Public License version
3394# 2 along with this work; if not, write to the Free Software Foundation,
3395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3396#
3397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3398# or visit www.oracle.com if you need additional information or have any
3399# questions.
3400#
3401
3402# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3403# If so, then append $1 to $2 \
3404# Also set JVM_ARG_OK to true/false depending on outcome.
3405
3406
3407# Appends a string to a path variable, only adding the : when needed.
3408
3409
3410# Prepends a string to a path variable, only adding the : when needed.
3411
3412
3413# This will make sure the given variable points to a full and proper
3414# path. This means:
3415# 1) There will be no spaces in the path. On unix platforms,
3416#    spaces in the path will result in an error. On Windows,
3417#    the path will be rewritten using short-style to be space-free.
3418# 2) The path will be absolute, and it will be in unix-style (on
3419#     cygwin).
3420# $1: The name of the variable to fix
3421
3422
3423# This will make sure the given variable points to a executable
3424# with a full and proper path. This means:
3425# 1) There will be no spaces in the path. On unix platforms,
3426#    spaces in the path will result in an error. On Windows,
3427#    the path will be rewritten using short-style to be space-free.
3428# 2) The path will be absolute, and it will be in unix-style (on
3429#     cygwin).
3430# Any arguments given to the executable is preserved.
3431# If the input variable does not have a directory specification, then
3432# it need to be in the PATH.
3433# $1: The name of the variable to fix
3434
3435
3436
3437
3438# Register a --with argument but mark it as deprecated
3439# $1: The name of the with argument to deprecate, not including --with-
3440
3441
3442# Register a --enable argument but mark it as deprecated
3443# $1: The name of the with argument to deprecate, not including --enable-
3444# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3445
3446
3447
3448
3449# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3450# $1: variable to check
3451
3452
3453# Check that there are no unprocessed overridden variables left.
3454# If so, they are an incorrect argument and we will exit with an error.
3455
3456
3457# Setup a tool for the given variable. If correctly specified by the user,
3458# use that value, otherwise search for the tool using the supplied code snippet.
3459# $1: variable to set
3460# $2: code snippet to call to look for the tool
3461
3462
3463# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3464# $1: variable to set
3465# $2: executable name (or list of names) to look for
3466
3467
3468# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3469# $1: variable to set
3470# $2: executable name (or list of names) to look for
3471
3472
3473# Like BASIC_PATH_PROGS but fails if no tool was found.
3474# $1: variable to set
3475# $2: executable name (or list of names) to look for
3476
3477
3478# Like BASIC_SETUP_TOOL but fails if no tool was found.
3479# $1: variable to set
3480# $2: autoconf macro to call to look for the special tool
3481
3482
3483# Setup the most fundamental tools that relies on not much else to set up,
3484# but is used by much of the early bootstrap code.
3485
3486
3487# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497#%%% Simple tools %%%
3498
3499# Check if we have found a usable version of make
3500# $1: the path to a potential make binary (or empty)
3501# $2: the description on how we found this
3502
3503
3504
3505
3506# Goes looking for a usable version of GNU make.
3507
3508
3509
3510
3511
3512
3513# Check if build directory is on local disk. If not possible to determine,
3514# we prefer to claim it's local.
3515# Argument 1: directory to test
3516# Argument 2: what to do if it is on local disk
3517# Argument 3: what to do otherwise (remote disk or failure)
3518
3519
3520# Check that source files have basic read permissions set. This might
3521# not be the case in cygwin in certain conditions.
3522
3523
3524
3525
3526# Check for support for specific options in bash
3527
3528
3529#
3530# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3531# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3532#
3533# This code is free software; you can redistribute it and/or modify it
3534# under the terms of the GNU General Public License version 2 only, as
3535# published by the Free Software Foundation.  Oracle designates this
3536# particular file as subject to the "Classpath" exception as provided
3537# by Oracle in the LICENSE file that accompanied this code.
3538#
3539# This code is distributed in the hope that it will be useful, but WITHOUT
3540# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3541# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3542# version 2 for more details (a copy is included in the LICENSE file that
3543# accompanied this code).
3544#
3545# You should have received a copy of the GNU General Public License version
3546# 2 along with this work; if not, write to the Free Software Foundation,
3547# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3548#
3549# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3550# or visit www.oracle.com if you need additional information or have any
3551# questions.
3552#
3553
3554
3555
3556
3557
3558# Helper function which possibly converts a path using DOS-style short mode.
3559# If so, the updated path is stored in $new_path.
3560# $1: The path to check
3561
3562
3563# Helper function which possibly converts a path using DOS-style short mode.
3564# If so, the updated path is stored in $new_path.
3565# $1: The path to check
3566
3567
3568# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3569# and could probably be heavily simplified. However, all changes in this
3570# area tend to need lot of testing in different scenarios, and in lack of
3571# proper unit testing, cleaning this up has not been deemed worth the effort
3572# at the moment.
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3583
3584
3585
3586
3587#
3588# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3589# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3590#
3591# This code is free software; you can redistribute it and/or modify it
3592# under the terms of the GNU General Public License version 2 only, as
3593# published by the Free Software Foundation.  Oracle designates this
3594# particular file as subject to the "Classpath" exception as provided
3595# by Oracle in the LICENSE file that accompanied this code.
3596#
3597# This code is distributed in the hope that it will be useful, but WITHOUT
3598# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3599# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3600# version 2 for more details (a copy is included in the LICENSE file that
3601# accompanied this code).
3602#
3603# You should have received a copy of the GNU General Public License version
3604# 2 along with this work; if not, write to the Free Software Foundation,
3605# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3606#
3607# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3608# or visit www.oracle.com if you need additional information or have any
3609# questions.
3610#
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622# ... then the rest
3623#
3624# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3625# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3626#
3627# This code is free software; you can redistribute it and/or modify it
3628# under the terms of the GNU General Public License version 2 only, as
3629# published by the Free Software Foundation.  Oracle designates this
3630# particular file as subject to the "Classpath" exception as provided
3631# by Oracle in the LICENSE file that accompanied this code.
3632#
3633# This code is distributed in the hope that it will be useful, but WITHOUT
3634# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3635# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3636# version 2 for more details (a copy is included in the LICENSE file that
3637# accompanied this code).
3638#
3639# You should have received a copy of the GNU General Public License version
3640# 2 along with this work; if not, write to the Free Software Foundation,
3641# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3642#
3643# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3644# or visit www.oracle.com if you need additional information or have any
3645# questions.
3646#
3647
3648########################################################################
3649# This file handles detection of the Boot JDK. The Boot JDK detection
3650# process has been developed as a response to solve a complex real-world
3651# problem. Initially, it was simple, but it has grown as platform after
3652# platform, idiosyncracy after idiosyncracy has been supported.
3653#
3654# The basic idea is this:
3655# 1) You need an acceptable *) JDK to use as a Boot JDK
3656# 2) There are several ways to locate a JDK, that are mostly platform
3657#    dependent **)
3658# 3) You can have multiple JDKs installed
3659# 4) If possible, configure should try to dig out an acceptable JDK
3660#    automatically, without having to resort to command-line options
3661#
3662# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3663#     javac) and not a JRE, etc.
3664#
3665# **) On Windows we typically use a well-known path.
3666#     On MacOSX we typically use the tool java_home.
3667#     On Linux we typically find javac in the $PATH, and then follow a
3668#     chain of symlinks that often ends up in a real JDK.
3669#
3670# This leads to the code where we check in different ways to locate a
3671# JDK, and if one is found, check if it is acceptable. If not, we print
3672# our reasons for rejecting it (useful when debugging non-working
3673# configure situations) and continue checking the next one.
3674########################################################################
3675
3676# Execute the check given as argument, and verify the result
3677# If the Boot JDK was previously found, do nothing
3678# $1 A command line (typically autoconf macro) to execute
3679
3680
3681# Test: Is bootjdk explicitely set by command line arguments?
3682
3683
3684# Test: Is bootjdk available from builddeps?
3685
3686
3687# Test: Is $JAVA_HOME set?
3688
3689
3690# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3691
3692
3693# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3694# $1: Argument to the java_home binary (optional)
3695
3696
3697# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3698
3699
3700# Look for a jdk in the given path. If there are multiple, try to select the newest.
3701# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3702# $1 = Path to directory containing jdk installations.
3703# $2 = String to append to the found JDK directory to get the proper JDK home
3704
3705
3706# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3707# environmental variable as base for where to look.
3708# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3709
3710
3711# Test: Is there a JDK installed in default, well-known locations?
3712
3713
3714# Check that a command-line tool in the Boot JDK is correct
3715# $1 = name of variable to assign
3716# $2 = name of binary
3717
3718
3719###############################################################################
3720#
3721# We need a Boot JDK to bootstrap the build.
3722#
3723
3724
3725
3726
3727
3728#
3729# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3730# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3731#
3732# This code is free software; you can redistribute it and/or modify it
3733# under the terms of the GNU General Public License version 2 only, as
3734# published by the Free Software Foundation.  Oracle designates this
3735# particular file as subject to the "Classpath" exception as provided
3736# by Oracle in the LICENSE file that accompanied this code.
3737#
3738# This code is distributed in the hope that it will be useful, but WITHOUT
3739# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3740# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3741# version 2 for more details (a copy is included in the LICENSE file that
3742# accompanied this code).
3743#
3744# You should have received a copy of the GNU General Public License version
3745# 2 along with this work; if not, write to the Free Software Foundation,
3746# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3747#
3748# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3749# or visit www.oracle.com if you need additional information or have any
3750# questions.
3751#
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772#
3773# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3774# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3775#
3776# This code is free software; you can redistribute it and/or modify it
3777# under the terms of the GNU General Public License version 2 only, as
3778# published by the Free Software Foundation.  Oracle designates this
3779# particular file as subject to the "Classpath" exception as provided
3780# by Oracle in the LICENSE file that accompanied this code.
3781#
3782# This code is distributed in the hope that it will be useful, but WITHOUT
3783# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3784# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3785# version 2 for more details (a copy is included in the LICENSE file that
3786# accompanied this code).
3787#
3788# You should have received a copy of the GNU General Public License version
3789# 2 along with this work; if not, write to the Free Software Foundation,
3790# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3791#
3792# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3793# or visit www.oracle.com if you need additional information or have any
3794# questions.
3795#
3796
3797
3798
3799
3800
3801# Documentation on common flags used for solstudio in HIGHEST.
3802#
3803# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3804#          done with care, there are some assumptions below that need to
3805#          be understood about the use of pointers, and IEEE behavior.
3806#
3807# -fns: Use non-standard floating point mode (not IEEE 754)
3808# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3809# -fsingle: Use single precision floating point with 'float'
3810# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3811#   (Source with excessing pointer casting and data access with mixed
3812#    pointer types are not recommended)
3813# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3814#   (If you expect perfect errno behavior, do not use this)
3815# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3816# -xrestrict: Pointer parameters to functions do not overlap
3817#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3818#    If you pass in multiple pointers to the same data, do not use this)
3819# -xlibmil: Inline some library routines
3820#   (If you expect perfect errno behavior, do not use this)
3821# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3822#   (If you expect perfect errno behavior, do not use this)
3823#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3824
3825    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3826    # Bug?
3827    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3828    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3829    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3830    #fi
3831
3832
3833
3834
3835
3836# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3837#                                   [RUN-IF-FALSE])
3838# ------------------------------------------------------------
3839# Check that the c and c++ compilers support an argument
3840
3841
3842# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3843#                                    [RUN-IF-FALSE])
3844# ------------------------------------------------------------
3845# Check that the linker support an argument
3846
3847
3848
3849
3850#
3851# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3852# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3853#
3854# This code is free software; you can redistribute it and/or modify it
3855# under the terms of the GNU General Public License version 2 only, as
3856# published by the Free Software Foundation.  Oracle designates this
3857# particular file as subject to the "Classpath" exception as provided
3858# by Oracle in the LICENSE file that accompanied this code.
3859#
3860# This code is distributed in the hope that it will be useful, but WITHOUT
3861# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3862# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3863# version 2 for more details (a copy is included in the LICENSE file that
3864# accompanied this code).
3865#
3866# You should have received a copy of the GNU General Public License version
3867# 2 along with this work; if not, write to the Free Software Foundation,
3868# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3869#
3870# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3871# or visit www.oracle.com if you need additional information or have any
3872# questions.
3873#
3874
3875
3876
3877
3878
3879cygwin_help() {
3880  case $1 in
3881    unzip)
3882      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3883      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3884      ;;
3885    zip)
3886      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3887      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3888      ;;
3889    make)
3890      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3891      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3892      ;;
3893    freetype)
3894      HELP_MSG="
3895The freetype library can now be build during the configure process.
3896Download the freetype sources and unpack them into an arbitrary directory:
3897
3898wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3899tar -xzf freetype-2.5.3.tar.gz
3900
3901Then run configure with '--with-freetype-src=<freetype_src>'. This will
3902automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3903builds or into '<freetype_src>/lib32' for 32-bit builds.
3904Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3905and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3906      ;;
3907  esac
3908}
3909
3910msys_help() {
3911  PKGHANDLER_COMMAND=""
3912}
3913
3914apt_help() {
3915  case $1 in
3916    devkit)
3917      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3918    openjdk)
3919      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3920    alsa)
3921      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3922    cups)
3923      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3924    freetype)
3925      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3926    pulse)
3927      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3928    x11)
3929      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3930    ccache)
3931      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3932  esac
3933}
3934
3935yum_help() {
3936  case $1 in
3937    devkit)
3938      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3939    openjdk)
3940      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3941    alsa)
3942      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3943    cups)
3944      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3945    freetype)
3946      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3947    pulse)
3948      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3949    x11)
3950      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3951    ccache)
3952      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3953  esac
3954}
3955
3956port_help() {
3957  PKGHANDLER_COMMAND=""
3958}
3959
3960pkgutil_help() {
3961  PKGHANDLER_COMMAND=""
3962}
3963
3964pkgadd_help() {
3965  PKGHANDLER_COMMAND=""
3966}
3967
3968# This function will check if we're called from the "configure" wrapper while
3969# printing --help. If so, we will print out additional information that can
3970# only be extracted within the autoconf script, and then exit. This must be
3971# called at the very beginning in configure.ac.
3972
3973
3974
3975
3976
3977
3978#
3979# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3980# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3981#
3982# This code is free software; you can redistribute it and/or modify it
3983# under the terms of the GNU General Public License version 2 only, as
3984# published by the Free Software Foundation.  Oracle designates this
3985# particular file as subject to the "Classpath" exception as provided
3986# by Oracle in the LICENSE file that accompanied this code.
3987#
3988# This code is distributed in the hope that it will be useful, but WITHOUT
3989# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3990# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3991# version 2 for more details (a copy is included in the LICENSE file that
3992# accompanied this code).
3993#
3994# You should have received a copy of the GNU General Public License version
3995# 2 along with this work; if not, write to the Free Software Foundation,
3996# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3997#
3998# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3999# or visit www.oracle.com if you need additional information or have any
4000# questions.
4001#
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012###############################################################################
4013#
4014# Should we build only OpenJDK even if closed sources are present?
4015#
4016
4017
4018
4019
4020###############################################################################
4021#
4022# Setup version numbers
4023#
4024
4025
4026
4027
4028
4029
4030#
4031# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4032# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4033#
4034# This code is free software; you can redistribute it and/or modify it
4035# under the terms of the GNU General Public License version 2 only, as
4036# published by the Free Software Foundation.  Oracle designates this
4037# particular file as subject to the "Classpath" exception as provided
4038# by Oracle in the LICENSE file that accompanied this code.
4039#
4040# This code is distributed in the hope that it will be useful, but WITHOUT
4041# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4042# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4043# version 2 for more details (a copy is included in the LICENSE file that
4044# accompanied this code).
4045#
4046# You should have received a copy of the GNU General Public License version
4047# 2 along with this work; if not, write to the Free Software Foundation,
4048# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4049#
4050# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4051# or visit www.oracle.com if you need additional information or have any
4052# questions.
4053#
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075#
4076# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4077# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4078#
4079# This code is free software; you can redistribute it and/or modify it
4080# under the terms of the GNU General Public License version 2 only, as
4081# published by the Free Software Foundation.  Oracle designates this
4082# particular file as subject to the "Classpath" exception as provided
4083# by Oracle in the LICENSE file that accompanied this code.
4084#
4085# This code is distributed in the hope that it will be useful, but WITHOUT
4086# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4087# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4088# version 2 for more details (a copy is included in the LICENSE file that
4089# accompanied this code).
4090#
4091# You should have received a copy of the GNU General Public License version
4092# 2 along with this work; if not, write to the Free Software Foundation,
4093# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4094#
4095# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4096# or visit www.oracle.com if you need additional information or have any
4097# questions.
4098#
4099
4100# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4101# Converts autoconf style CPU name to OpenJDK style, into
4102# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4103
4104
4105# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4106# Converts autoconf style OS name to OpenJDK style, into
4107# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4108
4109
4110# Expects $host_os $host_cpu $build_os and $build_cpu
4111# and $with_target_bits to have been setup!
4112#
4113# Translate the standard triplet(quadruplet) definition
4114# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4115# OPENJDK_BUILD_OS, etc.
4116
4117
4118# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4119# accordingly. Must be done after setting up build and target system, but before
4120# doing anything else with these values.
4121
4122
4123# Setup the legacy variables, for controlling the old makefiles.
4124#
4125
4126
4127
4128
4129#%%% Build and target systems %%%
4130
4131
4132
4133
4134# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4135# Add -mX to various FLAGS variables.
4136
4137
4138
4139
4140
4141
4142#
4143# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4144# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4145#
4146# This code is free software; you can redistribute it and/or modify it
4147# under the terms of the GNU General Public License version 2 only, as
4148# published by the Free Software Foundation.  Oracle designates this
4149# particular file as subject to the "Classpath" exception as provided
4150# by Oracle in the LICENSE file that accompanied this code.
4151#
4152# This code is distributed in the hope that it will be useful, but WITHOUT
4153# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4154# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4155# version 2 for more details (a copy is included in the LICENSE file that
4156# accompanied this code).
4157#
4158# You should have received a copy of the GNU General Public License version
4159# 2 along with this work; if not, write to the Free Software Foundation,
4160# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4161#
4162# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4163# or visit www.oracle.com if you need additional information or have any
4164# questions.
4165#
4166
4167
4168
4169
4170
4171
4172
4173
4174#
4175# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4176# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4177#
4178# This code is free software; you can redistribute it and/or modify it
4179# under the terms of the GNU General Public License version 2 only, as
4180# published by the Free Software Foundation.  Oracle designates this
4181# particular file as subject to the "Classpath" exception as provided
4182# by Oracle in the LICENSE file that accompanied this code.
4183#
4184# This code is distributed in the hope that it will be useful, but WITHOUT
4185# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4186# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4187# version 2 for more details (a copy is included in the LICENSE file that
4188# accompanied this code).
4189#
4190# You should have received a copy of the GNU General Public License version
4191# 2 along with this work; if not, write to the Free Software Foundation,
4192# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4193#
4194# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4195# or visit www.oracle.com if you need additional information or have any
4196# questions.
4197#
4198
4199########################################################################
4200# This file is responsible for detecting, verifying and setting up the
4201# toolchain, i.e. the compiler, linker and related utilities. It will setup
4202# proper paths to the binaries, but it will not setup any flags.
4203#
4204# The binaries used is determined by the toolchain type, which is the family of
4205# compilers and related tools that are used.
4206########################################################################
4207
4208
4209# All valid toolchains, regardless of platform (used by help.m4)
4210VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4211
4212# These toolchains are valid on different platforms
4213VALID_TOOLCHAINS_linux="gcc clang"
4214VALID_TOOLCHAINS_solaris="solstudio"
4215VALID_TOOLCHAINS_macosx="gcc clang"
4216VALID_TOOLCHAINS_aix="xlc"
4217VALID_TOOLCHAINS_windows="microsoft"
4218
4219# Toolchain descriptions
4220TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4221TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4222TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4223TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4224TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4225
4226# Setup a number of variables describing how native output files are
4227# named on this platform/toolchain.
4228
4229
4230# Determine which toolchain type to use, and make sure it is valid for this
4231# platform. Setup various information about the selected toolchain.
4232
4233
4234# Before we start detecting the toolchain executables, we might need some
4235# special setup, e.g. additional paths etc.
4236
4237
4238# Restore path, etc
4239
4240
4241# Check if a compiler is of the toolchain type we expect, and save the version
4242# information from it. If the compiler does not match the expected type,
4243# this function will abort using AC_MSG_ERROR. If it matches, the version will
4244# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4245# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4246#
4247# $1 = compiler to test (CC or CXX)
4248# $2 = human readable name of compiler (C or C++)
4249
4250
4251# Try to locate the given C or C++ compiler in the path, or otherwise.
4252#
4253# $1 = compiler to test (CC or CXX)
4254# $2 = human readable name of compiler (C or C++)
4255# $3 = list of compiler names to search for
4256
4257
4258# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4259# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4260# archiver (AR). Verify that the compilers are correct according to the
4261# toolchain type.
4262
4263
4264# Setup additional tools that is considered a part of the toolchain, but not the
4265# core part. Many of these are highly platform-specific and do not exist,
4266# and/or are not needed on all platforms.
4267
4268
4269# Setup the build tools (i.e, the compiler and linker used to build programs
4270# that should be run on the build platform, not the target platform, as a build
4271# helper). Since the non-cross-compile case uses the normal, target compilers
4272# for this, we can only do this after these have been setup.
4273
4274
4275# Setup legacy variables that are still needed as alternative ways to refer to
4276# parts of the toolchain.
4277
4278
4279# Do some additional checks on the detected tools.
4280
4281
4282# Setup the JTReg Regression Test Harness.
4283
4284
4285#
4286# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4287# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4288#
4289# This code is free software; you can redistribute it and/or modify it
4290# under the terms of the GNU General Public License version 2 only, as
4291# published by the Free Software Foundation.  Oracle designates this
4292# particular file as subject to the "Classpath" exception as provided
4293# by Oracle in the LICENSE file that accompanied this code.
4294#
4295# This code is distributed in the hope that it will be useful, but WITHOUT
4296# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4297# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4298# version 2 for more details (a copy is included in the LICENSE file that
4299# accompanied this code).
4300#
4301# You should have received a copy of the GNU General Public License version
4302# 2 along with this work; if not, write to the Free Software Foundation,
4303# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4304#
4305# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4306# or visit www.oracle.com if you need additional information or have any
4307# questions.
4308#
4309
4310
4311
4312
4313
4314
4315
4316# Check if the VS env variables were setup prior to running configure.
4317# If not, then find vcvarsall.bat and run it automatically, and integrate
4318# the set env variables into the spec file.
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330# This line needs to be here, verbatim, after all includes and the dummy hook
4331# definitions. It is replaced with custom functionality when building
4332# custom sources.
4333#CUSTOM_AUTOCONF_INCLUDE
4334
4335# Do not change or remove the following line, it is needed for consistency checks:
4336DATE_WHEN_GENERATED=1421247827
4337
4338###############################################################################
4339#
4340# Initialization / Boot-strapping
4341#
4342# The bootstrapping process needs to solve the "chicken or the egg" problem,
4343# thus it jumps back and forth, each time gaining something needed later on.
4344#
4345###############################################################################
4346
4347# If we are requested to print additional help, do that and then exit.
4348# This must be the very first call.
4349
4350  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4351    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4352    $PRINTF "Which are valid to use depends on the build platform.\n"
4353    for toolchain in $VALID_TOOLCHAINS_all; do
4354      # Use indirect variable referencing
4355      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4356      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4357      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4358    done
4359
4360    # And now exit directly
4361    exit 0
4362  fi
4363
4364
4365# Basic initialization that must happen first of all in the normal process.
4366
4367  # Save the original command line. This is passed to us by the wrapper configure script.
4368
4369  DATE_WHEN_CONFIGURED=`LANG=C date`
4370
4371  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4372$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4373  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4374$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4375
4376
4377  # Start with tools that do not need have cross compilation support
4378  # and can be expected to be found in the default PATH. These tools are
4379  # used by configure. Nor are these tools expected to be found in the
4380  # devkit from the builddeps server either, since they are
4381  # needed to download the devkit.
4382
4383  # First are all the simple required tools.
4384
4385
4386
4387  # Publish this variable in the help.
4388
4389
4390  if test "x$BASENAME" = x; then
4391    # The variable is not set by user, try to locate tool using the code snippet
4392    for ac_prog in basename
4393do
4394  # Extract the first word of "$ac_prog", so it can be a program name with args.
4395set dummy $ac_prog; ac_word=$2
4396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4397$as_echo_n "checking for $ac_word... " >&6; }
4398if ${ac_cv_path_BASENAME+:} false; then :
4399  $as_echo_n "(cached) " >&6
4400else
4401  case $BASENAME in
4402  [\\/]* | ?:[\\/]*)
4403  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4404  ;;
4405  *)
4406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4407for as_dir in $PATH
4408do
4409  IFS=$as_save_IFS
4410  test -z "$as_dir" && as_dir=.
4411    for ac_exec_ext in '' $ac_executable_extensions; do
4412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4413    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4415    break 2
4416  fi
4417done
4418  done
4419IFS=$as_save_IFS
4420
4421  ;;
4422esac
4423fi
4424BASENAME=$ac_cv_path_BASENAME
4425if test -n "$BASENAME"; then
4426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4427$as_echo "$BASENAME" >&6; }
4428else
4429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4430$as_echo "no" >&6; }
4431fi
4432
4433
4434  test -n "$BASENAME" && break
4435done
4436
4437  else
4438    # The variable is set, but is it from the command line or the environment?
4439
4440    # Try to remove the string !BASENAME! from our list.
4441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4443      # If it failed, the variable was not from the command line. Ignore it,
4444      # but warn the user (except for BASH, which is always set by the calling BASH).
4445      if test "xBASENAME" != xBASH; then
4446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4447$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4448      fi
4449      # Try to locate tool using the code snippet
4450      for ac_prog in basename
4451do
4452  # Extract the first word of "$ac_prog", so it can be a program name with args.
4453set dummy $ac_prog; ac_word=$2
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4455$as_echo_n "checking for $ac_word... " >&6; }
4456if ${ac_cv_path_BASENAME+:} false; then :
4457  $as_echo_n "(cached) " >&6
4458else
4459  case $BASENAME in
4460  [\\/]* | ?:[\\/]*)
4461  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4462  ;;
4463  *)
4464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4465for as_dir in $PATH
4466do
4467  IFS=$as_save_IFS
4468  test -z "$as_dir" && as_dir=.
4469    for ac_exec_ext in '' $ac_executable_extensions; do
4470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4471    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4473    break 2
4474  fi
4475done
4476  done
4477IFS=$as_save_IFS
4478
4479  ;;
4480esac
4481fi
4482BASENAME=$ac_cv_path_BASENAME
4483if test -n "$BASENAME"; then
4484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4485$as_echo "$BASENAME" >&6; }
4486else
4487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4488$as_echo "no" >&6; }
4489fi
4490
4491
4492  test -n "$BASENAME" && break
4493done
4494
4495    else
4496      # If it succeeded, then it was overridden by the user. We will use it
4497      # for the tool.
4498
4499      # First remove it from the list of overridden variables, so we can test
4500      # for unknown variables in the end.
4501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4502
4503      # Check if the provided tool contains a complete path.
4504      tool_specified="$BASENAME"
4505      tool_basename="${tool_specified##*/}"
4506      if test "x$tool_basename" = "x$tool_specified"; then
4507        # A command without a complete path is provided, search $PATH.
4508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4509$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4510        # Extract the first word of "$tool_basename", so it can be a program name with args.
4511set dummy $tool_basename; ac_word=$2
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4513$as_echo_n "checking for $ac_word... " >&6; }
4514if ${ac_cv_path_BASENAME+:} false; then :
4515  $as_echo_n "(cached) " >&6
4516else
4517  case $BASENAME in
4518  [\\/]* | ?:[\\/]*)
4519  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4520  ;;
4521  *)
4522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4523for as_dir in $PATH
4524do
4525  IFS=$as_save_IFS
4526  test -z "$as_dir" && as_dir=.
4527    for ac_exec_ext in '' $ac_executable_extensions; do
4528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4529    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4531    break 2
4532  fi
4533done
4534  done
4535IFS=$as_save_IFS
4536
4537  ;;
4538esac
4539fi
4540BASENAME=$ac_cv_path_BASENAME
4541if test -n "$BASENAME"; then
4542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4543$as_echo "$BASENAME" >&6; }
4544else
4545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546$as_echo "no" >&6; }
4547fi
4548
4549
4550        if test "x$BASENAME" = x; then
4551          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4552        fi
4553      else
4554        # Otherwise we believe it is a complete path. Use it as it is.
4555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4556$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4557        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4558$as_echo_n "checking for BASENAME... " >&6; }
4559        if test ! -x "$tool_specified"; then
4560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4561$as_echo "not found" >&6; }
4562          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4563        fi
4564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4565$as_echo "$tool_specified" >&6; }
4566      fi
4567    fi
4568  fi
4569
4570
4571
4572  if test "x$BASENAME" = x; then
4573    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4574  fi
4575
4576
4577
4578
4579
4580  # Publish this variable in the help.
4581
4582
4583  if test "x$BASH" = x; then
4584    # The variable is not set by user, try to locate tool using the code snippet
4585    for ac_prog in bash
4586do
4587  # Extract the first word of "$ac_prog", so it can be a program name with args.
4588set dummy $ac_prog; ac_word=$2
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590$as_echo_n "checking for $ac_word... " >&6; }
4591if ${ac_cv_path_BASH+:} false; then :
4592  $as_echo_n "(cached) " >&6
4593else
4594  case $BASH in
4595  [\\/]* | ?:[\\/]*)
4596  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4597  ;;
4598  *)
4599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600for as_dir in $PATH
4601do
4602  IFS=$as_save_IFS
4603  test -z "$as_dir" && as_dir=.
4604    for ac_exec_ext in '' $ac_executable_extensions; do
4605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4606    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4608    break 2
4609  fi
4610done
4611  done
4612IFS=$as_save_IFS
4613
4614  ;;
4615esac
4616fi
4617BASH=$ac_cv_path_BASH
4618if test -n "$BASH"; then
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4620$as_echo "$BASH" >&6; }
4621else
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4623$as_echo "no" >&6; }
4624fi
4625
4626
4627  test -n "$BASH" && break
4628done
4629
4630  else
4631    # The variable is set, but is it from the command line or the environment?
4632
4633    # Try to remove the string !BASH! from our list.
4634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4636      # If it failed, the variable was not from the command line. Ignore it,
4637      # but warn the user (except for BASH, which is always set by the calling BASH).
4638      if test "xBASH" != xBASH; then
4639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4640$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4641      fi
4642      # Try to locate tool using the code snippet
4643      for ac_prog in bash
4644do
4645  # Extract the first word of "$ac_prog", so it can be a program name with args.
4646set dummy $ac_prog; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if ${ac_cv_path_BASH+:} false; then :
4650  $as_echo_n "(cached) " >&6
4651else
4652  case $BASH in
4653  [\\/]* | ?:[\\/]*)
4654  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4655  ;;
4656  *)
4657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660  IFS=$as_save_IFS
4661  test -z "$as_dir" && as_dir=.
4662    for ac_exec_ext in '' $ac_executable_extensions; do
4663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4664    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666    break 2
4667  fi
4668done
4669  done
4670IFS=$as_save_IFS
4671
4672  ;;
4673esac
4674fi
4675BASH=$ac_cv_path_BASH
4676if test -n "$BASH"; then
4677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4678$as_echo "$BASH" >&6; }
4679else
4680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685  test -n "$BASH" && break
4686done
4687
4688    else
4689      # If it succeeded, then it was overridden by the user. We will use it
4690      # for the tool.
4691
4692      # First remove it from the list of overridden variables, so we can test
4693      # for unknown variables in the end.
4694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4695
4696      # Check if the provided tool contains a complete path.
4697      tool_specified="$BASH"
4698      tool_basename="${tool_specified##*/}"
4699      if test "x$tool_basename" = "x$tool_specified"; then
4700        # A command without a complete path is provided, search $PATH.
4701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4702$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4703        # Extract the first word of "$tool_basename", so it can be a program name with args.
4704set dummy $tool_basename; ac_word=$2
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
4707if ${ac_cv_path_BASH+:} false; then :
4708  $as_echo_n "(cached) " >&6
4709else
4710  case $BASH in
4711  [\\/]* | ?:[\\/]*)
4712  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4713  ;;
4714  *)
4715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4716for as_dir in $PATH
4717do
4718  IFS=$as_save_IFS
4719  test -z "$as_dir" && as_dir=.
4720    for ac_exec_ext in '' $ac_executable_extensions; do
4721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4722    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4724    break 2
4725  fi
4726done
4727  done
4728IFS=$as_save_IFS
4729
4730  ;;
4731esac
4732fi
4733BASH=$ac_cv_path_BASH
4734if test -n "$BASH"; then
4735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4736$as_echo "$BASH" >&6; }
4737else
4738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
4740fi
4741
4742
4743        if test "x$BASH" = x; then
4744          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4745        fi
4746      else
4747        # Otherwise we believe it is a complete path. Use it as it is.
4748        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4749$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4751$as_echo_n "checking for BASH... " >&6; }
4752        if test ! -x "$tool_specified"; then
4753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4754$as_echo "not found" >&6; }
4755          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4756        fi
4757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4758$as_echo "$tool_specified" >&6; }
4759      fi
4760    fi
4761  fi
4762
4763
4764
4765  if test "x$BASH" = x; then
4766    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4767  fi
4768
4769
4770
4771
4772
4773  # Publish this variable in the help.
4774
4775
4776  if test "x$CAT" = x; then
4777    # The variable is not set by user, try to locate tool using the code snippet
4778    for ac_prog in cat
4779do
4780  # Extract the first word of "$ac_prog", so it can be a program name with args.
4781set dummy $ac_prog; ac_word=$2
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4783$as_echo_n "checking for $ac_word... " >&6; }
4784if ${ac_cv_path_CAT+:} false; then :
4785  $as_echo_n "(cached) " >&6
4786else
4787  case $CAT in
4788  [\\/]* | ?:[\\/]*)
4789  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4790  ;;
4791  *)
4792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793for as_dir in $PATH
4794do
4795  IFS=$as_save_IFS
4796  test -z "$as_dir" && as_dir=.
4797    for ac_exec_ext in '' $ac_executable_extensions; do
4798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4799    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4801    break 2
4802  fi
4803done
4804  done
4805IFS=$as_save_IFS
4806
4807  ;;
4808esac
4809fi
4810CAT=$ac_cv_path_CAT
4811if test -n "$CAT"; then
4812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4813$as_echo "$CAT" >&6; }
4814else
4815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4816$as_echo "no" >&6; }
4817fi
4818
4819
4820  test -n "$CAT" && break
4821done
4822
4823  else
4824    # The variable is set, but is it from the command line or the environment?
4825
4826    # Try to remove the string !CAT! from our list.
4827    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4828    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4829      # If it failed, the variable was not from the command line. Ignore it,
4830      # but warn the user (except for BASH, which is always set by the calling BASH).
4831      if test "xCAT" != xBASH; then
4832        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4833$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4834      fi
4835      # Try to locate tool using the code snippet
4836      for ac_prog in cat
4837do
4838  # Extract the first word of "$ac_prog", so it can be a program name with args.
4839set dummy $ac_prog; ac_word=$2
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4841$as_echo_n "checking for $ac_word... " >&6; }
4842if ${ac_cv_path_CAT+:} false; then :
4843  $as_echo_n "(cached) " >&6
4844else
4845  case $CAT in
4846  [\\/]* | ?:[\\/]*)
4847  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4848  ;;
4849  *)
4850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4851for as_dir in $PATH
4852do
4853  IFS=$as_save_IFS
4854  test -z "$as_dir" && as_dir=.
4855    for ac_exec_ext in '' $ac_executable_extensions; do
4856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4857    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4859    break 2
4860  fi
4861done
4862  done
4863IFS=$as_save_IFS
4864
4865  ;;
4866esac
4867fi
4868CAT=$ac_cv_path_CAT
4869if test -n "$CAT"; then
4870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4871$as_echo "$CAT" >&6; }
4872else
4873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4874$as_echo "no" >&6; }
4875fi
4876
4877
4878  test -n "$CAT" && break
4879done
4880
4881    else
4882      # If it succeeded, then it was overridden by the user. We will use it
4883      # for the tool.
4884
4885      # First remove it from the list of overridden variables, so we can test
4886      # for unknown variables in the end.
4887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4888
4889      # Check if the provided tool contains a complete path.
4890      tool_specified="$CAT"
4891      tool_basename="${tool_specified##*/}"
4892      if test "x$tool_basename" = "x$tool_specified"; then
4893        # A command without a complete path is provided, search $PATH.
4894        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4895$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4896        # Extract the first word of "$tool_basename", so it can be a program name with args.
4897set dummy $tool_basename; ac_word=$2
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899$as_echo_n "checking for $ac_word... " >&6; }
4900if ${ac_cv_path_CAT+:} false; then :
4901  $as_echo_n "(cached) " >&6
4902else
4903  case $CAT in
4904  [\\/]* | ?:[\\/]*)
4905  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4906  ;;
4907  *)
4908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in $PATH
4910do
4911  IFS=$as_save_IFS
4912  test -z "$as_dir" && as_dir=.
4913    for ac_exec_ext in '' $ac_executable_extensions; do
4914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4915    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917    break 2
4918  fi
4919done
4920  done
4921IFS=$as_save_IFS
4922
4923  ;;
4924esac
4925fi
4926CAT=$ac_cv_path_CAT
4927if test -n "$CAT"; then
4928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4929$as_echo "$CAT" >&6; }
4930else
4931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932$as_echo "no" >&6; }
4933fi
4934
4935
4936        if test "x$CAT" = x; then
4937          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4938        fi
4939      else
4940        # Otherwise we believe it is a complete path. Use it as it is.
4941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4942$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4944$as_echo_n "checking for CAT... " >&6; }
4945        if test ! -x "$tool_specified"; then
4946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4947$as_echo "not found" >&6; }
4948          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4949        fi
4950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4951$as_echo "$tool_specified" >&6; }
4952      fi
4953    fi
4954  fi
4955
4956
4957
4958  if test "x$CAT" = x; then
4959    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4960  fi
4961
4962
4963
4964
4965
4966  # Publish this variable in the help.
4967
4968
4969  if test "x$CHMOD" = x; then
4970    # The variable is not set by user, try to locate tool using the code snippet
4971    for ac_prog in chmod
4972do
4973  # Extract the first word of "$ac_prog", so it can be a program name with args.
4974set dummy $ac_prog; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if ${ac_cv_path_CHMOD+:} false; then :
4978  $as_echo_n "(cached) " >&6
4979else
4980  case $CHMOD in
4981  [\\/]* | ?:[\\/]*)
4982  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4983  ;;
4984  *)
4985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in $PATH
4987do
4988  IFS=$as_save_IFS
4989  test -z "$as_dir" && as_dir=.
4990    for ac_exec_ext in '' $ac_executable_extensions; do
4991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4992    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994    break 2
4995  fi
4996done
4997  done
4998IFS=$as_save_IFS
4999
5000  ;;
5001esac
5002fi
5003CHMOD=$ac_cv_path_CHMOD
5004if test -n "$CHMOD"; then
5005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5006$as_echo "$CHMOD" >&6; }
5007else
5008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012
5013  test -n "$CHMOD" && break
5014done
5015
5016  else
5017    # The variable is set, but is it from the command line or the environment?
5018
5019    # Try to remove the string !CHMOD! from our list.
5020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5022      # If it failed, the variable was not from the command line. Ignore it,
5023      # but warn the user (except for BASH, which is always set by the calling BASH).
5024      if test "xCHMOD" != xBASH; then
5025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5026$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5027      fi
5028      # Try to locate tool using the code snippet
5029      for ac_prog in chmod
5030do
5031  # Extract the first word of "$ac_prog", so it can be a program name with args.
5032set dummy $ac_prog; ac_word=$2
5033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5034$as_echo_n "checking for $ac_word... " >&6; }
5035if ${ac_cv_path_CHMOD+:} false; then :
5036  $as_echo_n "(cached) " >&6
5037else
5038  case $CHMOD in
5039  [\\/]* | ?:[\\/]*)
5040  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5041  ;;
5042  *)
5043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5044for as_dir in $PATH
5045do
5046  IFS=$as_save_IFS
5047  test -z "$as_dir" && as_dir=.
5048    for ac_exec_ext in '' $ac_executable_extensions; do
5049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5050    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5052    break 2
5053  fi
5054done
5055  done
5056IFS=$as_save_IFS
5057
5058  ;;
5059esac
5060fi
5061CHMOD=$ac_cv_path_CHMOD
5062if test -n "$CHMOD"; then
5063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5064$as_echo "$CHMOD" >&6; }
5065else
5066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5067$as_echo "no" >&6; }
5068fi
5069
5070
5071  test -n "$CHMOD" && break
5072done
5073
5074    else
5075      # If it succeeded, then it was overridden by the user. We will use it
5076      # for the tool.
5077
5078      # First remove it from the list of overridden variables, so we can test
5079      # for unknown variables in the end.
5080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5081
5082      # Check if the provided tool contains a complete path.
5083      tool_specified="$CHMOD"
5084      tool_basename="${tool_specified##*/}"
5085      if test "x$tool_basename" = "x$tool_specified"; then
5086        # A command without a complete path is provided, search $PATH.
5087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5088$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5089        # Extract the first word of "$tool_basename", so it can be a program name with args.
5090set dummy $tool_basename; ac_word=$2
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
5093if ${ac_cv_path_CHMOD+:} false; then :
5094  $as_echo_n "(cached) " >&6
5095else
5096  case $CHMOD in
5097  [\\/]* | ?:[\\/]*)
5098  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5099  ;;
5100  *)
5101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102for as_dir in $PATH
5103do
5104  IFS=$as_save_IFS
5105  test -z "$as_dir" && as_dir=.
5106    for ac_exec_ext in '' $ac_executable_extensions; do
5107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5108    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5110    break 2
5111  fi
5112done
5113  done
5114IFS=$as_save_IFS
5115
5116  ;;
5117esac
5118fi
5119CHMOD=$ac_cv_path_CHMOD
5120if test -n "$CHMOD"; then
5121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5122$as_echo "$CHMOD" >&6; }
5123else
5124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125$as_echo "no" >&6; }
5126fi
5127
5128
5129        if test "x$CHMOD" = x; then
5130          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5131        fi
5132      else
5133        # Otherwise we believe it is a complete path. Use it as it is.
5134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5135$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5137$as_echo_n "checking for CHMOD... " >&6; }
5138        if test ! -x "$tool_specified"; then
5139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5140$as_echo "not found" >&6; }
5141          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5142        fi
5143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5144$as_echo "$tool_specified" >&6; }
5145      fi
5146    fi
5147  fi
5148
5149
5150
5151  if test "x$CHMOD" = x; then
5152    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5153  fi
5154
5155
5156
5157
5158
5159  # Publish this variable in the help.
5160
5161
5162  if test "x$CMP" = x; then
5163    # The variable is not set by user, try to locate tool using the code snippet
5164    for ac_prog in cmp
5165do
5166  # Extract the first word of "$ac_prog", so it can be a program name with args.
5167set dummy $ac_prog; ac_word=$2
5168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5169$as_echo_n "checking for $ac_word... " >&6; }
5170if ${ac_cv_path_CMP+:} false; then :
5171  $as_echo_n "(cached) " >&6
5172else
5173  case $CMP in
5174  [\\/]* | ?:[\\/]*)
5175  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5176  ;;
5177  *)
5178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5179for as_dir in $PATH
5180do
5181  IFS=$as_save_IFS
5182  test -z "$as_dir" && as_dir=.
5183    for ac_exec_ext in '' $ac_executable_extensions; do
5184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5185    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5187    break 2
5188  fi
5189done
5190  done
5191IFS=$as_save_IFS
5192
5193  ;;
5194esac
5195fi
5196CMP=$ac_cv_path_CMP
5197if test -n "$CMP"; then
5198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5199$as_echo "$CMP" >&6; }
5200else
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5202$as_echo "no" >&6; }
5203fi
5204
5205
5206  test -n "$CMP" && break
5207done
5208
5209  else
5210    # The variable is set, but is it from the command line or the environment?
5211
5212    # Try to remove the string !CMP! from our list.
5213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5215      # If it failed, the variable was not from the command line. Ignore it,
5216      # but warn the user (except for BASH, which is always set by the calling BASH).
5217      if test "xCMP" != xBASH; then
5218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5219$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5220      fi
5221      # Try to locate tool using the code snippet
5222      for ac_prog in cmp
5223do
5224  # Extract the first word of "$ac_prog", so it can be a program name with args.
5225set dummy $ac_prog; ac_word=$2
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5227$as_echo_n "checking for $ac_word... " >&6; }
5228if ${ac_cv_path_CMP+:} false; then :
5229  $as_echo_n "(cached) " >&6
5230else
5231  case $CMP in
5232  [\\/]* | ?:[\\/]*)
5233  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5234  ;;
5235  *)
5236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5237for as_dir in $PATH
5238do
5239  IFS=$as_save_IFS
5240  test -z "$as_dir" && as_dir=.
5241    for ac_exec_ext in '' $ac_executable_extensions; do
5242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5243    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5245    break 2
5246  fi
5247done
5248  done
5249IFS=$as_save_IFS
5250
5251  ;;
5252esac
5253fi
5254CMP=$ac_cv_path_CMP
5255if test -n "$CMP"; then
5256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5257$as_echo "$CMP" >&6; }
5258else
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260$as_echo "no" >&6; }
5261fi
5262
5263
5264  test -n "$CMP" && break
5265done
5266
5267    else
5268      # If it succeeded, then it was overridden by the user. We will use it
5269      # for the tool.
5270
5271      # First remove it from the list of overridden variables, so we can test
5272      # for unknown variables in the end.
5273      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5274
5275      # Check if the provided tool contains a complete path.
5276      tool_specified="$CMP"
5277      tool_basename="${tool_specified##*/}"
5278      if test "x$tool_basename" = "x$tool_specified"; then
5279        # A command without a complete path is provided, search $PATH.
5280        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5281$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5282        # Extract the first word of "$tool_basename", so it can be a program name with args.
5283set dummy $tool_basename; ac_word=$2
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5285$as_echo_n "checking for $ac_word... " >&6; }
5286if ${ac_cv_path_CMP+:} false; then :
5287  $as_echo_n "(cached) " >&6
5288else
5289  case $CMP in
5290  [\\/]* | ?:[\\/]*)
5291  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5292  ;;
5293  *)
5294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297  IFS=$as_save_IFS
5298  test -z "$as_dir" && as_dir=.
5299    for ac_exec_ext in '' $ac_executable_extensions; do
5300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5301    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5303    break 2
5304  fi
5305done
5306  done
5307IFS=$as_save_IFS
5308
5309  ;;
5310esac
5311fi
5312CMP=$ac_cv_path_CMP
5313if test -n "$CMP"; then
5314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5315$as_echo "$CMP" >&6; }
5316else
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
5319fi
5320
5321
5322        if test "x$CMP" = x; then
5323          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5324        fi
5325      else
5326        # Otherwise we believe it is a complete path. Use it as it is.
5327        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5328$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5329        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5330$as_echo_n "checking for CMP... " >&6; }
5331        if test ! -x "$tool_specified"; then
5332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5333$as_echo "not found" >&6; }
5334          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5335        fi
5336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5337$as_echo "$tool_specified" >&6; }
5338      fi
5339    fi
5340  fi
5341
5342
5343
5344  if test "x$CMP" = x; then
5345    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5346  fi
5347
5348
5349
5350
5351
5352  # Publish this variable in the help.
5353
5354
5355  if test "x$COMM" = x; then
5356    # The variable is not set by user, try to locate tool using the code snippet
5357    for ac_prog in comm
5358do
5359  # Extract the first word of "$ac_prog", so it can be a program name with args.
5360set dummy $ac_prog; ac_word=$2
5361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5362$as_echo_n "checking for $ac_word... " >&6; }
5363if ${ac_cv_path_COMM+:} false; then :
5364  $as_echo_n "(cached) " >&6
5365else
5366  case $COMM in
5367  [\\/]* | ?:[\\/]*)
5368  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5369  ;;
5370  *)
5371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5372for as_dir in $PATH
5373do
5374  IFS=$as_save_IFS
5375  test -z "$as_dir" && as_dir=.
5376    for ac_exec_ext in '' $ac_executable_extensions; do
5377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5378    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5380    break 2
5381  fi
5382done
5383  done
5384IFS=$as_save_IFS
5385
5386  ;;
5387esac
5388fi
5389COMM=$ac_cv_path_COMM
5390if test -n "$COMM"; then
5391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5392$as_echo "$COMM" >&6; }
5393else
5394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5395$as_echo "no" >&6; }
5396fi
5397
5398
5399  test -n "$COMM" && break
5400done
5401
5402  else
5403    # The variable is set, but is it from the command line or the environment?
5404
5405    # Try to remove the string !COMM! from our list.
5406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5408      # If it failed, the variable was not from the command line. Ignore it,
5409      # but warn the user (except for BASH, which is always set by the calling BASH).
5410      if test "xCOMM" != xBASH; then
5411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5412$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5413      fi
5414      # Try to locate tool using the code snippet
5415      for ac_prog in comm
5416do
5417  # Extract the first word of "$ac_prog", so it can be a program name with args.
5418set dummy $ac_prog; ac_word=$2
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5420$as_echo_n "checking for $ac_word... " >&6; }
5421if ${ac_cv_path_COMM+:} false; then :
5422  $as_echo_n "(cached) " >&6
5423else
5424  case $COMM in
5425  [\\/]* | ?:[\\/]*)
5426  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5427  ;;
5428  *)
5429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5430for as_dir in $PATH
5431do
5432  IFS=$as_save_IFS
5433  test -z "$as_dir" && as_dir=.
5434    for ac_exec_ext in '' $ac_executable_extensions; do
5435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5436    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5438    break 2
5439  fi
5440done
5441  done
5442IFS=$as_save_IFS
5443
5444  ;;
5445esac
5446fi
5447COMM=$ac_cv_path_COMM
5448if test -n "$COMM"; then
5449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5450$as_echo "$COMM" >&6; }
5451else
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5453$as_echo "no" >&6; }
5454fi
5455
5456
5457  test -n "$COMM" && break
5458done
5459
5460    else
5461      # If it succeeded, then it was overridden by the user. We will use it
5462      # for the tool.
5463
5464      # First remove it from the list of overridden variables, so we can test
5465      # for unknown variables in the end.
5466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5467
5468      # Check if the provided tool contains a complete path.
5469      tool_specified="$COMM"
5470      tool_basename="${tool_specified##*/}"
5471      if test "x$tool_basename" = "x$tool_specified"; then
5472        # A command without a complete path is provided, search $PATH.
5473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5474$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5475        # Extract the first word of "$tool_basename", so it can be a program name with args.
5476set dummy $tool_basename; ac_word=$2
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5478$as_echo_n "checking for $ac_word... " >&6; }
5479if ${ac_cv_path_COMM+:} false; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  case $COMM in
5483  [\\/]* | ?:[\\/]*)
5484  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5485  ;;
5486  *)
5487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488for as_dir in $PATH
5489do
5490  IFS=$as_save_IFS
5491  test -z "$as_dir" && as_dir=.
5492    for ac_exec_ext in '' $ac_executable_extensions; do
5493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5494    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496    break 2
5497  fi
5498done
5499  done
5500IFS=$as_save_IFS
5501
5502  ;;
5503esac
5504fi
5505COMM=$ac_cv_path_COMM
5506if test -n "$COMM"; then
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5508$as_echo "$COMM" >&6; }
5509else
5510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5511$as_echo "no" >&6; }
5512fi
5513
5514
5515        if test "x$COMM" = x; then
5516          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5517        fi
5518      else
5519        # Otherwise we believe it is a complete path. Use it as it is.
5520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5521$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5523$as_echo_n "checking for COMM... " >&6; }
5524        if test ! -x "$tool_specified"; then
5525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5526$as_echo "not found" >&6; }
5527          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5528        fi
5529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5530$as_echo "$tool_specified" >&6; }
5531      fi
5532    fi
5533  fi
5534
5535
5536
5537  if test "x$COMM" = x; then
5538    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5539  fi
5540
5541
5542
5543
5544
5545  # Publish this variable in the help.
5546
5547
5548  if test "x$CP" = x; then
5549    # The variable is not set by user, try to locate tool using the code snippet
5550    for ac_prog in cp
5551do
5552  # Extract the first word of "$ac_prog", so it can be a program name with args.
5553set dummy $ac_prog; ac_word=$2
5554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5555$as_echo_n "checking for $ac_word... " >&6; }
5556if ${ac_cv_path_CP+:} false; then :
5557  $as_echo_n "(cached) " >&6
5558else
5559  case $CP in
5560  [\\/]* | ?:[\\/]*)
5561  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5562  ;;
5563  *)
5564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565for as_dir in $PATH
5566do
5567  IFS=$as_save_IFS
5568  test -z "$as_dir" && as_dir=.
5569    for ac_exec_ext in '' $ac_executable_extensions; do
5570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5571    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5573    break 2
5574  fi
5575done
5576  done
5577IFS=$as_save_IFS
5578
5579  ;;
5580esac
5581fi
5582CP=$ac_cv_path_CP
5583if test -n "$CP"; then
5584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5585$as_echo "$CP" >&6; }
5586else
5587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5588$as_echo "no" >&6; }
5589fi
5590
5591
5592  test -n "$CP" && break
5593done
5594
5595  else
5596    # The variable is set, but is it from the command line or the environment?
5597
5598    # Try to remove the string !CP! from our list.
5599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5601      # If it failed, the variable was not from the command line. Ignore it,
5602      # but warn the user (except for BASH, which is always set by the calling BASH).
5603      if test "xCP" != xBASH; then
5604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5605$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5606      fi
5607      # Try to locate tool using the code snippet
5608      for ac_prog in cp
5609do
5610  # Extract the first word of "$ac_prog", so it can be a program name with args.
5611set dummy $ac_prog; ac_word=$2
5612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5613$as_echo_n "checking for $ac_word... " >&6; }
5614if ${ac_cv_path_CP+:} false; then :
5615  $as_echo_n "(cached) " >&6
5616else
5617  case $CP in
5618  [\\/]* | ?:[\\/]*)
5619  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5620  ;;
5621  *)
5622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623for as_dir in $PATH
5624do
5625  IFS=$as_save_IFS
5626  test -z "$as_dir" && as_dir=.
5627    for ac_exec_ext in '' $ac_executable_extensions; do
5628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5629    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631    break 2
5632  fi
5633done
5634  done
5635IFS=$as_save_IFS
5636
5637  ;;
5638esac
5639fi
5640CP=$ac_cv_path_CP
5641if test -n "$CP"; then
5642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5643$as_echo "$CP" >&6; }
5644else
5645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5646$as_echo "no" >&6; }
5647fi
5648
5649
5650  test -n "$CP" && break
5651done
5652
5653    else
5654      # If it succeeded, then it was overridden by the user. We will use it
5655      # for the tool.
5656
5657      # First remove it from the list of overridden variables, so we can test
5658      # for unknown variables in the end.
5659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5660
5661      # Check if the provided tool contains a complete path.
5662      tool_specified="$CP"
5663      tool_basename="${tool_specified##*/}"
5664      if test "x$tool_basename" = "x$tool_specified"; then
5665        # A command without a complete path is provided, search $PATH.
5666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5667$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5668        # Extract the first word of "$tool_basename", so it can be a program name with args.
5669set dummy $tool_basename; ac_word=$2
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5671$as_echo_n "checking for $ac_word... " >&6; }
5672if ${ac_cv_path_CP+:} false; then :
5673  $as_echo_n "(cached) " >&6
5674else
5675  case $CP in
5676  [\\/]* | ?:[\\/]*)
5677  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5678  ;;
5679  *)
5680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681for as_dir in $PATH
5682do
5683  IFS=$as_save_IFS
5684  test -z "$as_dir" && as_dir=.
5685    for ac_exec_ext in '' $ac_executable_extensions; do
5686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5687    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689    break 2
5690  fi
5691done
5692  done
5693IFS=$as_save_IFS
5694
5695  ;;
5696esac
5697fi
5698CP=$ac_cv_path_CP
5699if test -n "$CP"; then
5700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5701$as_echo "$CP" >&6; }
5702else
5703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5704$as_echo "no" >&6; }
5705fi
5706
5707
5708        if test "x$CP" = x; then
5709          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5710        fi
5711      else
5712        # Otherwise we believe it is a complete path. Use it as it is.
5713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5714$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5716$as_echo_n "checking for CP... " >&6; }
5717        if test ! -x "$tool_specified"; then
5718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5719$as_echo "not found" >&6; }
5720          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5721        fi
5722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5723$as_echo "$tool_specified" >&6; }
5724      fi
5725    fi
5726  fi
5727
5728
5729
5730  if test "x$CP" = x; then
5731    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5732  fi
5733
5734
5735
5736
5737
5738  # Publish this variable in the help.
5739
5740
5741  if test "x$CUT" = x; then
5742    # The variable is not set by user, try to locate tool using the code snippet
5743    for ac_prog in cut
5744do
5745  # Extract the first word of "$ac_prog", so it can be a program name with args.
5746set dummy $ac_prog; ac_word=$2
5747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5748$as_echo_n "checking for $ac_word... " >&6; }
5749if ${ac_cv_path_CUT+:} false; then :
5750  $as_echo_n "(cached) " >&6
5751else
5752  case $CUT in
5753  [\\/]* | ?:[\\/]*)
5754  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5755  ;;
5756  *)
5757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5758for as_dir in $PATH
5759do
5760  IFS=$as_save_IFS
5761  test -z "$as_dir" && as_dir=.
5762    for ac_exec_ext in '' $ac_executable_extensions; do
5763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5764    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5766    break 2
5767  fi
5768done
5769  done
5770IFS=$as_save_IFS
5771
5772  ;;
5773esac
5774fi
5775CUT=$ac_cv_path_CUT
5776if test -n "$CUT"; then
5777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5778$as_echo "$CUT" >&6; }
5779else
5780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
5782fi
5783
5784
5785  test -n "$CUT" && break
5786done
5787
5788  else
5789    # The variable is set, but is it from the command line or the environment?
5790
5791    # Try to remove the string !CUT! from our list.
5792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5794      # If it failed, the variable was not from the command line. Ignore it,
5795      # but warn the user (except for BASH, which is always set by the calling BASH).
5796      if test "xCUT" != xBASH; then
5797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5798$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5799      fi
5800      # Try to locate tool using the code snippet
5801      for ac_prog in cut
5802do
5803  # Extract the first word of "$ac_prog", so it can be a program name with args.
5804set dummy $ac_prog; ac_word=$2
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
5807if ${ac_cv_path_CUT+:} false; then :
5808  $as_echo_n "(cached) " >&6
5809else
5810  case $CUT in
5811  [\\/]* | ?:[\\/]*)
5812  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5813  ;;
5814  *)
5815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5816for as_dir in $PATH
5817do
5818  IFS=$as_save_IFS
5819  test -z "$as_dir" && as_dir=.
5820    for ac_exec_ext in '' $ac_executable_extensions; do
5821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5822    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5824    break 2
5825  fi
5826done
5827  done
5828IFS=$as_save_IFS
5829
5830  ;;
5831esac
5832fi
5833CUT=$ac_cv_path_CUT
5834if test -n "$CUT"; then
5835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5836$as_echo "$CUT" >&6; }
5837else
5838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5839$as_echo "no" >&6; }
5840fi
5841
5842
5843  test -n "$CUT" && break
5844done
5845
5846    else
5847      # If it succeeded, then it was overridden by the user. We will use it
5848      # for the tool.
5849
5850      # First remove it from the list of overridden variables, so we can test
5851      # for unknown variables in the end.
5852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5853
5854      # Check if the provided tool contains a complete path.
5855      tool_specified="$CUT"
5856      tool_basename="${tool_specified##*/}"
5857      if test "x$tool_basename" = "x$tool_specified"; then
5858        # A command without a complete path is provided, search $PATH.
5859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5860$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5861        # Extract the first word of "$tool_basename", so it can be a program name with args.
5862set dummy $tool_basename; ac_word=$2
5863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864$as_echo_n "checking for $ac_word... " >&6; }
5865if ${ac_cv_path_CUT+:} false; then :
5866  $as_echo_n "(cached) " >&6
5867else
5868  case $CUT in
5869  [\\/]* | ?:[\\/]*)
5870  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5871  ;;
5872  *)
5873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876  IFS=$as_save_IFS
5877  test -z "$as_dir" && as_dir=.
5878    for ac_exec_ext in '' $ac_executable_extensions; do
5879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882    break 2
5883  fi
5884done
5885  done
5886IFS=$as_save_IFS
5887
5888  ;;
5889esac
5890fi
5891CUT=$ac_cv_path_CUT
5892if test -n "$CUT"; then
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5894$as_echo "$CUT" >&6; }
5895else
5896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897$as_echo "no" >&6; }
5898fi
5899
5900
5901        if test "x$CUT" = x; then
5902          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5903        fi
5904      else
5905        # Otherwise we believe it is a complete path. Use it as it is.
5906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5907$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5908        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5909$as_echo_n "checking for CUT... " >&6; }
5910        if test ! -x "$tool_specified"; then
5911          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5912$as_echo "not found" >&6; }
5913          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5914        fi
5915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5916$as_echo "$tool_specified" >&6; }
5917      fi
5918    fi
5919  fi
5920
5921
5922
5923  if test "x$CUT" = x; then
5924    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5925  fi
5926
5927
5928
5929
5930
5931  # Publish this variable in the help.
5932
5933
5934  if test "x$DATE" = x; then
5935    # The variable is not set by user, try to locate tool using the code snippet
5936    for ac_prog in date
5937do
5938  # Extract the first word of "$ac_prog", so it can be a program name with args.
5939set dummy $ac_prog; ac_word=$2
5940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5941$as_echo_n "checking for $ac_word... " >&6; }
5942if ${ac_cv_path_DATE+:} false; then :
5943  $as_echo_n "(cached) " >&6
5944else
5945  case $DATE in
5946  [\\/]* | ?:[\\/]*)
5947  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5948  ;;
5949  *)
5950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5951for as_dir in $PATH
5952do
5953  IFS=$as_save_IFS
5954  test -z "$as_dir" && as_dir=.
5955    for ac_exec_ext in '' $ac_executable_extensions; do
5956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5957    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5959    break 2
5960  fi
5961done
5962  done
5963IFS=$as_save_IFS
5964
5965  ;;
5966esac
5967fi
5968DATE=$ac_cv_path_DATE
5969if test -n "$DATE"; then
5970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5971$as_echo "$DATE" >&6; }
5972else
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5974$as_echo "no" >&6; }
5975fi
5976
5977
5978  test -n "$DATE" && break
5979done
5980
5981  else
5982    # The variable is set, but is it from the command line or the environment?
5983
5984    # Try to remove the string !DATE! from our list.
5985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5987      # If it failed, the variable was not from the command line. Ignore it,
5988      # but warn the user (except for BASH, which is always set by the calling BASH).
5989      if test "xDATE" != xBASH; then
5990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5991$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5992      fi
5993      # Try to locate tool using the code snippet
5994      for ac_prog in date
5995do
5996  # Extract the first word of "$ac_prog", so it can be a program name with args.
5997set dummy $ac_prog; ac_word=$2
5998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5999$as_echo_n "checking for $ac_word... " >&6; }
6000if ${ac_cv_path_DATE+:} false; then :
6001  $as_echo_n "(cached) " >&6
6002else
6003  case $DATE in
6004  [\\/]* | ?:[\\/]*)
6005  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6006  ;;
6007  *)
6008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6009for as_dir in $PATH
6010do
6011  IFS=$as_save_IFS
6012  test -z "$as_dir" && as_dir=.
6013    for ac_exec_ext in '' $ac_executable_extensions; do
6014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6015    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6017    break 2
6018  fi
6019done
6020  done
6021IFS=$as_save_IFS
6022
6023  ;;
6024esac
6025fi
6026DATE=$ac_cv_path_DATE
6027if test -n "$DATE"; then
6028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6029$as_echo "$DATE" >&6; }
6030else
6031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6032$as_echo "no" >&6; }
6033fi
6034
6035
6036  test -n "$DATE" && break
6037done
6038
6039    else
6040      # If it succeeded, then it was overridden by the user. We will use it
6041      # for the tool.
6042
6043      # First remove it from the list of overridden variables, so we can test
6044      # for unknown variables in the end.
6045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6046
6047      # Check if the provided tool contains a complete path.
6048      tool_specified="$DATE"
6049      tool_basename="${tool_specified##*/}"
6050      if test "x$tool_basename" = "x$tool_specified"; then
6051        # A command without a complete path is provided, search $PATH.
6052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6053$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6054        # Extract the first word of "$tool_basename", so it can be a program name with args.
6055set dummy $tool_basename; ac_word=$2
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057$as_echo_n "checking for $ac_word... " >&6; }
6058if ${ac_cv_path_DATE+:} false; then :
6059  $as_echo_n "(cached) " >&6
6060else
6061  case $DATE in
6062  [\\/]* | ?:[\\/]*)
6063  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6064  ;;
6065  *)
6066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6067for as_dir in $PATH
6068do
6069  IFS=$as_save_IFS
6070  test -z "$as_dir" && as_dir=.
6071    for ac_exec_ext in '' $ac_executable_extensions; do
6072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6073    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6075    break 2
6076  fi
6077done
6078  done
6079IFS=$as_save_IFS
6080
6081  ;;
6082esac
6083fi
6084DATE=$ac_cv_path_DATE
6085if test -n "$DATE"; then
6086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6087$as_echo "$DATE" >&6; }
6088else
6089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094        if test "x$DATE" = x; then
6095          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6096        fi
6097      else
6098        # Otherwise we believe it is a complete path. Use it as it is.
6099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6100$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6102$as_echo_n "checking for DATE... " >&6; }
6103        if test ! -x "$tool_specified"; then
6104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6105$as_echo "not found" >&6; }
6106          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6107        fi
6108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6109$as_echo "$tool_specified" >&6; }
6110      fi
6111    fi
6112  fi
6113
6114
6115
6116  if test "x$DATE" = x; then
6117    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6118  fi
6119
6120
6121
6122
6123
6124  # Publish this variable in the help.
6125
6126
6127  if test "x$DIFF" = x; then
6128    # The variable is not set by user, try to locate tool using the code snippet
6129    for ac_prog in gdiff diff
6130do
6131  # Extract the first word of "$ac_prog", so it can be a program name with args.
6132set dummy $ac_prog; ac_word=$2
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6134$as_echo_n "checking for $ac_word... " >&6; }
6135if ${ac_cv_path_DIFF+:} false; then :
6136  $as_echo_n "(cached) " >&6
6137else
6138  case $DIFF in
6139  [\\/]* | ?:[\\/]*)
6140  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6141  ;;
6142  *)
6143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144for as_dir in $PATH
6145do
6146  IFS=$as_save_IFS
6147  test -z "$as_dir" && as_dir=.
6148    for ac_exec_ext in '' $ac_executable_extensions; do
6149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6150    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6152    break 2
6153  fi
6154done
6155  done
6156IFS=$as_save_IFS
6157
6158  ;;
6159esac
6160fi
6161DIFF=$ac_cv_path_DIFF
6162if test -n "$DIFF"; then
6163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6164$as_echo "$DIFF" >&6; }
6165else
6166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6167$as_echo "no" >&6; }
6168fi
6169
6170
6171  test -n "$DIFF" && break
6172done
6173
6174  else
6175    # The variable is set, but is it from the command line or the environment?
6176
6177    # Try to remove the string !DIFF! from our list.
6178    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6179    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6180      # If it failed, the variable was not from the command line. Ignore it,
6181      # but warn the user (except for BASH, which is always set by the calling BASH).
6182      if test "xDIFF" != xBASH; then
6183        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6184$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6185      fi
6186      # Try to locate tool using the code snippet
6187      for ac_prog in gdiff diff
6188do
6189  # Extract the first word of "$ac_prog", so it can be a program name with args.
6190set dummy $ac_prog; ac_word=$2
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6192$as_echo_n "checking for $ac_word... " >&6; }
6193if ${ac_cv_path_DIFF+:} false; then :
6194  $as_echo_n "(cached) " >&6
6195else
6196  case $DIFF in
6197  [\\/]* | ?:[\\/]*)
6198  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6199  ;;
6200  *)
6201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH
6203do
6204  IFS=$as_save_IFS
6205  test -z "$as_dir" && as_dir=.
6206    for ac_exec_ext in '' $ac_executable_extensions; do
6207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6208    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6210    break 2
6211  fi
6212done
6213  done
6214IFS=$as_save_IFS
6215
6216  ;;
6217esac
6218fi
6219DIFF=$ac_cv_path_DIFF
6220if test -n "$DIFF"; then
6221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6222$as_echo "$DIFF" >&6; }
6223else
6224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6225$as_echo "no" >&6; }
6226fi
6227
6228
6229  test -n "$DIFF" && break
6230done
6231
6232    else
6233      # If it succeeded, then it was overridden by the user. We will use it
6234      # for the tool.
6235
6236      # First remove it from the list of overridden variables, so we can test
6237      # for unknown variables in the end.
6238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6239
6240      # Check if the provided tool contains a complete path.
6241      tool_specified="$DIFF"
6242      tool_basename="${tool_specified##*/}"
6243      if test "x$tool_basename" = "x$tool_specified"; then
6244        # A command without a complete path is provided, search $PATH.
6245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6246$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6247        # Extract the first word of "$tool_basename", so it can be a program name with args.
6248set dummy $tool_basename; ac_word=$2
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6250$as_echo_n "checking for $ac_word... " >&6; }
6251if ${ac_cv_path_DIFF+:} false; then :
6252  $as_echo_n "(cached) " >&6
6253else
6254  case $DIFF in
6255  [\\/]* | ?:[\\/]*)
6256  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6257  ;;
6258  *)
6259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260for as_dir in $PATH
6261do
6262  IFS=$as_save_IFS
6263  test -z "$as_dir" && as_dir=.
6264    for ac_exec_ext in '' $ac_executable_extensions; do
6265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6266    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6268    break 2
6269  fi
6270done
6271  done
6272IFS=$as_save_IFS
6273
6274  ;;
6275esac
6276fi
6277DIFF=$ac_cv_path_DIFF
6278if test -n "$DIFF"; then
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6280$as_echo "$DIFF" >&6; }
6281else
6282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6283$as_echo "no" >&6; }
6284fi
6285
6286
6287        if test "x$DIFF" = x; then
6288          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6289        fi
6290      else
6291        # Otherwise we believe it is a complete path. Use it as it is.
6292        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6293$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6295$as_echo_n "checking for DIFF... " >&6; }
6296        if test ! -x "$tool_specified"; then
6297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6298$as_echo "not found" >&6; }
6299          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6300        fi
6301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6302$as_echo "$tool_specified" >&6; }
6303      fi
6304    fi
6305  fi
6306
6307
6308
6309  if test "x$DIFF" = x; then
6310    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6311  fi
6312
6313
6314
6315
6316
6317  # Publish this variable in the help.
6318
6319
6320  if test "x$DIRNAME" = x; then
6321    # The variable is not set by user, try to locate tool using the code snippet
6322    for ac_prog in dirname
6323do
6324  # Extract the first word of "$ac_prog", so it can be a program name with args.
6325set dummy $ac_prog; ac_word=$2
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6327$as_echo_n "checking for $ac_word... " >&6; }
6328if ${ac_cv_path_DIRNAME+:} false; then :
6329  $as_echo_n "(cached) " >&6
6330else
6331  case $DIRNAME in
6332  [\\/]* | ?:[\\/]*)
6333  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6334  ;;
6335  *)
6336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6337for as_dir in $PATH
6338do
6339  IFS=$as_save_IFS
6340  test -z "$as_dir" && as_dir=.
6341    for ac_exec_ext in '' $ac_executable_extensions; do
6342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6343    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6345    break 2
6346  fi
6347done
6348  done
6349IFS=$as_save_IFS
6350
6351  ;;
6352esac
6353fi
6354DIRNAME=$ac_cv_path_DIRNAME
6355if test -n "$DIRNAME"; then
6356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6357$as_echo "$DIRNAME" >&6; }
6358else
6359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360$as_echo "no" >&6; }
6361fi
6362
6363
6364  test -n "$DIRNAME" && break
6365done
6366
6367  else
6368    # The variable is set, but is it from the command line or the environment?
6369
6370    # Try to remove the string !DIRNAME! from our list.
6371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6373      # If it failed, the variable was not from the command line. Ignore it,
6374      # but warn the user (except for BASH, which is always set by the calling BASH).
6375      if test "xDIRNAME" != xBASH; then
6376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6377$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6378      fi
6379      # Try to locate tool using the code snippet
6380      for ac_prog in dirname
6381do
6382  # Extract the first word of "$ac_prog", so it can be a program name with args.
6383set dummy $ac_prog; ac_word=$2
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385$as_echo_n "checking for $ac_word... " >&6; }
6386if ${ac_cv_path_DIRNAME+:} false; then :
6387  $as_echo_n "(cached) " >&6
6388else
6389  case $DIRNAME in
6390  [\\/]* | ?:[\\/]*)
6391  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6392  ;;
6393  *)
6394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397  IFS=$as_save_IFS
6398  test -z "$as_dir" && as_dir=.
6399    for ac_exec_ext in '' $ac_executable_extensions; do
6400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6401    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6403    break 2
6404  fi
6405done
6406  done
6407IFS=$as_save_IFS
6408
6409  ;;
6410esac
6411fi
6412DIRNAME=$ac_cv_path_DIRNAME
6413if test -n "$DIRNAME"; then
6414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6415$as_echo "$DIRNAME" >&6; }
6416else
6417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; }
6419fi
6420
6421
6422  test -n "$DIRNAME" && break
6423done
6424
6425    else
6426      # If it succeeded, then it was overridden by the user. We will use it
6427      # for the tool.
6428
6429      # First remove it from the list of overridden variables, so we can test
6430      # for unknown variables in the end.
6431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6432
6433      # Check if the provided tool contains a complete path.
6434      tool_specified="$DIRNAME"
6435      tool_basename="${tool_specified##*/}"
6436      if test "x$tool_basename" = "x$tool_specified"; then
6437        # A command without a complete path is provided, search $PATH.
6438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6439$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6440        # Extract the first word of "$tool_basename", so it can be a program name with args.
6441set dummy $tool_basename; ac_word=$2
6442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6443$as_echo_n "checking for $ac_word... " >&6; }
6444if ${ac_cv_path_DIRNAME+:} false; then :
6445  $as_echo_n "(cached) " >&6
6446else
6447  case $DIRNAME in
6448  [\\/]* | ?:[\\/]*)
6449  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6450  ;;
6451  *)
6452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6453for as_dir in $PATH
6454do
6455  IFS=$as_save_IFS
6456  test -z "$as_dir" && as_dir=.
6457    for ac_exec_ext in '' $ac_executable_extensions; do
6458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6459    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6461    break 2
6462  fi
6463done
6464  done
6465IFS=$as_save_IFS
6466
6467  ;;
6468esac
6469fi
6470DIRNAME=$ac_cv_path_DIRNAME
6471if test -n "$DIRNAME"; then
6472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6473$as_echo "$DIRNAME" >&6; }
6474else
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479
6480        if test "x$DIRNAME" = x; then
6481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6482        fi
6483      else
6484        # Otherwise we believe it is a complete path. Use it as it is.
6485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6486$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6488$as_echo_n "checking for DIRNAME... " >&6; }
6489        if test ! -x "$tool_specified"; then
6490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6491$as_echo "not found" >&6; }
6492          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6493        fi
6494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6495$as_echo "$tool_specified" >&6; }
6496      fi
6497    fi
6498  fi
6499
6500
6501
6502  if test "x$DIRNAME" = x; then
6503    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6504  fi
6505
6506
6507
6508
6509
6510  # Publish this variable in the help.
6511
6512
6513  if test "x$ECHO" = x; then
6514    # The variable is not set by user, try to locate tool using the code snippet
6515    for ac_prog in echo
6516do
6517  # Extract the first word of "$ac_prog", so it can be a program name with args.
6518set dummy $ac_prog; ac_word=$2
6519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6520$as_echo_n "checking for $ac_word... " >&6; }
6521if ${ac_cv_path_ECHO+:} false; then :
6522  $as_echo_n "(cached) " >&6
6523else
6524  case $ECHO in
6525  [\\/]* | ?:[\\/]*)
6526  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6527  ;;
6528  *)
6529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6530for as_dir in $PATH
6531do
6532  IFS=$as_save_IFS
6533  test -z "$as_dir" && as_dir=.
6534    for ac_exec_ext in '' $ac_executable_extensions; do
6535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6536    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6538    break 2
6539  fi
6540done
6541  done
6542IFS=$as_save_IFS
6543
6544  ;;
6545esac
6546fi
6547ECHO=$ac_cv_path_ECHO
6548if test -n "$ECHO"; then
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6550$as_echo "$ECHO" >&6; }
6551else
6552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6553$as_echo "no" >&6; }
6554fi
6555
6556
6557  test -n "$ECHO" && break
6558done
6559
6560  else
6561    # The variable is set, but is it from the command line or the environment?
6562
6563    # Try to remove the string !ECHO! from our list.
6564    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6565    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6566      # If it failed, the variable was not from the command line. Ignore it,
6567      # but warn the user (except for BASH, which is always set by the calling BASH).
6568      if test "xECHO" != xBASH; then
6569        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6570$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6571      fi
6572      # Try to locate tool using the code snippet
6573      for ac_prog in echo
6574do
6575  # Extract the first word of "$ac_prog", so it can be a program name with args.
6576set dummy $ac_prog; ac_word=$2
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6578$as_echo_n "checking for $ac_word... " >&6; }
6579if ${ac_cv_path_ECHO+:} false; then :
6580  $as_echo_n "(cached) " >&6
6581else
6582  case $ECHO in
6583  [\\/]* | ?:[\\/]*)
6584  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6585  ;;
6586  *)
6587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6588for as_dir in $PATH
6589do
6590  IFS=$as_save_IFS
6591  test -z "$as_dir" && as_dir=.
6592    for ac_exec_ext in '' $ac_executable_extensions; do
6593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6594    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6596    break 2
6597  fi
6598done
6599  done
6600IFS=$as_save_IFS
6601
6602  ;;
6603esac
6604fi
6605ECHO=$ac_cv_path_ECHO
6606if test -n "$ECHO"; then
6607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6608$as_echo "$ECHO" >&6; }
6609else
6610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611$as_echo "no" >&6; }
6612fi
6613
6614
6615  test -n "$ECHO" && break
6616done
6617
6618    else
6619      # If it succeeded, then it was overridden by the user. We will use it
6620      # for the tool.
6621
6622      # First remove it from the list of overridden variables, so we can test
6623      # for unknown variables in the end.
6624      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6625
6626      # Check if the provided tool contains a complete path.
6627      tool_specified="$ECHO"
6628      tool_basename="${tool_specified##*/}"
6629      if test "x$tool_basename" = "x$tool_specified"; then
6630        # A command without a complete path is provided, search $PATH.
6631        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6632$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6633        # Extract the first word of "$tool_basename", so it can be a program name with args.
6634set dummy $tool_basename; ac_word=$2
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636$as_echo_n "checking for $ac_word... " >&6; }
6637if ${ac_cv_path_ECHO+:} false; then :
6638  $as_echo_n "(cached) " >&6
6639else
6640  case $ECHO in
6641  [\\/]* | ?:[\\/]*)
6642  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6643  ;;
6644  *)
6645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6646for as_dir in $PATH
6647do
6648  IFS=$as_save_IFS
6649  test -z "$as_dir" && as_dir=.
6650    for ac_exec_ext in '' $ac_executable_extensions; do
6651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6652    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6654    break 2
6655  fi
6656done
6657  done
6658IFS=$as_save_IFS
6659
6660  ;;
6661esac
6662fi
6663ECHO=$ac_cv_path_ECHO
6664if test -n "$ECHO"; then
6665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6666$as_echo "$ECHO" >&6; }
6667else
6668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669$as_echo "no" >&6; }
6670fi
6671
6672
6673        if test "x$ECHO" = x; then
6674          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6675        fi
6676      else
6677        # Otherwise we believe it is a complete path. Use it as it is.
6678        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6679$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6681$as_echo_n "checking for ECHO... " >&6; }
6682        if test ! -x "$tool_specified"; then
6683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6684$as_echo "not found" >&6; }
6685          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6686        fi
6687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6688$as_echo "$tool_specified" >&6; }
6689      fi
6690    fi
6691  fi
6692
6693
6694
6695  if test "x$ECHO" = x; then
6696    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6697  fi
6698
6699
6700
6701
6702
6703  # Publish this variable in the help.
6704
6705
6706  if test "x$EXPR" = x; then
6707    # The variable is not set by user, try to locate tool using the code snippet
6708    for ac_prog in expr
6709do
6710  # Extract the first word of "$ac_prog", so it can be a program name with args.
6711set dummy $ac_prog; ac_word=$2
6712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6713$as_echo_n "checking for $ac_word... " >&6; }
6714if ${ac_cv_path_EXPR+:} false; then :
6715  $as_echo_n "(cached) " >&6
6716else
6717  case $EXPR in
6718  [\\/]* | ?:[\\/]*)
6719  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6720  ;;
6721  *)
6722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6723for as_dir in $PATH
6724do
6725  IFS=$as_save_IFS
6726  test -z "$as_dir" && as_dir=.
6727    for ac_exec_ext in '' $ac_executable_extensions; do
6728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6729    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6731    break 2
6732  fi
6733done
6734  done
6735IFS=$as_save_IFS
6736
6737  ;;
6738esac
6739fi
6740EXPR=$ac_cv_path_EXPR
6741if test -n "$EXPR"; then
6742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6743$as_echo "$EXPR" >&6; }
6744else
6745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6746$as_echo "no" >&6; }
6747fi
6748
6749
6750  test -n "$EXPR" && break
6751done
6752
6753  else
6754    # The variable is set, but is it from the command line or the environment?
6755
6756    # Try to remove the string !EXPR! from our list.
6757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6759      # If it failed, the variable was not from the command line. Ignore it,
6760      # but warn the user (except for BASH, which is always set by the calling BASH).
6761      if test "xEXPR" != xBASH; then
6762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6763$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6764      fi
6765      # Try to locate tool using the code snippet
6766      for ac_prog in expr
6767do
6768  # Extract the first word of "$ac_prog", so it can be a program name with args.
6769set dummy $ac_prog; ac_word=$2
6770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6771$as_echo_n "checking for $ac_word... " >&6; }
6772if ${ac_cv_path_EXPR+:} false; then :
6773  $as_echo_n "(cached) " >&6
6774else
6775  case $EXPR in
6776  [\\/]* | ?:[\\/]*)
6777  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6778  ;;
6779  *)
6780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6781for as_dir in $PATH
6782do
6783  IFS=$as_save_IFS
6784  test -z "$as_dir" && as_dir=.
6785    for ac_exec_ext in '' $ac_executable_extensions; do
6786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6787    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6789    break 2
6790  fi
6791done
6792  done
6793IFS=$as_save_IFS
6794
6795  ;;
6796esac
6797fi
6798EXPR=$ac_cv_path_EXPR
6799if test -n "$EXPR"; then
6800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6801$as_echo "$EXPR" >&6; }
6802else
6803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6804$as_echo "no" >&6; }
6805fi
6806
6807
6808  test -n "$EXPR" && break
6809done
6810
6811    else
6812      # If it succeeded, then it was overridden by the user. We will use it
6813      # for the tool.
6814
6815      # First remove it from the list of overridden variables, so we can test
6816      # for unknown variables in the end.
6817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6818
6819      # Check if the provided tool contains a complete path.
6820      tool_specified="$EXPR"
6821      tool_basename="${tool_specified##*/}"
6822      if test "x$tool_basename" = "x$tool_specified"; then
6823        # A command without a complete path is provided, search $PATH.
6824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6825$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6826        # Extract the first word of "$tool_basename", so it can be a program name with args.
6827set dummy $tool_basename; ac_word=$2
6828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6829$as_echo_n "checking for $ac_word... " >&6; }
6830if ${ac_cv_path_EXPR+:} false; then :
6831  $as_echo_n "(cached) " >&6
6832else
6833  case $EXPR in
6834  [\\/]* | ?:[\\/]*)
6835  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6836  ;;
6837  *)
6838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6839for as_dir in $PATH
6840do
6841  IFS=$as_save_IFS
6842  test -z "$as_dir" && as_dir=.
6843    for ac_exec_ext in '' $ac_executable_extensions; do
6844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6845    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6847    break 2
6848  fi
6849done
6850  done
6851IFS=$as_save_IFS
6852
6853  ;;
6854esac
6855fi
6856EXPR=$ac_cv_path_EXPR
6857if test -n "$EXPR"; then
6858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6859$as_echo "$EXPR" >&6; }
6860else
6861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6862$as_echo "no" >&6; }
6863fi
6864
6865
6866        if test "x$EXPR" = x; then
6867          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6868        fi
6869      else
6870        # Otherwise we believe it is a complete path. Use it as it is.
6871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6872$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6874$as_echo_n "checking for EXPR... " >&6; }
6875        if test ! -x "$tool_specified"; then
6876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6877$as_echo "not found" >&6; }
6878          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6879        fi
6880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6881$as_echo "$tool_specified" >&6; }
6882      fi
6883    fi
6884  fi
6885
6886
6887
6888  if test "x$EXPR" = x; then
6889    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6890  fi
6891
6892
6893
6894
6895
6896  # Publish this variable in the help.
6897
6898
6899  if test "x$FILE" = x; then
6900    # The variable is not set by user, try to locate tool using the code snippet
6901    for ac_prog in file
6902do
6903  # Extract the first word of "$ac_prog", so it can be a program name with args.
6904set dummy $ac_prog; ac_word=$2
6905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6906$as_echo_n "checking for $ac_word... " >&6; }
6907if ${ac_cv_path_FILE+:} false; then :
6908  $as_echo_n "(cached) " >&6
6909else
6910  case $FILE in
6911  [\\/]* | ?:[\\/]*)
6912  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6913  ;;
6914  *)
6915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6916for as_dir in $PATH
6917do
6918  IFS=$as_save_IFS
6919  test -z "$as_dir" && as_dir=.
6920    for ac_exec_ext in '' $ac_executable_extensions; do
6921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6922    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6924    break 2
6925  fi
6926done
6927  done
6928IFS=$as_save_IFS
6929
6930  ;;
6931esac
6932fi
6933FILE=$ac_cv_path_FILE
6934if test -n "$FILE"; then
6935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6936$as_echo "$FILE" >&6; }
6937else
6938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6939$as_echo "no" >&6; }
6940fi
6941
6942
6943  test -n "$FILE" && break
6944done
6945
6946  else
6947    # The variable is set, but is it from the command line or the environment?
6948
6949    # Try to remove the string !FILE! from our list.
6950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6952      # If it failed, the variable was not from the command line. Ignore it,
6953      # but warn the user (except for BASH, which is always set by the calling BASH).
6954      if test "xFILE" != xBASH; then
6955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6956$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6957      fi
6958      # Try to locate tool using the code snippet
6959      for ac_prog in file
6960do
6961  # Extract the first word of "$ac_prog", so it can be a program name with args.
6962set dummy $ac_prog; ac_word=$2
6963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6964$as_echo_n "checking for $ac_word... " >&6; }
6965if ${ac_cv_path_FILE+:} false; then :
6966  $as_echo_n "(cached) " >&6
6967else
6968  case $FILE in
6969  [\\/]* | ?:[\\/]*)
6970  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6971  ;;
6972  *)
6973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6974for as_dir in $PATH
6975do
6976  IFS=$as_save_IFS
6977  test -z "$as_dir" && as_dir=.
6978    for ac_exec_ext in '' $ac_executable_extensions; do
6979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6980    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6982    break 2
6983  fi
6984done
6985  done
6986IFS=$as_save_IFS
6987
6988  ;;
6989esac
6990fi
6991FILE=$ac_cv_path_FILE
6992if test -n "$FILE"; then
6993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6994$as_echo "$FILE" >&6; }
6995else
6996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6997$as_echo "no" >&6; }
6998fi
6999
7000
7001  test -n "$FILE" && break
7002done
7003
7004    else
7005      # If it succeeded, then it was overridden by the user. We will use it
7006      # for the tool.
7007
7008      # First remove it from the list of overridden variables, so we can test
7009      # for unknown variables in the end.
7010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7011
7012      # Check if the provided tool contains a complete path.
7013      tool_specified="$FILE"
7014      tool_basename="${tool_specified##*/}"
7015      if test "x$tool_basename" = "x$tool_specified"; then
7016        # A command without a complete path is provided, search $PATH.
7017        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7018$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7019        # Extract the first word of "$tool_basename", so it can be a program name with args.
7020set dummy $tool_basename; ac_word=$2
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7022$as_echo_n "checking for $ac_word... " >&6; }
7023if ${ac_cv_path_FILE+:} false; then :
7024  $as_echo_n "(cached) " >&6
7025else
7026  case $FILE in
7027  [\\/]* | ?:[\\/]*)
7028  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7029  ;;
7030  *)
7031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7032for as_dir in $PATH
7033do
7034  IFS=$as_save_IFS
7035  test -z "$as_dir" && as_dir=.
7036    for ac_exec_ext in '' $ac_executable_extensions; do
7037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7038    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7040    break 2
7041  fi
7042done
7043  done
7044IFS=$as_save_IFS
7045
7046  ;;
7047esac
7048fi
7049FILE=$ac_cv_path_FILE
7050if test -n "$FILE"; then
7051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7052$as_echo "$FILE" >&6; }
7053else
7054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7055$as_echo "no" >&6; }
7056fi
7057
7058
7059        if test "x$FILE" = x; then
7060          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7061        fi
7062      else
7063        # Otherwise we believe it is a complete path. Use it as it is.
7064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7065$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7067$as_echo_n "checking for FILE... " >&6; }
7068        if test ! -x "$tool_specified"; then
7069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7070$as_echo "not found" >&6; }
7071          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7072        fi
7073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7074$as_echo "$tool_specified" >&6; }
7075      fi
7076    fi
7077  fi
7078
7079
7080
7081  if test "x$FILE" = x; then
7082    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7083  fi
7084
7085
7086
7087
7088
7089  # Publish this variable in the help.
7090
7091
7092  if test "x$FIND" = x; then
7093    # The variable is not set by user, try to locate tool using the code snippet
7094    for ac_prog in find
7095do
7096  # Extract the first word of "$ac_prog", so it can be a program name with args.
7097set dummy $ac_prog; ac_word=$2
7098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7099$as_echo_n "checking for $ac_word... " >&6; }
7100if ${ac_cv_path_FIND+:} false; then :
7101  $as_echo_n "(cached) " >&6
7102else
7103  case $FIND in
7104  [\\/]* | ?:[\\/]*)
7105  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7106  ;;
7107  *)
7108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7109for as_dir in $PATH
7110do
7111  IFS=$as_save_IFS
7112  test -z "$as_dir" && as_dir=.
7113    for ac_exec_ext in '' $ac_executable_extensions; do
7114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7115    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7117    break 2
7118  fi
7119done
7120  done
7121IFS=$as_save_IFS
7122
7123  ;;
7124esac
7125fi
7126FIND=$ac_cv_path_FIND
7127if test -n "$FIND"; then
7128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7129$as_echo "$FIND" >&6; }
7130else
7131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7132$as_echo "no" >&6; }
7133fi
7134
7135
7136  test -n "$FIND" && break
7137done
7138
7139  else
7140    # The variable is set, but is it from the command line or the environment?
7141
7142    # Try to remove the string !FIND! from our list.
7143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7145      # If it failed, the variable was not from the command line. Ignore it,
7146      # but warn the user (except for BASH, which is always set by the calling BASH).
7147      if test "xFIND" != xBASH; then
7148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7149$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7150      fi
7151      # Try to locate tool using the code snippet
7152      for ac_prog in find
7153do
7154  # Extract the first word of "$ac_prog", so it can be a program name with args.
7155set dummy $ac_prog; ac_word=$2
7156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7157$as_echo_n "checking for $ac_word... " >&6; }
7158if ${ac_cv_path_FIND+:} false; then :
7159  $as_echo_n "(cached) " >&6
7160else
7161  case $FIND in
7162  [\\/]* | ?:[\\/]*)
7163  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7164  ;;
7165  *)
7166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7167for as_dir in $PATH
7168do
7169  IFS=$as_save_IFS
7170  test -z "$as_dir" && as_dir=.
7171    for ac_exec_ext in '' $ac_executable_extensions; do
7172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7173    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7175    break 2
7176  fi
7177done
7178  done
7179IFS=$as_save_IFS
7180
7181  ;;
7182esac
7183fi
7184FIND=$ac_cv_path_FIND
7185if test -n "$FIND"; then
7186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7187$as_echo "$FIND" >&6; }
7188else
7189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7190$as_echo "no" >&6; }
7191fi
7192
7193
7194  test -n "$FIND" && break
7195done
7196
7197    else
7198      # If it succeeded, then it was overridden by the user. We will use it
7199      # for the tool.
7200
7201      # First remove it from the list of overridden variables, so we can test
7202      # for unknown variables in the end.
7203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7204
7205      # Check if the provided tool contains a complete path.
7206      tool_specified="$FIND"
7207      tool_basename="${tool_specified##*/}"
7208      if test "x$tool_basename" = "x$tool_specified"; then
7209        # A command without a complete path is provided, search $PATH.
7210        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7211$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7212        # Extract the first word of "$tool_basename", so it can be a program name with args.
7213set dummy $tool_basename; ac_word=$2
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7215$as_echo_n "checking for $ac_word... " >&6; }
7216if ${ac_cv_path_FIND+:} false; then :
7217  $as_echo_n "(cached) " >&6
7218else
7219  case $FIND in
7220  [\\/]* | ?:[\\/]*)
7221  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7222  ;;
7223  *)
7224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7225for as_dir in $PATH
7226do
7227  IFS=$as_save_IFS
7228  test -z "$as_dir" && as_dir=.
7229    for ac_exec_ext in '' $ac_executable_extensions; do
7230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7231    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7233    break 2
7234  fi
7235done
7236  done
7237IFS=$as_save_IFS
7238
7239  ;;
7240esac
7241fi
7242FIND=$ac_cv_path_FIND
7243if test -n "$FIND"; then
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7245$as_echo "$FIND" >&6; }
7246else
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7248$as_echo "no" >&6; }
7249fi
7250
7251
7252        if test "x$FIND" = x; then
7253          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7254        fi
7255      else
7256        # Otherwise we believe it is a complete path. Use it as it is.
7257        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7258$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7260$as_echo_n "checking for FIND... " >&6; }
7261        if test ! -x "$tool_specified"; then
7262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7263$as_echo "not found" >&6; }
7264          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7265        fi
7266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7267$as_echo "$tool_specified" >&6; }
7268      fi
7269    fi
7270  fi
7271
7272
7273
7274  if test "x$FIND" = x; then
7275    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7276  fi
7277
7278
7279
7280
7281
7282  # Publish this variable in the help.
7283
7284
7285  if test "x$HEAD" = x; then
7286    # The variable is not set by user, try to locate tool using the code snippet
7287    for ac_prog in head
7288do
7289  # Extract the first word of "$ac_prog", so it can be a program name with args.
7290set dummy $ac_prog; ac_word=$2
7291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7292$as_echo_n "checking for $ac_word... " >&6; }
7293if ${ac_cv_path_HEAD+:} false; then :
7294  $as_echo_n "(cached) " >&6
7295else
7296  case $HEAD in
7297  [\\/]* | ?:[\\/]*)
7298  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7299  ;;
7300  *)
7301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7302for as_dir in $PATH
7303do
7304  IFS=$as_save_IFS
7305  test -z "$as_dir" && as_dir=.
7306    for ac_exec_ext in '' $ac_executable_extensions; do
7307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7308    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7310    break 2
7311  fi
7312done
7313  done
7314IFS=$as_save_IFS
7315
7316  ;;
7317esac
7318fi
7319HEAD=$ac_cv_path_HEAD
7320if test -n "$HEAD"; then
7321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7322$as_echo "$HEAD" >&6; }
7323else
7324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7325$as_echo "no" >&6; }
7326fi
7327
7328
7329  test -n "$HEAD" && break
7330done
7331
7332  else
7333    # The variable is set, but is it from the command line or the environment?
7334
7335    # Try to remove the string !HEAD! from our list.
7336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7338      # If it failed, the variable was not from the command line. Ignore it,
7339      # but warn the user (except for BASH, which is always set by the calling BASH).
7340      if test "xHEAD" != xBASH; then
7341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7342$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7343      fi
7344      # Try to locate tool using the code snippet
7345      for ac_prog in head
7346do
7347  # Extract the first word of "$ac_prog", so it can be a program name with args.
7348set dummy $ac_prog; ac_word=$2
7349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7350$as_echo_n "checking for $ac_word... " >&6; }
7351if ${ac_cv_path_HEAD+:} false; then :
7352  $as_echo_n "(cached) " >&6
7353else
7354  case $HEAD in
7355  [\\/]* | ?:[\\/]*)
7356  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7357  ;;
7358  *)
7359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7360for as_dir in $PATH
7361do
7362  IFS=$as_save_IFS
7363  test -z "$as_dir" && as_dir=.
7364    for ac_exec_ext in '' $ac_executable_extensions; do
7365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7366    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7368    break 2
7369  fi
7370done
7371  done
7372IFS=$as_save_IFS
7373
7374  ;;
7375esac
7376fi
7377HEAD=$ac_cv_path_HEAD
7378if test -n "$HEAD"; then
7379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7380$as_echo "$HEAD" >&6; }
7381else
7382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7383$as_echo "no" >&6; }
7384fi
7385
7386
7387  test -n "$HEAD" && break
7388done
7389
7390    else
7391      # If it succeeded, then it was overridden by the user. We will use it
7392      # for the tool.
7393
7394      # First remove it from the list of overridden variables, so we can test
7395      # for unknown variables in the end.
7396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7397
7398      # Check if the provided tool contains a complete path.
7399      tool_specified="$HEAD"
7400      tool_basename="${tool_specified##*/}"
7401      if test "x$tool_basename" = "x$tool_specified"; then
7402        # A command without a complete path is provided, search $PATH.
7403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7404$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7405        # Extract the first word of "$tool_basename", so it can be a program name with args.
7406set dummy $tool_basename; ac_word=$2
7407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7408$as_echo_n "checking for $ac_word... " >&6; }
7409if ${ac_cv_path_HEAD+:} false; then :
7410  $as_echo_n "(cached) " >&6
7411else
7412  case $HEAD in
7413  [\\/]* | ?:[\\/]*)
7414  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7415  ;;
7416  *)
7417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7418for as_dir in $PATH
7419do
7420  IFS=$as_save_IFS
7421  test -z "$as_dir" && as_dir=.
7422    for ac_exec_ext in '' $ac_executable_extensions; do
7423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7424    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7426    break 2
7427  fi
7428done
7429  done
7430IFS=$as_save_IFS
7431
7432  ;;
7433esac
7434fi
7435HEAD=$ac_cv_path_HEAD
7436if test -n "$HEAD"; then
7437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7438$as_echo "$HEAD" >&6; }
7439else
7440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441$as_echo "no" >&6; }
7442fi
7443
7444
7445        if test "x$HEAD" = x; then
7446          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7447        fi
7448      else
7449        # Otherwise we believe it is a complete path. Use it as it is.
7450        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7451$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7453$as_echo_n "checking for HEAD... " >&6; }
7454        if test ! -x "$tool_specified"; then
7455          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7456$as_echo "not found" >&6; }
7457          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7458        fi
7459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7460$as_echo "$tool_specified" >&6; }
7461      fi
7462    fi
7463  fi
7464
7465
7466
7467  if test "x$HEAD" = x; then
7468    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7469  fi
7470
7471
7472
7473
7474
7475  # Publish this variable in the help.
7476
7477
7478  if test "x$LN" = x; then
7479    # The variable is not set by user, try to locate tool using the code snippet
7480    for ac_prog in ln
7481do
7482  # Extract the first word of "$ac_prog", so it can be a program name with args.
7483set dummy $ac_prog; ac_word=$2
7484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7485$as_echo_n "checking for $ac_word... " >&6; }
7486if ${ac_cv_path_LN+:} false; then :
7487  $as_echo_n "(cached) " >&6
7488else
7489  case $LN in
7490  [\\/]* | ?:[\\/]*)
7491  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7492  ;;
7493  *)
7494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7495for as_dir in $PATH
7496do
7497  IFS=$as_save_IFS
7498  test -z "$as_dir" && as_dir=.
7499    for ac_exec_ext in '' $ac_executable_extensions; do
7500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7501    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7503    break 2
7504  fi
7505done
7506  done
7507IFS=$as_save_IFS
7508
7509  ;;
7510esac
7511fi
7512LN=$ac_cv_path_LN
7513if test -n "$LN"; then
7514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7515$as_echo "$LN" >&6; }
7516else
7517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7518$as_echo "no" >&6; }
7519fi
7520
7521
7522  test -n "$LN" && break
7523done
7524
7525  else
7526    # The variable is set, but is it from the command line or the environment?
7527
7528    # Try to remove the string !LN! from our list.
7529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7531      # If it failed, the variable was not from the command line. Ignore it,
7532      # but warn the user (except for BASH, which is always set by the calling BASH).
7533      if test "xLN" != xBASH; then
7534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7535$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7536      fi
7537      # Try to locate tool using the code snippet
7538      for ac_prog in ln
7539do
7540  # Extract the first word of "$ac_prog", so it can be a program name with args.
7541set dummy $ac_prog; ac_word=$2
7542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7543$as_echo_n "checking for $ac_word... " >&6; }
7544if ${ac_cv_path_LN+:} false; then :
7545  $as_echo_n "(cached) " >&6
7546else
7547  case $LN in
7548  [\\/]* | ?:[\\/]*)
7549  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7550  ;;
7551  *)
7552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7553for as_dir in $PATH
7554do
7555  IFS=$as_save_IFS
7556  test -z "$as_dir" && as_dir=.
7557    for ac_exec_ext in '' $ac_executable_extensions; do
7558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7559    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7561    break 2
7562  fi
7563done
7564  done
7565IFS=$as_save_IFS
7566
7567  ;;
7568esac
7569fi
7570LN=$ac_cv_path_LN
7571if test -n "$LN"; then
7572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7573$as_echo "$LN" >&6; }
7574else
7575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7576$as_echo "no" >&6; }
7577fi
7578
7579
7580  test -n "$LN" && break
7581done
7582
7583    else
7584      # If it succeeded, then it was overridden by the user. We will use it
7585      # for the tool.
7586
7587      # First remove it from the list of overridden variables, so we can test
7588      # for unknown variables in the end.
7589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7590
7591      # Check if the provided tool contains a complete path.
7592      tool_specified="$LN"
7593      tool_basename="${tool_specified##*/}"
7594      if test "x$tool_basename" = "x$tool_specified"; then
7595        # A command without a complete path is provided, search $PATH.
7596        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7597$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7598        # Extract the first word of "$tool_basename", so it can be a program name with args.
7599set dummy $tool_basename; ac_word=$2
7600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7601$as_echo_n "checking for $ac_word... " >&6; }
7602if ${ac_cv_path_LN+:} false; then :
7603  $as_echo_n "(cached) " >&6
7604else
7605  case $LN in
7606  [\\/]* | ?:[\\/]*)
7607  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7608  ;;
7609  *)
7610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613  IFS=$as_save_IFS
7614  test -z "$as_dir" && as_dir=.
7615    for ac_exec_ext in '' $ac_executable_extensions; do
7616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7617    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7619    break 2
7620  fi
7621done
7622  done
7623IFS=$as_save_IFS
7624
7625  ;;
7626esac
7627fi
7628LN=$ac_cv_path_LN
7629if test -n "$LN"; then
7630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7631$as_echo "$LN" >&6; }
7632else
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7634$as_echo "no" >&6; }
7635fi
7636
7637
7638        if test "x$LN" = x; then
7639          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7640        fi
7641      else
7642        # Otherwise we believe it is a complete path. Use it as it is.
7643        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7644$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7646$as_echo_n "checking for LN... " >&6; }
7647        if test ! -x "$tool_specified"; then
7648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7649$as_echo "not found" >&6; }
7650          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7651        fi
7652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7653$as_echo "$tool_specified" >&6; }
7654      fi
7655    fi
7656  fi
7657
7658
7659
7660  if test "x$LN" = x; then
7661    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7662  fi
7663
7664
7665
7666
7667
7668  # Publish this variable in the help.
7669
7670
7671  if test "x$LS" = x; then
7672    # The variable is not set by user, try to locate tool using the code snippet
7673    for ac_prog in ls
7674do
7675  # Extract the first word of "$ac_prog", so it can be a program name with args.
7676set dummy $ac_prog; ac_word=$2
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7678$as_echo_n "checking for $ac_word... " >&6; }
7679if ${ac_cv_path_LS+:} false; then :
7680  $as_echo_n "(cached) " >&6
7681else
7682  case $LS in
7683  [\\/]* | ?:[\\/]*)
7684  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7685  ;;
7686  *)
7687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7688for as_dir in $PATH
7689do
7690  IFS=$as_save_IFS
7691  test -z "$as_dir" && as_dir=.
7692    for ac_exec_ext in '' $ac_executable_extensions; do
7693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7694    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7696    break 2
7697  fi
7698done
7699  done
7700IFS=$as_save_IFS
7701
7702  ;;
7703esac
7704fi
7705LS=$ac_cv_path_LS
7706if test -n "$LS"; then
7707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7708$as_echo "$LS" >&6; }
7709else
7710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7711$as_echo "no" >&6; }
7712fi
7713
7714
7715  test -n "$LS" && break
7716done
7717
7718  else
7719    # The variable is set, but is it from the command line or the environment?
7720
7721    # Try to remove the string !LS! from our list.
7722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7724      # If it failed, the variable was not from the command line. Ignore it,
7725      # but warn the user (except for BASH, which is always set by the calling BASH).
7726      if test "xLS" != xBASH; then
7727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7728$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7729      fi
7730      # Try to locate tool using the code snippet
7731      for ac_prog in ls
7732do
7733  # Extract the first word of "$ac_prog", so it can be a program name with args.
7734set dummy $ac_prog; ac_word=$2
7735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7736$as_echo_n "checking for $ac_word... " >&6; }
7737if ${ac_cv_path_LS+:} false; then :
7738  $as_echo_n "(cached) " >&6
7739else
7740  case $LS in
7741  [\\/]* | ?:[\\/]*)
7742  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7743  ;;
7744  *)
7745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7746for as_dir in $PATH
7747do
7748  IFS=$as_save_IFS
7749  test -z "$as_dir" && as_dir=.
7750    for ac_exec_ext in '' $ac_executable_extensions; do
7751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7752    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7754    break 2
7755  fi
7756done
7757  done
7758IFS=$as_save_IFS
7759
7760  ;;
7761esac
7762fi
7763LS=$ac_cv_path_LS
7764if test -n "$LS"; then
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7766$as_echo "$LS" >&6; }
7767else
7768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7769$as_echo "no" >&6; }
7770fi
7771
7772
7773  test -n "$LS" && break
7774done
7775
7776    else
7777      # If it succeeded, then it was overridden by the user. We will use it
7778      # for the tool.
7779
7780      # First remove it from the list of overridden variables, so we can test
7781      # for unknown variables in the end.
7782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7783
7784      # Check if the provided tool contains a complete path.
7785      tool_specified="$LS"
7786      tool_basename="${tool_specified##*/}"
7787      if test "x$tool_basename" = "x$tool_specified"; then
7788        # A command without a complete path is provided, search $PATH.
7789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7790$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7791        # Extract the first word of "$tool_basename", so it can be a program name with args.
7792set dummy $tool_basename; ac_word=$2
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7794$as_echo_n "checking for $ac_word... " >&6; }
7795if ${ac_cv_path_LS+:} false; then :
7796  $as_echo_n "(cached) " >&6
7797else
7798  case $LS in
7799  [\\/]* | ?:[\\/]*)
7800  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7801  ;;
7802  *)
7803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7804for as_dir in $PATH
7805do
7806  IFS=$as_save_IFS
7807  test -z "$as_dir" && as_dir=.
7808    for ac_exec_ext in '' $ac_executable_extensions; do
7809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7810    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7812    break 2
7813  fi
7814done
7815  done
7816IFS=$as_save_IFS
7817
7818  ;;
7819esac
7820fi
7821LS=$ac_cv_path_LS
7822if test -n "$LS"; then
7823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7824$as_echo "$LS" >&6; }
7825else
7826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7827$as_echo "no" >&6; }
7828fi
7829
7830
7831        if test "x$LS" = x; then
7832          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7833        fi
7834      else
7835        # Otherwise we believe it is a complete path. Use it as it is.
7836        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7837$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7839$as_echo_n "checking for LS... " >&6; }
7840        if test ! -x "$tool_specified"; then
7841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7842$as_echo "not found" >&6; }
7843          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7844        fi
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7846$as_echo "$tool_specified" >&6; }
7847      fi
7848    fi
7849  fi
7850
7851
7852
7853  if test "x$LS" = x; then
7854    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7855  fi
7856
7857
7858
7859
7860
7861  # Publish this variable in the help.
7862
7863
7864  if test "x$MKDIR" = x; then
7865    # The variable is not set by user, try to locate tool using the code snippet
7866    for ac_prog in mkdir
7867do
7868  # Extract the first word of "$ac_prog", so it can be a program name with args.
7869set dummy $ac_prog; ac_word=$2
7870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7871$as_echo_n "checking for $ac_word... " >&6; }
7872if ${ac_cv_path_MKDIR+:} false; then :
7873  $as_echo_n "(cached) " >&6
7874else
7875  case $MKDIR in
7876  [\\/]* | ?:[\\/]*)
7877  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7878  ;;
7879  *)
7880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7881for as_dir in $PATH
7882do
7883  IFS=$as_save_IFS
7884  test -z "$as_dir" && as_dir=.
7885    for ac_exec_ext in '' $ac_executable_extensions; do
7886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7887    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7889    break 2
7890  fi
7891done
7892  done
7893IFS=$as_save_IFS
7894
7895  ;;
7896esac
7897fi
7898MKDIR=$ac_cv_path_MKDIR
7899if test -n "$MKDIR"; then
7900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7901$as_echo "$MKDIR" >&6; }
7902else
7903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7904$as_echo "no" >&6; }
7905fi
7906
7907
7908  test -n "$MKDIR" && break
7909done
7910
7911  else
7912    # The variable is set, but is it from the command line or the environment?
7913
7914    # Try to remove the string !MKDIR! from our list.
7915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7917      # If it failed, the variable was not from the command line. Ignore it,
7918      # but warn the user (except for BASH, which is always set by the calling BASH).
7919      if test "xMKDIR" != xBASH; then
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7921$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7922      fi
7923      # Try to locate tool using the code snippet
7924      for ac_prog in mkdir
7925do
7926  # Extract the first word of "$ac_prog", so it can be a program name with args.
7927set dummy $ac_prog; ac_word=$2
7928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7929$as_echo_n "checking for $ac_word... " >&6; }
7930if ${ac_cv_path_MKDIR+:} false; then :
7931  $as_echo_n "(cached) " >&6
7932else
7933  case $MKDIR in
7934  [\\/]* | ?:[\\/]*)
7935  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7936  ;;
7937  *)
7938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7939for as_dir in $PATH
7940do
7941  IFS=$as_save_IFS
7942  test -z "$as_dir" && as_dir=.
7943    for ac_exec_ext in '' $ac_executable_extensions; do
7944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7945    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7947    break 2
7948  fi
7949done
7950  done
7951IFS=$as_save_IFS
7952
7953  ;;
7954esac
7955fi
7956MKDIR=$ac_cv_path_MKDIR
7957if test -n "$MKDIR"; then
7958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7959$as_echo "$MKDIR" >&6; }
7960else
7961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7962$as_echo "no" >&6; }
7963fi
7964
7965
7966  test -n "$MKDIR" && break
7967done
7968
7969    else
7970      # If it succeeded, then it was overridden by the user. We will use it
7971      # for the tool.
7972
7973      # First remove it from the list of overridden variables, so we can test
7974      # for unknown variables in the end.
7975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7976
7977      # Check if the provided tool contains a complete path.
7978      tool_specified="$MKDIR"
7979      tool_basename="${tool_specified##*/}"
7980      if test "x$tool_basename" = "x$tool_specified"; then
7981        # A command without a complete path is provided, search $PATH.
7982        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7983$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7984        # Extract the first word of "$tool_basename", so it can be a program name with args.
7985set dummy $tool_basename; ac_word=$2
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7987$as_echo_n "checking for $ac_word... " >&6; }
7988if ${ac_cv_path_MKDIR+:} false; then :
7989  $as_echo_n "(cached) " >&6
7990else
7991  case $MKDIR in
7992  [\\/]* | ?:[\\/]*)
7993  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7994  ;;
7995  *)
7996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7997for as_dir in $PATH
7998do
7999  IFS=$as_save_IFS
8000  test -z "$as_dir" && as_dir=.
8001    for ac_exec_ext in '' $ac_executable_extensions; do
8002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8003    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8005    break 2
8006  fi
8007done
8008  done
8009IFS=$as_save_IFS
8010
8011  ;;
8012esac
8013fi
8014MKDIR=$ac_cv_path_MKDIR
8015if test -n "$MKDIR"; then
8016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8017$as_echo "$MKDIR" >&6; }
8018else
8019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8020$as_echo "no" >&6; }
8021fi
8022
8023
8024        if test "x$MKDIR" = x; then
8025          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8026        fi
8027      else
8028        # Otherwise we believe it is a complete path. Use it as it is.
8029        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8030$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8032$as_echo_n "checking for MKDIR... " >&6; }
8033        if test ! -x "$tool_specified"; then
8034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8035$as_echo "not found" >&6; }
8036          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8037        fi
8038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8039$as_echo "$tool_specified" >&6; }
8040      fi
8041    fi
8042  fi
8043
8044
8045
8046  if test "x$MKDIR" = x; then
8047    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8048  fi
8049
8050
8051
8052
8053
8054  # Publish this variable in the help.
8055
8056
8057  if test "x$MKTEMP" = x; then
8058    # The variable is not set by user, try to locate tool using the code snippet
8059    for ac_prog in mktemp
8060do
8061  # Extract the first word of "$ac_prog", so it can be a program name with args.
8062set dummy $ac_prog; ac_word=$2
8063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8064$as_echo_n "checking for $ac_word... " >&6; }
8065if ${ac_cv_path_MKTEMP+:} false; then :
8066  $as_echo_n "(cached) " >&6
8067else
8068  case $MKTEMP in
8069  [\\/]* | ?:[\\/]*)
8070  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8071  ;;
8072  *)
8073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8074for as_dir in $PATH
8075do
8076  IFS=$as_save_IFS
8077  test -z "$as_dir" && as_dir=.
8078    for ac_exec_ext in '' $ac_executable_extensions; do
8079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8080    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8082    break 2
8083  fi
8084done
8085  done
8086IFS=$as_save_IFS
8087
8088  ;;
8089esac
8090fi
8091MKTEMP=$ac_cv_path_MKTEMP
8092if test -n "$MKTEMP"; then
8093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8094$as_echo "$MKTEMP" >&6; }
8095else
8096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
8098fi
8099
8100
8101  test -n "$MKTEMP" && break
8102done
8103
8104  else
8105    # The variable is set, but is it from the command line or the environment?
8106
8107    # Try to remove the string !MKTEMP! from our list.
8108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8110      # If it failed, the variable was not from the command line. Ignore it,
8111      # but warn the user (except for BASH, which is always set by the calling BASH).
8112      if test "xMKTEMP" != xBASH; then
8113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8114$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8115      fi
8116      # Try to locate tool using the code snippet
8117      for ac_prog in mktemp
8118do
8119  # Extract the first word of "$ac_prog", so it can be a program name with args.
8120set dummy $ac_prog; ac_word=$2
8121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8122$as_echo_n "checking for $ac_word... " >&6; }
8123if ${ac_cv_path_MKTEMP+:} false; then :
8124  $as_echo_n "(cached) " >&6
8125else
8126  case $MKTEMP in
8127  [\\/]* | ?:[\\/]*)
8128  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8129  ;;
8130  *)
8131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8132for as_dir in $PATH
8133do
8134  IFS=$as_save_IFS
8135  test -z "$as_dir" && as_dir=.
8136    for ac_exec_ext in '' $ac_executable_extensions; do
8137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8138    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8140    break 2
8141  fi
8142done
8143  done
8144IFS=$as_save_IFS
8145
8146  ;;
8147esac
8148fi
8149MKTEMP=$ac_cv_path_MKTEMP
8150if test -n "$MKTEMP"; then
8151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8152$as_echo "$MKTEMP" >&6; }
8153else
8154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8155$as_echo "no" >&6; }
8156fi
8157
8158
8159  test -n "$MKTEMP" && break
8160done
8161
8162    else
8163      # If it succeeded, then it was overridden by the user. We will use it
8164      # for the tool.
8165
8166      # First remove it from the list of overridden variables, so we can test
8167      # for unknown variables in the end.
8168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8169
8170      # Check if the provided tool contains a complete path.
8171      tool_specified="$MKTEMP"
8172      tool_basename="${tool_specified##*/}"
8173      if test "x$tool_basename" = "x$tool_specified"; then
8174        # A command without a complete path is provided, search $PATH.
8175        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8176$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8177        # Extract the first word of "$tool_basename", so it can be a program name with args.
8178set dummy $tool_basename; ac_word=$2
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8180$as_echo_n "checking for $ac_word... " >&6; }
8181if ${ac_cv_path_MKTEMP+:} false; then :
8182  $as_echo_n "(cached) " >&6
8183else
8184  case $MKTEMP in
8185  [\\/]* | ?:[\\/]*)
8186  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8187  ;;
8188  *)
8189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8190for as_dir in $PATH
8191do
8192  IFS=$as_save_IFS
8193  test -z "$as_dir" && as_dir=.
8194    for ac_exec_ext in '' $ac_executable_extensions; do
8195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8196    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8198    break 2
8199  fi
8200done
8201  done
8202IFS=$as_save_IFS
8203
8204  ;;
8205esac
8206fi
8207MKTEMP=$ac_cv_path_MKTEMP
8208if test -n "$MKTEMP"; then
8209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8210$as_echo "$MKTEMP" >&6; }
8211else
8212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8213$as_echo "no" >&6; }
8214fi
8215
8216
8217        if test "x$MKTEMP" = x; then
8218          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8219        fi
8220      else
8221        # Otherwise we believe it is a complete path. Use it as it is.
8222        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8223$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8224        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8225$as_echo_n "checking for MKTEMP... " >&6; }
8226        if test ! -x "$tool_specified"; then
8227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8228$as_echo "not found" >&6; }
8229          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8230        fi
8231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8232$as_echo "$tool_specified" >&6; }
8233      fi
8234    fi
8235  fi
8236
8237
8238
8239  if test "x$MKTEMP" = x; then
8240    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8241  fi
8242
8243
8244
8245
8246
8247  # Publish this variable in the help.
8248
8249
8250  if test "x$MV" = x; then
8251    # The variable is not set by user, try to locate tool using the code snippet
8252    for ac_prog in mv
8253do
8254  # Extract the first word of "$ac_prog", so it can be a program name with args.
8255set dummy $ac_prog; ac_word=$2
8256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8257$as_echo_n "checking for $ac_word... " >&6; }
8258if ${ac_cv_path_MV+:} false; then :
8259  $as_echo_n "(cached) " >&6
8260else
8261  case $MV in
8262  [\\/]* | ?:[\\/]*)
8263  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8264  ;;
8265  *)
8266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8267for as_dir in $PATH
8268do
8269  IFS=$as_save_IFS
8270  test -z "$as_dir" && as_dir=.
8271    for ac_exec_ext in '' $ac_executable_extensions; do
8272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8273    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8275    break 2
8276  fi
8277done
8278  done
8279IFS=$as_save_IFS
8280
8281  ;;
8282esac
8283fi
8284MV=$ac_cv_path_MV
8285if test -n "$MV"; then
8286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8287$as_echo "$MV" >&6; }
8288else
8289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8290$as_echo "no" >&6; }
8291fi
8292
8293
8294  test -n "$MV" && break
8295done
8296
8297  else
8298    # The variable is set, but is it from the command line or the environment?
8299
8300    # Try to remove the string !MV! from our list.
8301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8303      # If it failed, the variable was not from the command line. Ignore it,
8304      # but warn the user (except for BASH, which is always set by the calling BASH).
8305      if test "xMV" != xBASH; then
8306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8307$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8308      fi
8309      # Try to locate tool using the code snippet
8310      for ac_prog in mv
8311do
8312  # Extract the first word of "$ac_prog", so it can be a program name with args.
8313set dummy $ac_prog; ac_word=$2
8314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8315$as_echo_n "checking for $ac_word... " >&6; }
8316if ${ac_cv_path_MV+:} false; then :
8317  $as_echo_n "(cached) " >&6
8318else
8319  case $MV in
8320  [\\/]* | ?:[\\/]*)
8321  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8322  ;;
8323  *)
8324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8325for as_dir in $PATH
8326do
8327  IFS=$as_save_IFS
8328  test -z "$as_dir" && as_dir=.
8329    for ac_exec_ext in '' $ac_executable_extensions; do
8330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8331    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8333    break 2
8334  fi
8335done
8336  done
8337IFS=$as_save_IFS
8338
8339  ;;
8340esac
8341fi
8342MV=$ac_cv_path_MV
8343if test -n "$MV"; then
8344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8345$as_echo "$MV" >&6; }
8346else
8347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8348$as_echo "no" >&6; }
8349fi
8350
8351
8352  test -n "$MV" && break
8353done
8354
8355    else
8356      # If it succeeded, then it was overridden by the user. We will use it
8357      # for the tool.
8358
8359      # First remove it from the list of overridden variables, so we can test
8360      # for unknown variables in the end.
8361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8362
8363      # Check if the provided tool contains a complete path.
8364      tool_specified="$MV"
8365      tool_basename="${tool_specified##*/}"
8366      if test "x$tool_basename" = "x$tool_specified"; then
8367        # A command without a complete path is provided, search $PATH.
8368        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8369$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8370        # Extract the first word of "$tool_basename", so it can be a program name with args.
8371set dummy $tool_basename; ac_word=$2
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8373$as_echo_n "checking for $ac_word... " >&6; }
8374if ${ac_cv_path_MV+:} false; then :
8375  $as_echo_n "(cached) " >&6
8376else
8377  case $MV in
8378  [\\/]* | ?:[\\/]*)
8379  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8380  ;;
8381  *)
8382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8383for as_dir in $PATH
8384do
8385  IFS=$as_save_IFS
8386  test -z "$as_dir" && as_dir=.
8387    for ac_exec_ext in '' $ac_executable_extensions; do
8388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8389    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8391    break 2
8392  fi
8393done
8394  done
8395IFS=$as_save_IFS
8396
8397  ;;
8398esac
8399fi
8400MV=$ac_cv_path_MV
8401if test -n "$MV"; then
8402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8403$as_echo "$MV" >&6; }
8404else
8405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8406$as_echo "no" >&6; }
8407fi
8408
8409
8410        if test "x$MV" = x; then
8411          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8412        fi
8413      else
8414        # Otherwise we believe it is a complete path. Use it as it is.
8415        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8416$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8418$as_echo_n "checking for MV... " >&6; }
8419        if test ! -x "$tool_specified"; then
8420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8421$as_echo "not found" >&6; }
8422          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8423        fi
8424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8425$as_echo "$tool_specified" >&6; }
8426      fi
8427    fi
8428  fi
8429
8430
8431
8432  if test "x$MV" = x; then
8433    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8434  fi
8435
8436
8437
8438
8439
8440  # Publish this variable in the help.
8441
8442
8443  if test "x$NAWK" = x; then
8444    # The variable is not set by user, try to locate tool using the code snippet
8445    for ac_prog in nawk gawk awk
8446do
8447  # Extract the first word of "$ac_prog", so it can be a program name with args.
8448set dummy $ac_prog; ac_word=$2
8449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8450$as_echo_n "checking for $ac_word... " >&6; }
8451if ${ac_cv_path_NAWK+:} false; then :
8452  $as_echo_n "(cached) " >&6
8453else
8454  case $NAWK in
8455  [\\/]* | ?:[\\/]*)
8456  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8457  ;;
8458  *)
8459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8460for as_dir in $PATH
8461do
8462  IFS=$as_save_IFS
8463  test -z "$as_dir" && as_dir=.
8464    for ac_exec_ext in '' $ac_executable_extensions; do
8465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8466    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8468    break 2
8469  fi
8470done
8471  done
8472IFS=$as_save_IFS
8473
8474  ;;
8475esac
8476fi
8477NAWK=$ac_cv_path_NAWK
8478if test -n "$NAWK"; then
8479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8480$as_echo "$NAWK" >&6; }
8481else
8482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8483$as_echo "no" >&6; }
8484fi
8485
8486
8487  test -n "$NAWK" && break
8488done
8489
8490  else
8491    # The variable is set, but is it from the command line or the environment?
8492
8493    # Try to remove the string !NAWK! from our list.
8494    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8495    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8496      # If it failed, the variable was not from the command line. Ignore it,
8497      # but warn the user (except for BASH, which is always set by the calling BASH).
8498      if test "xNAWK" != xBASH; then
8499        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8500$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8501      fi
8502      # Try to locate tool using the code snippet
8503      for ac_prog in nawk gawk awk
8504do
8505  # Extract the first word of "$ac_prog", so it can be a program name with args.
8506set dummy $ac_prog; ac_word=$2
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8508$as_echo_n "checking for $ac_word... " >&6; }
8509if ${ac_cv_path_NAWK+:} false; then :
8510  $as_echo_n "(cached) " >&6
8511else
8512  case $NAWK in
8513  [\\/]* | ?:[\\/]*)
8514  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8515  ;;
8516  *)
8517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518for as_dir in $PATH
8519do
8520  IFS=$as_save_IFS
8521  test -z "$as_dir" && as_dir=.
8522    for ac_exec_ext in '' $ac_executable_extensions; do
8523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8524    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8526    break 2
8527  fi
8528done
8529  done
8530IFS=$as_save_IFS
8531
8532  ;;
8533esac
8534fi
8535NAWK=$ac_cv_path_NAWK
8536if test -n "$NAWK"; then
8537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8538$as_echo "$NAWK" >&6; }
8539else
8540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8541$as_echo "no" >&6; }
8542fi
8543
8544
8545  test -n "$NAWK" && break
8546done
8547
8548    else
8549      # If it succeeded, then it was overridden by the user. We will use it
8550      # for the tool.
8551
8552      # First remove it from the list of overridden variables, so we can test
8553      # for unknown variables in the end.
8554      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8555
8556      # Check if the provided tool contains a complete path.
8557      tool_specified="$NAWK"
8558      tool_basename="${tool_specified##*/}"
8559      if test "x$tool_basename" = "x$tool_specified"; then
8560        # A command without a complete path is provided, search $PATH.
8561        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8562$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8563        # Extract the first word of "$tool_basename", so it can be a program name with args.
8564set dummy $tool_basename; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_NAWK+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $NAWK in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593NAWK=$ac_cv_path_NAWK
8594if test -n "$NAWK"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8596$as_echo "$NAWK" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603        if test "x$NAWK" = x; then
8604          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8605        fi
8606      else
8607        # Otherwise we believe it is a complete path. Use it as it is.
8608        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8609$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8611$as_echo_n "checking for NAWK... " >&6; }
8612        if test ! -x "$tool_specified"; then
8613          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8614$as_echo "not found" >&6; }
8615          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8616        fi
8617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8618$as_echo "$tool_specified" >&6; }
8619      fi
8620    fi
8621  fi
8622
8623
8624
8625  if test "x$NAWK" = x; then
8626    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8627  fi
8628
8629
8630
8631
8632
8633  # Publish this variable in the help.
8634
8635
8636  if test "x$PRINTF" = x; then
8637    # The variable is not set by user, try to locate tool using the code snippet
8638    for ac_prog in printf
8639do
8640  # Extract the first word of "$ac_prog", so it can be a program name with args.
8641set dummy $ac_prog; ac_word=$2
8642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8643$as_echo_n "checking for $ac_word... " >&6; }
8644if ${ac_cv_path_PRINTF+:} false; then :
8645  $as_echo_n "(cached) " >&6
8646else
8647  case $PRINTF in
8648  [\\/]* | ?:[\\/]*)
8649  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8650  ;;
8651  *)
8652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8653for as_dir in $PATH
8654do
8655  IFS=$as_save_IFS
8656  test -z "$as_dir" && as_dir=.
8657    for ac_exec_ext in '' $ac_executable_extensions; do
8658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8659    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8661    break 2
8662  fi
8663done
8664  done
8665IFS=$as_save_IFS
8666
8667  ;;
8668esac
8669fi
8670PRINTF=$ac_cv_path_PRINTF
8671if test -n "$PRINTF"; then
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8673$as_echo "$PRINTF" >&6; }
8674else
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8676$as_echo "no" >&6; }
8677fi
8678
8679
8680  test -n "$PRINTF" && break
8681done
8682
8683  else
8684    # The variable is set, but is it from the command line or the environment?
8685
8686    # Try to remove the string !PRINTF! from our list.
8687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8689      # If it failed, the variable was not from the command line. Ignore it,
8690      # but warn the user (except for BASH, which is always set by the calling BASH).
8691      if test "xPRINTF" != xBASH; then
8692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8693$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8694      fi
8695      # Try to locate tool using the code snippet
8696      for ac_prog in printf
8697do
8698  # Extract the first word of "$ac_prog", so it can be a program name with args.
8699set dummy $ac_prog; ac_word=$2
8700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8701$as_echo_n "checking for $ac_word... " >&6; }
8702if ${ac_cv_path_PRINTF+:} false; then :
8703  $as_echo_n "(cached) " >&6
8704else
8705  case $PRINTF in
8706  [\\/]* | ?:[\\/]*)
8707  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8708  ;;
8709  *)
8710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8711for as_dir in $PATH
8712do
8713  IFS=$as_save_IFS
8714  test -z "$as_dir" && as_dir=.
8715    for ac_exec_ext in '' $ac_executable_extensions; do
8716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8717    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8719    break 2
8720  fi
8721done
8722  done
8723IFS=$as_save_IFS
8724
8725  ;;
8726esac
8727fi
8728PRINTF=$ac_cv_path_PRINTF
8729if test -n "$PRINTF"; then
8730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8731$as_echo "$PRINTF" >&6; }
8732else
8733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8734$as_echo "no" >&6; }
8735fi
8736
8737
8738  test -n "$PRINTF" && break
8739done
8740
8741    else
8742      # If it succeeded, then it was overridden by the user. We will use it
8743      # for the tool.
8744
8745      # First remove it from the list of overridden variables, so we can test
8746      # for unknown variables in the end.
8747      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8748
8749      # Check if the provided tool contains a complete path.
8750      tool_specified="$PRINTF"
8751      tool_basename="${tool_specified##*/}"
8752      if test "x$tool_basename" = "x$tool_specified"; then
8753        # A command without a complete path is provided, search $PATH.
8754        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8755$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8756        # Extract the first word of "$tool_basename", so it can be a program name with args.
8757set dummy $tool_basename; ac_word=$2
8758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8759$as_echo_n "checking for $ac_word... " >&6; }
8760if ${ac_cv_path_PRINTF+:} false; then :
8761  $as_echo_n "(cached) " >&6
8762else
8763  case $PRINTF in
8764  [\\/]* | ?:[\\/]*)
8765  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8766  ;;
8767  *)
8768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8769for as_dir in $PATH
8770do
8771  IFS=$as_save_IFS
8772  test -z "$as_dir" && as_dir=.
8773    for ac_exec_ext in '' $ac_executable_extensions; do
8774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8775    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8777    break 2
8778  fi
8779done
8780  done
8781IFS=$as_save_IFS
8782
8783  ;;
8784esac
8785fi
8786PRINTF=$ac_cv_path_PRINTF
8787if test -n "$PRINTF"; then
8788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8789$as_echo "$PRINTF" >&6; }
8790else
8791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8792$as_echo "no" >&6; }
8793fi
8794
8795
8796        if test "x$PRINTF" = x; then
8797          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8798        fi
8799      else
8800        # Otherwise we believe it is a complete path. Use it as it is.
8801        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8802$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8804$as_echo_n "checking for PRINTF... " >&6; }
8805        if test ! -x "$tool_specified"; then
8806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8807$as_echo "not found" >&6; }
8808          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8809        fi
8810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8811$as_echo "$tool_specified" >&6; }
8812      fi
8813    fi
8814  fi
8815
8816
8817
8818  if test "x$PRINTF" = x; then
8819    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8820  fi
8821
8822
8823
8824
8825
8826  # Publish this variable in the help.
8827
8828
8829  if test "x$RM" = x; then
8830    # The variable is not set by user, try to locate tool using the code snippet
8831    for ac_prog in rm
8832do
8833  # Extract the first word of "$ac_prog", so it can be a program name with args.
8834set dummy $ac_prog; ac_word=$2
8835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8836$as_echo_n "checking for $ac_word... " >&6; }
8837if ${ac_cv_path_RM+:} false; then :
8838  $as_echo_n "(cached) " >&6
8839else
8840  case $RM in
8841  [\\/]* | ?:[\\/]*)
8842  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8843  ;;
8844  *)
8845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8846for as_dir in $PATH
8847do
8848  IFS=$as_save_IFS
8849  test -z "$as_dir" && as_dir=.
8850    for ac_exec_ext in '' $ac_executable_extensions; do
8851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8852    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8854    break 2
8855  fi
8856done
8857  done
8858IFS=$as_save_IFS
8859
8860  ;;
8861esac
8862fi
8863RM=$ac_cv_path_RM
8864if test -n "$RM"; then
8865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8866$as_echo "$RM" >&6; }
8867else
8868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869$as_echo "no" >&6; }
8870fi
8871
8872
8873  test -n "$RM" && break
8874done
8875
8876  else
8877    # The variable is set, but is it from the command line or the environment?
8878
8879    # Try to remove the string !RM! from our list.
8880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8882      # If it failed, the variable was not from the command line. Ignore it,
8883      # but warn the user (except for BASH, which is always set by the calling BASH).
8884      if test "xRM" != xBASH; then
8885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8886$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8887      fi
8888      # Try to locate tool using the code snippet
8889      for ac_prog in rm
8890do
8891  # Extract the first word of "$ac_prog", so it can be a program name with args.
8892set dummy $ac_prog; ac_word=$2
8893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8894$as_echo_n "checking for $ac_word... " >&6; }
8895if ${ac_cv_path_RM+:} false; then :
8896  $as_echo_n "(cached) " >&6
8897else
8898  case $RM in
8899  [\\/]* | ?:[\\/]*)
8900  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8901  ;;
8902  *)
8903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8904for as_dir in $PATH
8905do
8906  IFS=$as_save_IFS
8907  test -z "$as_dir" && as_dir=.
8908    for ac_exec_ext in '' $ac_executable_extensions; do
8909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8910    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8912    break 2
8913  fi
8914done
8915  done
8916IFS=$as_save_IFS
8917
8918  ;;
8919esac
8920fi
8921RM=$ac_cv_path_RM
8922if test -n "$RM"; then
8923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8924$as_echo "$RM" >&6; }
8925else
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8927$as_echo "no" >&6; }
8928fi
8929
8930
8931  test -n "$RM" && break
8932done
8933
8934    else
8935      # If it succeeded, then it was overridden by the user. We will use it
8936      # for the tool.
8937
8938      # First remove it from the list of overridden variables, so we can test
8939      # for unknown variables in the end.
8940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8941
8942      # Check if the provided tool contains a complete path.
8943      tool_specified="$RM"
8944      tool_basename="${tool_specified##*/}"
8945      if test "x$tool_basename" = "x$tool_specified"; then
8946        # A command without a complete path is provided, search $PATH.
8947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8948$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8949        # Extract the first word of "$tool_basename", so it can be a program name with args.
8950set dummy $tool_basename; ac_word=$2
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8952$as_echo_n "checking for $ac_word... " >&6; }
8953if ${ac_cv_path_RM+:} false; then :
8954  $as_echo_n "(cached) " >&6
8955else
8956  case $RM in
8957  [\\/]* | ?:[\\/]*)
8958  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8959  ;;
8960  *)
8961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8962for as_dir in $PATH
8963do
8964  IFS=$as_save_IFS
8965  test -z "$as_dir" && as_dir=.
8966    for ac_exec_ext in '' $ac_executable_extensions; do
8967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8968    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8970    break 2
8971  fi
8972done
8973  done
8974IFS=$as_save_IFS
8975
8976  ;;
8977esac
8978fi
8979RM=$ac_cv_path_RM
8980if test -n "$RM"; then
8981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8982$as_echo "$RM" >&6; }
8983else
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985$as_echo "no" >&6; }
8986fi
8987
8988
8989        if test "x$RM" = x; then
8990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8991        fi
8992      else
8993        # Otherwise we believe it is a complete path. Use it as it is.
8994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8995$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8997$as_echo_n "checking for RM... " >&6; }
8998        if test ! -x "$tool_specified"; then
8999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9000$as_echo "not found" >&6; }
9001          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9002        fi
9003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9004$as_echo "$tool_specified" >&6; }
9005      fi
9006    fi
9007  fi
9008
9009
9010
9011  if test "x$RM" = x; then
9012    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9013  fi
9014
9015
9016
9017
9018
9019  # Publish this variable in the help.
9020
9021
9022  if test "x$SH" = x; then
9023    # The variable is not set by user, try to locate tool using the code snippet
9024    for ac_prog in sh
9025do
9026  # Extract the first word of "$ac_prog", so it can be a program name with args.
9027set dummy $ac_prog; ac_word=$2
9028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9029$as_echo_n "checking for $ac_word... " >&6; }
9030if ${ac_cv_path_SH+:} false; then :
9031  $as_echo_n "(cached) " >&6
9032else
9033  case $SH in
9034  [\\/]* | ?:[\\/]*)
9035  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9036  ;;
9037  *)
9038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9039for as_dir in $PATH
9040do
9041  IFS=$as_save_IFS
9042  test -z "$as_dir" && as_dir=.
9043    for ac_exec_ext in '' $ac_executable_extensions; do
9044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9045    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9047    break 2
9048  fi
9049done
9050  done
9051IFS=$as_save_IFS
9052
9053  ;;
9054esac
9055fi
9056SH=$ac_cv_path_SH
9057if test -n "$SH"; then
9058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9059$as_echo "$SH" >&6; }
9060else
9061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9062$as_echo "no" >&6; }
9063fi
9064
9065
9066  test -n "$SH" && break
9067done
9068
9069  else
9070    # The variable is set, but is it from the command line or the environment?
9071
9072    # Try to remove the string !SH! from our list.
9073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9075      # If it failed, the variable was not from the command line. Ignore it,
9076      # but warn the user (except for BASH, which is always set by the calling BASH).
9077      if test "xSH" != xBASH; then
9078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9079$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9080      fi
9081      # Try to locate tool using the code snippet
9082      for ac_prog in sh
9083do
9084  # Extract the first word of "$ac_prog", so it can be a program name with args.
9085set dummy $ac_prog; ac_word=$2
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9087$as_echo_n "checking for $ac_word... " >&6; }
9088if ${ac_cv_path_SH+:} false; then :
9089  $as_echo_n "(cached) " >&6
9090else
9091  case $SH in
9092  [\\/]* | ?:[\\/]*)
9093  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9094  ;;
9095  *)
9096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9097for as_dir in $PATH
9098do
9099  IFS=$as_save_IFS
9100  test -z "$as_dir" && as_dir=.
9101    for ac_exec_ext in '' $ac_executable_extensions; do
9102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9103    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9105    break 2
9106  fi
9107done
9108  done
9109IFS=$as_save_IFS
9110
9111  ;;
9112esac
9113fi
9114SH=$ac_cv_path_SH
9115if test -n "$SH"; then
9116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9117$as_echo "$SH" >&6; }
9118else
9119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9120$as_echo "no" >&6; }
9121fi
9122
9123
9124  test -n "$SH" && break
9125done
9126
9127    else
9128      # If it succeeded, then it was overridden by the user. We will use it
9129      # for the tool.
9130
9131      # First remove it from the list of overridden variables, so we can test
9132      # for unknown variables in the end.
9133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9134
9135      # Check if the provided tool contains a complete path.
9136      tool_specified="$SH"
9137      tool_basename="${tool_specified##*/}"
9138      if test "x$tool_basename" = "x$tool_specified"; then
9139        # A command without a complete path is provided, search $PATH.
9140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9141$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9142        # Extract the first word of "$tool_basename", so it can be a program name with args.
9143set dummy $tool_basename; ac_word=$2
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9145$as_echo_n "checking for $ac_word... " >&6; }
9146if ${ac_cv_path_SH+:} false; then :
9147  $as_echo_n "(cached) " >&6
9148else
9149  case $SH in
9150  [\\/]* | ?:[\\/]*)
9151  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9152  ;;
9153  *)
9154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9155for as_dir in $PATH
9156do
9157  IFS=$as_save_IFS
9158  test -z "$as_dir" && as_dir=.
9159    for ac_exec_ext in '' $ac_executable_extensions; do
9160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9161    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9163    break 2
9164  fi
9165done
9166  done
9167IFS=$as_save_IFS
9168
9169  ;;
9170esac
9171fi
9172SH=$ac_cv_path_SH
9173if test -n "$SH"; then
9174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9175$as_echo "$SH" >&6; }
9176else
9177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9178$as_echo "no" >&6; }
9179fi
9180
9181
9182        if test "x$SH" = x; then
9183          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9184        fi
9185      else
9186        # Otherwise we believe it is a complete path. Use it as it is.
9187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9188$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9190$as_echo_n "checking for SH... " >&6; }
9191        if test ! -x "$tool_specified"; then
9192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9193$as_echo "not found" >&6; }
9194          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9195        fi
9196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9197$as_echo "$tool_specified" >&6; }
9198      fi
9199    fi
9200  fi
9201
9202
9203
9204  if test "x$SH" = x; then
9205    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9206  fi
9207
9208
9209
9210
9211
9212  # Publish this variable in the help.
9213
9214
9215  if test "x$SORT" = x; then
9216    # The variable is not set by user, try to locate tool using the code snippet
9217    for ac_prog in sort
9218do
9219  # Extract the first word of "$ac_prog", so it can be a program name with args.
9220set dummy $ac_prog; ac_word=$2
9221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9222$as_echo_n "checking for $ac_word... " >&6; }
9223if ${ac_cv_path_SORT+:} false; then :
9224  $as_echo_n "(cached) " >&6
9225else
9226  case $SORT in
9227  [\\/]* | ?:[\\/]*)
9228  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9229  ;;
9230  *)
9231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9232for as_dir in $PATH
9233do
9234  IFS=$as_save_IFS
9235  test -z "$as_dir" && as_dir=.
9236    for ac_exec_ext in '' $ac_executable_extensions; do
9237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9238    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9240    break 2
9241  fi
9242done
9243  done
9244IFS=$as_save_IFS
9245
9246  ;;
9247esac
9248fi
9249SORT=$ac_cv_path_SORT
9250if test -n "$SORT"; then
9251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9252$as_echo "$SORT" >&6; }
9253else
9254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9255$as_echo "no" >&6; }
9256fi
9257
9258
9259  test -n "$SORT" && break
9260done
9261
9262  else
9263    # The variable is set, but is it from the command line or the environment?
9264
9265    # Try to remove the string !SORT! from our list.
9266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9268      # If it failed, the variable was not from the command line. Ignore it,
9269      # but warn the user (except for BASH, which is always set by the calling BASH).
9270      if test "xSORT" != xBASH; then
9271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9272$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9273      fi
9274      # Try to locate tool using the code snippet
9275      for ac_prog in sort
9276do
9277  # Extract the first word of "$ac_prog", so it can be a program name with args.
9278set dummy $ac_prog; ac_word=$2
9279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9280$as_echo_n "checking for $ac_word... " >&6; }
9281if ${ac_cv_path_SORT+:} false; then :
9282  $as_echo_n "(cached) " >&6
9283else
9284  case $SORT in
9285  [\\/]* | ?:[\\/]*)
9286  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9287  ;;
9288  *)
9289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9290for as_dir in $PATH
9291do
9292  IFS=$as_save_IFS
9293  test -z "$as_dir" && as_dir=.
9294    for ac_exec_ext in '' $ac_executable_extensions; do
9295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9296    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9298    break 2
9299  fi
9300done
9301  done
9302IFS=$as_save_IFS
9303
9304  ;;
9305esac
9306fi
9307SORT=$ac_cv_path_SORT
9308if test -n "$SORT"; then
9309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9310$as_echo "$SORT" >&6; }
9311else
9312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9313$as_echo "no" >&6; }
9314fi
9315
9316
9317  test -n "$SORT" && break
9318done
9319
9320    else
9321      # If it succeeded, then it was overridden by the user. We will use it
9322      # for the tool.
9323
9324      # First remove it from the list of overridden variables, so we can test
9325      # for unknown variables in the end.
9326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9327
9328      # Check if the provided tool contains a complete path.
9329      tool_specified="$SORT"
9330      tool_basename="${tool_specified##*/}"
9331      if test "x$tool_basename" = "x$tool_specified"; then
9332        # A command without a complete path is provided, search $PATH.
9333        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9334$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9335        # Extract the first word of "$tool_basename", so it can be a program name with args.
9336set dummy $tool_basename; ac_word=$2
9337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9338$as_echo_n "checking for $ac_word... " >&6; }
9339if ${ac_cv_path_SORT+:} false; then :
9340  $as_echo_n "(cached) " >&6
9341else
9342  case $SORT in
9343  [\\/]* | ?:[\\/]*)
9344  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9345  ;;
9346  *)
9347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9348for as_dir in $PATH
9349do
9350  IFS=$as_save_IFS
9351  test -z "$as_dir" && as_dir=.
9352    for ac_exec_ext in '' $ac_executable_extensions; do
9353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9354    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9356    break 2
9357  fi
9358done
9359  done
9360IFS=$as_save_IFS
9361
9362  ;;
9363esac
9364fi
9365SORT=$ac_cv_path_SORT
9366if test -n "$SORT"; then
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9368$as_echo "$SORT" >&6; }
9369else
9370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9371$as_echo "no" >&6; }
9372fi
9373
9374
9375        if test "x$SORT" = x; then
9376          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9377        fi
9378      else
9379        # Otherwise we believe it is a complete path. Use it as it is.
9380        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9381$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9383$as_echo_n "checking for SORT... " >&6; }
9384        if test ! -x "$tool_specified"; then
9385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9386$as_echo "not found" >&6; }
9387          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9388        fi
9389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9390$as_echo "$tool_specified" >&6; }
9391      fi
9392    fi
9393  fi
9394
9395
9396
9397  if test "x$SORT" = x; then
9398    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9399  fi
9400
9401
9402
9403
9404
9405  # Publish this variable in the help.
9406
9407
9408  if test "x$TAIL" = x; then
9409    # The variable is not set by user, try to locate tool using the code snippet
9410    for ac_prog in tail
9411do
9412  # Extract the first word of "$ac_prog", so it can be a program name with args.
9413set dummy $ac_prog; ac_word=$2
9414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9415$as_echo_n "checking for $ac_word... " >&6; }
9416if ${ac_cv_path_TAIL+:} false; then :
9417  $as_echo_n "(cached) " >&6
9418else
9419  case $TAIL in
9420  [\\/]* | ?:[\\/]*)
9421  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9422  ;;
9423  *)
9424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9425for as_dir in $PATH
9426do
9427  IFS=$as_save_IFS
9428  test -z "$as_dir" && as_dir=.
9429    for ac_exec_ext in '' $ac_executable_extensions; do
9430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9431    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9433    break 2
9434  fi
9435done
9436  done
9437IFS=$as_save_IFS
9438
9439  ;;
9440esac
9441fi
9442TAIL=$ac_cv_path_TAIL
9443if test -n "$TAIL"; then
9444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9445$as_echo "$TAIL" >&6; }
9446else
9447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9448$as_echo "no" >&6; }
9449fi
9450
9451
9452  test -n "$TAIL" && break
9453done
9454
9455  else
9456    # The variable is set, but is it from the command line or the environment?
9457
9458    # Try to remove the string !TAIL! from our list.
9459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9461      # If it failed, the variable was not from the command line. Ignore it,
9462      # but warn the user (except for BASH, which is always set by the calling BASH).
9463      if test "xTAIL" != xBASH; then
9464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9465$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9466      fi
9467      # Try to locate tool using the code snippet
9468      for ac_prog in tail
9469do
9470  # Extract the first word of "$ac_prog", so it can be a program name with args.
9471set dummy $ac_prog; ac_word=$2
9472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9473$as_echo_n "checking for $ac_word... " >&6; }
9474if ${ac_cv_path_TAIL+:} false; then :
9475  $as_echo_n "(cached) " >&6
9476else
9477  case $TAIL in
9478  [\\/]* | ?:[\\/]*)
9479  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9480  ;;
9481  *)
9482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9483for as_dir in $PATH
9484do
9485  IFS=$as_save_IFS
9486  test -z "$as_dir" && as_dir=.
9487    for ac_exec_ext in '' $ac_executable_extensions; do
9488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9489    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9491    break 2
9492  fi
9493done
9494  done
9495IFS=$as_save_IFS
9496
9497  ;;
9498esac
9499fi
9500TAIL=$ac_cv_path_TAIL
9501if test -n "$TAIL"; then
9502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9503$as_echo "$TAIL" >&6; }
9504else
9505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9506$as_echo "no" >&6; }
9507fi
9508
9509
9510  test -n "$TAIL" && break
9511done
9512
9513    else
9514      # If it succeeded, then it was overridden by the user. We will use it
9515      # for the tool.
9516
9517      # First remove it from the list of overridden variables, so we can test
9518      # for unknown variables in the end.
9519      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9520
9521      # Check if the provided tool contains a complete path.
9522      tool_specified="$TAIL"
9523      tool_basename="${tool_specified##*/}"
9524      if test "x$tool_basename" = "x$tool_specified"; then
9525        # A command without a complete path is provided, search $PATH.
9526        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9527$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9528        # Extract the first word of "$tool_basename", so it can be a program name with args.
9529set dummy $tool_basename; ac_word=$2
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9531$as_echo_n "checking for $ac_word... " >&6; }
9532if ${ac_cv_path_TAIL+:} false; then :
9533  $as_echo_n "(cached) " >&6
9534else
9535  case $TAIL in
9536  [\\/]* | ?:[\\/]*)
9537  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9538  ;;
9539  *)
9540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9541for as_dir in $PATH
9542do
9543  IFS=$as_save_IFS
9544  test -z "$as_dir" && as_dir=.
9545    for ac_exec_ext in '' $ac_executable_extensions; do
9546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9547    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9549    break 2
9550  fi
9551done
9552  done
9553IFS=$as_save_IFS
9554
9555  ;;
9556esac
9557fi
9558TAIL=$ac_cv_path_TAIL
9559if test -n "$TAIL"; then
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9561$as_echo "$TAIL" >&6; }
9562else
9563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
9565fi
9566
9567
9568        if test "x$TAIL" = x; then
9569          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9570        fi
9571      else
9572        # Otherwise we believe it is a complete path. Use it as it is.
9573        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9574$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9576$as_echo_n "checking for TAIL... " >&6; }
9577        if test ! -x "$tool_specified"; then
9578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9579$as_echo "not found" >&6; }
9580          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9581        fi
9582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9583$as_echo "$tool_specified" >&6; }
9584      fi
9585    fi
9586  fi
9587
9588
9589
9590  if test "x$TAIL" = x; then
9591    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9592  fi
9593
9594
9595
9596
9597
9598  # Publish this variable in the help.
9599
9600
9601  if test "x$TAR" = x; then
9602    # The variable is not set by user, try to locate tool using the code snippet
9603    for ac_prog in tar
9604do
9605  # Extract the first word of "$ac_prog", so it can be a program name with args.
9606set dummy $ac_prog; ac_word=$2
9607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9608$as_echo_n "checking for $ac_word... " >&6; }
9609if ${ac_cv_path_TAR+:} false; then :
9610  $as_echo_n "(cached) " >&6
9611else
9612  case $TAR in
9613  [\\/]* | ?:[\\/]*)
9614  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9615  ;;
9616  *)
9617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9618for as_dir in $PATH
9619do
9620  IFS=$as_save_IFS
9621  test -z "$as_dir" && as_dir=.
9622    for ac_exec_ext in '' $ac_executable_extensions; do
9623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9624    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9626    break 2
9627  fi
9628done
9629  done
9630IFS=$as_save_IFS
9631
9632  ;;
9633esac
9634fi
9635TAR=$ac_cv_path_TAR
9636if test -n "$TAR"; then
9637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9638$as_echo "$TAR" >&6; }
9639else
9640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9641$as_echo "no" >&6; }
9642fi
9643
9644
9645  test -n "$TAR" && break
9646done
9647
9648  else
9649    # The variable is set, but is it from the command line or the environment?
9650
9651    # Try to remove the string !TAR! from our list.
9652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9654      # If it failed, the variable was not from the command line. Ignore it,
9655      # but warn the user (except for BASH, which is always set by the calling BASH).
9656      if test "xTAR" != xBASH; then
9657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9658$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9659      fi
9660      # Try to locate tool using the code snippet
9661      for ac_prog in tar
9662do
9663  # Extract the first word of "$ac_prog", so it can be a program name with args.
9664set dummy $ac_prog; ac_word=$2
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9666$as_echo_n "checking for $ac_word... " >&6; }
9667if ${ac_cv_path_TAR+:} false; then :
9668  $as_echo_n "(cached) " >&6
9669else
9670  case $TAR in
9671  [\\/]* | ?:[\\/]*)
9672  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9673  ;;
9674  *)
9675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9676for as_dir in $PATH
9677do
9678  IFS=$as_save_IFS
9679  test -z "$as_dir" && as_dir=.
9680    for ac_exec_ext in '' $ac_executable_extensions; do
9681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9682    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9684    break 2
9685  fi
9686done
9687  done
9688IFS=$as_save_IFS
9689
9690  ;;
9691esac
9692fi
9693TAR=$ac_cv_path_TAR
9694if test -n "$TAR"; then
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9696$as_echo "$TAR" >&6; }
9697else
9698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699$as_echo "no" >&6; }
9700fi
9701
9702
9703  test -n "$TAR" && break
9704done
9705
9706    else
9707      # If it succeeded, then it was overridden by the user. We will use it
9708      # for the tool.
9709
9710      # First remove it from the list of overridden variables, so we can test
9711      # for unknown variables in the end.
9712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9713
9714      # Check if the provided tool contains a complete path.
9715      tool_specified="$TAR"
9716      tool_basename="${tool_specified##*/}"
9717      if test "x$tool_basename" = "x$tool_specified"; then
9718        # A command without a complete path is provided, search $PATH.
9719        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9720$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9721        # Extract the first word of "$tool_basename", so it can be a program name with args.
9722set dummy $tool_basename; ac_word=$2
9723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9724$as_echo_n "checking for $ac_word... " >&6; }
9725if ${ac_cv_path_TAR+:} false; then :
9726  $as_echo_n "(cached) " >&6
9727else
9728  case $TAR in
9729  [\\/]* | ?:[\\/]*)
9730  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9731  ;;
9732  *)
9733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734for as_dir in $PATH
9735do
9736  IFS=$as_save_IFS
9737  test -z "$as_dir" && as_dir=.
9738    for ac_exec_ext in '' $ac_executable_extensions; do
9739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9740    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9742    break 2
9743  fi
9744done
9745  done
9746IFS=$as_save_IFS
9747
9748  ;;
9749esac
9750fi
9751TAR=$ac_cv_path_TAR
9752if test -n "$TAR"; then
9753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9754$as_echo "$TAR" >&6; }
9755else
9756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757$as_echo "no" >&6; }
9758fi
9759
9760
9761        if test "x$TAR" = x; then
9762          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9763        fi
9764      else
9765        # Otherwise we believe it is a complete path. Use it as it is.
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9767$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9769$as_echo_n "checking for TAR... " >&6; }
9770        if test ! -x "$tool_specified"; then
9771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9772$as_echo "not found" >&6; }
9773          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9774        fi
9775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9776$as_echo "$tool_specified" >&6; }
9777      fi
9778    fi
9779  fi
9780
9781
9782
9783  if test "x$TAR" = x; then
9784    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9785  fi
9786
9787
9788
9789
9790
9791  # Publish this variable in the help.
9792
9793
9794  if test "x$TEE" = x; then
9795    # The variable is not set by user, try to locate tool using the code snippet
9796    for ac_prog in tee
9797do
9798  # Extract the first word of "$ac_prog", so it can be a program name with args.
9799set dummy $ac_prog; ac_word=$2
9800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9801$as_echo_n "checking for $ac_word... " >&6; }
9802if ${ac_cv_path_TEE+:} false; then :
9803  $as_echo_n "(cached) " >&6
9804else
9805  case $TEE in
9806  [\\/]* | ?:[\\/]*)
9807  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9808  ;;
9809  *)
9810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9811for as_dir in $PATH
9812do
9813  IFS=$as_save_IFS
9814  test -z "$as_dir" && as_dir=.
9815    for ac_exec_ext in '' $ac_executable_extensions; do
9816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9817    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9819    break 2
9820  fi
9821done
9822  done
9823IFS=$as_save_IFS
9824
9825  ;;
9826esac
9827fi
9828TEE=$ac_cv_path_TEE
9829if test -n "$TEE"; then
9830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9831$as_echo "$TEE" >&6; }
9832else
9833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9834$as_echo "no" >&6; }
9835fi
9836
9837
9838  test -n "$TEE" && break
9839done
9840
9841  else
9842    # The variable is set, but is it from the command line or the environment?
9843
9844    # Try to remove the string !TEE! from our list.
9845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9847      # If it failed, the variable was not from the command line. Ignore it,
9848      # but warn the user (except for BASH, which is always set by the calling BASH).
9849      if test "xTEE" != xBASH; then
9850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9851$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9852      fi
9853      # Try to locate tool using the code snippet
9854      for ac_prog in tee
9855do
9856  # Extract the first word of "$ac_prog", so it can be a program name with args.
9857set dummy $ac_prog; ac_word=$2
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859$as_echo_n "checking for $ac_word... " >&6; }
9860if ${ac_cv_path_TEE+:} false; then :
9861  $as_echo_n "(cached) " >&6
9862else
9863  case $TEE in
9864  [\\/]* | ?:[\\/]*)
9865  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9866  ;;
9867  *)
9868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869for as_dir in $PATH
9870do
9871  IFS=$as_save_IFS
9872  test -z "$as_dir" && as_dir=.
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883  ;;
9884esac
9885fi
9886TEE=$ac_cv_path_TEE
9887if test -n "$TEE"; then
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9889$as_echo "$TEE" >&6; }
9890else
9891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892$as_echo "no" >&6; }
9893fi
9894
9895
9896  test -n "$TEE" && break
9897done
9898
9899    else
9900      # If it succeeded, then it was overridden by the user. We will use it
9901      # for the tool.
9902
9903      # First remove it from the list of overridden variables, so we can test
9904      # for unknown variables in the end.
9905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9906
9907      # Check if the provided tool contains a complete path.
9908      tool_specified="$TEE"
9909      tool_basename="${tool_specified##*/}"
9910      if test "x$tool_basename" = "x$tool_specified"; then
9911        # A command without a complete path is provided, search $PATH.
9912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9913$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9914        # Extract the first word of "$tool_basename", so it can be a program name with args.
9915set dummy $tool_basename; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_TEE+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $TEE in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944TEE=$ac_cv_path_TEE
9945if test -n "$TEE"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9947$as_echo "$TEE" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954        if test "x$TEE" = x; then
9955          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9956        fi
9957      else
9958        # Otherwise we believe it is a complete path. Use it as it is.
9959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9960$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9962$as_echo_n "checking for TEE... " >&6; }
9963        if test ! -x "$tool_specified"; then
9964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9965$as_echo "not found" >&6; }
9966          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9967        fi
9968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9969$as_echo "$tool_specified" >&6; }
9970      fi
9971    fi
9972  fi
9973
9974
9975
9976  if test "x$TEE" = x; then
9977    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9978  fi
9979
9980
9981
9982
9983
9984  # Publish this variable in the help.
9985
9986
9987  if test "x$TOUCH" = x; then
9988    # The variable is not set by user, try to locate tool using the code snippet
9989    for ac_prog in touch
9990do
9991  # Extract the first word of "$ac_prog", so it can be a program name with args.
9992set dummy $ac_prog; ac_word=$2
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994$as_echo_n "checking for $ac_word... " >&6; }
9995if ${ac_cv_path_TOUCH+:} false; then :
9996  $as_echo_n "(cached) " >&6
9997else
9998  case $TOUCH in
9999  [\\/]* | ?:[\\/]*)
10000  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10001  ;;
10002  *)
10003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004for as_dir in $PATH
10005do
10006  IFS=$as_save_IFS
10007  test -z "$as_dir" && as_dir=.
10008    for ac_exec_ext in '' $ac_executable_extensions; do
10009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10010    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10012    break 2
10013  fi
10014done
10015  done
10016IFS=$as_save_IFS
10017
10018  ;;
10019esac
10020fi
10021TOUCH=$ac_cv_path_TOUCH
10022if test -n "$TOUCH"; then
10023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10024$as_echo "$TOUCH" >&6; }
10025else
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
10028fi
10029
10030
10031  test -n "$TOUCH" && break
10032done
10033
10034  else
10035    # The variable is set, but is it from the command line or the environment?
10036
10037    # Try to remove the string !TOUCH! from our list.
10038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10040      # If it failed, the variable was not from the command line. Ignore it,
10041      # but warn the user (except for BASH, which is always set by the calling BASH).
10042      if test "xTOUCH" != xBASH; then
10043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10044$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10045      fi
10046      # Try to locate tool using the code snippet
10047      for ac_prog in touch
10048do
10049  # Extract the first word of "$ac_prog", so it can be a program name with args.
10050set dummy $ac_prog; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_TOUCH+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $TOUCH in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10068    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079TOUCH=$ac_cv_path_TOUCH
10080if test -n "$TOUCH"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10082$as_echo "$TOUCH" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089  test -n "$TOUCH" && break
10090done
10091
10092    else
10093      # If it succeeded, then it was overridden by the user. We will use it
10094      # for the tool.
10095
10096      # First remove it from the list of overridden variables, so we can test
10097      # for unknown variables in the end.
10098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10099
10100      # Check if the provided tool contains a complete path.
10101      tool_specified="$TOUCH"
10102      tool_basename="${tool_specified##*/}"
10103      if test "x$tool_basename" = "x$tool_specified"; then
10104        # A command without a complete path is provided, search $PATH.
10105        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10106$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10107        # Extract the first word of "$tool_basename", so it can be a program name with args.
10108set dummy $tool_basename; ac_word=$2
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110$as_echo_n "checking for $ac_word... " >&6; }
10111if ${ac_cv_path_TOUCH+:} false; then :
10112  $as_echo_n "(cached) " >&6
10113else
10114  case $TOUCH in
10115  [\\/]* | ?:[\\/]*)
10116  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10117  ;;
10118  *)
10119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120for as_dir in $PATH
10121do
10122  IFS=$as_save_IFS
10123  test -z "$as_dir" && as_dir=.
10124    for ac_exec_ext in '' $ac_executable_extensions; do
10125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10126    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128    break 2
10129  fi
10130done
10131  done
10132IFS=$as_save_IFS
10133
10134  ;;
10135esac
10136fi
10137TOUCH=$ac_cv_path_TOUCH
10138if test -n "$TOUCH"; then
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10140$as_echo "$TOUCH" >&6; }
10141else
10142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143$as_echo "no" >&6; }
10144fi
10145
10146
10147        if test "x$TOUCH" = x; then
10148          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10149        fi
10150      else
10151        # Otherwise we believe it is a complete path. Use it as it is.
10152        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10153$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10155$as_echo_n "checking for TOUCH... " >&6; }
10156        if test ! -x "$tool_specified"; then
10157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10158$as_echo "not found" >&6; }
10159          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10160        fi
10161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10162$as_echo "$tool_specified" >&6; }
10163      fi
10164    fi
10165  fi
10166
10167
10168
10169  if test "x$TOUCH" = x; then
10170    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10171  fi
10172
10173
10174
10175
10176
10177  # Publish this variable in the help.
10178
10179
10180  if test "x$TR" = x; then
10181    # The variable is not set by user, try to locate tool using the code snippet
10182    for ac_prog in tr
10183do
10184  # Extract the first word of "$ac_prog", so it can be a program name with args.
10185set dummy $ac_prog; ac_word=$2
10186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10187$as_echo_n "checking for $ac_word... " >&6; }
10188if ${ac_cv_path_TR+:} false; then :
10189  $as_echo_n "(cached) " >&6
10190else
10191  case $TR in
10192  [\\/]* | ?:[\\/]*)
10193  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10194  ;;
10195  *)
10196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10197for as_dir in $PATH
10198do
10199  IFS=$as_save_IFS
10200  test -z "$as_dir" && as_dir=.
10201    for ac_exec_ext in '' $ac_executable_extensions; do
10202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10203    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10205    break 2
10206  fi
10207done
10208  done
10209IFS=$as_save_IFS
10210
10211  ;;
10212esac
10213fi
10214TR=$ac_cv_path_TR
10215if test -n "$TR"; then
10216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10217$as_echo "$TR" >&6; }
10218else
10219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10220$as_echo "no" >&6; }
10221fi
10222
10223
10224  test -n "$TR" && break
10225done
10226
10227  else
10228    # The variable is set, but is it from the command line or the environment?
10229
10230    # Try to remove the string !TR! from our list.
10231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10233      # If it failed, the variable was not from the command line. Ignore it,
10234      # but warn the user (except for BASH, which is always set by the calling BASH).
10235      if test "xTR" != xBASH; then
10236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10237$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10238      fi
10239      # Try to locate tool using the code snippet
10240      for ac_prog in tr
10241do
10242  # Extract the first word of "$ac_prog", so it can be a program name with args.
10243set dummy $ac_prog; ac_word=$2
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10245$as_echo_n "checking for $ac_word... " >&6; }
10246if ${ac_cv_path_TR+:} false; then :
10247  $as_echo_n "(cached) " >&6
10248else
10249  case $TR in
10250  [\\/]* | ?:[\\/]*)
10251  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10252  ;;
10253  *)
10254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10255for as_dir in $PATH
10256do
10257  IFS=$as_save_IFS
10258  test -z "$as_dir" && as_dir=.
10259    for ac_exec_ext in '' $ac_executable_extensions; do
10260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10261    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10263    break 2
10264  fi
10265done
10266  done
10267IFS=$as_save_IFS
10268
10269  ;;
10270esac
10271fi
10272TR=$ac_cv_path_TR
10273if test -n "$TR"; then
10274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10275$as_echo "$TR" >&6; }
10276else
10277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278$as_echo "no" >&6; }
10279fi
10280
10281
10282  test -n "$TR" && break
10283done
10284
10285    else
10286      # If it succeeded, then it was overridden by the user. We will use it
10287      # for the tool.
10288
10289      # First remove it from the list of overridden variables, so we can test
10290      # for unknown variables in the end.
10291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10292
10293      # Check if the provided tool contains a complete path.
10294      tool_specified="$TR"
10295      tool_basename="${tool_specified##*/}"
10296      if test "x$tool_basename" = "x$tool_specified"; then
10297        # A command without a complete path is provided, search $PATH.
10298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10299$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10300        # Extract the first word of "$tool_basename", so it can be a program name with args.
10301set dummy $tool_basename; ac_word=$2
10302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10303$as_echo_n "checking for $ac_word... " >&6; }
10304if ${ac_cv_path_TR+:} false; then :
10305  $as_echo_n "(cached) " >&6
10306else
10307  case $TR in
10308  [\\/]* | ?:[\\/]*)
10309  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10310  ;;
10311  *)
10312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10313for as_dir in $PATH
10314do
10315  IFS=$as_save_IFS
10316  test -z "$as_dir" && as_dir=.
10317    for ac_exec_ext in '' $ac_executable_extensions; do
10318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10319    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10321    break 2
10322  fi
10323done
10324  done
10325IFS=$as_save_IFS
10326
10327  ;;
10328esac
10329fi
10330TR=$ac_cv_path_TR
10331if test -n "$TR"; then
10332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10333$as_echo "$TR" >&6; }
10334else
10335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10336$as_echo "no" >&6; }
10337fi
10338
10339
10340        if test "x$TR" = x; then
10341          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10342        fi
10343      else
10344        # Otherwise we believe it is a complete path. Use it as it is.
10345        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10346$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10348$as_echo_n "checking for TR... " >&6; }
10349        if test ! -x "$tool_specified"; then
10350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10351$as_echo "not found" >&6; }
10352          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10353        fi
10354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10355$as_echo "$tool_specified" >&6; }
10356      fi
10357    fi
10358  fi
10359
10360
10361
10362  if test "x$TR" = x; then
10363    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10364  fi
10365
10366
10367
10368
10369
10370  # Publish this variable in the help.
10371
10372
10373  if test "x$UNAME" = x; then
10374    # The variable is not set by user, try to locate tool using the code snippet
10375    for ac_prog in uname
10376do
10377  # Extract the first word of "$ac_prog", so it can be a program name with args.
10378set dummy $ac_prog; ac_word=$2
10379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10380$as_echo_n "checking for $ac_word... " >&6; }
10381if ${ac_cv_path_UNAME+:} false; then :
10382  $as_echo_n "(cached) " >&6
10383else
10384  case $UNAME in
10385  [\\/]* | ?:[\\/]*)
10386  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10387  ;;
10388  *)
10389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10390for as_dir in $PATH
10391do
10392  IFS=$as_save_IFS
10393  test -z "$as_dir" && as_dir=.
10394    for ac_exec_ext in '' $ac_executable_extensions; do
10395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10396    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10398    break 2
10399  fi
10400done
10401  done
10402IFS=$as_save_IFS
10403
10404  ;;
10405esac
10406fi
10407UNAME=$ac_cv_path_UNAME
10408if test -n "$UNAME"; then
10409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10410$as_echo "$UNAME" >&6; }
10411else
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10413$as_echo "no" >&6; }
10414fi
10415
10416
10417  test -n "$UNAME" && break
10418done
10419
10420  else
10421    # The variable is set, but is it from the command line or the environment?
10422
10423    # Try to remove the string !UNAME! from our list.
10424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10426      # If it failed, the variable was not from the command line. Ignore it,
10427      # but warn the user (except for BASH, which is always set by the calling BASH).
10428      if test "xUNAME" != xBASH; then
10429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10430$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10431      fi
10432      # Try to locate tool using the code snippet
10433      for ac_prog in uname
10434do
10435  # Extract the first word of "$ac_prog", so it can be a program name with args.
10436set dummy $ac_prog; ac_word=$2
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10438$as_echo_n "checking for $ac_word... " >&6; }
10439if ${ac_cv_path_UNAME+:} false; then :
10440  $as_echo_n "(cached) " >&6
10441else
10442  case $UNAME in
10443  [\\/]* | ?:[\\/]*)
10444  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10445  ;;
10446  *)
10447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10448for as_dir in $PATH
10449do
10450  IFS=$as_save_IFS
10451  test -z "$as_dir" && as_dir=.
10452    for ac_exec_ext in '' $ac_executable_extensions; do
10453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10454    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10456    break 2
10457  fi
10458done
10459  done
10460IFS=$as_save_IFS
10461
10462  ;;
10463esac
10464fi
10465UNAME=$ac_cv_path_UNAME
10466if test -n "$UNAME"; then
10467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10468$as_echo "$UNAME" >&6; }
10469else
10470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
10472fi
10473
10474
10475  test -n "$UNAME" && break
10476done
10477
10478    else
10479      # If it succeeded, then it was overridden by the user. We will use it
10480      # for the tool.
10481
10482      # First remove it from the list of overridden variables, so we can test
10483      # for unknown variables in the end.
10484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10485
10486      # Check if the provided tool contains a complete path.
10487      tool_specified="$UNAME"
10488      tool_basename="${tool_specified##*/}"
10489      if test "x$tool_basename" = "x$tool_specified"; then
10490        # A command without a complete path is provided, search $PATH.
10491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10492$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10493        # Extract the first word of "$tool_basename", so it can be a program name with args.
10494set dummy $tool_basename; ac_word=$2
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10496$as_echo_n "checking for $ac_word... " >&6; }
10497if ${ac_cv_path_UNAME+:} false; then :
10498  $as_echo_n "(cached) " >&6
10499else
10500  case $UNAME in
10501  [\\/]* | ?:[\\/]*)
10502  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10503  ;;
10504  *)
10505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10506for as_dir in $PATH
10507do
10508  IFS=$as_save_IFS
10509  test -z "$as_dir" && as_dir=.
10510    for ac_exec_ext in '' $ac_executable_extensions; do
10511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10512    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10514    break 2
10515  fi
10516done
10517  done
10518IFS=$as_save_IFS
10519
10520  ;;
10521esac
10522fi
10523UNAME=$ac_cv_path_UNAME
10524if test -n "$UNAME"; then
10525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10526$as_echo "$UNAME" >&6; }
10527else
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530fi
10531
10532
10533        if test "x$UNAME" = x; then
10534          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10535        fi
10536      else
10537        # Otherwise we believe it is a complete path. Use it as it is.
10538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10539$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10541$as_echo_n "checking for UNAME... " >&6; }
10542        if test ! -x "$tool_specified"; then
10543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10544$as_echo "not found" >&6; }
10545          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10546        fi
10547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10548$as_echo "$tool_specified" >&6; }
10549      fi
10550    fi
10551  fi
10552
10553
10554
10555  if test "x$UNAME" = x; then
10556    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10557  fi
10558
10559
10560
10561
10562
10563  # Publish this variable in the help.
10564
10565
10566  if test "x$UNIQ" = x; then
10567    # The variable is not set by user, try to locate tool using the code snippet
10568    for ac_prog in uniq
10569do
10570  # Extract the first word of "$ac_prog", so it can be a program name with args.
10571set dummy $ac_prog; ac_word=$2
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10573$as_echo_n "checking for $ac_word... " >&6; }
10574if ${ac_cv_path_UNIQ+:} false; then :
10575  $as_echo_n "(cached) " >&6
10576else
10577  case $UNIQ in
10578  [\\/]* | ?:[\\/]*)
10579  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10580  ;;
10581  *)
10582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10583for as_dir in $PATH
10584do
10585  IFS=$as_save_IFS
10586  test -z "$as_dir" && as_dir=.
10587    for ac_exec_ext in '' $ac_executable_extensions; do
10588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10589    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10591    break 2
10592  fi
10593done
10594  done
10595IFS=$as_save_IFS
10596
10597  ;;
10598esac
10599fi
10600UNIQ=$ac_cv_path_UNIQ
10601if test -n "$UNIQ"; then
10602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10603$as_echo "$UNIQ" >&6; }
10604else
10605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
10607fi
10608
10609
10610  test -n "$UNIQ" && break
10611done
10612
10613  else
10614    # The variable is set, but is it from the command line or the environment?
10615
10616    # Try to remove the string !UNIQ! from our list.
10617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10619      # If it failed, the variable was not from the command line. Ignore it,
10620      # but warn the user (except for BASH, which is always set by the calling BASH).
10621      if test "xUNIQ" != xBASH; then
10622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10623$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10624      fi
10625      # Try to locate tool using the code snippet
10626      for ac_prog in uniq
10627do
10628  # Extract the first word of "$ac_prog", so it can be a program name with args.
10629set dummy $ac_prog; ac_word=$2
10630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10631$as_echo_n "checking for $ac_word... " >&6; }
10632if ${ac_cv_path_UNIQ+:} false; then :
10633  $as_echo_n "(cached) " >&6
10634else
10635  case $UNIQ in
10636  [\\/]* | ?:[\\/]*)
10637  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10638  ;;
10639  *)
10640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10641for as_dir in $PATH
10642do
10643  IFS=$as_save_IFS
10644  test -z "$as_dir" && as_dir=.
10645    for ac_exec_ext in '' $ac_executable_extensions; do
10646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10647    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10649    break 2
10650  fi
10651done
10652  done
10653IFS=$as_save_IFS
10654
10655  ;;
10656esac
10657fi
10658UNIQ=$ac_cv_path_UNIQ
10659if test -n "$UNIQ"; then
10660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10661$as_echo "$UNIQ" >&6; }
10662else
10663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10664$as_echo "no" >&6; }
10665fi
10666
10667
10668  test -n "$UNIQ" && break
10669done
10670
10671    else
10672      # If it succeeded, then it was overridden by the user. We will use it
10673      # for the tool.
10674
10675      # First remove it from the list of overridden variables, so we can test
10676      # for unknown variables in the end.
10677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10678
10679      # Check if the provided tool contains a complete path.
10680      tool_specified="$UNIQ"
10681      tool_basename="${tool_specified##*/}"
10682      if test "x$tool_basename" = "x$tool_specified"; then
10683        # A command without a complete path is provided, search $PATH.
10684        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10685$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10686        # Extract the first word of "$tool_basename", so it can be a program name with args.
10687set dummy $tool_basename; ac_word=$2
10688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10689$as_echo_n "checking for $ac_word... " >&6; }
10690if ${ac_cv_path_UNIQ+:} false; then :
10691  $as_echo_n "(cached) " >&6
10692else
10693  case $UNIQ in
10694  [\\/]* | ?:[\\/]*)
10695  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10696  ;;
10697  *)
10698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10699for as_dir in $PATH
10700do
10701  IFS=$as_save_IFS
10702  test -z "$as_dir" && as_dir=.
10703    for ac_exec_ext in '' $ac_executable_extensions; do
10704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10705    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10707    break 2
10708  fi
10709done
10710  done
10711IFS=$as_save_IFS
10712
10713  ;;
10714esac
10715fi
10716UNIQ=$ac_cv_path_UNIQ
10717if test -n "$UNIQ"; then
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10719$as_echo "$UNIQ" >&6; }
10720else
10721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
10723fi
10724
10725
10726        if test "x$UNIQ" = x; then
10727          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10728        fi
10729      else
10730        # Otherwise we believe it is a complete path. Use it as it is.
10731        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10732$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10734$as_echo_n "checking for UNIQ... " >&6; }
10735        if test ! -x "$tool_specified"; then
10736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10737$as_echo "not found" >&6; }
10738          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10739        fi
10740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10741$as_echo "$tool_specified" >&6; }
10742      fi
10743    fi
10744  fi
10745
10746
10747
10748  if test "x$UNIQ" = x; then
10749    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10750  fi
10751
10752
10753
10754
10755
10756  # Publish this variable in the help.
10757
10758
10759  if test "x$WC" = x; then
10760    # The variable is not set by user, try to locate tool using the code snippet
10761    for ac_prog in wc
10762do
10763  # Extract the first word of "$ac_prog", so it can be a program name with args.
10764set dummy $ac_prog; ac_word=$2
10765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10766$as_echo_n "checking for $ac_word... " >&6; }
10767if ${ac_cv_path_WC+:} false; then :
10768  $as_echo_n "(cached) " >&6
10769else
10770  case $WC in
10771  [\\/]* | ?:[\\/]*)
10772  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10773  ;;
10774  *)
10775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10776for as_dir in $PATH
10777do
10778  IFS=$as_save_IFS
10779  test -z "$as_dir" && as_dir=.
10780    for ac_exec_ext in '' $ac_executable_extensions; do
10781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10782    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10784    break 2
10785  fi
10786done
10787  done
10788IFS=$as_save_IFS
10789
10790  ;;
10791esac
10792fi
10793WC=$ac_cv_path_WC
10794if test -n "$WC"; then
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10796$as_echo "$WC" >&6; }
10797else
10798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10799$as_echo "no" >&6; }
10800fi
10801
10802
10803  test -n "$WC" && break
10804done
10805
10806  else
10807    # The variable is set, but is it from the command line or the environment?
10808
10809    # Try to remove the string !WC! from our list.
10810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10812      # If it failed, the variable was not from the command line. Ignore it,
10813      # but warn the user (except for BASH, which is always set by the calling BASH).
10814      if test "xWC" != xBASH; then
10815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10816$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10817      fi
10818      # Try to locate tool using the code snippet
10819      for ac_prog in wc
10820do
10821  # Extract the first word of "$ac_prog", so it can be a program name with args.
10822set dummy $ac_prog; ac_word=$2
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10824$as_echo_n "checking for $ac_word... " >&6; }
10825if ${ac_cv_path_WC+:} false; then :
10826  $as_echo_n "(cached) " >&6
10827else
10828  case $WC in
10829  [\\/]* | ?:[\\/]*)
10830  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10831  ;;
10832  *)
10833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10834for as_dir in $PATH
10835do
10836  IFS=$as_save_IFS
10837  test -z "$as_dir" && as_dir=.
10838    for ac_exec_ext in '' $ac_executable_extensions; do
10839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10840    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10842    break 2
10843  fi
10844done
10845  done
10846IFS=$as_save_IFS
10847
10848  ;;
10849esac
10850fi
10851WC=$ac_cv_path_WC
10852if test -n "$WC"; then
10853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10854$as_echo "$WC" >&6; }
10855else
10856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857$as_echo "no" >&6; }
10858fi
10859
10860
10861  test -n "$WC" && break
10862done
10863
10864    else
10865      # If it succeeded, then it was overridden by the user. We will use it
10866      # for the tool.
10867
10868      # First remove it from the list of overridden variables, so we can test
10869      # for unknown variables in the end.
10870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10871
10872      # Check if the provided tool contains a complete path.
10873      tool_specified="$WC"
10874      tool_basename="${tool_specified##*/}"
10875      if test "x$tool_basename" = "x$tool_specified"; then
10876        # A command without a complete path is provided, search $PATH.
10877        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10878$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10879        # Extract the first word of "$tool_basename", so it can be a program name with args.
10880set dummy $tool_basename; ac_word=$2
10881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10882$as_echo_n "checking for $ac_word... " >&6; }
10883if ${ac_cv_path_WC+:} false; then :
10884  $as_echo_n "(cached) " >&6
10885else
10886  case $WC in
10887  [\\/]* | ?:[\\/]*)
10888  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10889  ;;
10890  *)
10891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10892for as_dir in $PATH
10893do
10894  IFS=$as_save_IFS
10895  test -z "$as_dir" && as_dir=.
10896    for ac_exec_ext in '' $ac_executable_extensions; do
10897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10898    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10900    break 2
10901  fi
10902done
10903  done
10904IFS=$as_save_IFS
10905
10906  ;;
10907esac
10908fi
10909WC=$ac_cv_path_WC
10910if test -n "$WC"; then
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10912$as_echo "$WC" >&6; }
10913else
10914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10915$as_echo "no" >&6; }
10916fi
10917
10918
10919        if test "x$WC" = x; then
10920          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10921        fi
10922      else
10923        # Otherwise we believe it is a complete path. Use it as it is.
10924        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10925$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10927$as_echo_n "checking for WC... " >&6; }
10928        if test ! -x "$tool_specified"; then
10929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10930$as_echo "not found" >&6; }
10931          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10932        fi
10933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10934$as_echo "$tool_specified" >&6; }
10935      fi
10936    fi
10937  fi
10938
10939
10940
10941  if test "x$WC" = x; then
10942    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10943  fi
10944
10945
10946
10947
10948
10949  # Publish this variable in the help.
10950
10951
10952  if test "x$WHICH" = x; then
10953    # The variable is not set by user, try to locate tool using the code snippet
10954    for ac_prog in which
10955do
10956  # Extract the first word of "$ac_prog", so it can be a program name with args.
10957set dummy $ac_prog; ac_word=$2
10958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10959$as_echo_n "checking for $ac_word... " >&6; }
10960if ${ac_cv_path_WHICH+:} false; then :
10961  $as_echo_n "(cached) " >&6
10962else
10963  case $WHICH in
10964  [\\/]* | ?:[\\/]*)
10965  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10966  ;;
10967  *)
10968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10969for as_dir in $PATH
10970do
10971  IFS=$as_save_IFS
10972  test -z "$as_dir" && as_dir=.
10973    for ac_exec_ext in '' $ac_executable_extensions; do
10974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10975    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10977    break 2
10978  fi
10979done
10980  done
10981IFS=$as_save_IFS
10982
10983  ;;
10984esac
10985fi
10986WHICH=$ac_cv_path_WHICH
10987if test -n "$WHICH"; then
10988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10989$as_echo "$WHICH" >&6; }
10990else
10991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10992$as_echo "no" >&6; }
10993fi
10994
10995
10996  test -n "$WHICH" && break
10997done
10998
10999  else
11000    # The variable is set, but is it from the command line or the environment?
11001
11002    # Try to remove the string !WHICH! from our list.
11003    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11004    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11005      # If it failed, the variable was not from the command line. Ignore it,
11006      # but warn the user (except for BASH, which is always set by the calling BASH).
11007      if test "xWHICH" != xBASH; then
11008        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11009$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11010      fi
11011      # Try to locate tool using the code snippet
11012      for ac_prog in which
11013do
11014  # Extract the first word of "$ac_prog", so it can be a program name with args.
11015set dummy $ac_prog; ac_word=$2
11016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11017$as_echo_n "checking for $ac_word... " >&6; }
11018if ${ac_cv_path_WHICH+:} false; then :
11019  $as_echo_n "(cached) " >&6
11020else
11021  case $WHICH in
11022  [\\/]* | ?:[\\/]*)
11023  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11024  ;;
11025  *)
11026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11027for as_dir in $PATH
11028do
11029  IFS=$as_save_IFS
11030  test -z "$as_dir" && as_dir=.
11031    for ac_exec_ext in '' $ac_executable_extensions; do
11032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11033    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11035    break 2
11036  fi
11037done
11038  done
11039IFS=$as_save_IFS
11040
11041  ;;
11042esac
11043fi
11044WHICH=$ac_cv_path_WHICH
11045if test -n "$WHICH"; then
11046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11047$as_echo "$WHICH" >&6; }
11048else
11049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11050$as_echo "no" >&6; }
11051fi
11052
11053
11054  test -n "$WHICH" && break
11055done
11056
11057    else
11058      # If it succeeded, then it was overridden by the user. We will use it
11059      # for the tool.
11060
11061      # First remove it from the list of overridden variables, so we can test
11062      # for unknown variables in the end.
11063      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11064
11065      # Check if the provided tool contains a complete path.
11066      tool_specified="$WHICH"
11067      tool_basename="${tool_specified##*/}"
11068      if test "x$tool_basename" = "x$tool_specified"; then
11069        # A command without a complete path is provided, search $PATH.
11070        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11071$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11072        # Extract the first word of "$tool_basename", so it can be a program name with args.
11073set dummy $tool_basename; ac_word=$2
11074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11075$as_echo_n "checking for $ac_word... " >&6; }
11076if ${ac_cv_path_WHICH+:} false; then :
11077  $as_echo_n "(cached) " >&6
11078else
11079  case $WHICH in
11080  [\\/]* | ?:[\\/]*)
11081  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11082  ;;
11083  *)
11084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11085for as_dir in $PATH
11086do
11087  IFS=$as_save_IFS
11088  test -z "$as_dir" && as_dir=.
11089    for ac_exec_ext in '' $ac_executable_extensions; do
11090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11091    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11093    break 2
11094  fi
11095done
11096  done
11097IFS=$as_save_IFS
11098
11099  ;;
11100esac
11101fi
11102WHICH=$ac_cv_path_WHICH
11103if test -n "$WHICH"; then
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11105$as_echo "$WHICH" >&6; }
11106else
11107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11108$as_echo "no" >&6; }
11109fi
11110
11111
11112        if test "x$WHICH" = x; then
11113          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11114        fi
11115      else
11116        # Otherwise we believe it is a complete path. Use it as it is.
11117        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11118$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11120$as_echo_n "checking for WHICH... " >&6; }
11121        if test ! -x "$tool_specified"; then
11122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11123$as_echo "not found" >&6; }
11124          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11125        fi
11126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11127$as_echo "$tool_specified" >&6; }
11128      fi
11129    fi
11130  fi
11131
11132
11133
11134  if test "x$WHICH" = x; then
11135    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11136  fi
11137
11138
11139
11140
11141
11142  # Publish this variable in the help.
11143
11144
11145  if test "x$XARGS" = x; then
11146    # The variable is not set by user, try to locate tool using the code snippet
11147    for ac_prog in xargs
11148do
11149  # Extract the first word of "$ac_prog", so it can be a program name with args.
11150set dummy $ac_prog; ac_word=$2
11151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11152$as_echo_n "checking for $ac_word... " >&6; }
11153if ${ac_cv_path_XARGS+:} false; then :
11154  $as_echo_n "(cached) " >&6
11155else
11156  case $XARGS in
11157  [\\/]* | ?:[\\/]*)
11158  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11159  ;;
11160  *)
11161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11162for as_dir in $PATH
11163do
11164  IFS=$as_save_IFS
11165  test -z "$as_dir" && as_dir=.
11166    for ac_exec_ext in '' $ac_executable_extensions; do
11167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11168    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11170    break 2
11171  fi
11172done
11173  done
11174IFS=$as_save_IFS
11175
11176  ;;
11177esac
11178fi
11179XARGS=$ac_cv_path_XARGS
11180if test -n "$XARGS"; then
11181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11182$as_echo "$XARGS" >&6; }
11183else
11184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11185$as_echo "no" >&6; }
11186fi
11187
11188
11189  test -n "$XARGS" && break
11190done
11191
11192  else
11193    # The variable is set, but is it from the command line or the environment?
11194
11195    # Try to remove the string !XARGS! from our list.
11196    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11197    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11198      # If it failed, the variable was not from the command line. Ignore it,
11199      # but warn the user (except for BASH, which is always set by the calling BASH).
11200      if test "xXARGS" != xBASH; then
11201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11202$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11203      fi
11204      # Try to locate tool using the code snippet
11205      for ac_prog in xargs
11206do
11207  # Extract the first word of "$ac_prog", so it can be a program name with args.
11208set dummy $ac_prog; ac_word=$2
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11210$as_echo_n "checking for $ac_word... " >&6; }
11211if ${ac_cv_path_XARGS+:} false; then :
11212  $as_echo_n "(cached) " >&6
11213else
11214  case $XARGS in
11215  [\\/]* | ?:[\\/]*)
11216  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11217  ;;
11218  *)
11219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11220for as_dir in $PATH
11221do
11222  IFS=$as_save_IFS
11223  test -z "$as_dir" && as_dir=.
11224    for ac_exec_ext in '' $ac_executable_extensions; do
11225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11226    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11228    break 2
11229  fi
11230done
11231  done
11232IFS=$as_save_IFS
11233
11234  ;;
11235esac
11236fi
11237XARGS=$ac_cv_path_XARGS
11238if test -n "$XARGS"; then
11239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11240$as_echo "$XARGS" >&6; }
11241else
11242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243$as_echo "no" >&6; }
11244fi
11245
11246
11247  test -n "$XARGS" && break
11248done
11249
11250    else
11251      # If it succeeded, then it was overridden by the user. We will use it
11252      # for the tool.
11253
11254      # First remove it from the list of overridden variables, so we can test
11255      # for unknown variables in the end.
11256      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11257
11258      # Check if the provided tool contains a complete path.
11259      tool_specified="$XARGS"
11260      tool_basename="${tool_specified##*/}"
11261      if test "x$tool_basename" = "x$tool_specified"; then
11262        # A command without a complete path is provided, search $PATH.
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11264$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11265        # Extract the first word of "$tool_basename", so it can be a program name with args.
11266set dummy $tool_basename; ac_word=$2
11267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11268$as_echo_n "checking for $ac_word... " >&6; }
11269if ${ac_cv_path_XARGS+:} false; then :
11270  $as_echo_n "(cached) " >&6
11271else
11272  case $XARGS in
11273  [\\/]* | ?:[\\/]*)
11274  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11275  ;;
11276  *)
11277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11278for as_dir in $PATH
11279do
11280  IFS=$as_save_IFS
11281  test -z "$as_dir" && as_dir=.
11282    for ac_exec_ext in '' $ac_executable_extensions; do
11283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11284    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11286    break 2
11287  fi
11288done
11289  done
11290IFS=$as_save_IFS
11291
11292  ;;
11293esac
11294fi
11295XARGS=$ac_cv_path_XARGS
11296if test -n "$XARGS"; then
11297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11298$as_echo "$XARGS" >&6; }
11299else
11300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11301$as_echo "no" >&6; }
11302fi
11303
11304
11305        if test "x$XARGS" = x; then
11306          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11307        fi
11308      else
11309        # Otherwise we believe it is a complete path. Use it as it is.
11310        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11311$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11313$as_echo_n "checking for XARGS... " >&6; }
11314        if test ! -x "$tool_specified"; then
11315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11316$as_echo "not found" >&6; }
11317          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11318        fi
11319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11320$as_echo "$tool_specified" >&6; }
11321      fi
11322    fi
11323  fi
11324
11325
11326
11327  if test "x$XARGS" = x; then
11328    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11329  fi
11330
11331
11332
11333  # Then required tools that require some special treatment.
11334
11335
11336  # Publish this variable in the help.
11337
11338
11339  if test "x$AWK" = x; then
11340    # The variable is not set by user, try to locate tool using the code snippet
11341    for ac_prog in gawk mawk nawk awk
11342do
11343  # Extract the first word of "$ac_prog", so it can be a program name with args.
11344set dummy $ac_prog; ac_word=$2
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11346$as_echo_n "checking for $ac_word... " >&6; }
11347if ${ac_cv_prog_AWK+:} false; then :
11348  $as_echo_n "(cached) " >&6
11349else
11350  if test -n "$AWK"; then
11351  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11352else
11353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11354for as_dir in $PATH
11355do
11356  IFS=$as_save_IFS
11357  test -z "$as_dir" && as_dir=.
11358    for ac_exec_ext in '' $ac_executable_extensions; do
11359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11360    ac_cv_prog_AWK="$ac_prog"
11361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11362    break 2
11363  fi
11364done
11365  done
11366IFS=$as_save_IFS
11367
11368fi
11369fi
11370AWK=$ac_cv_prog_AWK
11371if test -n "$AWK"; then
11372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11373$as_echo "$AWK" >&6; }
11374else
11375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376$as_echo "no" >&6; }
11377fi
11378
11379
11380  test -n "$AWK" && break
11381done
11382
11383  else
11384    # The variable is set, but is it from the command line or the environment?
11385
11386    # Try to remove the string !AWK! from our list.
11387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11389      # If it failed, the variable was not from the command line. Ignore it,
11390      # but warn the user (except for BASH, which is always set by the calling BASH).
11391      if test "xAWK" != xBASH; then
11392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11393$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11394      fi
11395      # Try to locate tool using the code snippet
11396      for ac_prog in gawk mawk nawk awk
11397do
11398  # Extract the first word of "$ac_prog", so it can be a program name with args.
11399set dummy $ac_prog; ac_word=$2
11400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11401$as_echo_n "checking for $ac_word... " >&6; }
11402if ${ac_cv_prog_AWK+:} false; then :
11403  $as_echo_n "(cached) " >&6
11404else
11405  if test -n "$AWK"; then
11406  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11407else
11408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11409for as_dir in $PATH
11410do
11411  IFS=$as_save_IFS
11412  test -z "$as_dir" && as_dir=.
11413    for ac_exec_ext in '' $ac_executable_extensions; do
11414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11415    ac_cv_prog_AWK="$ac_prog"
11416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11417    break 2
11418  fi
11419done
11420  done
11421IFS=$as_save_IFS
11422
11423fi
11424fi
11425AWK=$ac_cv_prog_AWK
11426if test -n "$AWK"; then
11427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11428$as_echo "$AWK" >&6; }
11429else
11430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11431$as_echo "no" >&6; }
11432fi
11433
11434
11435  test -n "$AWK" && break
11436done
11437
11438    else
11439      # If it succeeded, then it was overridden by the user. We will use it
11440      # for the tool.
11441
11442      # First remove it from the list of overridden variables, so we can test
11443      # for unknown variables in the end.
11444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11445
11446      # Check if the provided tool contains a complete path.
11447      tool_specified="$AWK"
11448      tool_basename="${tool_specified##*/}"
11449      if test "x$tool_basename" = "x$tool_specified"; then
11450        # A command without a complete path is provided, search $PATH.
11451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11452$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11453        # Extract the first word of "$tool_basename", so it can be a program name with args.
11454set dummy $tool_basename; ac_word=$2
11455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11456$as_echo_n "checking for $ac_word... " >&6; }
11457if ${ac_cv_path_AWK+:} false; then :
11458  $as_echo_n "(cached) " >&6
11459else
11460  case $AWK in
11461  [\\/]* | ?:[\\/]*)
11462  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11463  ;;
11464  *)
11465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11466for as_dir in $PATH
11467do
11468  IFS=$as_save_IFS
11469  test -z "$as_dir" && as_dir=.
11470    for ac_exec_ext in '' $ac_executable_extensions; do
11471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11472    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11474    break 2
11475  fi
11476done
11477  done
11478IFS=$as_save_IFS
11479
11480  ;;
11481esac
11482fi
11483AWK=$ac_cv_path_AWK
11484if test -n "$AWK"; then
11485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11486$as_echo "$AWK" >&6; }
11487else
11488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11489$as_echo "no" >&6; }
11490fi
11491
11492
11493        if test "x$AWK" = x; then
11494          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11495        fi
11496      else
11497        # Otherwise we believe it is a complete path. Use it as it is.
11498        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11499$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11501$as_echo_n "checking for AWK... " >&6; }
11502        if test ! -x "$tool_specified"; then
11503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11504$as_echo "not found" >&6; }
11505          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11506        fi
11507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11508$as_echo "$tool_specified" >&6; }
11509      fi
11510    fi
11511  fi
11512
11513
11514  if test "x$AWK" = x; then
11515    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11516  fi
11517
11518
11519
11520
11521  # Publish this variable in the help.
11522
11523
11524  if test "x$GREP" = x; then
11525    # The variable is not set by user, try to locate tool using the code snippet
11526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11527$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11528if ${ac_cv_path_GREP+:} false; then :
11529  $as_echo_n "(cached) " >&6
11530else
11531  if test -z "$GREP"; then
11532  ac_path_GREP_found=false
11533  # Loop through the user's path and test for each of PROGNAME-LIST
11534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11535for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11536do
11537  IFS=$as_save_IFS
11538  test -z "$as_dir" && as_dir=.
11539    for ac_prog in grep ggrep; do
11540    for ac_exec_ext in '' $ac_executable_extensions; do
11541      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11542      as_fn_executable_p "$ac_path_GREP" || continue
11543# Check for GNU ac_path_GREP and select it if it is found.
11544  # Check for GNU $ac_path_GREP
11545case `"$ac_path_GREP" --version 2>&1` in
11546*GNU*)
11547  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11548*)
11549  ac_count=0
11550  $as_echo_n 0123456789 >"conftest.in"
11551  while :
11552  do
11553    cat "conftest.in" "conftest.in" >"conftest.tmp"
11554    mv "conftest.tmp" "conftest.in"
11555    cp "conftest.in" "conftest.nl"
11556    $as_echo 'GREP' >> "conftest.nl"
11557    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11558    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11559    as_fn_arith $ac_count + 1 && ac_count=$as_val
11560    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11561      # Best one so far, save it but keep looking for a better one
11562      ac_cv_path_GREP="$ac_path_GREP"
11563      ac_path_GREP_max=$ac_count
11564    fi
11565    # 10*(2^10) chars as input seems more than enough
11566    test $ac_count -gt 10 && break
11567  done
11568  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11569esac
11570
11571      $ac_path_GREP_found && break 3
11572    done
11573  done
11574  done
11575IFS=$as_save_IFS
11576  if test -z "$ac_cv_path_GREP"; then
11577    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11578  fi
11579else
11580  ac_cv_path_GREP=$GREP
11581fi
11582
11583fi
11584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11585$as_echo "$ac_cv_path_GREP" >&6; }
11586 GREP="$ac_cv_path_GREP"
11587
11588
11589  else
11590    # The variable is set, but is it from the command line or the environment?
11591
11592    # Try to remove the string !GREP! from our list.
11593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11595      # If it failed, the variable was not from the command line. Ignore it,
11596      # but warn the user (except for BASH, which is always set by the calling BASH).
11597      if test "xGREP" != xBASH; then
11598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11599$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11600      fi
11601      # Try to locate tool using the code snippet
11602      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11603$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11604if ${ac_cv_path_GREP+:} false; then :
11605  $as_echo_n "(cached) " >&6
11606else
11607  if test -z "$GREP"; then
11608  ac_path_GREP_found=false
11609  # Loop through the user's path and test for each of PROGNAME-LIST
11610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11611for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11612do
11613  IFS=$as_save_IFS
11614  test -z "$as_dir" && as_dir=.
11615    for ac_prog in grep ggrep; do
11616    for ac_exec_ext in '' $ac_executable_extensions; do
11617      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11618      as_fn_executable_p "$ac_path_GREP" || continue
11619# Check for GNU ac_path_GREP and select it if it is found.
11620  # Check for GNU $ac_path_GREP
11621case `"$ac_path_GREP" --version 2>&1` in
11622*GNU*)
11623  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11624*)
11625  ac_count=0
11626  $as_echo_n 0123456789 >"conftest.in"
11627  while :
11628  do
11629    cat "conftest.in" "conftest.in" >"conftest.tmp"
11630    mv "conftest.tmp" "conftest.in"
11631    cp "conftest.in" "conftest.nl"
11632    $as_echo 'GREP' >> "conftest.nl"
11633    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11634    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11635    as_fn_arith $ac_count + 1 && ac_count=$as_val
11636    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11637      # Best one so far, save it but keep looking for a better one
11638      ac_cv_path_GREP="$ac_path_GREP"
11639      ac_path_GREP_max=$ac_count
11640    fi
11641    # 10*(2^10) chars as input seems more than enough
11642    test $ac_count -gt 10 && break
11643  done
11644  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11645esac
11646
11647      $ac_path_GREP_found && break 3
11648    done
11649  done
11650  done
11651IFS=$as_save_IFS
11652  if test -z "$ac_cv_path_GREP"; then
11653    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11654  fi
11655else
11656  ac_cv_path_GREP=$GREP
11657fi
11658
11659fi
11660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11661$as_echo "$ac_cv_path_GREP" >&6; }
11662 GREP="$ac_cv_path_GREP"
11663
11664
11665    else
11666      # If it succeeded, then it was overridden by the user. We will use it
11667      # for the tool.
11668
11669      # First remove it from the list of overridden variables, so we can test
11670      # for unknown variables in the end.
11671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11672
11673      # Check if the provided tool contains a complete path.
11674      tool_specified="$GREP"
11675      tool_basename="${tool_specified##*/}"
11676      if test "x$tool_basename" = "x$tool_specified"; then
11677        # A command without a complete path is provided, search $PATH.
11678        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11679$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11680        # Extract the first word of "$tool_basename", so it can be a program name with args.
11681set dummy $tool_basename; ac_word=$2
11682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11683$as_echo_n "checking for $ac_word... " >&6; }
11684if ${ac_cv_path_GREP+:} false; then :
11685  $as_echo_n "(cached) " >&6
11686else
11687  case $GREP in
11688  [\\/]* | ?:[\\/]*)
11689  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11690  ;;
11691  *)
11692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11693for as_dir in $PATH
11694do
11695  IFS=$as_save_IFS
11696  test -z "$as_dir" && as_dir=.
11697    for ac_exec_ext in '' $ac_executable_extensions; do
11698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11699    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11701    break 2
11702  fi
11703done
11704  done
11705IFS=$as_save_IFS
11706
11707  ;;
11708esac
11709fi
11710GREP=$ac_cv_path_GREP
11711if test -n "$GREP"; then
11712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11713$as_echo "$GREP" >&6; }
11714else
11715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11716$as_echo "no" >&6; }
11717fi
11718
11719
11720        if test "x$GREP" = x; then
11721          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11722        fi
11723      else
11724        # Otherwise we believe it is a complete path. Use it as it is.
11725        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11726$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11728$as_echo_n "checking for GREP... " >&6; }
11729        if test ! -x "$tool_specified"; then
11730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11731$as_echo "not found" >&6; }
11732          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11733        fi
11734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11735$as_echo "$tool_specified" >&6; }
11736      fi
11737    fi
11738  fi
11739
11740
11741  if test "x$GREP" = x; then
11742    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11743  fi
11744
11745
11746
11747
11748  # Publish this variable in the help.
11749
11750
11751  if test "x$EGREP" = x; then
11752    # The variable is not set by user, try to locate tool using the code snippet
11753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11754$as_echo_n "checking for egrep... " >&6; }
11755if ${ac_cv_path_EGREP+:} false; then :
11756  $as_echo_n "(cached) " >&6
11757else
11758  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11759   then ac_cv_path_EGREP="$GREP -E"
11760   else
11761     if test -z "$EGREP"; then
11762  ac_path_EGREP_found=false
11763  # Loop through the user's path and test for each of PROGNAME-LIST
11764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11765for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11766do
11767  IFS=$as_save_IFS
11768  test -z "$as_dir" && as_dir=.
11769    for ac_prog in egrep; do
11770    for ac_exec_ext in '' $ac_executable_extensions; do
11771      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11772      as_fn_executable_p "$ac_path_EGREP" || continue
11773# Check for GNU ac_path_EGREP and select it if it is found.
11774  # Check for GNU $ac_path_EGREP
11775case `"$ac_path_EGREP" --version 2>&1` in
11776*GNU*)
11777  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11778*)
11779  ac_count=0
11780  $as_echo_n 0123456789 >"conftest.in"
11781  while :
11782  do
11783    cat "conftest.in" "conftest.in" >"conftest.tmp"
11784    mv "conftest.tmp" "conftest.in"
11785    cp "conftest.in" "conftest.nl"
11786    $as_echo 'EGREP' >> "conftest.nl"
11787    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11788    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11789    as_fn_arith $ac_count + 1 && ac_count=$as_val
11790    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11791      # Best one so far, save it but keep looking for a better one
11792      ac_cv_path_EGREP="$ac_path_EGREP"
11793      ac_path_EGREP_max=$ac_count
11794    fi
11795    # 10*(2^10) chars as input seems more than enough
11796    test $ac_count -gt 10 && break
11797  done
11798  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11799esac
11800
11801      $ac_path_EGREP_found && break 3
11802    done
11803  done
11804  done
11805IFS=$as_save_IFS
11806  if test -z "$ac_cv_path_EGREP"; then
11807    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11808  fi
11809else
11810  ac_cv_path_EGREP=$EGREP
11811fi
11812
11813   fi
11814fi
11815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11816$as_echo "$ac_cv_path_EGREP" >&6; }
11817 EGREP="$ac_cv_path_EGREP"
11818
11819
11820  else
11821    # The variable is set, but is it from the command line or the environment?
11822
11823    # Try to remove the string !EGREP! from our list.
11824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11826      # If it failed, the variable was not from the command line. Ignore it,
11827      # but warn the user (except for BASH, which is always set by the calling BASH).
11828      if test "xEGREP" != xBASH; then
11829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11830$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11831      fi
11832      # Try to locate tool using the code snippet
11833      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11834$as_echo_n "checking for egrep... " >&6; }
11835if ${ac_cv_path_EGREP+:} false; then :
11836  $as_echo_n "(cached) " >&6
11837else
11838  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11839   then ac_cv_path_EGREP="$GREP -E"
11840   else
11841     if test -z "$EGREP"; then
11842  ac_path_EGREP_found=false
11843  # Loop through the user's path and test for each of PROGNAME-LIST
11844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11845for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11846do
11847  IFS=$as_save_IFS
11848  test -z "$as_dir" && as_dir=.
11849    for ac_prog in egrep; do
11850    for ac_exec_ext in '' $ac_executable_extensions; do
11851      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11852      as_fn_executable_p "$ac_path_EGREP" || continue
11853# Check for GNU ac_path_EGREP and select it if it is found.
11854  # Check for GNU $ac_path_EGREP
11855case `"$ac_path_EGREP" --version 2>&1` in
11856*GNU*)
11857  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11858*)
11859  ac_count=0
11860  $as_echo_n 0123456789 >"conftest.in"
11861  while :
11862  do
11863    cat "conftest.in" "conftest.in" >"conftest.tmp"
11864    mv "conftest.tmp" "conftest.in"
11865    cp "conftest.in" "conftest.nl"
11866    $as_echo 'EGREP' >> "conftest.nl"
11867    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11868    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11869    as_fn_arith $ac_count + 1 && ac_count=$as_val
11870    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11871      # Best one so far, save it but keep looking for a better one
11872      ac_cv_path_EGREP="$ac_path_EGREP"
11873      ac_path_EGREP_max=$ac_count
11874    fi
11875    # 10*(2^10) chars as input seems more than enough
11876    test $ac_count -gt 10 && break
11877  done
11878  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11879esac
11880
11881      $ac_path_EGREP_found && break 3
11882    done
11883  done
11884  done
11885IFS=$as_save_IFS
11886  if test -z "$ac_cv_path_EGREP"; then
11887    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11888  fi
11889else
11890  ac_cv_path_EGREP=$EGREP
11891fi
11892
11893   fi
11894fi
11895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11896$as_echo "$ac_cv_path_EGREP" >&6; }
11897 EGREP="$ac_cv_path_EGREP"
11898
11899
11900    else
11901      # If it succeeded, then it was overridden by the user. We will use it
11902      # for the tool.
11903
11904      # First remove it from the list of overridden variables, so we can test
11905      # for unknown variables in the end.
11906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11907
11908      # Check if the provided tool contains a complete path.
11909      tool_specified="$EGREP"
11910      tool_basename="${tool_specified##*/}"
11911      if test "x$tool_basename" = "x$tool_specified"; then
11912        # A command without a complete path is provided, search $PATH.
11913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11914$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11915        # Extract the first word of "$tool_basename", so it can be a program name with args.
11916set dummy $tool_basename; ac_word=$2
11917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11918$as_echo_n "checking for $ac_word... " >&6; }
11919if ${ac_cv_path_EGREP+:} false; then :
11920  $as_echo_n "(cached) " >&6
11921else
11922  case $EGREP in
11923  [\\/]* | ?:[\\/]*)
11924  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11925  ;;
11926  *)
11927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11928for as_dir in $PATH
11929do
11930  IFS=$as_save_IFS
11931  test -z "$as_dir" && as_dir=.
11932    for ac_exec_ext in '' $ac_executable_extensions; do
11933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11934    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11936    break 2
11937  fi
11938done
11939  done
11940IFS=$as_save_IFS
11941
11942  ;;
11943esac
11944fi
11945EGREP=$ac_cv_path_EGREP
11946if test -n "$EGREP"; then
11947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11948$as_echo "$EGREP" >&6; }
11949else
11950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11951$as_echo "no" >&6; }
11952fi
11953
11954
11955        if test "x$EGREP" = x; then
11956          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11957        fi
11958      else
11959        # Otherwise we believe it is a complete path. Use it as it is.
11960        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11961$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11963$as_echo_n "checking for EGREP... " >&6; }
11964        if test ! -x "$tool_specified"; then
11965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11966$as_echo "not found" >&6; }
11967          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11968        fi
11969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11970$as_echo "$tool_specified" >&6; }
11971      fi
11972    fi
11973  fi
11974
11975
11976  if test "x$EGREP" = x; then
11977    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11978  fi
11979
11980
11981
11982
11983  # Publish this variable in the help.
11984
11985
11986  if test "x$FGREP" = x; then
11987    # The variable is not set by user, try to locate tool using the code snippet
11988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11989$as_echo_n "checking for fgrep... " >&6; }
11990if ${ac_cv_path_FGREP+:} false; then :
11991  $as_echo_n "(cached) " >&6
11992else
11993  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11994   then ac_cv_path_FGREP="$GREP -F"
11995   else
11996     if test -z "$FGREP"; then
11997  ac_path_FGREP_found=false
11998  # Loop through the user's path and test for each of PROGNAME-LIST
11999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12000for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12001do
12002  IFS=$as_save_IFS
12003  test -z "$as_dir" && as_dir=.
12004    for ac_prog in fgrep; do
12005    for ac_exec_ext in '' $ac_executable_extensions; do
12006      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12007      as_fn_executable_p "$ac_path_FGREP" || continue
12008# Check for GNU ac_path_FGREP and select it if it is found.
12009  # Check for GNU $ac_path_FGREP
12010case `"$ac_path_FGREP" --version 2>&1` in
12011*GNU*)
12012  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12013*)
12014  ac_count=0
12015  $as_echo_n 0123456789 >"conftest.in"
12016  while :
12017  do
12018    cat "conftest.in" "conftest.in" >"conftest.tmp"
12019    mv "conftest.tmp" "conftest.in"
12020    cp "conftest.in" "conftest.nl"
12021    $as_echo 'FGREP' >> "conftest.nl"
12022    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12023    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12024    as_fn_arith $ac_count + 1 && ac_count=$as_val
12025    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12026      # Best one so far, save it but keep looking for a better one
12027      ac_cv_path_FGREP="$ac_path_FGREP"
12028      ac_path_FGREP_max=$ac_count
12029    fi
12030    # 10*(2^10) chars as input seems more than enough
12031    test $ac_count -gt 10 && break
12032  done
12033  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12034esac
12035
12036      $ac_path_FGREP_found && break 3
12037    done
12038  done
12039  done
12040IFS=$as_save_IFS
12041  if test -z "$ac_cv_path_FGREP"; then
12042    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12043  fi
12044else
12045  ac_cv_path_FGREP=$FGREP
12046fi
12047
12048   fi
12049fi
12050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12051$as_echo "$ac_cv_path_FGREP" >&6; }
12052 FGREP="$ac_cv_path_FGREP"
12053
12054
12055  else
12056    # The variable is set, but is it from the command line or the environment?
12057
12058    # Try to remove the string !FGREP! from our list.
12059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12061      # If it failed, the variable was not from the command line. Ignore it,
12062      # but warn the user (except for BASH, which is always set by the calling BASH).
12063      if test "xFGREP" != xBASH; then
12064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12065$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12066      fi
12067      # Try to locate tool using the code snippet
12068      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12069$as_echo_n "checking for fgrep... " >&6; }
12070if ${ac_cv_path_FGREP+:} false; then :
12071  $as_echo_n "(cached) " >&6
12072else
12073  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12074   then ac_cv_path_FGREP="$GREP -F"
12075   else
12076     if test -z "$FGREP"; then
12077  ac_path_FGREP_found=false
12078  # Loop through the user's path and test for each of PROGNAME-LIST
12079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12080for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12081do
12082  IFS=$as_save_IFS
12083  test -z "$as_dir" && as_dir=.
12084    for ac_prog in fgrep; do
12085    for ac_exec_ext in '' $ac_executable_extensions; do
12086      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12087      as_fn_executable_p "$ac_path_FGREP" || continue
12088# Check for GNU ac_path_FGREP and select it if it is found.
12089  # Check for GNU $ac_path_FGREP
12090case `"$ac_path_FGREP" --version 2>&1` in
12091*GNU*)
12092  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12093*)
12094  ac_count=0
12095  $as_echo_n 0123456789 >"conftest.in"
12096  while :
12097  do
12098    cat "conftest.in" "conftest.in" >"conftest.tmp"
12099    mv "conftest.tmp" "conftest.in"
12100    cp "conftest.in" "conftest.nl"
12101    $as_echo 'FGREP' >> "conftest.nl"
12102    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12103    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12104    as_fn_arith $ac_count + 1 && ac_count=$as_val
12105    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12106      # Best one so far, save it but keep looking for a better one
12107      ac_cv_path_FGREP="$ac_path_FGREP"
12108      ac_path_FGREP_max=$ac_count
12109    fi
12110    # 10*(2^10) chars as input seems more than enough
12111    test $ac_count -gt 10 && break
12112  done
12113  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12114esac
12115
12116      $ac_path_FGREP_found && break 3
12117    done
12118  done
12119  done
12120IFS=$as_save_IFS
12121  if test -z "$ac_cv_path_FGREP"; then
12122    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12123  fi
12124else
12125  ac_cv_path_FGREP=$FGREP
12126fi
12127
12128   fi
12129fi
12130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12131$as_echo "$ac_cv_path_FGREP" >&6; }
12132 FGREP="$ac_cv_path_FGREP"
12133
12134
12135    else
12136      # If it succeeded, then it was overridden by the user. We will use it
12137      # for the tool.
12138
12139      # First remove it from the list of overridden variables, so we can test
12140      # for unknown variables in the end.
12141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12142
12143      # Check if the provided tool contains a complete path.
12144      tool_specified="$FGREP"
12145      tool_basename="${tool_specified##*/}"
12146      if test "x$tool_basename" = "x$tool_specified"; then
12147        # A command without a complete path is provided, search $PATH.
12148        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12149$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12150        # Extract the first word of "$tool_basename", so it can be a program name with args.
12151set dummy $tool_basename; ac_word=$2
12152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12153$as_echo_n "checking for $ac_word... " >&6; }
12154if ${ac_cv_path_FGREP+:} false; then :
12155  $as_echo_n "(cached) " >&6
12156else
12157  case $FGREP in
12158  [\\/]* | ?:[\\/]*)
12159  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12160  ;;
12161  *)
12162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12163for as_dir in $PATH
12164do
12165  IFS=$as_save_IFS
12166  test -z "$as_dir" && as_dir=.
12167    for ac_exec_ext in '' $ac_executable_extensions; do
12168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12169    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12171    break 2
12172  fi
12173done
12174  done
12175IFS=$as_save_IFS
12176
12177  ;;
12178esac
12179fi
12180FGREP=$ac_cv_path_FGREP
12181if test -n "$FGREP"; then
12182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12183$as_echo "$FGREP" >&6; }
12184else
12185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12186$as_echo "no" >&6; }
12187fi
12188
12189
12190        if test "x$FGREP" = x; then
12191          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12192        fi
12193      else
12194        # Otherwise we believe it is a complete path. Use it as it is.
12195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12196$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12198$as_echo_n "checking for FGREP... " >&6; }
12199        if test ! -x "$tool_specified"; then
12200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12201$as_echo "not found" >&6; }
12202          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12203        fi
12204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12205$as_echo "$tool_specified" >&6; }
12206      fi
12207    fi
12208  fi
12209
12210
12211  if test "x$FGREP" = x; then
12212    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12213  fi
12214
12215
12216
12217
12218  # Publish this variable in the help.
12219
12220
12221  if test "x$SED" = x; then
12222    # The variable is not set by user, try to locate tool using the code snippet
12223    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12224$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12225if ${ac_cv_path_SED+:} false; then :
12226  $as_echo_n "(cached) " >&6
12227else
12228            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12229     for ac_i in 1 2 3 4 5 6 7; do
12230       ac_script="$ac_script$as_nl$ac_script"
12231     done
12232     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12233     { ac_script=; unset ac_script;}
12234     if test -z "$SED"; then
12235  ac_path_SED_found=false
12236  # Loop through the user's path and test for each of PROGNAME-LIST
12237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12238for as_dir in $PATH
12239do
12240  IFS=$as_save_IFS
12241  test -z "$as_dir" && as_dir=.
12242    for ac_prog in sed gsed; do
12243    for ac_exec_ext in '' $ac_executable_extensions; do
12244      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12245      as_fn_executable_p "$ac_path_SED" || continue
12246# Check for GNU ac_path_SED and select it if it is found.
12247  # Check for GNU $ac_path_SED
12248case `"$ac_path_SED" --version 2>&1` in
12249*GNU*)
12250  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12251*)
12252  ac_count=0
12253  $as_echo_n 0123456789 >"conftest.in"
12254  while :
12255  do
12256    cat "conftest.in" "conftest.in" >"conftest.tmp"
12257    mv "conftest.tmp" "conftest.in"
12258    cp "conftest.in" "conftest.nl"
12259    $as_echo '' >> "conftest.nl"
12260    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12261    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12262    as_fn_arith $ac_count + 1 && ac_count=$as_val
12263    if test $ac_count -gt ${ac_path_SED_max-0}; then
12264      # Best one so far, save it but keep looking for a better one
12265      ac_cv_path_SED="$ac_path_SED"
12266      ac_path_SED_max=$ac_count
12267    fi
12268    # 10*(2^10) chars as input seems more than enough
12269    test $ac_count -gt 10 && break
12270  done
12271  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12272esac
12273
12274      $ac_path_SED_found && break 3
12275    done
12276  done
12277  done
12278IFS=$as_save_IFS
12279  if test -z "$ac_cv_path_SED"; then
12280    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12281  fi
12282else
12283  ac_cv_path_SED=$SED
12284fi
12285
12286fi
12287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12288$as_echo "$ac_cv_path_SED" >&6; }
12289 SED="$ac_cv_path_SED"
12290  rm -f conftest.sed
12291
12292  else
12293    # The variable is set, but is it from the command line or the environment?
12294
12295    # Try to remove the string !SED! from our list.
12296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12298      # If it failed, the variable was not from the command line. Ignore it,
12299      # but warn the user (except for BASH, which is always set by the calling BASH).
12300      if test "xSED" != xBASH; then
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12302$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12303      fi
12304      # Try to locate tool using the code snippet
12305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12306$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12307if ${ac_cv_path_SED+:} false; then :
12308  $as_echo_n "(cached) " >&6
12309else
12310            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12311     for ac_i in 1 2 3 4 5 6 7; do
12312       ac_script="$ac_script$as_nl$ac_script"
12313     done
12314     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12315     { ac_script=; unset ac_script;}
12316     if test -z "$SED"; then
12317  ac_path_SED_found=false
12318  # Loop through the user's path and test for each of PROGNAME-LIST
12319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12320for as_dir in $PATH
12321do
12322  IFS=$as_save_IFS
12323  test -z "$as_dir" && as_dir=.
12324    for ac_prog in sed gsed; do
12325    for ac_exec_ext in '' $ac_executable_extensions; do
12326      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12327      as_fn_executable_p "$ac_path_SED" || continue
12328# Check for GNU ac_path_SED and select it if it is found.
12329  # Check for GNU $ac_path_SED
12330case `"$ac_path_SED" --version 2>&1` in
12331*GNU*)
12332  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12333*)
12334  ac_count=0
12335  $as_echo_n 0123456789 >"conftest.in"
12336  while :
12337  do
12338    cat "conftest.in" "conftest.in" >"conftest.tmp"
12339    mv "conftest.tmp" "conftest.in"
12340    cp "conftest.in" "conftest.nl"
12341    $as_echo '' >> "conftest.nl"
12342    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12343    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12344    as_fn_arith $ac_count + 1 && ac_count=$as_val
12345    if test $ac_count -gt ${ac_path_SED_max-0}; then
12346      # Best one so far, save it but keep looking for a better one
12347      ac_cv_path_SED="$ac_path_SED"
12348      ac_path_SED_max=$ac_count
12349    fi
12350    # 10*(2^10) chars as input seems more than enough
12351    test $ac_count -gt 10 && break
12352  done
12353  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12354esac
12355
12356      $ac_path_SED_found && break 3
12357    done
12358  done
12359  done
12360IFS=$as_save_IFS
12361  if test -z "$ac_cv_path_SED"; then
12362    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12363  fi
12364else
12365  ac_cv_path_SED=$SED
12366fi
12367
12368fi
12369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12370$as_echo "$ac_cv_path_SED" >&6; }
12371 SED="$ac_cv_path_SED"
12372  rm -f conftest.sed
12373
12374    else
12375      # If it succeeded, then it was overridden by the user. We will use it
12376      # for the tool.
12377
12378      # First remove it from the list of overridden variables, so we can test
12379      # for unknown variables in the end.
12380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12381
12382      # Check if the provided tool contains a complete path.
12383      tool_specified="$SED"
12384      tool_basename="${tool_specified##*/}"
12385      if test "x$tool_basename" = "x$tool_specified"; then
12386        # A command without a complete path is provided, search $PATH.
12387        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12388$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12389        # Extract the first word of "$tool_basename", so it can be a program name with args.
12390set dummy $tool_basename; ac_word=$2
12391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12392$as_echo_n "checking for $ac_word... " >&6; }
12393if ${ac_cv_path_SED+:} false; then :
12394  $as_echo_n "(cached) " >&6
12395else
12396  case $SED in
12397  [\\/]* | ?:[\\/]*)
12398  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12399  ;;
12400  *)
12401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12402for as_dir in $PATH
12403do
12404  IFS=$as_save_IFS
12405  test -z "$as_dir" && as_dir=.
12406    for ac_exec_ext in '' $ac_executable_extensions; do
12407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12408    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12410    break 2
12411  fi
12412done
12413  done
12414IFS=$as_save_IFS
12415
12416  ;;
12417esac
12418fi
12419SED=$ac_cv_path_SED
12420if test -n "$SED"; then
12421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12422$as_echo "$SED" >&6; }
12423else
12424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12425$as_echo "no" >&6; }
12426fi
12427
12428
12429        if test "x$SED" = x; then
12430          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12431        fi
12432      else
12433        # Otherwise we believe it is a complete path. Use it as it is.
12434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12435$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12437$as_echo_n "checking for SED... " >&6; }
12438        if test ! -x "$tool_specified"; then
12439          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12440$as_echo "not found" >&6; }
12441          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12442        fi
12443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12444$as_echo "$tool_specified" >&6; }
12445      fi
12446    fi
12447  fi
12448
12449
12450  if test "x$SED" = x; then
12451    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12452  fi
12453
12454
12455
12456  # Always force rm.
12457  RM="$RM -f"
12458
12459  # pwd behaves differently on various platforms and some don't support the -L flag.
12460  # Always use the bash builtin pwd to get uniform behavior.
12461  THEPWDCMD=pwd
12462
12463  # These are not required on all platforms
12464
12465
12466  # Publish this variable in the help.
12467
12468
12469  if test "x$CYGPATH" = x; then
12470    # The variable is not set by user, try to locate tool using the code snippet
12471    for ac_prog in cygpath
12472do
12473  # Extract the first word of "$ac_prog", so it can be a program name with args.
12474set dummy $ac_prog; ac_word=$2
12475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12476$as_echo_n "checking for $ac_word... " >&6; }
12477if ${ac_cv_path_CYGPATH+:} false; then :
12478  $as_echo_n "(cached) " >&6
12479else
12480  case $CYGPATH in
12481  [\\/]* | ?:[\\/]*)
12482  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12483  ;;
12484  *)
12485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12486for as_dir in $PATH
12487do
12488  IFS=$as_save_IFS
12489  test -z "$as_dir" && as_dir=.
12490    for ac_exec_ext in '' $ac_executable_extensions; do
12491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12492    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12494    break 2
12495  fi
12496done
12497  done
12498IFS=$as_save_IFS
12499
12500  ;;
12501esac
12502fi
12503CYGPATH=$ac_cv_path_CYGPATH
12504if test -n "$CYGPATH"; then
12505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12506$as_echo "$CYGPATH" >&6; }
12507else
12508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12509$as_echo "no" >&6; }
12510fi
12511
12512
12513  test -n "$CYGPATH" && break
12514done
12515
12516  else
12517    # The variable is set, but is it from the command line or the environment?
12518
12519    # Try to remove the string !CYGPATH! from our list.
12520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12522      # If it failed, the variable was not from the command line. Ignore it,
12523      # but warn the user (except for BASH, which is always set by the calling BASH).
12524      if test "xCYGPATH" != xBASH; then
12525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12526$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12527      fi
12528      # Try to locate tool using the code snippet
12529      for ac_prog in cygpath
12530do
12531  # Extract the first word of "$ac_prog", so it can be a program name with args.
12532set dummy $ac_prog; ac_word=$2
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12534$as_echo_n "checking for $ac_word... " >&6; }
12535if ${ac_cv_path_CYGPATH+:} false; then :
12536  $as_echo_n "(cached) " >&6
12537else
12538  case $CYGPATH in
12539  [\\/]* | ?:[\\/]*)
12540  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12541  ;;
12542  *)
12543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12544for as_dir in $PATH
12545do
12546  IFS=$as_save_IFS
12547  test -z "$as_dir" && as_dir=.
12548    for ac_exec_ext in '' $ac_executable_extensions; do
12549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12550    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12552    break 2
12553  fi
12554done
12555  done
12556IFS=$as_save_IFS
12557
12558  ;;
12559esac
12560fi
12561CYGPATH=$ac_cv_path_CYGPATH
12562if test -n "$CYGPATH"; then
12563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12564$as_echo "$CYGPATH" >&6; }
12565else
12566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567$as_echo "no" >&6; }
12568fi
12569
12570
12571  test -n "$CYGPATH" && break
12572done
12573
12574    else
12575      # If it succeeded, then it was overridden by the user. We will use it
12576      # for the tool.
12577
12578      # First remove it from the list of overridden variables, so we can test
12579      # for unknown variables in the end.
12580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12581
12582      # Check if the provided tool contains a complete path.
12583      tool_specified="$CYGPATH"
12584      tool_basename="${tool_specified##*/}"
12585      if test "x$tool_basename" = "x$tool_specified"; then
12586        # A command without a complete path is provided, search $PATH.
12587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12588$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12589        # Extract the first word of "$tool_basename", so it can be a program name with args.
12590set dummy $tool_basename; ac_word=$2
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12592$as_echo_n "checking for $ac_word... " >&6; }
12593if ${ac_cv_path_CYGPATH+:} false; then :
12594  $as_echo_n "(cached) " >&6
12595else
12596  case $CYGPATH in
12597  [\\/]* | ?:[\\/]*)
12598  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12599  ;;
12600  *)
12601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12602for as_dir in $PATH
12603do
12604  IFS=$as_save_IFS
12605  test -z "$as_dir" && as_dir=.
12606    for ac_exec_ext in '' $ac_executable_extensions; do
12607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12608    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12610    break 2
12611  fi
12612done
12613  done
12614IFS=$as_save_IFS
12615
12616  ;;
12617esac
12618fi
12619CYGPATH=$ac_cv_path_CYGPATH
12620if test -n "$CYGPATH"; then
12621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12622$as_echo "$CYGPATH" >&6; }
12623else
12624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12625$as_echo "no" >&6; }
12626fi
12627
12628
12629        if test "x$CYGPATH" = x; then
12630          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12631        fi
12632      else
12633        # Otherwise we believe it is a complete path. Use it as it is.
12634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12635$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12637$as_echo_n "checking for CYGPATH... " >&6; }
12638        if test ! -x "$tool_specified"; then
12639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12640$as_echo "not found" >&6; }
12641          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12642        fi
12643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12644$as_echo "$tool_specified" >&6; }
12645      fi
12646    fi
12647  fi
12648
12649
12650
12651
12652  # Publish this variable in the help.
12653
12654
12655  if test "x$READLINK" = x; then
12656    # The variable is not set by user, try to locate tool using the code snippet
12657    for ac_prog in greadlink readlink
12658do
12659  # Extract the first word of "$ac_prog", so it can be a program name with args.
12660set dummy $ac_prog; ac_word=$2
12661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12662$as_echo_n "checking for $ac_word... " >&6; }
12663if ${ac_cv_path_READLINK+:} false; then :
12664  $as_echo_n "(cached) " >&6
12665else
12666  case $READLINK in
12667  [\\/]* | ?:[\\/]*)
12668  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12669  ;;
12670  *)
12671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12672for as_dir in $PATH
12673do
12674  IFS=$as_save_IFS
12675  test -z "$as_dir" && as_dir=.
12676    for ac_exec_ext in '' $ac_executable_extensions; do
12677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12678    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12680    break 2
12681  fi
12682done
12683  done
12684IFS=$as_save_IFS
12685
12686  ;;
12687esac
12688fi
12689READLINK=$ac_cv_path_READLINK
12690if test -n "$READLINK"; then
12691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12692$as_echo "$READLINK" >&6; }
12693else
12694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12695$as_echo "no" >&6; }
12696fi
12697
12698
12699  test -n "$READLINK" && break
12700done
12701
12702  else
12703    # The variable is set, but is it from the command line or the environment?
12704
12705    # Try to remove the string !READLINK! from our list.
12706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12708      # If it failed, the variable was not from the command line. Ignore it,
12709      # but warn the user (except for BASH, which is always set by the calling BASH).
12710      if test "xREADLINK" != xBASH; then
12711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12712$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12713      fi
12714      # Try to locate tool using the code snippet
12715      for ac_prog in greadlink readlink
12716do
12717  # Extract the first word of "$ac_prog", so it can be a program name with args.
12718set dummy $ac_prog; ac_word=$2
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12720$as_echo_n "checking for $ac_word... " >&6; }
12721if ${ac_cv_path_READLINK+:} false; then :
12722  $as_echo_n "(cached) " >&6
12723else
12724  case $READLINK in
12725  [\\/]* | ?:[\\/]*)
12726  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12727  ;;
12728  *)
12729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12730for as_dir in $PATH
12731do
12732  IFS=$as_save_IFS
12733  test -z "$as_dir" && as_dir=.
12734    for ac_exec_ext in '' $ac_executable_extensions; do
12735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12736    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12738    break 2
12739  fi
12740done
12741  done
12742IFS=$as_save_IFS
12743
12744  ;;
12745esac
12746fi
12747READLINK=$ac_cv_path_READLINK
12748if test -n "$READLINK"; then
12749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12750$as_echo "$READLINK" >&6; }
12751else
12752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12753$as_echo "no" >&6; }
12754fi
12755
12756
12757  test -n "$READLINK" && break
12758done
12759
12760    else
12761      # If it succeeded, then it was overridden by the user. We will use it
12762      # for the tool.
12763
12764      # First remove it from the list of overridden variables, so we can test
12765      # for unknown variables in the end.
12766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12767
12768      # Check if the provided tool contains a complete path.
12769      tool_specified="$READLINK"
12770      tool_basename="${tool_specified##*/}"
12771      if test "x$tool_basename" = "x$tool_specified"; then
12772        # A command without a complete path is provided, search $PATH.
12773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12774$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12775        # Extract the first word of "$tool_basename", so it can be a program name with args.
12776set dummy $tool_basename; ac_word=$2
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12778$as_echo_n "checking for $ac_word... " >&6; }
12779if ${ac_cv_path_READLINK+:} false; then :
12780  $as_echo_n "(cached) " >&6
12781else
12782  case $READLINK in
12783  [\\/]* | ?:[\\/]*)
12784  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12785  ;;
12786  *)
12787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12788for as_dir in $PATH
12789do
12790  IFS=$as_save_IFS
12791  test -z "$as_dir" && as_dir=.
12792    for ac_exec_ext in '' $ac_executable_extensions; do
12793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12794    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12796    break 2
12797  fi
12798done
12799  done
12800IFS=$as_save_IFS
12801
12802  ;;
12803esac
12804fi
12805READLINK=$ac_cv_path_READLINK
12806if test -n "$READLINK"; then
12807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12808$as_echo "$READLINK" >&6; }
12809else
12810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12811$as_echo "no" >&6; }
12812fi
12813
12814
12815        if test "x$READLINK" = x; then
12816          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12817        fi
12818      else
12819        # Otherwise we believe it is a complete path. Use it as it is.
12820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12821$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12823$as_echo_n "checking for READLINK... " >&6; }
12824        if test ! -x "$tool_specified"; then
12825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12826$as_echo "not found" >&6; }
12827          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12828        fi
12829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12830$as_echo "$tool_specified" >&6; }
12831      fi
12832    fi
12833  fi
12834
12835
12836
12837
12838  # Publish this variable in the help.
12839
12840
12841  if test "x$DF" = x; then
12842    # The variable is not set by user, try to locate tool using the code snippet
12843    for ac_prog in df
12844do
12845  # Extract the first word of "$ac_prog", so it can be a program name with args.
12846set dummy $ac_prog; ac_word=$2
12847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12848$as_echo_n "checking for $ac_word... " >&6; }
12849if ${ac_cv_path_DF+:} false; then :
12850  $as_echo_n "(cached) " >&6
12851else
12852  case $DF in
12853  [\\/]* | ?:[\\/]*)
12854  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12855  ;;
12856  *)
12857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12858for as_dir in $PATH
12859do
12860  IFS=$as_save_IFS
12861  test -z "$as_dir" && as_dir=.
12862    for ac_exec_ext in '' $ac_executable_extensions; do
12863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12864    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12866    break 2
12867  fi
12868done
12869  done
12870IFS=$as_save_IFS
12871
12872  ;;
12873esac
12874fi
12875DF=$ac_cv_path_DF
12876if test -n "$DF"; then
12877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12878$as_echo "$DF" >&6; }
12879else
12880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12881$as_echo "no" >&6; }
12882fi
12883
12884
12885  test -n "$DF" && break
12886done
12887
12888  else
12889    # The variable is set, but is it from the command line or the environment?
12890
12891    # Try to remove the string !DF! from our list.
12892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12894      # If it failed, the variable was not from the command line. Ignore it,
12895      # but warn the user (except for BASH, which is always set by the calling BASH).
12896      if test "xDF" != xBASH; then
12897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12898$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12899      fi
12900      # Try to locate tool using the code snippet
12901      for ac_prog in df
12902do
12903  # Extract the first word of "$ac_prog", so it can be a program name with args.
12904set dummy $ac_prog; ac_word=$2
12905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12906$as_echo_n "checking for $ac_word... " >&6; }
12907if ${ac_cv_path_DF+:} false; then :
12908  $as_echo_n "(cached) " >&6
12909else
12910  case $DF in
12911  [\\/]* | ?:[\\/]*)
12912  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12913  ;;
12914  *)
12915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12916for as_dir in $PATH
12917do
12918  IFS=$as_save_IFS
12919  test -z "$as_dir" && as_dir=.
12920    for ac_exec_ext in '' $ac_executable_extensions; do
12921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12922    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12924    break 2
12925  fi
12926done
12927  done
12928IFS=$as_save_IFS
12929
12930  ;;
12931esac
12932fi
12933DF=$ac_cv_path_DF
12934if test -n "$DF"; then
12935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12936$as_echo "$DF" >&6; }
12937else
12938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12939$as_echo "no" >&6; }
12940fi
12941
12942
12943  test -n "$DF" && break
12944done
12945
12946    else
12947      # If it succeeded, then it was overridden by the user. We will use it
12948      # for the tool.
12949
12950      # First remove it from the list of overridden variables, so we can test
12951      # for unknown variables in the end.
12952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12953
12954      # Check if the provided tool contains a complete path.
12955      tool_specified="$DF"
12956      tool_basename="${tool_specified##*/}"
12957      if test "x$tool_basename" = "x$tool_specified"; then
12958        # A command without a complete path is provided, search $PATH.
12959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12960$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12961        # Extract the first word of "$tool_basename", so it can be a program name with args.
12962set dummy $tool_basename; ac_word=$2
12963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12964$as_echo_n "checking for $ac_word... " >&6; }
12965if ${ac_cv_path_DF+:} false; then :
12966  $as_echo_n "(cached) " >&6
12967else
12968  case $DF in
12969  [\\/]* | ?:[\\/]*)
12970  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12971  ;;
12972  *)
12973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12974for as_dir in $PATH
12975do
12976  IFS=$as_save_IFS
12977  test -z "$as_dir" && as_dir=.
12978    for ac_exec_ext in '' $ac_executable_extensions; do
12979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12980    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12982    break 2
12983  fi
12984done
12985  done
12986IFS=$as_save_IFS
12987
12988  ;;
12989esac
12990fi
12991DF=$ac_cv_path_DF
12992if test -n "$DF"; then
12993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12994$as_echo "$DF" >&6; }
12995else
12996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12997$as_echo "no" >&6; }
12998fi
12999
13000
13001        if test "x$DF" = x; then
13002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13003        fi
13004      else
13005        # Otherwise we believe it is a complete path. Use it as it is.
13006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13007$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13009$as_echo_n "checking for DF... " >&6; }
13010        if test ! -x "$tool_specified"; then
13011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13012$as_echo "not found" >&6; }
13013          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13014        fi
13015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13016$as_echo "$tool_specified" >&6; }
13017      fi
13018    fi
13019  fi
13020
13021
13022
13023
13024  # Publish this variable in the help.
13025
13026
13027  if test "x$SETFILE" = x; then
13028    # The variable is not set by user, try to locate tool using the code snippet
13029    for ac_prog in SetFile
13030do
13031  # Extract the first word of "$ac_prog", so it can be a program name with args.
13032set dummy $ac_prog; ac_word=$2
13033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13034$as_echo_n "checking for $ac_word... " >&6; }
13035if ${ac_cv_path_SETFILE+:} false; then :
13036  $as_echo_n "(cached) " >&6
13037else
13038  case $SETFILE in
13039  [\\/]* | ?:[\\/]*)
13040  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13041  ;;
13042  *)
13043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13044for as_dir in $PATH
13045do
13046  IFS=$as_save_IFS
13047  test -z "$as_dir" && as_dir=.
13048    for ac_exec_ext in '' $ac_executable_extensions; do
13049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13050    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13052    break 2
13053  fi
13054done
13055  done
13056IFS=$as_save_IFS
13057
13058  ;;
13059esac
13060fi
13061SETFILE=$ac_cv_path_SETFILE
13062if test -n "$SETFILE"; then
13063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13064$as_echo "$SETFILE" >&6; }
13065else
13066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13067$as_echo "no" >&6; }
13068fi
13069
13070
13071  test -n "$SETFILE" && break
13072done
13073
13074  else
13075    # The variable is set, but is it from the command line or the environment?
13076
13077    # Try to remove the string !SETFILE! from our list.
13078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13080      # If it failed, the variable was not from the command line. Ignore it,
13081      # but warn the user (except for BASH, which is always set by the calling BASH).
13082      if test "xSETFILE" != xBASH; then
13083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13084$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13085      fi
13086      # Try to locate tool using the code snippet
13087      for ac_prog in SetFile
13088do
13089  # Extract the first word of "$ac_prog", so it can be a program name with args.
13090set dummy $ac_prog; ac_word=$2
13091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13092$as_echo_n "checking for $ac_word... " >&6; }
13093if ${ac_cv_path_SETFILE+:} false; then :
13094  $as_echo_n "(cached) " >&6
13095else
13096  case $SETFILE in
13097  [\\/]* | ?:[\\/]*)
13098  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13099  ;;
13100  *)
13101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13102for as_dir in $PATH
13103do
13104  IFS=$as_save_IFS
13105  test -z "$as_dir" && as_dir=.
13106    for ac_exec_ext in '' $ac_executable_extensions; do
13107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13108    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13110    break 2
13111  fi
13112done
13113  done
13114IFS=$as_save_IFS
13115
13116  ;;
13117esac
13118fi
13119SETFILE=$ac_cv_path_SETFILE
13120if test -n "$SETFILE"; then
13121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13122$as_echo "$SETFILE" >&6; }
13123else
13124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13125$as_echo "no" >&6; }
13126fi
13127
13128
13129  test -n "$SETFILE" && break
13130done
13131
13132    else
13133      # If it succeeded, then it was overridden by the user. We will use it
13134      # for the tool.
13135
13136      # First remove it from the list of overridden variables, so we can test
13137      # for unknown variables in the end.
13138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13139
13140      # Check if the provided tool contains a complete path.
13141      tool_specified="$SETFILE"
13142      tool_basename="${tool_specified##*/}"
13143      if test "x$tool_basename" = "x$tool_specified"; then
13144        # A command without a complete path is provided, search $PATH.
13145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13146$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13147        # Extract the first word of "$tool_basename", so it can be a program name with args.
13148set dummy $tool_basename; ac_word=$2
13149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13150$as_echo_n "checking for $ac_word... " >&6; }
13151if ${ac_cv_path_SETFILE+:} false; then :
13152  $as_echo_n "(cached) " >&6
13153else
13154  case $SETFILE in
13155  [\\/]* | ?:[\\/]*)
13156  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13157  ;;
13158  *)
13159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13160for as_dir in $PATH
13161do
13162  IFS=$as_save_IFS
13163  test -z "$as_dir" && as_dir=.
13164    for ac_exec_ext in '' $ac_executable_extensions; do
13165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13166    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13168    break 2
13169  fi
13170done
13171  done
13172IFS=$as_save_IFS
13173
13174  ;;
13175esac
13176fi
13177SETFILE=$ac_cv_path_SETFILE
13178if test -n "$SETFILE"; then
13179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13180$as_echo "$SETFILE" >&6; }
13181else
13182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13183$as_echo "no" >&6; }
13184fi
13185
13186
13187        if test "x$SETFILE" = x; then
13188          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13189        fi
13190      else
13191        # Otherwise we believe it is a complete path. Use it as it is.
13192        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13193$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13195$as_echo_n "checking for SETFILE... " >&6; }
13196        if test ! -x "$tool_specified"; then
13197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13198$as_echo "not found" >&6; }
13199          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13200        fi
13201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13202$as_echo "$tool_specified" >&6; }
13203      fi
13204    fi
13205  fi
13206
13207
13208
13209
13210  # Publish this variable in the help.
13211
13212
13213  if test "x$CPIO" = x; then
13214    # The variable is not set by user, try to locate tool using the code snippet
13215    for ac_prog in cpio bsdcpio
13216do
13217  # Extract the first word of "$ac_prog", so it can be a program name with args.
13218set dummy $ac_prog; ac_word=$2
13219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13220$as_echo_n "checking for $ac_word... " >&6; }
13221if ${ac_cv_path_CPIO+:} false; then :
13222  $as_echo_n "(cached) " >&6
13223else
13224  case $CPIO in
13225  [\\/]* | ?:[\\/]*)
13226  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13227  ;;
13228  *)
13229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13230for as_dir in $PATH
13231do
13232  IFS=$as_save_IFS
13233  test -z "$as_dir" && as_dir=.
13234    for ac_exec_ext in '' $ac_executable_extensions; do
13235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13236    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13238    break 2
13239  fi
13240done
13241  done
13242IFS=$as_save_IFS
13243
13244  ;;
13245esac
13246fi
13247CPIO=$ac_cv_path_CPIO
13248if test -n "$CPIO"; then
13249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13250$as_echo "$CPIO" >&6; }
13251else
13252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13253$as_echo "no" >&6; }
13254fi
13255
13256
13257  test -n "$CPIO" && break
13258done
13259
13260  else
13261    # The variable is set, but is it from the command line or the environment?
13262
13263    # Try to remove the string !CPIO! from our list.
13264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13266      # If it failed, the variable was not from the command line. Ignore it,
13267      # but warn the user (except for BASH, which is always set by the calling BASH).
13268      if test "xCPIO" != xBASH; then
13269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13270$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13271      fi
13272      # Try to locate tool using the code snippet
13273      for ac_prog in cpio bsdcpio
13274do
13275  # Extract the first word of "$ac_prog", so it can be a program name with args.
13276set dummy $ac_prog; ac_word=$2
13277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13278$as_echo_n "checking for $ac_word... " >&6; }
13279if ${ac_cv_path_CPIO+:} false; then :
13280  $as_echo_n "(cached) " >&6
13281else
13282  case $CPIO in
13283  [\\/]* | ?:[\\/]*)
13284  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13285  ;;
13286  *)
13287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13288for as_dir in $PATH
13289do
13290  IFS=$as_save_IFS
13291  test -z "$as_dir" && as_dir=.
13292    for ac_exec_ext in '' $ac_executable_extensions; do
13293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13294    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13296    break 2
13297  fi
13298done
13299  done
13300IFS=$as_save_IFS
13301
13302  ;;
13303esac
13304fi
13305CPIO=$ac_cv_path_CPIO
13306if test -n "$CPIO"; then
13307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13308$as_echo "$CPIO" >&6; }
13309else
13310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
13312fi
13313
13314
13315  test -n "$CPIO" && break
13316done
13317
13318    else
13319      # If it succeeded, then it was overridden by the user. We will use it
13320      # for the tool.
13321
13322      # First remove it from the list of overridden variables, so we can test
13323      # for unknown variables in the end.
13324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13325
13326      # Check if the provided tool contains a complete path.
13327      tool_specified="$CPIO"
13328      tool_basename="${tool_specified##*/}"
13329      if test "x$tool_basename" = "x$tool_specified"; then
13330        # A command without a complete path is provided, search $PATH.
13331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13332$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13333        # Extract the first word of "$tool_basename", so it can be a program name with args.
13334set dummy $tool_basename; ac_word=$2
13335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13336$as_echo_n "checking for $ac_word... " >&6; }
13337if ${ac_cv_path_CPIO+:} false; then :
13338  $as_echo_n "(cached) " >&6
13339else
13340  case $CPIO in
13341  [\\/]* | ?:[\\/]*)
13342  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13343  ;;
13344  *)
13345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13346for as_dir in $PATH
13347do
13348  IFS=$as_save_IFS
13349  test -z "$as_dir" && as_dir=.
13350    for ac_exec_ext in '' $ac_executable_extensions; do
13351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13352    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13354    break 2
13355  fi
13356done
13357  done
13358IFS=$as_save_IFS
13359
13360  ;;
13361esac
13362fi
13363CPIO=$ac_cv_path_CPIO
13364if test -n "$CPIO"; then
13365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13366$as_echo "$CPIO" >&6; }
13367else
13368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13369$as_echo "no" >&6; }
13370fi
13371
13372
13373        if test "x$CPIO" = x; then
13374          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13375        fi
13376      else
13377        # Otherwise we believe it is a complete path. Use it as it is.
13378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13379$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13381$as_echo_n "checking for CPIO... " >&6; }
13382        if test ! -x "$tool_specified"; then
13383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13384$as_echo "not found" >&6; }
13385          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13386        fi
13387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13388$as_echo "$tool_specified" >&6; }
13389      fi
13390    fi
13391  fi
13392
13393
13394
13395
13396# Now we can determine OpenJDK build and target platforms. This is required to
13397# have early on.
13398# Make sure we can run config.sub.
13399$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13400  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13401
13402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13403$as_echo_n "checking build system type... " >&6; }
13404if ${ac_cv_build+:} false; then :
13405  $as_echo_n "(cached) " >&6
13406else
13407  ac_build_alias=$build_alias
13408test "x$ac_build_alias" = x &&
13409  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13410test "x$ac_build_alias" = x &&
13411  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13412ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13413  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13414
13415fi
13416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13417$as_echo "$ac_cv_build" >&6; }
13418case $ac_cv_build in
13419*-*-*) ;;
13420*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13421esac
13422build=$ac_cv_build
13423ac_save_IFS=$IFS; IFS='-'
13424set x $ac_cv_build
13425shift
13426build_cpu=$1
13427build_vendor=$2
13428shift; shift
13429# Remember, the first character of IFS is used to create $*,
13430# except with old shells:
13431build_os=$*
13432IFS=$ac_save_IFS
13433case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13434
13435
13436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13437$as_echo_n "checking host system type... " >&6; }
13438if ${ac_cv_host+:} false; then :
13439  $as_echo_n "(cached) " >&6
13440else
13441  if test "x$host_alias" = x; then
13442  ac_cv_host=$ac_cv_build
13443else
13444  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13445    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13446fi
13447
13448fi
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13450$as_echo "$ac_cv_host" >&6; }
13451case $ac_cv_host in
13452*-*-*) ;;
13453*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13454esac
13455host=$ac_cv_host
13456ac_save_IFS=$IFS; IFS='-'
13457set x $ac_cv_host
13458shift
13459host_cpu=$1
13460host_vendor=$2
13461shift; shift
13462# Remember, the first character of IFS is used to create $*,
13463# except with old shells:
13464host_os=$*
13465IFS=$ac_save_IFS
13466case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13467
13468
13469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13470$as_echo_n "checking target system type... " >&6; }
13471if ${ac_cv_target+:} false; then :
13472  $as_echo_n "(cached) " >&6
13473else
13474  if test "x$target_alias" = x; then
13475  ac_cv_target=$ac_cv_host
13476else
13477  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13478    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13479fi
13480
13481fi
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13483$as_echo "$ac_cv_target" >&6; }
13484case $ac_cv_target in
13485*-*-*) ;;
13486*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13487esac
13488target=$ac_cv_target
13489ac_save_IFS=$IFS; IFS='-'
13490set x $ac_cv_target
13491shift
13492target_cpu=$1
13493target_vendor=$2
13494shift; shift
13495# Remember, the first character of IFS is used to create $*,
13496# except with old shells:
13497target_os=$*
13498IFS=$ac_save_IFS
13499case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13500
13501
13502# The aliases save the names the user supplied, while $host etc.
13503# will get canonicalized.
13504test -n "$target_alias" &&
13505  test "$program_prefix$program_suffix$program_transform_name" = \
13506    NONENONEs,x,x, &&
13507  program_prefix=${target_alias}-
13508
13509  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13510  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13511  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13512  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13513  # to use the configure naming style.
13514
13515
13516
13517
13518
13519  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13520  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13521  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13522  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13523  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13524  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13525
13526
13527
13528  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13529
13530  case "$build_os" in
13531    *linux*)
13532      VAR_OS=linux
13533      VAR_OS_TYPE=unix
13534      ;;
13535    *solaris*)
13536      VAR_OS=solaris
13537      VAR_OS_TYPE=unix
13538      ;;
13539    *darwin*)
13540      VAR_OS=macosx
13541      VAR_OS_TYPE=unix
13542      ;;
13543    *bsd*)
13544      VAR_OS=bsd
13545      VAR_OS_TYPE=unix
13546      ;;
13547    *cygwin*)
13548      VAR_OS=windows
13549      VAR_OS_ENV=windows.cygwin
13550      ;;
13551    *mingw*)
13552      VAR_OS=windows
13553      VAR_OS_ENV=windows.msys
13554      ;;
13555    *aix*)
13556      VAR_OS=aix
13557      VAR_OS_TYPE=unix
13558      ;;
13559    *)
13560      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13561      ;;
13562  esac
13563
13564
13565  # First argument is the cpu name from the trip/quad
13566  case "$build_cpu" in
13567    x86_64)
13568      VAR_CPU=x86_64
13569      VAR_CPU_ARCH=x86
13570      VAR_CPU_BITS=64
13571      VAR_CPU_ENDIAN=little
13572      ;;
13573    i?86)
13574      VAR_CPU=x86
13575      VAR_CPU_ARCH=x86
13576      VAR_CPU_BITS=32
13577      VAR_CPU_ENDIAN=little
13578      ;;
13579    arm*)
13580      VAR_CPU=arm
13581      VAR_CPU_ARCH=arm
13582      VAR_CPU_BITS=32
13583      VAR_CPU_ENDIAN=little
13584      ;;
13585    powerpc)
13586      VAR_CPU=ppc
13587      VAR_CPU_ARCH=ppc
13588      VAR_CPU_BITS=32
13589      VAR_CPU_ENDIAN=big
13590      ;;
13591    powerpc64)
13592      VAR_CPU=ppc64
13593      VAR_CPU_ARCH=ppc
13594      VAR_CPU_BITS=64
13595      VAR_CPU_ENDIAN=big
13596      ;;
13597    powerpc64le)
13598      VAR_CPU=ppc64
13599      VAR_CPU_ARCH=ppc
13600      VAR_CPU_BITS=64
13601      VAR_CPU_ENDIAN=little
13602      ;;
13603    s390)
13604      VAR_CPU=s390
13605      VAR_CPU_ARCH=s390
13606      VAR_CPU_BITS=32
13607      VAR_CPU_ENDIAN=big
13608      ;;
13609    s390x)
13610      VAR_CPU=s390x
13611      VAR_CPU_ARCH=s390
13612      VAR_CPU_BITS=64
13613      VAR_CPU_ENDIAN=big
13614      ;;
13615    sparc)
13616      VAR_CPU=sparc
13617      VAR_CPU_ARCH=sparc
13618      VAR_CPU_BITS=32
13619      VAR_CPU_ENDIAN=big
13620      ;;
13621    sparcv9|sparc64)
13622      VAR_CPU=sparcv9
13623      VAR_CPU_ARCH=sparc
13624      VAR_CPU_BITS=64
13625      VAR_CPU_ENDIAN=big
13626      ;;
13627    *)
13628      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13629      ;;
13630  esac
13631
13632  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13633  OPENJDK_BUILD_OS="$VAR_OS"
13634  if test "x$VAR_OS_TYPE" != x; then
13635    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13636  else
13637    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13638  fi
13639  if test "x$VAR_OS_ENV" != x; then
13640    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13641  else
13642    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13643  fi
13644  OPENJDK_BUILD_CPU="$VAR_CPU"
13645  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13646  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13647  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13648
13649
13650
13651
13652
13653
13654
13655
13656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13657$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13659$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13660
13661  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13662
13663  case "$host_os" in
13664    *linux*)
13665      VAR_OS=linux
13666      VAR_OS_TYPE=unix
13667      ;;
13668    *solaris*)
13669      VAR_OS=solaris
13670      VAR_OS_TYPE=unix
13671      ;;
13672    *darwin*)
13673      VAR_OS=macosx
13674      VAR_OS_TYPE=unix
13675      ;;
13676    *bsd*)
13677      VAR_OS=bsd
13678      VAR_OS_TYPE=unix
13679      ;;
13680    *cygwin*)
13681      VAR_OS=windows
13682      VAR_OS_ENV=windows.cygwin
13683      ;;
13684    *mingw*)
13685      VAR_OS=windows
13686      VAR_OS_ENV=windows.msys
13687      ;;
13688    *aix*)
13689      VAR_OS=aix
13690      VAR_OS_TYPE=unix
13691      ;;
13692    *)
13693      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13694      ;;
13695  esac
13696
13697
13698  # First argument is the cpu name from the trip/quad
13699  case "$host_cpu" in
13700    x86_64)
13701      VAR_CPU=x86_64
13702      VAR_CPU_ARCH=x86
13703      VAR_CPU_BITS=64
13704      VAR_CPU_ENDIAN=little
13705      ;;
13706    i?86)
13707      VAR_CPU=x86
13708      VAR_CPU_ARCH=x86
13709      VAR_CPU_BITS=32
13710      VAR_CPU_ENDIAN=little
13711      ;;
13712    arm*)
13713      VAR_CPU=arm
13714      VAR_CPU_ARCH=arm
13715      VAR_CPU_BITS=32
13716      VAR_CPU_ENDIAN=little
13717      ;;
13718    powerpc)
13719      VAR_CPU=ppc
13720      VAR_CPU_ARCH=ppc
13721      VAR_CPU_BITS=32
13722      VAR_CPU_ENDIAN=big
13723      ;;
13724    powerpc64)
13725      VAR_CPU=ppc64
13726      VAR_CPU_ARCH=ppc
13727      VAR_CPU_BITS=64
13728      VAR_CPU_ENDIAN=big
13729      ;;
13730    powerpc64le)
13731      VAR_CPU=ppc64
13732      VAR_CPU_ARCH=ppc
13733      VAR_CPU_BITS=64
13734      VAR_CPU_ENDIAN=little
13735      ;;
13736    s390)
13737      VAR_CPU=s390
13738      VAR_CPU_ARCH=s390
13739      VAR_CPU_BITS=32
13740      VAR_CPU_ENDIAN=big
13741      ;;
13742    s390x)
13743      VAR_CPU=s390x
13744      VAR_CPU_ARCH=s390
13745      VAR_CPU_BITS=64
13746      VAR_CPU_ENDIAN=big
13747      ;;
13748    sparc)
13749      VAR_CPU=sparc
13750      VAR_CPU_ARCH=sparc
13751      VAR_CPU_BITS=32
13752      VAR_CPU_ENDIAN=big
13753      ;;
13754    sparcv9|sparc64)
13755      VAR_CPU=sparcv9
13756      VAR_CPU_ARCH=sparc
13757      VAR_CPU_BITS=64
13758      VAR_CPU_ENDIAN=big
13759      ;;
13760    *)
13761      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13762      ;;
13763  esac
13764
13765  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13766  OPENJDK_TARGET_OS="$VAR_OS"
13767  if test "x$VAR_OS_TYPE" != x; then
13768    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13769  else
13770    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13771  fi
13772  if test "x$VAR_OS_ENV" != x; then
13773    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13774  else
13775    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13776  fi
13777  OPENJDK_TARGET_CPU="$VAR_CPU"
13778  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13779  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13780  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13781
13782
13783
13784
13785
13786
13787
13788
13789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13790$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13792$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13793
13794
13795
13796# Check whether --with-target-bits was given.
13797if test "${with_target_bits+set}" = set; then :
13798  withval=$with_target_bits;
13799fi
13800
13801
13802  # We have three types of compiles:
13803  # native  == normal compilation, target system == build system
13804  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13805  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13806  #
13807  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13808    # We're doing a proper cross-compilation
13809    COMPILE_TYPE="cross"
13810  else
13811    COMPILE_TYPE="native"
13812  fi
13813
13814  if test "x$with_target_bits" != x; then
13815    if test "x$COMPILE_TYPE" = "xcross"; then
13816      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13817    fi
13818
13819    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13820      # A reduced build is requested
13821      COMPILE_TYPE="reduced"
13822      OPENJDK_TARGET_CPU_BITS=32
13823      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13824        OPENJDK_TARGET_CPU=x86
13825      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13826        OPENJDK_TARGET_CPU=sparc
13827      else
13828        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13829      fi
13830    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13831      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
13832    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13833      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13834$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13835    else
13836      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13837    fi
13838  fi
13839
13840
13841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13842$as_echo_n "checking compilation type... " >&6; }
13843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13844$as_echo "$COMPILE_TYPE" >&6; }
13845
13846
13847  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13848    REQUIRED_OS_NAME=SunOS
13849    REQUIRED_OS_VERSION=5.10
13850  fi
13851  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13852    REQUIRED_OS_NAME=Linux
13853    REQUIRED_OS_VERSION=2.6
13854  fi
13855  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13856    REQUIRED_OS_NAME=Windows
13857    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13858      REQUIRED_OS_VERSION=5.2
13859    else
13860      REQUIRED_OS_VERSION=5.1
13861    fi
13862  fi
13863  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13864    REQUIRED_OS_NAME=Darwin
13865    REQUIRED_OS_VERSION=11.2
13866  fi
13867
13868
13869
13870
13871
13872  # Also store the legacy naming of the cpu.
13873  # Ie i586 and amd64 instead of x86 and x86_64
13874  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13875  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13876    OPENJDK_TARGET_CPU_LEGACY="i586"
13877  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13878    # On all platforms except MacOSX replace x86_64 with amd64.
13879    OPENJDK_TARGET_CPU_LEGACY="amd64"
13880  fi
13881
13882
13883  # And the second legacy naming of the cpu.
13884  # Ie i386 and amd64 instead of x86 and x86_64.
13885  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13886  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13887    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13888  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13889    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13890  fi
13891
13892
13893  # This is the name of the cpu (but using i386 and amd64 instead of
13894  # x86 and x86_64, respectively), preceeded by a /, to be used when
13895  # locating libraries. On macosx, it's empty, though.
13896  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13897  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13898    OPENJDK_TARGET_CPU_LIBDIR=""
13899  fi
13900
13901
13902  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13903  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13904  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13905  OPENJDK_TARGET_CPU_ISADIR=""
13906  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13907    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13908      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13909    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13910      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13911    fi
13912  fi
13913
13914
13915  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13916  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13917  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13918    # On linux only, we replace x86 with i386.
13919    OPENJDK_TARGET_CPU_OSARCH="i386"
13920  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13921    # On all platforms except macosx, we replace x86_64 with amd64.
13922    OPENJDK_TARGET_CPU_OSARCH="amd64"
13923  fi
13924
13925
13926  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13927  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13928    OPENJDK_TARGET_CPU_JLI="i386"
13929  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13930    # On all platforms except macosx, we replace x86_64 with amd64.
13931    OPENJDK_TARGET_CPU_JLI="amd64"
13932  fi
13933  # Now setup the -D flags for building libjli.
13934  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13935  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13936    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13937      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13938    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13939      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13940    fi
13941  fi
13942
13943
13944  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13945      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13946  else
13947      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13948  fi
13949
13950
13951  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13952    A_LP64="LP64:="
13953    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13954    # unpack200.exe
13955    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13956      ADD_LP64="-D_LP64=1"
13957    fi
13958  fi
13959  LP64=$A_LP64
13960
13961
13962  if test "x$COMPILE_TYPE" = "xcross"; then
13963    # FIXME: ... or should this include reduced builds..?
13964    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13965  else
13966    DEFINE_CROSS_COMPILE_ARCH=""
13967  fi
13968
13969
13970  # ZERO_ARCHDEF is used to enable architecture-specific code
13971  case "${OPENJDK_TARGET_CPU}" in
13972    ppc)     ZERO_ARCHDEF=PPC32 ;;
13973    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13974    s390*)   ZERO_ARCHDEF=S390  ;;
13975    sparc*)  ZERO_ARCHDEF=SPARC ;;
13976    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13977    x86)     ZERO_ARCHDEF=IA32  ;;
13978    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13979  esac
13980
13981
13982
13983
13984# Continue setting up basic stuff. Most remaining code require fundamental tools.
13985
13986  # Save the current directory this script was started from
13987  CURDIR="$PWD"
13988
13989  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13990    PATH_SEP=";"
13991
13992  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13993  if test $SRC_ROOT_LENGTH -gt 100; then
13994    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13995  fi
13996
13997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13999$as_echo_n "checking cygwin release... " >&6; }
14000    CYGWIN_VERSION=`$UNAME -r`
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14002$as_echo "$CYGWIN_VERSION" >&6; }
14003    WINDOWS_ENV_VENDOR='cygwin'
14004    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14005
14006    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14007    if test "x$CYGWIN_VERSION_OK" = x; then
14008      { $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
14009$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;}
14010      as_fn_error $? "Cannot continue" "$LINENO" 5
14011    fi
14012    if test "x$CYGPATH" = x; then
14013      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14014    fi
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14016$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14017    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14018    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14019    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14020    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14022$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14023    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14024    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14025    if test "x$test_cygdrive_prefix" = x; then
14026      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14027    fi
14028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14030$as_echo_n "checking msys release... " >&6; }
14031    MSYS_VERSION=`$UNAME -r`
14032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14033$as_echo "$MSYS_VERSION" >&6; }
14034
14035    WINDOWS_ENV_VENDOR='msys'
14036    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14037
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14039$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14040    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14041    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14042
14043  windows_path="$MSYS_ROOT_PATH"
14044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14045    unix_path=`$CYGPATH -u "$windows_path"`
14046    MSYS_ROOT_PATH="$unix_path"
14047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14049    MSYS_ROOT_PATH="$unix_path"
14050  fi
14051
14052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14053$as_echo "$MSYS_ROOT_PATH" >&6; }
14054    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14055  else
14056    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14057  fi
14058
14059  # Test if windows or unix (cygwin/msys) find is first in path.
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14061$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14062  FIND_BINARY_OUTPUT=`find --version 2>&1`
14063  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14065$as_echo "unix style" >&6; }
14066  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14068$as_echo "Windows" >&6; }
14069    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14070$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14071    { $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
14072$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14073    as_fn_error $? "Cannot continue" "$LINENO" 5
14074  else
14075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14076$as_echo "unknown" >&6; }
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14078$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14079  fi
14080
14081  else
14082    PATH_SEP=":"
14083  fi
14084
14085
14086  # We get the top-level directory from the supporting wrappers.
14087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14088$as_echo_n "checking for top-level directory... " >&6; }
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14090$as_echo "$TOPDIR" >&6; }
14091
14092
14093  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14094
14095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14096
14097  # Input might be given as Windows format, start by converting to
14098  # unix format.
14099  path="$CURDIR"
14100  new_path=`$CYGPATH -u "$path"`
14101
14102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14105  # "foo.exe" is OK but "foo" is an error.
14106  #
14107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14108  # It is also a way to make sure we got the proper file name for the real test later on.
14109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14110  if test "x$test_shortpath" = x; then
14111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14112$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14113    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14114  fi
14115
14116  # Call helper function which possibly converts this using DOS-style short mode.
14117  # If so, the updated path is stored in $new_path.
14118
14119  input_path="$new_path"
14120  # Check if we need to convert this using DOS-style short mode. If the path
14121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14122  # take no chances and rewrite it.
14123  # Note: m4 eats our [], so we need to use [ and ] instead.
14124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14125  if test "x$has_forbidden_chars" != x; then
14126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14130      # Going to short mode and back again did indeed matter. Since short mode is
14131      # case insensitive, let's make it lowercase to improve readability.
14132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14133      # Now convert it back to Unix-stile (cygpath)
14134      input_path=`$CYGPATH -u "$shortmode_path"`
14135      new_path="$input_path"
14136    fi
14137  fi
14138
14139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14140  if test "x$test_cygdrive_prefix" = x; then
14141    # As a simple fix, exclude /usr/bin since it's not a real path.
14142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14144      # a path prefixed by /cygdrive for fixpath to work.
14145      new_path="$CYGWIN_ROOT_PATH$input_path"
14146    fi
14147  fi
14148
14149
14150  if test "x$path" != "x$new_path"; then
14151    CURDIR="$new_path"
14152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14153$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14154  fi
14155
14156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14157
14158  path="$CURDIR"
14159  has_colon=`$ECHO $path | $GREP ^.:`
14160  new_path="$path"
14161  if test "x$has_colon" = x; then
14162    # Not in mixed or Windows style, start by that.
14163    new_path=`cmd //c echo $path`
14164  fi
14165
14166
14167  input_path="$new_path"
14168  # Check if we need to convert this using DOS-style short mode. If the path
14169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14170  # take no chances and rewrite it.
14171  # Note: m4 eats our [], so we need to use [ and ] instead.
14172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14173  if test "x$has_forbidden_chars" != x; then
14174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14176  fi
14177
14178
14179  windows_path="$new_path"
14180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14181    unix_path=`$CYGPATH -u "$windows_path"`
14182    new_path="$unix_path"
14183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14185    new_path="$unix_path"
14186  fi
14187
14188  if test "x$path" != "x$new_path"; then
14189    CURDIR="$new_path"
14190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14191$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14192  fi
14193
14194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14196
14197  else
14198    # We're on a unix platform. Hooray! :)
14199    path="$CURDIR"
14200    has_space=`$ECHO "$path" | $GREP " "`
14201    if test "x$has_space" != x; then
14202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14203$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14204      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14205    fi
14206
14207    # Use eval to expand a potential ~
14208    eval path="$path"
14209    if test ! -f "$path" && test ! -d "$path"; then
14210      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14211    fi
14212
14213    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14214  fi
14215
14216
14217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14218
14219  # Input might be given as Windows format, start by converting to
14220  # unix format.
14221  path="$TOPDIR"
14222  new_path=`$CYGPATH -u "$path"`
14223
14224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14227  # "foo.exe" is OK but "foo" is an error.
14228  #
14229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14230  # It is also a way to make sure we got the proper file name for the real test later on.
14231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14232  if test "x$test_shortpath" = x; then
14233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14234$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14235    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14236  fi
14237
14238  # Call helper function which possibly converts this using DOS-style short mode.
14239  # If so, the updated path is stored in $new_path.
14240
14241  input_path="$new_path"
14242  # Check if we need to convert this using DOS-style short mode. If the path
14243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14244  # take no chances and rewrite it.
14245  # Note: m4 eats our [], so we need to use [ and ] instead.
14246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14247  if test "x$has_forbidden_chars" != x; then
14248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14252      # Going to short mode and back again did indeed matter. Since short mode is
14253      # case insensitive, let's make it lowercase to improve readability.
14254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14255      # Now convert it back to Unix-stile (cygpath)
14256      input_path=`$CYGPATH -u "$shortmode_path"`
14257      new_path="$input_path"
14258    fi
14259  fi
14260
14261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14262  if test "x$test_cygdrive_prefix" = x; then
14263    # As a simple fix, exclude /usr/bin since it's not a real path.
14264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14266      # a path prefixed by /cygdrive for fixpath to work.
14267      new_path="$CYGWIN_ROOT_PATH$input_path"
14268    fi
14269  fi
14270
14271
14272  if test "x$path" != "x$new_path"; then
14273    TOPDIR="$new_path"
14274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14275$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14276  fi
14277
14278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14279
14280  path="$TOPDIR"
14281  has_colon=`$ECHO $path | $GREP ^.:`
14282  new_path="$path"
14283  if test "x$has_colon" = x; then
14284    # Not in mixed or Windows style, start by that.
14285    new_path=`cmd //c echo $path`
14286  fi
14287
14288
14289  input_path="$new_path"
14290  # Check if we need to convert this using DOS-style short mode. If the path
14291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14292  # take no chances and rewrite it.
14293  # Note: m4 eats our [], so we need to use [ and ] instead.
14294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14295  if test "x$has_forbidden_chars" != x; then
14296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14298  fi
14299
14300
14301  windows_path="$new_path"
14302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14303    unix_path=`$CYGPATH -u "$windows_path"`
14304    new_path="$unix_path"
14305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14307    new_path="$unix_path"
14308  fi
14309
14310  if test "x$path" != "x$new_path"; then
14311    TOPDIR="$new_path"
14312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14313$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14314  fi
14315
14316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14318
14319  else
14320    # We're on a unix platform. Hooray! :)
14321    path="$TOPDIR"
14322    has_space=`$ECHO "$path" | $GREP " "`
14323    if test "x$has_space" != x; then
14324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14325$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14326      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14327    fi
14328
14329    # Use eval to expand a potential ~
14330    eval path="$path"
14331    if test ! -f "$path" && test ! -d "$path"; then
14332      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14333    fi
14334
14335    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14336  fi
14337
14338  # SRC_ROOT is a traditional alias for TOPDIR.
14339  SRC_ROOT=$TOPDIR
14340
14341  # Locate the directory of this script.
14342  AUTOCONF_DIR=$TOPDIR/common/autoconf
14343
14344
14345  # Setup default logging of stdout and stderr to build.log in the output root.
14346  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14347  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14348  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14349
14350
14351
14352
14353
14354# Check if it's a pure open build or if custom sources are to be used.
14355
14356  # Check whether --enable-openjdk-only was given.
14357if test "${enable_openjdk_only+set}" = set; then :
14358  enableval=$enable_openjdk_only;
14359else
14360  enable_openjdk_only="no"
14361fi
14362
14363
14364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14365$as_echo_n "checking for presence of closed sources... " >&6; }
14366  if test -d "$SRC_ROOT/jdk/src/closed"; then
14367    CLOSED_SOURCE_PRESENT=yes
14368  else
14369    CLOSED_SOURCE_PRESENT=no
14370  fi
14371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14372$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14373
14374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14375$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14376  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14378$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14379
14380  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14381    OPENJDK=true
14382    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14383      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14384$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14385    fi
14386  else
14387    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14388      OPENJDK=true
14389    else
14390      OPENJDK=false
14391    fi
14392  fi
14393
14394  if test "x$OPENJDK" = "xtrue"; then
14395    SET_OPENJDK="OPENJDK=true"
14396  fi
14397
14398
14399
14400  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14401  # the IncludeCustomExtension macro.
14402
14403
14404# Check whether --with-custom-make-dir was given.
14405if test "${with_custom_make_dir+set}" = set; then :
14406  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
14407$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14408fi
14409
14410
14411
14412
14413# These are needed to be able to create a configuration name (and thus the output directory)
14414
14415  ###############################################################################
14416  #
14417  # Check which variant of the JDK that we want to build.
14418  # Currently we have:
14419  #    normal:   standard edition
14420  # but the custom make system may add other variants
14421  #
14422  # Effectively the JDK variant gives a name to a specific set of
14423  # modules to compile into the JDK. In the future, these modules
14424  # might even be Jigsaw modules.
14425  #
14426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14427$as_echo_n "checking which variant of the JDK to build... " >&6; }
14428
14429# Check whether --with-jdk-variant was given.
14430if test "${with_jdk_variant+set}" = set; then :
14431  withval=$with_jdk_variant;
14432fi
14433
14434
14435  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14436    JDK_VARIANT="normal"
14437  else
14438    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14439  fi
14440
14441
14442
14443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14444$as_echo "$JDK_VARIANT" >&6; }
14445
14446
14447###############################################################################
14448#
14449# Check which interpreter of the JVM we want to build.
14450# Currently we have:
14451#    template: Template interpreter (the default)
14452#    cpp     : C++ interpreter
14453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14454$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14455
14456# Check whether --with-jvm-interpreter was given.
14457if test "${with_jvm_interpreter+set}" = set; then :
14458  withval=$with_jvm_interpreter;
14459fi
14460
14461
14462if test "x$with_jvm_interpreter" = x; then
14463     with_jvm_interpreter="template"
14464fi
14465
14466JVM_INTERPRETER="$with_jvm_interpreter"
14467
14468if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14469   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14470fi
14471
14472
14473
14474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14475$as_echo "$with_jvm_interpreter" >&6; }
14476
14477
14478
14479  ###############################################################################
14480  #
14481  # Check which variants of the JVM that we want to build.
14482  # Currently we have:
14483  #    server: normal interpreter and a tiered C1/C2 compiler
14484  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14485  #    minimal1: reduced form of client with optional VM services and features stripped out
14486  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14487  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14488  #    zero: no machine code interpreter, no compiler
14489  #    zeroshark: zero interpreter and shark/llvm compiler backend
14490#    core: interpreter only, no compiler (only works on some platforms)
14491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14492$as_echo_n "checking which variants of the JVM to build... " >&6; }
14493
14494# Check whether --with-jvm-variants was given.
14495if test "${with_jvm_variants+set}" = set; then :
14496  withval=$with_jvm_variants;
14497fi
14498
14499
14500  if test "x$with_jvm_variants" = x; then
14501    with_jvm_variants="server"
14502  fi
14503
14504  JVM_VARIANTS=",$with_jvm_variants,"
14505  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,//'`
14506
14507  if test "x$TEST_VARIANTS" != "x,"; then
14508     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14509  fi
14510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14511$as_echo "$with_jvm_variants" >&6; }
14512
14513  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14514  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14515  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14516  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14517  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14518  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14519  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14520
14521  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14522    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14523      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14524    fi
14525  fi
14526  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14527    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14528      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14529    fi
14530  fi
14531  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14532    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14533      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14534    fi
14535  fi
14536
14537  # Replace the commas with AND for use in the build directory name.
14538  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14539  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/'`
14540  if test "x$COUNT_VARIANTS" != "x,1"; then
14541    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14542  else
14543    BUILDING_MULTIPLE_JVM_VARIANTS=no
14544  fi
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555  INCLUDE_SA=true
14556  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14557    INCLUDE_SA=false
14558  fi
14559  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14560    INCLUDE_SA=false
14561  fi
14562  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14563    INCLUDE_SA=false
14564  fi
14565
14566
14567  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14568    MACOSX_UNIVERSAL="true"
14569  fi
14570
14571
14572
14573
14574  ###############################################################################
14575  #
14576  # Set the debug level
14577  #    release: no debug information, all optimizations, no asserts.
14578  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14579  #    fastdebug: debug information (-g), all optimizations, all asserts
14580  #    slowdebug: debug information (-g), no optimizations, all asserts
14581  #
14582  DEBUG_LEVEL="release"
14583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14584$as_echo_n "checking which debug level to use... " >&6; }
14585  # Check whether --enable-debug was given.
14586if test "${enable_debug+set}" = set; then :
14587  enableval=$enable_debug;
14588        ENABLE_DEBUG="${enableval}"
14589        DEBUG_LEVEL="fastdebug"
14590
14591else
14592  ENABLE_DEBUG="no"
14593fi
14594
14595
14596
14597# Check whether --with-debug-level was given.
14598if test "${with_debug_level+set}" = set; then :
14599  withval=$with_debug_level;
14600        DEBUG_LEVEL="${withval}"
14601        if test "x$ENABLE_DEBUG" = xyes; then
14602          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14603        fi
14604
14605fi
14606
14607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14608$as_echo "$DEBUG_LEVEL" >&6; }
14609
14610  if test "x$DEBUG_LEVEL" != xrelease && \
14611      test "x$DEBUG_LEVEL" != xoptimized && \
14612      test "x$DEBUG_LEVEL" != xfastdebug && \
14613      test "x$DEBUG_LEVEL" != xslowdebug; then
14614    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14615  fi
14616
14617
14618  ###############################################################################
14619  #
14620  # Setup legacy vars/targets and new vars to deal with different debug levels.
14621  #
14622
14623  case $DEBUG_LEVEL in
14624    release )
14625      VARIANT="OPT"
14626      FASTDEBUG="false"
14627      DEBUG_CLASSFILES="false"
14628      BUILD_VARIANT_RELEASE=""
14629      HOTSPOT_DEBUG_LEVEL="product"
14630      HOTSPOT_EXPORT="product"
14631      ;;
14632    fastdebug )
14633      VARIANT="DBG"
14634      FASTDEBUG="true"
14635      DEBUG_CLASSFILES="true"
14636      BUILD_VARIANT_RELEASE="-fastdebug"
14637      HOTSPOT_DEBUG_LEVEL="fastdebug"
14638      HOTSPOT_EXPORT="fastdebug"
14639      ;;
14640    slowdebug )
14641      VARIANT="DBG"
14642      FASTDEBUG="false"
14643      DEBUG_CLASSFILES="true"
14644      BUILD_VARIANT_RELEASE="-debug"
14645      HOTSPOT_DEBUG_LEVEL="debug"
14646      HOTSPOT_EXPORT="debug"
14647      ;;
14648    optimized )
14649      VARIANT="OPT"
14650      FASTDEBUG="false"
14651      DEBUG_CLASSFILES="false"
14652      BUILD_VARIANT_RELEASE="-optimized"
14653      HOTSPOT_DEBUG_LEVEL="optimized"
14654      HOTSPOT_EXPORT="optimized"
14655      ;;
14656  esac
14657
14658  # The debug level 'optimized' is a little special because it is currently only
14659  # applicable to the HotSpot build where it means to build a completely
14660  # optimized version of the VM without any debugging code (like for the
14661  # 'release' debug level which is called 'product' in the HotSpot build) but
14662  # with the exception that it can contain additional code which is otherwise
14663  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14664  # test new and/or experimental features which are not intended for customer
14665  # shipment. Because these new features need to be tested and benchmarked in
14666  # real world scenarios, we want to build the containing JDK at the 'release'
14667  # debug level.
14668  if test "x$DEBUG_LEVEL" = xoptimized; then
14669    DEBUG_LEVEL="release"
14670  fi
14671
14672  #####
14673  # Generate the legacy makefile targets for hotspot.
14674  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14675  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14676  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14677  # But until then ...
14678  HOTSPOT_TARGET=""
14679
14680  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14681    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14682  fi
14683
14684  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14685    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14686  fi
14687
14688  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14689    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14690  fi
14691
14692  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14693    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14694  fi
14695
14696  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14697    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14698  fi
14699
14700  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14701    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14702  fi
14703
14704  if test "x$JVM_VARIANT_CORE" = xtrue; then
14705    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14706  fi
14707
14708  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14709
14710  # On Macosx universal binaries are produced, but they only contain
14711  # 64 bit intel. This invalidates control of which jvms are built
14712  # from configure, but only server is valid anyway. Fix this
14713  # when hotspot makefiles are rewritten.
14714  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14715    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14716  fi
14717
14718  #####
14719
14720
14721
14722
14723
14724
14725
14726
14727# With basic setup done, call the custom early hook.
14728
14729
14730# Check if we have devkits, extra paths or sysroot set.
14731
14732
14733# Check whether --with-devkit was given.
14734if test "${with_devkit+set}" = set; then :
14735  withval=$with_devkit;
14736
14737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14738
14739  # Input might be given as Windows format, start by converting to
14740  # unix format.
14741  path="$with_devkit"
14742  new_path=`$CYGPATH -u "$path"`
14743
14744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14747  # "foo.exe" is OK but "foo" is an error.
14748  #
14749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14750  # It is also a way to make sure we got the proper file name for the real test later on.
14751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14752  if test "x$test_shortpath" = x; then
14753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14754$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14755    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14756  fi
14757
14758  # Call helper function which possibly converts this using DOS-style short mode.
14759  # If so, the updated path is stored in $new_path.
14760
14761  input_path="$new_path"
14762  # Check if we need to convert this using DOS-style short mode. If the path
14763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14764  # take no chances and rewrite it.
14765  # Note: m4 eats our [], so we need to use [ and ] instead.
14766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14767  if test "x$has_forbidden_chars" != x; then
14768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14772      # Going to short mode and back again did indeed matter. Since short mode is
14773      # case insensitive, let's make it lowercase to improve readability.
14774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14775      # Now convert it back to Unix-stile (cygpath)
14776      input_path=`$CYGPATH -u "$shortmode_path"`
14777      new_path="$input_path"
14778    fi
14779  fi
14780
14781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14782  if test "x$test_cygdrive_prefix" = x; then
14783    # As a simple fix, exclude /usr/bin since it's not a real path.
14784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14786      # a path prefixed by /cygdrive for fixpath to work.
14787      new_path="$CYGWIN_ROOT_PATH$input_path"
14788    fi
14789  fi
14790
14791
14792  if test "x$path" != "x$new_path"; then
14793    with_devkit="$new_path"
14794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14795$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14796  fi
14797
14798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14799
14800  path="$with_devkit"
14801  has_colon=`$ECHO $path | $GREP ^.:`
14802  new_path="$path"
14803  if test "x$has_colon" = x; then
14804    # Not in mixed or Windows style, start by that.
14805    new_path=`cmd //c echo $path`
14806  fi
14807
14808
14809  input_path="$new_path"
14810  # Check if we need to convert this using DOS-style short mode. If the path
14811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14812  # take no chances and rewrite it.
14813  # Note: m4 eats our [], so we need to use [ and ] instead.
14814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14815  if test "x$has_forbidden_chars" != x; then
14816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14818  fi
14819
14820
14821  windows_path="$new_path"
14822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14823    unix_path=`$CYGPATH -u "$windows_path"`
14824    new_path="$unix_path"
14825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14827    new_path="$unix_path"
14828  fi
14829
14830  if test "x$path" != "x$new_path"; then
14831    with_devkit="$new_path"
14832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14833$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14834  fi
14835
14836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14838
14839  else
14840    # We're on a unix platform. Hooray! :)
14841    path="$with_devkit"
14842    has_space=`$ECHO "$path" | $GREP " "`
14843    if test "x$has_space" != x; then
14844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14845$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14846      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14847    fi
14848
14849    # Use eval to expand a potential ~
14850    eval path="$path"
14851    if test ! -f "$path" && test ! -d "$path"; then
14852      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14853    fi
14854
14855    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14856  fi
14857
14858        DEVKIT_ROOT="$with_devkit"
14859        # Check for a meta data info file in the root of the devkit
14860        if test -f "$DEVKIT_ROOT/devkit.info"; then
14861          # This potentially sets the following:
14862          # DEVKIT_NAME: A descriptive name of the devkit
14863          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14864          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14865          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14866          . $DEVKIT_ROOT/devkit.info
14867        fi
14868
14869        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14870$as_echo_n "checking for devkit... " >&6; }
14871        if test "x$DEVKIT_NAME" != x; then
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14873$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14874        else
14875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14876$as_echo "$DEVKIT_ROOT" >&6; }
14877        fi
14878
14879        if test "x$DEVKIT_EXTRA_PATH" != x; then
14880
14881  if test "x$DEVKIT_EXTRA_PATH" != x; then
14882    if test "x$EXTRA_PATH" = x; then
14883      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14884    else
14885      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14886    fi
14887  fi
14888
14889        fi
14890
14891        # Fallback default of just /bin if DEVKIT_PATH is not defined
14892        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14893          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14894        fi
14895
14896  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14897    if test "x$TOOLCHAIN_PATH" = x; then
14898      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14899    else
14900      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14901    fi
14902  fi
14903
14904
14905        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14906        # places for backwards compatiblity.
14907        if test "x$DEVKIT_SYSROOT" != x; then
14908          SYSROOT="$DEVKIT_SYSROOT"
14909        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14910          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14911        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14912          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14913        fi
14914
14915
14916fi
14917
14918
14919  # You can force the sysroot if the sysroot encoded into the compiler tools
14920  # is not correct.
14921
14922# Check whether --with-sys-root was given.
14923if test "${with_sys_root+set}" = set; then :
14924  withval=$with_sys_root; SYSROOT=$with_sys_root
14925
14926fi
14927
14928
14929
14930# Check whether --with-sysroot was given.
14931if test "${with_sysroot+set}" = set; then :
14932  withval=$with_sysroot; SYSROOT=$with_sysroot
14933
14934fi
14935
14936
14937
14938# Check whether --with-tools-dir was given.
14939if test "${with_tools_dir+set}" = set; then :
14940  withval=$with_tools_dir;
14941  if test "x$with_tools_dir" != x; then
14942    if test "x$TOOLCHAIN_PATH" = x; then
14943      TOOLCHAIN_PATH="$with_tools_dir"
14944    else
14945      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14946    fi
14947  fi
14948
14949
14950fi
14951
14952
14953
14954# Check whether --with-toolchain-path was given.
14955if test "${with_toolchain_path+set}" = set; then :
14956  withval=$with_toolchain_path;
14957  if test "x$with_toolchain_path" != x; then
14958    if test "x$TOOLCHAIN_PATH" = x; then
14959      TOOLCHAIN_PATH="$with_toolchain_path"
14960    else
14961      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14962    fi
14963  fi
14964
14965
14966fi
14967
14968
14969
14970# Check whether --with-extra-path was given.
14971if test "${with_extra_path+set}" = set; then :
14972  withval=$with_extra_path;
14973  if test "x$with_extra_path" != x; then
14974    if test "x$EXTRA_PATH" = x; then
14975      EXTRA_PATH="$with_extra_path"
14976    else
14977      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14978    fi
14979  fi
14980
14981
14982fi
14983
14984
14985  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14986    # detect if Xcode is installed by running xcodebuild -version
14987    # if no Xcode installed, xcodebuild exits with 1
14988    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14989    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14990      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14991      # fall back on the stub binary in /usr/bin/xcodebuild
14992      # Extract the first word of "xcodebuild", so it can be a program name with args.
14993set dummy xcodebuild; ac_word=$2
14994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14995$as_echo_n "checking for $ac_word... " >&6; }
14996if ${ac_cv_path_XCODEBUILD+:} false; then :
14997  $as_echo_n "(cached) " >&6
14998else
14999  case $XCODEBUILD in
15000  [\\/]* | ?:[\\/]*)
15001  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15002  ;;
15003  *)
15004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15005for as_dir in $TOOLCHAIN_PATH
15006do
15007  IFS=$as_save_IFS
15008  test -z "$as_dir" && as_dir=.
15009    for ac_exec_ext in '' $ac_executable_extensions; do
15010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15011    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15013    break 2
15014  fi
15015done
15016  done
15017IFS=$as_save_IFS
15018
15019  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15020  ;;
15021esac
15022fi
15023XCODEBUILD=$ac_cv_path_XCODEBUILD
15024if test -n "$XCODEBUILD"; then
15025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15026$as_echo "$XCODEBUILD" >&6; }
15027else
15028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15029$as_echo "no" >&6; }
15030fi
15031
15032
15033    else
15034      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15035      # when only the command line tools are installed there are no SDKs, so headers
15036      # are copied into the system frameworks
15037      XCODEBUILD=
15038
15039    fi
15040
15041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15042$as_echo_n "checking for sdk name... " >&6; }
15043
15044# Check whether --with-sdk-name was given.
15045if test "${with_sdk_name+set}" = set; then :
15046  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15047
15048fi
15049
15050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15051$as_echo "$SDKNAME" >&6; }
15052
15053    # if toolchain path is specified then don't rely on system headers, they may not compile
15054    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15055    test -z "$TOOLCHAIN_PATH" && \
15056      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15057
15058    if test -z "$SYSROOT"; then
15059      if test -n "$XCODEBUILD"; then
15060        # if we don't have system headers, use default SDK name (last resort)
15061        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15062          SDKNAME=${SDKNAME:-macosx}
15063        fi
15064
15065        if test -n "$SDKNAME"; then
15066          # Call xcodebuild to determine SYSROOT
15067          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15068        fi
15069      else
15070        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15071          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
15072        fi
15073      fi
15074    else
15075      # warn user if --with-sdk-name was also set
15076      if test -n "$with_sdk_name"; then
15077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15078$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15079      fi
15080    fi
15081
15082    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15083      # If no system framework headers, then SYSROOT must be set, or we won't build
15084      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
15085    fi
15086
15087    # Perform a basic sanity test
15088    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15089      if test -z "$SYSROOT"; then
15090        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
15091      else
15092        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15093      fi
15094    fi
15095
15096    # set SDKROOT too, Xcode tools will pick it up
15097    SDKROOT=$SYSROOT
15098
15099  fi
15100
15101  # Prepend the extra path to the global path
15102
15103  if test "x$EXTRA_PATH" != x; then
15104    if test "x$PATH" = x; then
15105      PATH="$EXTRA_PATH"
15106    else
15107      PATH="$EXTRA_PATH:$PATH"
15108    fi
15109  fi
15110
15111
15112  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15113    # Add extra search paths on solaris for utilities like ar and as etc...
15114    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15115  fi
15116
15117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15118$as_echo_n "checking for sysroot... " >&6; }
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15120$as_echo "$SYSROOT" >&6; }
15121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15122$as_echo_n "checking for toolchain path... " >&6; }
15123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15124$as_echo "$TOOLCHAIN_PATH" >&6; }
15125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15126$as_echo_n "checking for extra path... " >&6; }
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15128$as_echo "$EXTRA_PATH" >&6; }
15129
15130
15131# To properly create a configuration name, we need to have the OpenJDK target
15132# and options (variants and debug level) parsed.
15133
15134
15135
15136# Check whether --with-conf-name was given.
15137if test "${with_conf_name+set}" = set; then :
15138  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15139fi
15140
15141
15142  # Test from where we are running configure, in or outside of src root.
15143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15144$as_echo_n "checking where to store configuration... " >&6; }
15145  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15146      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15147      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15148    # We are running configure from the src root.
15149    # Create a default ./build/target-variant-debuglevel output root.
15150    if test "x${CONF_NAME}" = x; then
15151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15152$as_echo "in default location" >&6; }
15153      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15154    else
15155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15156$as_echo "in build directory with custom name" >&6; }
15157    fi
15158    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15159    $MKDIR -p "$OUTPUT_ROOT"
15160    if test ! -d "$OUTPUT_ROOT"; then
15161      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15162    fi
15163  else
15164    # We are running configure from outside of the src dir.
15165    # Then use the current directory as output dir!
15166    # If configuration is situated in normal build directory, just use the build
15167    # directory name as configuration name, otherwise use the complete path.
15168    if test "x${CONF_NAME}" = x; then
15169      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15170    fi
15171    OUTPUT_ROOT="$CURDIR"
15172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15173$as_echo "in current directory" >&6; }
15174
15175    # WARNING: This might be a bad thing to do. You need to be sure you want to
15176    # have a configuration in this directory. Do some sanity checks!
15177
15178    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15179      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15180      # other files
15181      files_present=`$LS $OUTPUT_ROOT`
15182      # Configure has already touched config.log and confdefs.h in the current dir when this check
15183      # is performed.
15184      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15185      | $TR -d '\n'`
15186      if test "x$filtered_files" != x; then
15187        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15188$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15189        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15190$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15191        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15192$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15193        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15194$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15195        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15196$as_echo "$as_me: seriously mess up just about everything." >&6;}
15197        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15198$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15199        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15200$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15201        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15202      fi
15203    fi
15204  fi
15205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15206$as_echo_n "checking what configuration name to use... " >&6; }
15207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15208$as_echo "$CONF_NAME" >&6; }
15209
15210
15211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15212
15213  # Input might be given as Windows format, start by converting to
15214  # unix format.
15215  path="$OUTPUT_ROOT"
15216  new_path=`$CYGPATH -u "$path"`
15217
15218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15221  # "foo.exe" is OK but "foo" is an error.
15222  #
15223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15224  # It is also a way to make sure we got the proper file name for the real test later on.
15225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15226  if test "x$test_shortpath" = x; then
15227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15228$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15229    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15230  fi
15231
15232  # Call helper function which possibly converts this using DOS-style short mode.
15233  # If so, the updated path is stored in $new_path.
15234
15235  input_path="$new_path"
15236  # Check if we need to convert this using DOS-style short mode. If the path
15237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15238  # take no chances and rewrite it.
15239  # Note: m4 eats our [], so we need to use [ and ] instead.
15240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15241  if test "x$has_forbidden_chars" != x; then
15242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15246      # Going to short mode and back again did indeed matter. Since short mode is
15247      # case insensitive, let's make it lowercase to improve readability.
15248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15249      # Now convert it back to Unix-stile (cygpath)
15250      input_path=`$CYGPATH -u "$shortmode_path"`
15251      new_path="$input_path"
15252    fi
15253  fi
15254
15255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15256  if test "x$test_cygdrive_prefix" = x; then
15257    # As a simple fix, exclude /usr/bin since it's not a real path.
15258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15260      # a path prefixed by /cygdrive for fixpath to work.
15261      new_path="$CYGWIN_ROOT_PATH$input_path"
15262    fi
15263  fi
15264
15265
15266  if test "x$path" != "x$new_path"; then
15267    OUTPUT_ROOT="$new_path"
15268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15269$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15270  fi
15271
15272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15273
15274  path="$OUTPUT_ROOT"
15275  has_colon=`$ECHO $path | $GREP ^.:`
15276  new_path="$path"
15277  if test "x$has_colon" = x; then
15278    # Not in mixed or Windows style, start by that.
15279    new_path=`cmd //c echo $path`
15280  fi
15281
15282
15283  input_path="$new_path"
15284  # Check if we need to convert this using DOS-style short mode. If the path
15285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15286  # take no chances and rewrite it.
15287  # Note: m4 eats our [], so we need to use [ and ] instead.
15288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15289  if test "x$has_forbidden_chars" != x; then
15290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15292  fi
15293
15294
15295  windows_path="$new_path"
15296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15297    unix_path=`$CYGPATH -u "$windows_path"`
15298    new_path="$unix_path"
15299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15301    new_path="$unix_path"
15302  fi
15303
15304  if test "x$path" != "x$new_path"; then
15305    OUTPUT_ROOT="$new_path"
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15307$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15308  fi
15309
15310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15312
15313  else
15314    # We're on a unix platform. Hooray! :)
15315    path="$OUTPUT_ROOT"
15316    has_space=`$ECHO "$path" | $GREP " "`
15317    if test "x$has_space" != x; then
15318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15319$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15320      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15321    fi
15322
15323    # Use eval to expand a potential ~
15324    eval path="$path"
15325    if test ! -f "$path" && test ! -d "$path"; then
15326      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15327    fi
15328
15329    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15330  fi
15331
15332
15333  SPEC=$OUTPUT_ROOT/spec.gmk
15334
15335  CONF_NAME=$CONF_NAME
15336
15337  OUTPUT_ROOT=$OUTPUT_ROOT
15338
15339
15340  # The spec.gmk file contains all variables for the make system.
15341  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15342
15343  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15344  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15345
15346  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15347  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15348
15349  # The compare.sh is used to compare the build output to other builds.
15350  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15351
15352  # The generated Makefile knows where the spec.gmk is and where the source is.
15353  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15354  # which will look for generated configurations
15355  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15356
15357
15358
15359# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15360
15361  for ac_prog in apt-get yum port pkgutil pkgadd
15362do
15363  # Extract the first word of "$ac_prog", so it can be a program name with args.
15364set dummy $ac_prog; ac_word=$2
15365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15366$as_echo_n "checking for $ac_word... " >&6; }
15367if ${ac_cv_prog_PKGHANDLER+:} false; then :
15368  $as_echo_n "(cached) " >&6
15369else
15370  if test -n "$PKGHANDLER"; then
15371  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15372else
15373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15374for as_dir in $PATH
15375do
15376  IFS=$as_save_IFS
15377  test -z "$as_dir" && as_dir=.
15378    for ac_exec_ext in '' $ac_executable_extensions; do
15379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15380    ac_cv_prog_PKGHANDLER="$ac_prog"
15381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15382    break 2
15383  fi
15384done
15385  done
15386IFS=$as_save_IFS
15387
15388fi
15389fi
15390PKGHANDLER=$ac_cv_prog_PKGHANDLER
15391if test -n "$PKGHANDLER"; then
15392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15393$as_echo "$PKGHANDLER" >&6; }
15394else
15395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15396$as_echo "no" >&6; }
15397fi
15398
15399
15400  test -n "$PKGHANDLER" && break
15401done
15402
15403
15404
15405# Setup tools that requires more complex handling, or that is not needed by the configure script.
15406
15407
15408  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15409  if test "x$MAKE" != x; then
15410    # User has supplied a make, test it.
15411    if test ! -f "$MAKE"; then
15412      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15413    fi
15414
15415  MAKE_CANDIDATE=""$MAKE""
15416  DESCRIPTION="user supplied MAKE=$MAKE"
15417  if test "x$MAKE_CANDIDATE" != x; then
15418    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15419$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15420    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15421    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15422    if test "x$IS_GNU_MAKE" = x; then
15423      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15424$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15425    else
15426      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15427      if test "x$IS_MODERN_MAKE" = x; then
15428        { $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
15429$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;}
15430      else
15431        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15432          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15433            MAKE_EXPECTED_ENV='cygwin'
15434          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15435            MAKE_EXPECTED_ENV='msys'
15436          else
15437            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15438          fi
15439          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15440          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15441        else
15442          # Not relevant for non-Windows
15443          IS_MAKE_CORRECT_ENV=true
15444        fi
15445        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15446          { $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
15447$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;}
15448        else
15449          FOUND_MAKE=$MAKE_CANDIDATE
15450
15451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15452
15453  # First separate the path from the arguments. This will split at the first
15454  # space.
15455  complete="$FOUND_MAKE"
15456  path="${complete%% *}"
15457  tmp="$complete EOL"
15458  arguments="${tmp#* }"
15459
15460  # Input might be given as Windows format, start by converting to
15461  # unix format.
15462  new_path=`$CYGPATH -u "$path"`
15463
15464  # Now try to locate executable using which
15465  new_path=`$WHICH "$new_path" 2> /dev/null`
15466  # bat and cmd files are not always considered executable in cygwin causing which
15467  # to not find them
15468  if test "x$new_path" = x \
15469      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15470      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15471    new_path=`$CYGPATH -u "$path"`
15472  fi
15473  if test "x$new_path" = x; then
15474    # Oops. Which didn't find the executable.
15475    # The splitting of arguments from the executable at a space might have been incorrect,
15476    # since paths with space are more likely in Windows. Give it another try with the whole
15477    # argument.
15478    path="$complete"
15479    arguments="EOL"
15480    new_path=`$CYGPATH -u "$path"`
15481    new_path=`$WHICH "$new_path" 2> /dev/null`
15482    # bat and cmd files are not always considered executable in cygwin causing which
15483    # to not find them
15484    if test "x$new_path" = x \
15485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15487      new_path=`$CYGPATH -u "$path"`
15488    fi
15489    if test "x$new_path" = x; then
15490      # It's still not found. Now this is an unrecoverable error.
15491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15492$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15493      has_space=`$ECHO "$complete" | $GREP " "`
15494      if test "x$has_space" != x; then
15495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15497      fi
15498      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15499    fi
15500  fi
15501
15502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15505  # "foo.exe" is OK but "foo" is an error.
15506  #
15507  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15508  # It is also a way to make sure we got the proper file name for the real test later on.
15509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15510  if test "x$test_shortpath" = x; then
15511    # Short path failed, file does not exist as specified.
15512    # Try adding .exe or .cmd
15513    if test -f "${new_path}.exe"; then
15514      input_to_shortpath="${new_path}.exe"
15515    elif test -f "${new_path}.cmd"; then
15516      input_to_shortpath="${new_path}.cmd"
15517    else
15518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15519$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15520      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15521$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15522      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15523    fi
15524  else
15525    input_to_shortpath="$new_path"
15526  fi
15527
15528  # Call helper function which possibly converts this using DOS-style short mode.
15529  # If so, the updated path is stored in $new_path.
15530  new_path="$input_to_shortpath"
15531
15532  input_path="$input_to_shortpath"
15533  # Check if we need to convert this using DOS-style short mode. If the path
15534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15535  # take no chances and rewrite it.
15536  # Note: m4 eats our [], so we need to use [ and ] instead.
15537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15538  if test "x$has_forbidden_chars" != x; then
15539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15543      # Going to short mode and back again did indeed matter. Since short mode is
15544      # case insensitive, let's make it lowercase to improve readability.
15545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15546      # Now convert it back to Unix-stile (cygpath)
15547      input_path=`$CYGPATH -u "$shortmode_path"`
15548      new_path="$input_path"
15549    fi
15550  fi
15551
15552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15553  if test "x$test_cygdrive_prefix" = x; then
15554    # As a simple fix, exclude /usr/bin since it's not a real path.
15555    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15557      # a path prefixed by /cygdrive for fixpath to work.
15558      new_path="$CYGWIN_ROOT_PATH$input_path"
15559    fi
15560  fi
15561
15562  # remove trailing .exe if any
15563  new_path="${new_path/%.exe/}"
15564
15565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15566
15567  # First separate the path from the arguments. This will split at the first
15568  # space.
15569  complete="$FOUND_MAKE"
15570  path="${complete%% *}"
15571  tmp="$complete EOL"
15572  arguments="${tmp#* }"
15573
15574  # Input might be given as Windows format, start by converting to
15575  # unix format.
15576  new_path="$path"
15577
15578  windows_path="$new_path"
15579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15580    unix_path=`$CYGPATH -u "$windows_path"`
15581    new_path="$unix_path"
15582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15584    new_path="$unix_path"
15585  fi
15586
15587
15588  # Now try to locate executable using which
15589  new_path=`$WHICH "$new_path" 2> /dev/null`
15590
15591  if test "x$new_path" = x; then
15592    # Oops. Which didn't find the executable.
15593    # The splitting of arguments from the executable at a space might have been incorrect,
15594    # since paths with space are more likely in Windows. Give it another try with the whole
15595    # argument.
15596    path="$complete"
15597    arguments="EOL"
15598    new_path="$path"
15599
15600  windows_path="$new_path"
15601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15602    unix_path=`$CYGPATH -u "$windows_path"`
15603    new_path="$unix_path"
15604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15606    new_path="$unix_path"
15607  fi
15608
15609
15610    new_path=`$WHICH "$new_path" 2> /dev/null`
15611    # bat and cmd files are not always considered executable in MSYS causing which
15612    # to not find them
15613    if test "x$new_path" = x \
15614        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15615        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15616      new_path="$path"
15617
15618  windows_path="$new_path"
15619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15620    unix_path=`$CYGPATH -u "$windows_path"`
15621    new_path="$unix_path"
15622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15624    new_path="$unix_path"
15625  fi
15626
15627    fi
15628
15629    if test "x$new_path" = x; then
15630      # It's still not found. Now this is an unrecoverable error.
15631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15632$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15633      has_space=`$ECHO "$complete" | $GREP " "`
15634      if test "x$has_space" != x; then
15635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15637      fi
15638      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15639    fi
15640  fi
15641
15642  # Now new_path has a complete unix path to the binary
15643  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15644    # Keep paths in /bin as-is, but remove trailing .exe if any
15645    new_path="${new_path/%.exe/}"
15646    # Do not save /bin paths to all_fixpath_prefixes!
15647  else
15648    # Not in mixed or Windows style, start by that.
15649    new_path=`cmd //c echo $new_path`
15650
15651  input_path="$new_path"
15652  # Check if we need to convert this using DOS-style short mode. If the path
15653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15654  # take no chances and rewrite it.
15655  # Note: m4 eats our [], so we need to use [ and ] instead.
15656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15657  if test "x$has_forbidden_chars" != x; then
15658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15660  fi
15661
15662    # Output is in $new_path
15663
15664  windows_path="$new_path"
15665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15666    unix_path=`$CYGPATH -u "$windows_path"`
15667    new_path="$unix_path"
15668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15670    new_path="$unix_path"
15671  fi
15672
15673    # remove trailing .exe if any
15674    new_path="${new_path/%.exe/}"
15675
15676    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15677    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15678  fi
15679
15680  else
15681    # We're on a unix platform. Hooray! :)
15682    # First separate the path from the arguments. This will split at the first
15683    # space.
15684    complete="$FOUND_MAKE"
15685    path="${complete%% *}"
15686    tmp="$complete EOL"
15687    arguments="${tmp#* }"
15688
15689    # Cannot rely on the command "which" here since it doesn't always work.
15690    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15691    if test -z "$is_absolute_path"; then
15692      # Path to executable is not absolute. Find it.
15693      IFS_save="$IFS"
15694      IFS=:
15695      for p in $PATH; do
15696        if test -f "$p/$path" && test -x "$p/$path"; then
15697          new_path="$p/$path"
15698          break
15699        fi
15700      done
15701      IFS="$IFS_save"
15702    else
15703      # This is an absolute path, we can use it without further modifications.
15704      new_path="$path"
15705    fi
15706
15707    if test "x$new_path" = x; then
15708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15709$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15710      has_space=`$ECHO "$complete" | $GREP " "`
15711      if test "x$has_space" != x; then
15712        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15713$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15714      fi
15715      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15716    fi
15717  fi
15718
15719  # Now join together the path and the arguments once again
15720  if test "x$arguments" != xEOL; then
15721    new_complete="$new_path ${arguments% *}"
15722  else
15723    new_complete="$new_path"
15724  fi
15725
15726  if test "x$complete" != "x$new_complete"; then
15727    FOUND_MAKE="$new_complete"
15728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15729$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15730  fi
15731
15732        fi
15733      fi
15734    fi
15735  fi
15736
15737    if test "x$FOUND_MAKE" = x; then
15738      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15739    fi
15740  else
15741    # Try our hardest to locate a correct version of GNU make
15742    for ac_prog in gmake
15743do
15744  # Extract the first word of "$ac_prog", so it can be a program name with args.
15745set dummy $ac_prog; ac_word=$2
15746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15747$as_echo_n "checking for $ac_word... " >&6; }
15748if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15749  $as_echo_n "(cached) " >&6
15750else
15751  case $CHECK_GMAKE in
15752  [\\/]* | ?:[\\/]*)
15753  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15754  ;;
15755  *)
15756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15757for as_dir in $PATH
15758do
15759  IFS=$as_save_IFS
15760  test -z "$as_dir" && as_dir=.
15761    for ac_exec_ext in '' $ac_executable_extensions; do
15762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15763    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15765    break 2
15766  fi
15767done
15768  done
15769IFS=$as_save_IFS
15770
15771  ;;
15772esac
15773fi
15774CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15775if test -n "$CHECK_GMAKE"; then
15776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15777$as_echo "$CHECK_GMAKE" >&6; }
15778else
15779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15780$as_echo "no" >&6; }
15781fi
15782
15783
15784  test -n "$CHECK_GMAKE" && break
15785done
15786
15787
15788  MAKE_CANDIDATE=""$CHECK_GMAKE""
15789  DESCRIPTION="gmake in PATH"
15790  if test "x$MAKE_CANDIDATE" != x; then
15791    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15792$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15793    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15794    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15795    if test "x$IS_GNU_MAKE" = x; then
15796      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15797$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15798    else
15799      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15800      if test "x$IS_MODERN_MAKE" = x; then
15801        { $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
15802$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;}
15803      else
15804        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15805          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15806            MAKE_EXPECTED_ENV='cygwin'
15807          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15808            MAKE_EXPECTED_ENV='msys'
15809          else
15810            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15811          fi
15812          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15813          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15814        else
15815          # Not relevant for non-Windows
15816          IS_MAKE_CORRECT_ENV=true
15817        fi
15818        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15819          { $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
15820$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;}
15821        else
15822          FOUND_MAKE=$MAKE_CANDIDATE
15823
15824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15825
15826  # First separate the path from the arguments. This will split at the first
15827  # space.
15828  complete="$FOUND_MAKE"
15829  path="${complete%% *}"
15830  tmp="$complete EOL"
15831  arguments="${tmp#* }"
15832
15833  # Input might be given as Windows format, start by converting to
15834  # unix format.
15835  new_path=`$CYGPATH -u "$path"`
15836
15837  # Now try to locate executable using which
15838  new_path=`$WHICH "$new_path" 2> /dev/null`
15839  # bat and cmd files are not always considered executable in cygwin causing which
15840  # to not find them
15841  if test "x$new_path" = x \
15842      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15843      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15844    new_path=`$CYGPATH -u "$path"`
15845  fi
15846  if test "x$new_path" = x; then
15847    # Oops. Which didn't find the executable.
15848    # The splitting of arguments from the executable at a space might have been incorrect,
15849    # since paths with space are more likely in Windows. Give it another try with the whole
15850    # argument.
15851    path="$complete"
15852    arguments="EOL"
15853    new_path=`$CYGPATH -u "$path"`
15854    new_path=`$WHICH "$new_path" 2> /dev/null`
15855    # bat and cmd files are not always considered executable in cygwin causing which
15856    # to not find them
15857    if test "x$new_path" = x \
15858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15860      new_path=`$CYGPATH -u "$path"`
15861    fi
15862    if test "x$new_path" = x; then
15863      # It's still not found. Now this is an unrecoverable error.
15864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15865$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15866      has_space=`$ECHO "$complete" | $GREP " "`
15867      if test "x$has_space" != x; then
15868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15870      fi
15871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15872    fi
15873  fi
15874
15875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15878  # "foo.exe" is OK but "foo" is an error.
15879  #
15880  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15881  # It is also a way to make sure we got the proper file name for the real test later on.
15882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15883  if test "x$test_shortpath" = x; then
15884    # Short path failed, file does not exist as specified.
15885    # Try adding .exe or .cmd
15886    if test -f "${new_path}.exe"; then
15887      input_to_shortpath="${new_path}.exe"
15888    elif test -f "${new_path}.cmd"; then
15889      input_to_shortpath="${new_path}.cmd"
15890    else
15891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15893      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15894$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15896    fi
15897  else
15898    input_to_shortpath="$new_path"
15899  fi
15900
15901  # Call helper function which possibly converts this using DOS-style short mode.
15902  # If so, the updated path is stored in $new_path.
15903  new_path="$input_to_shortpath"
15904
15905  input_path="$input_to_shortpath"
15906  # Check if we need to convert this using DOS-style short mode. If the path
15907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15908  # take no chances and rewrite it.
15909  # Note: m4 eats our [], so we need to use [ and ] instead.
15910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15911  if test "x$has_forbidden_chars" != x; then
15912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15916      # Going to short mode and back again did indeed matter. Since short mode is
15917      # case insensitive, let's make it lowercase to improve readability.
15918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15919      # Now convert it back to Unix-stile (cygpath)
15920      input_path=`$CYGPATH -u "$shortmode_path"`
15921      new_path="$input_path"
15922    fi
15923  fi
15924
15925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15926  if test "x$test_cygdrive_prefix" = x; then
15927    # As a simple fix, exclude /usr/bin since it's not a real path.
15928    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15930      # a path prefixed by /cygdrive for fixpath to work.
15931      new_path="$CYGWIN_ROOT_PATH$input_path"
15932    fi
15933  fi
15934
15935  # remove trailing .exe if any
15936  new_path="${new_path/%.exe/}"
15937
15938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15939
15940  # First separate the path from the arguments. This will split at the first
15941  # space.
15942  complete="$FOUND_MAKE"
15943  path="${complete%% *}"
15944  tmp="$complete EOL"
15945  arguments="${tmp#* }"
15946
15947  # Input might be given as Windows format, start by converting to
15948  # unix format.
15949  new_path="$path"
15950
15951  windows_path="$new_path"
15952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953    unix_path=`$CYGPATH -u "$windows_path"`
15954    new_path="$unix_path"
15955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15957    new_path="$unix_path"
15958  fi
15959
15960
15961  # Now try to locate executable using which
15962  new_path=`$WHICH "$new_path" 2> /dev/null`
15963
15964  if test "x$new_path" = x; then
15965    # Oops. Which didn't find the executable.
15966    # The splitting of arguments from the executable at a space might have been incorrect,
15967    # since paths with space are more likely in Windows. Give it another try with the whole
15968    # argument.
15969    path="$complete"
15970    arguments="EOL"
15971    new_path="$path"
15972
15973  windows_path="$new_path"
15974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15975    unix_path=`$CYGPATH -u "$windows_path"`
15976    new_path="$unix_path"
15977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15979    new_path="$unix_path"
15980  fi
15981
15982
15983    new_path=`$WHICH "$new_path" 2> /dev/null`
15984    # bat and cmd files are not always considered executable in MSYS causing which
15985    # to not find them
15986    if test "x$new_path" = x \
15987        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15988        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15989      new_path="$path"
15990
15991  windows_path="$new_path"
15992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15993    unix_path=`$CYGPATH -u "$windows_path"`
15994    new_path="$unix_path"
15995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15997    new_path="$unix_path"
15998  fi
15999
16000    fi
16001
16002    if test "x$new_path" = x; then
16003      # It's still not found. Now this is an unrecoverable error.
16004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16006      has_space=`$ECHO "$complete" | $GREP " "`
16007      if test "x$has_space" != x; then
16008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16010      fi
16011      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16012    fi
16013  fi
16014
16015  # Now new_path has a complete unix path to the binary
16016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16017    # Keep paths in /bin as-is, but remove trailing .exe if any
16018    new_path="${new_path/%.exe/}"
16019    # Do not save /bin paths to all_fixpath_prefixes!
16020  else
16021    # Not in mixed or Windows style, start by that.
16022    new_path=`cmd //c echo $new_path`
16023
16024  input_path="$new_path"
16025  # Check if we need to convert this using DOS-style short mode. If the path
16026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16027  # take no chances and rewrite it.
16028  # Note: m4 eats our [], so we need to use [ and ] instead.
16029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16030  if test "x$has_forbidden_chars" != x; then
16031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16033  fi
16034
16035    # Output is in $new_path
16036
16037  windows_path="$new_path"
16038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16039    unix_path=`$CYGPATH -u "$windows_path"`
16040    new_path="$unix_path"
16041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16043    new_path="$unix_path"
16044  fi
16045
16046    # remove trailing .exe if any
16047    new_path="${new_path/%.exe/}"
16048
16049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16051  fi
16052
16053  else
16054    # We're on a unix platform. Hooray! :)
16055    # First separate the path from the arguments. This will split at the first
16056    # space.
16057    complete="$FOUND_MAKE"
16058    path="${complete%% *}"
16059    tmp="$complete EOL"
16060    arguments="${tmp#* }"
16061
16062    # Cannot rely on the command "which" here since it doesn't always work.
16063    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16064    if test -z "$is_absolute_path"; then
16065      # Path to executable is not absolute. Find it.
16066      IFS_save="$IFS"
16067      IFS=:
16068      for p in $PATH; do
16069        if test -f "$p/$path" && test -x "$p/$path"; then
16070          new_path="$p/$path"
16071          break
16072        fi
16073      done
16074      IFS="$IFS_save"
16075    else
16076      # This is an absolute path, we can use it without further modifications.
16077      new_path="$path"
16078    fi
16079
16080    if test "x$new_path" = x; then
16081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16082$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16083      has_space=`$ECHO "$complete" | $GREP " "`
16084      if test "x$has_space" != x; then
16085        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16087      fi
16088      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16089    fi
16090  fi
16091
16092  # Now join together the path and the arguments once again
16093  if test "x$arguments" != xEOL; then
16094    new_complete="$new_path ${arguments% *}"
16095  else
16096    new_complete="$new_path"
16097  fi
16098
16099  if test "x$complete" != "x$new_complete"; then
16100    FOUND_MAKE="$new_complete"
16101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16102$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16103  fi
16104
16105        fi
16106      fi
16107    fi
16108  fi
16109
16110
16111    if test "x$FOUND_MAKE" = x; then
16112      for ac_prog in make
16113do
16114  # Extract the first word of "$ac_prog", so it can be a program name with args.
16115set dummy $ac_prog; ac_word=$2
16116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16117$as_echo_n "checking for $ac_word... " >&6; }
16118if ${ac_cv_path_CHECK_MAKE+:} false; then :
16119  $as_echo_n "(cached) " >&6
16120else
16121  case $CHECK_MAKE in
16122  [\\/]* | ?:[\\/]*)
16123  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16124  ;;
16125  *)
16126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16127for as_dir in $PATH
16128do
16129  IFS=$as_save_IFS
16130  test -z "$as_dir" && as_dir=.
16131    for ac_exec_ext in '' $ac_executable_extensions; do
16132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16133    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16135    break 2
16136  fi
16137done
16138  done
16139IFS=$as_save_IFS
16140
16141  ;;
16142esac
16143fi
16144CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16145if test -n "$CHECK_MAKE"; then
16146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16147$as_echo "$CHECK_MAKE" >&6; }
16148else
16149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16150$as_echo "no" >&6; }
16151fi
16152
16153
16154  test -n "$CHECK_MAKE" && break
16155done
16156
16157
16158  MAKE_CANDIDATE=""$CHECK_MAKE""
16159  DESCRIPTION="make in PATH"
16160  if test "x$MAKE_CANDIDATE" != x; then
16161    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16162$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16163    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16164    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16165    if test "x$IS_GNU_MAKE" = x; then
16166      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16167$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16168    else
16169      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16170      if test "x$IS_MODERN_MAKE" = x; then
16171        { $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
16172$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;}
16173      else
16174        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16175          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16176            MAKE_EXPECTED_ENV='cygwin'
16177          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16178            MAKE_EXPECTED_ENV='msys'
16179          else
16180            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16181          fi
16182          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16183          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16184        else
16185          # Not relevant for non-Windows
16186          IS_MAKE_CORRECT_ENV=true
16187        fi
16188        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16189          { $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
16190$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;}
16191        else
16192          FOUND_MAKE=$MAKE_CANDIDATE
16193
16194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16195
16196  # First separate the path from the arguments. This will split at the first
16197  # space.
16198  complete="$FOUND_MAKE"
16199  path="${complete%% *}"
16200  tmp="$complete EOL"
16201  arguments="${tmp#* }"
16202
16203  # Input might be given as Windows format, start by converting to
16204  # unix format.
16205  new_path=`$CYGPATH -u "$path"`
16206
16207  # Now try to locate executable using which
16208  new_path=`$WHICH "$new_path" 2> /dev/null`
16209  # bat and cmd files are not always considered executable in cygwin causing which
16210  # to not find them
16211  if test "x$new_path" = x \
16212      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16213      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16214    new_path=`$CYGPATH -u "$path"`
16215  fi
16216  if test "x$new_path" = x; then
16217    # Oops. Which didn't find the executable.
16218    # The splitting of arguments from the executable at a space might have been incorrect,
16219    # since paths with space are more likely in Windows. Give it another try with the whole
16220    # argument.
16221    path="$complete"
16222    arguments="EOL"
16223    new_path=`$CYGPATH -u "$path"`
16224    new_path=`$WHICH "$new_path" 2> /dev/null`
16225    # bat and cmd files are not always considered executable in cygwin causing which
16226    # to not find them
16227    if test "x$new_path" = x \
16228        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16229        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16230      new_path=`$CYGPATH -u "$path"`
16231    fi
16232    if test "x$new_path" = x; then
16233      # It's still not found. Now this is an unrecoverable error.
16234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16235$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16236      has_space=`$ECHO "$complete" | $GREP " "`
16237      if test "x$has_space" != x; then
16238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16240      fi
16241      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16242    fi
16243  fi
16244
16245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16248  # "foo.exe" is OK but "foo" is an error.
16249  #
16250  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16251  # It is also a way to make sure we got the proper file name for the real test later on.
16252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16253  if test "x$test_shortpath" = x; then
16254    # Short path failed, file does not exist as specified.
16255    # Try adding .exe or .cmd
16256    if test -f "${new_path}.exe"; then
16257      input_to_shortpath="${new_path}.exe"
16258    elif test -f "${new_path}.cmd"; then
16259      input_to_shortpath="${new_path}.cmd"
16260    else
16261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16262$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16263      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16264$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16265      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16266    fi
16267  else
16268    input_to_shortpath="$new_path"
16269  fi
16270
16271  # Call helper function which possibly converts this using DOS-style short mode.
16272  # If so, the updated path is stored in $new_path.
16273  new_path="$input_to_shortpath"
16274
16275  input_path="$input_to_shortpath"
16276  # Check if we need to convert this using DOS-style short mode. If the path
16277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16278  # take no chances and rewrite it.
16279  # Note: m4 eats our [], so we need to use [ and ] instead.
16280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16281  if test "x$has_forbidden_chars" != x; then
16282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16286      # Going to short mode and back again did indeed matter. Since short mode is
16287      # case insensitive, let's make it lowercase to improve readability.
16288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16289      # Now convert it back to Unix-stile (cygpath)
16290      input_path=`$CYGPATH -u "$shortmode_path"`
16291      new_path="$input_path"
16292    fi
16293  fi
16294
16295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16296  if test "x$test_cygdrive_prefix" = x; then
16297    # As a simple fix, exclude /usr/bin since it's not a real path.
16298    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16300      # a path prefixed by /cygdrive for fixpath to work.
16301      new_path="$CYGWIN_ROOT_PATH$input_path"
16302    fi
16303  fi
16304
16305  # remove trailing .exe if any
16306  new_path="${new_path/%.exe/}"
16307
16308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16309
16310  # First separate the path from the arguments. This will split at the first
16311  # space.
16312  complete="$FOUND_MAKE"
16313  path="${complete%% *}"
16314  tmp="$complete EOL"
16315  arguments="${tmp#* }"
16316
16317  # Input might be given as Windows format, start by converting to
16318  # unix format.
16319  new_path="$path"
16320
16321  windows_path="$new_path"
16322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16323    unix_path=`$CYGPATH -u "$windows_path"`
16324    new_path="$unix_path"
16325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16327    new_path="$unix_path"
16328  fi
16329
16330
16331  # Now try to locate executable using which
16332  new_path=`$WHICH "$new_path" 2> /dev/null`
16333
16334  if test "x$new_path" = x; then
16335    # Oops. Which didn't find the executable.
16336    # The splitting of arguments from the executable at a space might have been incorrect,
16337    # since paths with space are more likely in Windows. Give it another try with the whole
16338    # argument.
16339    path="$complete"
16340    arguments="EOL"
16341    new_path="$path"
16342
16343  windows_path="$new_path"
16344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16345    unix_path=`$CYGPATH -u "$windows_path"`
16346    new_path="$unix_path"
16347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16349    new_path="$unix_path"
16350  fi
16351
16352
16353    new_path=`$WHICH "$new_path" 2> /dev/null`
16354    # bat and cmd files are not always considered executable in MSYS causing which
16355    # to not find them
16356    if test "x$new_path" = x \
16357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16359      new_path="$path"
16360
16361  windows_path="$new_path"
16362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16363    unix_path=`$CYGPATH -u "$windows_path"`
16364    new_path="$unix_path"
16365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16367    new_path="$unix_path"
16368  fi
16369
16370    fi
16371
16372    if test "x$new_path" = x; then
16373      # It's still not found. Now this is an unrecoverable error.
16374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16375$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16376      has_space=`$ECHO "$complete" | $GREP " "`
16377      if test "x$has_space" != x; then
16378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16380      fi
16381      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16382    fi
16383  fi
16384
16385  # Now new_path has a complete unix path to the binary
16386  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16387    # Keep paths in /bin as-is, but remove trailing .exe if any
16388    new_path="${new_path/%.exe/}"
16389    # Do not save /bin paths to all_fixpath_prefixes!
16390  else
16391    # Not in mixed or Windows style, start by that.
16392    new_path=`cmd //c echo $new_path`
16393
16394  input_path="$new_path"
16395  # Check if we need to convert this using DOS-style short mode. If the path
16396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16397  # take no chances and rewrite it.
16398  # Note: m4 eats our [], so we need to use [ and ] instead.
16399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16400  if test "x$has_forbidden_chars" != x; then
16401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16403  fi
16404
16405    # Output is in $new_path
16406
16407  windows_path="$new_path"
16408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16409    unix_path=`$CYGPATH -u "$windows_path"`
16410    new_path="$unix_path"
16411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16413    new_path="$unix_path"
16414  fi
16415
16416    # remove trailing .exe if any
16417    new_path="${new_path/%.exe/}"
16418
16419    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16420    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16421  fi
16422
16423  else
16424    # We're on a unix platform. Hooray! :)
16425    # First separate the path from the arguments. This will split at the first
16426    # space.
16427    complete="$FOUND_MAKE"
16428    path="${complete%% *}"
16429    tmp="$complete EOL"
16430    arguments="${tmp#* }"
16431
16432    # Cannot rely on the command "which" here since it doesn't always work.
16433    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16434    if test -z "$is_absolute_path"; then
16435      # Path to executable is not absolute. Find it.
16436      IFS_save="$IFS"
16437      IFS=:
16438      for p in $PATH; do
16439        if test -f "$p/$path" && test -x "$p/$path"; then
16440          new_path="$p/$path"
16441          break
16442        fi
16443      done
16444      IFS="$IFS_save"
16445    else
16446      # This is an absolute path, we can use it without further modifications.
16447      new_path="$path"
16448    fi
16449
16450    if test "x$new_path" = x; then
16451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16452$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16453      has_space=`$ECHO "$complete" | $GREP " "`
16454      if test "x$has_space" != x; then
16455        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16456$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16457      fi
16458      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16459    fi
16460  fi
16461
16462  # Now join together the path and the arguments once again
16463  if test "x$arguments" != xEOL; then
16464    new_complete="$new_path ${arguments% *}"
16465  else
16466    new_complete="$new_path"
16467  fi
16468
16469  if test "x$complete" != "x$new_complete"; then
16470    FOUND_MAKE="$new_complete"
16471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16472$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16473  fi
16474
16475        fi
16476      fi
16477    fi
16478  fi
16479
16480    fi
16481
16482    if test "x$FOUND_MAKE" = x; then
16483      if test "x$TOOLCHAIN_PATH" != x; then
16484        # We have a toolchain path, check that as well before giving up.
16485        OLD_PATH=$PATH
16486        PATH=$TOOLCHAIN_PATH:$PATH
16487        for ac_prog in gmake
16488do
16489  # Extract the first word of "$ac_prog", so it can be a program name with args.
16490set dummy $ac_prog; ac_word=$2
16491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16492$as_echo_n "checking for $ac_word... " >&6; }
16493if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16494  $as_echo_n "(cached) " >&6
16495else
16496  case $CHECK_TOOLSDIR_GMAKE in
16497  [\\/]* | ?:[\\/]*)
16498  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16499  ;;
16500  *)
16501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16502for as_dir in $PATH
16503do
16504  IFS=$as_save_IFS
16505  test -z "$as_dir" && as_dir=.
16506    for ac_exec_ext in '' $ac_executable_extensions; do
16507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16508    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16510    break 2
16511  fi
16512done
16513  done
16514IFS=$as_save_IFS
16515
16516  ;;
16517esac
16518fi
16519CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16520if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16522$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16523else
16524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16525$as_echo "no" >&6; }
16526fi
16527
16528
16529  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16530done
16531
16532
16533  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16534  DESCRIPTION="gmake in tools-dir"
16535  if test "x$MAKE_CANDIDATE" != x; then
16536    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16537$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16538    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16539    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16540    if test "x$IS_GNU_MAKE" = x; then
16541      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16542$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16543    else
16544      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16545      if test "x$IS_MODERN_MAKE" = x; then
16546        { $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
16547$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;}
16548      else
16549        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16550          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16551            MAKE_EXPECTED_ENV='cygwin'
16552          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16553            MAKE_EXPECTED_ENV='msys'
16554          else
16555            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16556          fi
16557          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16558          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16559        else
16560          # Not relevant for non-Windows
16561          IS_MAKE_CORRECT_ENV=true
16562        fi
16563        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16564          { $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
16565$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;}
16566        else
16567          FOUND_MAKE=$MAKE_CANDIDATE
16568
16569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16570
16571  # First separate the path from the arguments. This will split at the first
16572  # space.
16573  complete="$FOUND_MAKE"
16574  path="${complete%% *}"
16575  tmp="$complete EOL"
16576  arguments="${tmp#* }"
16577
16578  # Input might be given as Windows format, start by converting to
16579  # unix format.
16580  new_path=`$CYGPATH -u "$path"`
16581
16582  # Now try to locate executable using which
16583  new_path=`$WHICH "$new_path" 2> /dev/null`
16584  # bat and cmd files are not always considered executable in cygwin causing which
16585  # to not find them
16586  if test "x$new_path" = x \
16587      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16588      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16589    new_path=`$CYGPATH -u "$path"`
16590  fi
16591  if test "x$new_path" = x; then
16592    # Oops. Which didn't find the executable.
16593    # The splitting of arguments from the executable at a space might have been incorrect,
16594    # since paths with space are more likely in Windows. Give it another try with the whole
16595    # argument.
16596    path="$complete"
16597    arguments="EOL"
16598    new_path=`$CYGPATH -u "$path"`
16599    new_path=`$WHICH "$new_path" 2> /dev/null`
16600    # bat and cmd files are not always considered executable in cygwin causing which
16601    # to not find them
16602    if test "x$new_path" = x \
16603        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16604        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16605      new_path=`$CYGPATH -u "$path"`
16606    fi
16607    if test "x$new_path" = x; then
16608      # It's still not found. Now this is an unrecoverable error.
16609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16611      has_space=`$ECHO "$complete" | $GREP " "`
16612      if test "x$has_space" != x; then
16613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16615      fi
16616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16617    fi
16618  fi
16619
16620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16623  # "foo.exe" is OK but "foo" is an error.
16624  #
16625  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16626  # It is also a way to make sure we got the proper file name for the real test later on.
16627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16628  if test "x$test_shortpath" = x; then
16629    # Short path failed, file does not exist as specified.
16630    # Try adding .exe or .cmd
16631    if test -f "${new_path}.exe"; then
16632      input_to_shortpath="${new_path}.exe"
16633    elif test -f "${new_path}.cmd"; then
16634      input_to_shortpath="${new_path}.cmd"
16635    else
16636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16637$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16638      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16639$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16640      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16641    fi
16642  else
16643    input_to_shortpath="$new_path"
16644  fi
16645
16646  # Call helper function which possibly converts this using DOS-style short mode.
16647  # If so, the updated path is stored in $new_path.
16648  new_path="$input_to_shortpath"
16649
16650  input_path="$input_to_shortpath"
16651  # Check if we need to convert this using DOS-style short mode. If the path
16652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16653  # take no chances and rewrite it.
16654  # Note: m4 eats our [], so we need to use [ and ] instead.
16655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16656  if test "x$has_forbidden_chars" != x; then
16657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16661      # Going to short mode and back again did indeed matter. Since short mode is
16662      # case insensitive, let's make it lowercase to improve readability.
16663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16664      # Now convert it back to Unix-stile (cygpath)
16665      input_path=`$CYGPATH -u "$shortmode_path"`
16666      new_path="$input_path"
16667    fi
16668  fi
16669
16670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16671  if test "x$test_cygdrive_prefix" = x; then
16672    # As a simple fix, exclude /usr/bin since it's not a real path.
16673    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16675      # a path prefixed by /cygdrive for fixpath to work.
16676      new_path="$CYGWIN_ROOT_PATH$input_path"
16677    fi
16678  fi
16679
16680  # remove trailing .exe if any
16681  new_path="${new_path/%.exe/}"
16682
16683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16684
16685  # First separate the path from the arguments. This will split at the first
16686  # space.
16687  complete="$FOUND_MAKE"
16688  path="${complete%% *}"
16689  tmp="$complete EOL"
16690  arguments="${tmp#* }"
16691
16692  # Input might be given as Windows format, start by converting to
16693  # unix format.
16694  new_path="$path"
16695
16696  windows_path="$new_path"
16697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16698    unix_path=`$CYGPATH -u "$windows_path"`
16699    new_path="$unix_path"
16700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16702    new_path="$unix_path"
16703  fi
16704
16705
16706  # Now try to locate executable using which
16707  new_path=`$WHICH "$new_path" 2> /dev/null`
16708
16709  if test "x$new_path" = x; then
16710    # Oops. Which didn't find the executable.
16711    # The splitting of arguments from the executable at a space might have been incorrect,
16712    # since paths with space are more likely in Windows. Give it another try with the whole
16713    # argument.
16714    path="$complete"
16715    arguments="EOL"
16716    new_path="$path"
16717
16718  windows_path="$new_path"
16719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16720    unix_path=`$CYGPATH -u "$windows_path"`
16721    new_path="$unix_path"
16722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16724    new_path="$unix_path"
16725  fi
16726
16727
16728    new_path=`$WHICH "$new_path" 2> /dev/null`
16729    # bat and cmd files are not always considered executable in MSYS causing which
16730    # to not find them
16731    if test "x$new_path" = x \
16732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16734      new_path="$path"
16735
16736  windows_path="$new_path"
16737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16738    unix_path=`$CYGPATH -u "$windows_path"`
16739    new_path="$unix_path"
16740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16742    new_path="$unix_path"
16743  fi
16744
16745    fi
16746
16747    if test "x$new_path" = x; then
16748      # It's still not found. Now this is an unrecoverable error.
16749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16750$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16751      has_space=`$ECHO "$complete" | $GREP " "`
16752      if test "x$has_space" != x; then
16753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16755      fi
16756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16757    fi
16758  fi
16759
16760  # Now new_path has a complete unix path to the binary
16761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16762    # Keep paths in /bin as-is, but remove trailing .exe if any
16763    new_path="${new_path/%.exe/}"
16764    # Do not save /bin paths to all_fixpath_prefixes!
16765  else
16766    # Not in mixed or Windows style, start by that.
16767    new_path=`cmd //c echo $new_path`
16768
16769  input_path="$new_path"
16770  # Check if we need to convert this using DOS-style short mode. If the path
16771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16772  # take no chances and rewrite it.
16773  # Note: m4 eats our [], so we need to use [ and ] instead.
16774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16775  if test "x$has_forbidden_chars" != x; then
16776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16778  fi
16779
16780    # Output is in $new_path
16781
16782  windows_path="$new_path"
16783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16784    unix_path=`$CYGPATH -u "$windows_path"`
16785    new_path="$unix_path"
16786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16788    new_path="$unix_path"
16789  fi
16790
16791    # remove trailing .exe if any
16792    new_path="${new_path/%.exe/}"
16793
16794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16796  fi
16797
16798  else
16799    # We're on a unix platform. Hooray! :)
16800    # First separate the path from the arguments. This will split at the first
16801    # space.
16802    complete="$FOUND_MAKE"
16803    path="${complete%% *}"
16804    tmp="$complete EOL"
16805    arguments="${tmp#* }"
16806
16807    # Cannot rely on the command "which" here since it doesn't always work.
16808    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16809    if test -z "$is_absolute_path"; then
16810      # Path to executable is not absolute. Find it.
16811      IFS_save="$IFS"
16812      IFS=:
16813      for p in $PATH; do
16814        if test -f "$p/$path" && test -x "$p/$path"; then
16815          new_path="$p/$path"
16816          break
16817        fi
16818      done
16819      IFS="$IFS_save"
16820    else
16821      # This is an absolute path, we can use it without further modifications.
16822      new_path="$path"
16823    fi
16824
16825    if test "x$new_path" = x; then
16826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16827$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16828      has_space=`$ECHO "$complete" | $GREP " "`
16829      if test "x$has_space" != x; then
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16831$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16832      fi
16833      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16834    fi
16835  fi
16836
16837  # Now join together the path and the arguments once again
16838  if test "x$arguments" != xEOL; then
16839    new_complete="$new_path ${arguments% *}"
16840  else
16841    new_complete="$new_path"
16842  fi
16843
16844  if test "x$complete" != "x$new_complete"; then
16845    FOUND_MAKE="$new_complete"
16846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16847$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16848  fi
16849
16850        fi
16851      fi
16852    fi
16853  fi
16854
16855        if test "x$FOUND_MAKE" = x; then
16856          for ac_prog in make
16857do
16858  # Extract the first word of "$ac_prog", so it can be a program name with args.
16859set dummy $ac_prog; ac_word=$2
16860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16861$as_echo_n "checking for $ac_word... " >&6; }
16862if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16863  $as_echo_n "(cached) " >&6
16864else
16865  case $CHECK_TOOLSDIR_MAKE in
16866  [\\/]* | ?:[\\/]*)
16867  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16868  ;;
16869  *)
16870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16871for as_dir in $PATH
16872do
16873  IFS=$as_save_IFS
16874  test -z "$as_dir" && as_dir=.
16875    for ac_exec_ext in '' $ac_executable_extensions; do
16876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16877    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16879    break 2
16880  fi
16881done
16882  done
16883IFS=$as_save_IFS
16884
16885  ;;
16886esac
16887fi
16888CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16889if test -n "$CHECK_TOOLSDIR_MAKE"; then
16890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16891$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16892else
16893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16894$as_echo "no" >&6; }
16895fi
16896
16897
16898  test -n "$CHECK_TOOLSDIR_MAKE" && break
16899done
16900
16901
16902  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16903  DESCRIPTION="make in tools-dir"
16904  if test "x$MAKE_CANDIDATE" != x; then
16905    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16906$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16907    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16908    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16909    if test "x$IS_GNU_MAKE" = x; then
16910      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16911$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16912    else
16913      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16914      if test "x$IS_MODERN_MAKE" = x; then
16915        { $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
16916$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;}
16917      else
16918        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16919          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16920            MAKE_EXPECTED_ENV='cygwin'
16921          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16922            MAKE_EXPECTED_ENV='msys'
16923          else
16924            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16925          fi
16926          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16927          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16928        else
16929          # Not relevant for non-Windows
16930          IS_MAKE_CORRECT_ENV=true
16931        fi
16932        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16933          { $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
16934$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;}
16935        else
16936          FOUND_MAKE=$MAKE_CANDIDATE
16937
16938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16939
16940  # First separate the path from the arguments. This will split at the first
16941  # space.
16942  complete="$FOUND_MAKE"
16943  path="${complete%% *}"
16944  tmp="$complete EOL"
16945  arguments="${tmp#* }"
16946
16947  # Input might be given as Windows format, start by converting to
16948  # unix format.
16949  new_path=`$CYGPATH -u "$path"`
16950
16951  # Now try to locate executable using which
16952  new_path=`$WHICH "$new_path" 2> /dev/null`
16953  # bat and cmd files are not always considered executable in cygwin causing which
16954  # to not find them
16955  if test "x$new_path" = x \
16956      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16957      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16958    new_path=`$CYGPATH -u "$path"`
16959  fi
16960  if test "x$new_path" = x; then
16961    # Oops. Which didn't find the executable.
16962    # The splitting of arguments from the executable at a space might have been incorrect,
16963    # since paths with space are more likely in Windows. Give it another try with the whole
16964    # argument.
16965    path="$complete"
16966    arguments="EOL"
16967    new_path=`$CYGPATH -u "$path"`
16968    new_path=`$WHICH "$new_path" 2> /dev/null`
16969    # bat and cmd files are not always considered executable in cygwin causing which
16970    # to not find them
16971    if test "x$new_path" = x \
16972        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16973        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16974      new_path=`$CYGPATH -u "$path"`
16975    fi
16976    if test "x$new_path" = x; then
16977      # It's still not found. Now this is an unrecoverable error.
16978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16979$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16980      has_space=`$ECHO "$complete" | $GREP " "`
16981      if test "x$has_space" != x; then
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16984      fi
16985      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16986    fi
16987  fi
16988
16989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16992  # "foo.exe" is OK but "foo" is an error.
16993  #
16994  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16995  # It is also a way to make sure we got the proper file name for the real test later on.
16996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16997  if test "x$test_shortpath" = x; then
16998    # Short path failed, file does not exist as specified.
16999    # Try adding .exe or .cmd
17000    if test -f "${new_path}.exe"; then
17001      input_to_shortpath="${new_path}.exe"
17002    elif test -f "${new_path}.cmd"; then
17003      input_to_shortpath="${new_path}.cmd"
17004    else
17005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17007      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17008$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17009      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17010    fi
17011  else
17012    input_to_shortpath="$new_path"
17013  fi
17014
17015  # Call helper function which possibly converts this using DOS-style short mode.
17016  # If so, the updated path is stored in $new_path.
17017  new_path="$input_to_shortpath"
17018
17019  input_path="$input_to_shortpath"
17020  # Check if we need to convert this using DOS-style short mode. If the path
17021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17022  # take no chances and rewrite it.
17023  # Note: m4 eats our [], so we need to use [ and ] instead.
17024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17025  if test "x$has_forbidden_chars" != x; then
17026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17030      # Going to short mode and back again did indeed matter. Since short mode is
17031      # case insensitive, let's make it lowercase to improve readability.
17032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17033      # Now convert it back to Unix-stile (cygpath)
17034      input_path=`$CYGPATH -u "$shortmode_path"`
17035      new_path="$input_path"
17036    fi
17037  fi
17038
17039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17040  if test "x$test_cygdrive_prefix" = x; then
17041    # As a simple fix, exclude /usr/bin since it's not a real path.
17042    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17044      # a path prefixed by /cygdrive for fixpath to work.
17045      new_path="$CYGWIN_ROOT_PATH$input_path"
17046    fi
17047  fi
17048
17049  # remove trailing .exe if any
17050  new_path="${new_path/%.exe/}"
17051
17052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17053
17054  # First separate the path from the arguments. This will split at the first
17055  # space.
17056  complete="$FOUND_MAKE"
17057  path="${complete%% *}"
17058  tmp="$complete EOL"
17059  arguments="${tmp#* }"
17060
17061  # Input might be given as Windows format, start by converting to
17062  # unix format.
17063  new_path="$path"
17064
17065  windows_path="$new_path"
17066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17067    unix_path=`$CYGPATH -u "$windows_path"`
17068    new_path="$unix_path"
17069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17071    new_path="$unix_path"
17072  fi
17073
17074
17075  # Now try to locate executable using which
17076  new_path=`$WHICH "$new_path" 2> /dev/null`
17077
17078  if test "x$new_path" = x; then
17079    # Oops. Which didn't find the executable.
17080    # The splitting of arguments from the executable at a space might have been incorrect,
17081    # since paths with space are more likely in Windows. Give it another try with the whole
17082    # argument.
17083    path="$complete"
17084    arguments="EOL"
17085    new_path="$path"
17086
17087  windows_path="$new_path"
17088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17089    unix_path=`$CYGPATH -u "$windows_path"`
17090    new_path="$unix_path"
17091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17093    new_path="$unix_path"
17094  fi
17095
17096
17097    new_path=`$WHICH "$new_path" 2> /dev/null`
17098    # bat and cmd files are not always considered executable in MSYS causing which
17099    # to not find them
17100    if test "x$new_path" = x \
17101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17103      new_path="$path"
17104
17105  windows_path="$new_path"
17106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17107    unix_path=`$CYGPATH -u "$windows_path"`
17108    new_path="$unix_path"
17109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17111    new_path="$unix_path"
17112  fi
17113
17114    fi
17115
17116    if test "x$new_path" = x; then
17117      # It's still not found. Now this is an unrecoverable error.
17118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17119$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17120      has_space=`$ECHO "$complete" | $GREP " "`
17121      if test "x$has_space" != x; then
17122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17124      fi
17125      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17126    fi
17127  fi
17128
17129  # Now new_path has a complete unix path to the binary
17130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17131    # Keep paths in /bin as-is, but remove trailing .exe if any
17132    new_path="${new_path/%.exe/}"
17133    # Do not save /bin paths to all_fixpath_prefixes!
17134  else
17135    # Not in mixed or Windows style, start by that.
17136    new_path=`cmd //c echo $new_path`
17137
17138  input_path="$new_path"
17139  # Check if we need to convert this using DOS-style short mode. If the path
17140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17141  # take no chances and rewrite it.
17142  # Note: m4 eats our [], so we need to use [ and ] instead.
17143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17144  if test "x$has_forbidden_chars" != x; then
17145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17147  fi
17148
17149    # Output is in $new_path
17150
17151  windows_path="$new_path"
17152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17153    unix_path=`$CYGPATH -u "$windows_path"`
17154    new_path="$unix_path"
17155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17157    new_path="$unix_path"
17158  fi
17159
17160    # remove trailing .exe if any
17161    new_path="${new_path/%.exe/}"
17162
17163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17165  fi
17166
17167  else
17168    # We're on a unix platform. Hooray! :)
17169    # First separate the path from the arguments. This will split at the first
17170    # space.
17171    complete="$FOUND_MAKE"
17172    path="${complete%% *}"
17173    tmp="$complete EOL"
17174    arguments="${tmp#* }"
17175
17176    # Cannot rely on the command "which" here since it doesn't always work.
17177    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17178    if test -z "$is_absolute_path"; then
17179      # Path to executable is not absolute. Find it.
17180      IFS_save="$IFS"
17181      IFS=:
17182      for p in $PATH; do
17183        if test -f "$p/$path" && test -x "$p/$path"; then
17184          new_path="$p/$path"
17185          break
17186        fi
17187      done
17188      IFS="$IFS_save"
17189    else
17190      # This is an absolute path, we can use it without further modifications.
17191      new_path="$path"
17192    fi
17193
17194    if test "x$new_path" = x; then
17195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17196$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17197      has_space=`$ECHO "$complete" | $GREP " "`
17198      if test "x$has_space" != x; then
17199        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17200$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17201      fi
17202      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17203    fi
17204  fi
17205
17206  # Now join together the path and the arguments once again
17207  if test "x$arguments" != xEOL; then
17208    new_complete="$new_path ${arguments% *}"
17209  else
17210    new_complete="$new_path"
17211  fi
17212
17213  if test "x$complete" != "x$new_complete"; then
17214    FOUND_MAKE="$new_complete"
17215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17216$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17217  fi
17218
17219        fi
17220      fi
17221    fi
17222  fi
17223
17224        fi
17225        PATH=$OLD_PATH
17226      fi
17227    fi
17228
17229    if test "x$FOUND_MAKE" = x; then
17230      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
17231    fi
17232  fi
17233
17234  MAKE=$FOUND_MAKE
17235
17236  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17237$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17238
17239
17240  # Check if make supports the output sync option and if so, setup using it.
17241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17242$as_echo_n "checking if make --output-sync is supported... " >&6; }
17243  if $MAKE --version -O > /dev/null 2>&1; then
17244    OUTPUT_SYNC_SUPPORTED=true
17245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17246$as_echo "yes" >&6; }
17247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17248$as_echo_n "checking for output-sync value... " >&6; }
17249
17250# Check whether --with-output-sync was given.
17251if test "${with_output_sync+set}" = set; then :
17252  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17253fi
17254
17255    if test "x$OUTPUT_SYNC" = "x"; then
17256      OUTPUT_SYNC=none
17257    fi
17258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17259$as_echo "$OUTPUT_SYNC" >&6; }
17260    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17261      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17262    fi
17263  else
17264    OUTPUT_SYNC_SUPPORTED=false
17265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17266$as_echo "no" >&6; }
17267  fi
17268
17269
17270
17271
17272
17273
17274  # Test if find supports -delete
17275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17276$as_echo_n "checking if find supports -delete... " >&6; }
17277  FIND_DELETE="-delete"
17278
17279  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17280
17281  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17282
17283  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17284  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17285    # No, it does not.
17286    rm $DELETEDIR/TestIfFindSupportsDelete
17287    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17288      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17289      FIND_DELETE="-print | xargs rm"
17290    else
17291      FIND_DELETE="-exec rm \{\} \+"
17292    fi
17293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17294$as_echo "no" >&6; }
17295  else
17296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17297$as_echo "yes" >&6; }
17298  fi
17299  rmdir $DELETEDIR
17300
17301
17302
17303  # These tools might not be installed by default,
17304  # need hint on how to install them.
17305
17306
17307
17308  # Publish this variable in the help.
17309
17310
17311  if test "x$UNZIP" = x; then
17312    # The variable is not set by user, try to locate tool using the code snippet
17313    for ac_prog in unzip
17314do
17315  # Extract the first word of "$ac_prog", so it can be a program name with args.
17316set dummy $ac_prog; ac_word=$2
17317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17318$as_echo_n "checking for $ac_word... " >&6; }
17319if ${ac_cv_path_UNZIP+:} false; then :
17320  $as_echo_n "(cached) " >&6
17321else
17322  case $UNZIP in
17323  [\\/]* | ?:[\\/]*)
17324  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17325  ;;
17326  *)
17327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17328for as_dir in $PATH
17329do
17330  IFS=$as_save_IFS
17331  test -z "$as_dir" && as_dir=.
17332    for ac_exec_ext in '' $ac_executable_extensions; do
17333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17334    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17336    break 2
17337  fi
17338done
17339  done
17340IFS=$as_save_IFS
17341
17342  ;;
17343esac
17344fi
17345UNZIP=$ac_cv_path_UNZIP
17346if test -n "$UNZIP"; then
17347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17348$as_echo "$UNZIP" >&6; }
17349else
17350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17351$as_echo "no" >&6; }
17352fi
17353
17354
17355  test -n "$UNZIP" && break
17356done
17357
17358  else
17359    # The variable is set, but is it from the command line or the environment?
17360
17361    # Try to remove the string !UNZIP! from our list.
17362    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17363    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17364      # If it failed, the variable was not from the command line. Ignore it,
17365      # but warn the user (except for BASH, which is always set by the calling BASH).
17366      if test "xUNZIP" != xBASH; then
17367        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17368$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17369      fi
17370      # Try to locate tool using the code snippet
17371      for ac_prog in unzip
17372do
17373  # Extract the first word of "$ac_prog", so it can be a program name with args.
17374set dummy $ac_prog; ac_word=$2
17375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17376$as_echo_n "checking for $ac_word... " >&6; }
17377if ${ac_cv_path_UNZIP+:} false; then :
17378  $as_echo_n "(cached) " >&6
17379else
17380  case $UNZIP in
17381  [\\/]* | ?:[\\/]*)
17382  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17383  ;;
17384  *)
17385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17386for as_dir in $PATH
17387do
17388  IFS=$as_save_IFS
17389  test -z "$as_dir" && as_dir=.
17390    for ac_exec_ext in '' $ac_executable_extensions; do
17391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17392    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17394    break 2
17395  fi
17396done
17397  done
17398IFS=$as_save_IFS
17399
17400  ;;
17401esac
17402fi
17403UNZIP=$ac_cv_path_UNZIP
17404if test -n "$UNZIP"; then
17405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17406$as_echo "$UNZIP" >&6; }
17407else
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410fi
17411
17412
17413  test -n "$UNZIP" && break
17414done
17415
17416    else
17417      # If it succeeded, then it was overridden by the user. We will use it
17418      # for the tool.
17419
17420      # First remove it from the list of overridden variables, so we can test
17421      # for unknown variables in the end.
17422      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17423
17424      # Check if the provided tool contains a complete path.
17425      tool_specified="$UNZIP"
17426      tool_basename="${tool_specified##*/}"
17427      if test "x$tool_basename" = "x$tool_specified"; then
17428        # A command without a complete path is provided, search $PATH.
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17430$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17431        # Extract the first word of "$tool_basename", so it can be a program name with args.
17432set dummy $tool_basename; ac_word=$2
17433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17434$as_echo_n "checking for $ac_word... " >&6; }
17435if ${ac_cv_path_UNZIP+:} false; then :
17436  $as_echo_n "(cached) " >&6
17437else
17438  case $UNZIP in
17439  [\\/]* | ?:[\\/]*)
17440  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17441  ;;
17442  *)
17443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17444for as_dir in $PATH
17445do
17446  IFS=$as_save_IFS
17447  test -z "$as_dir" && as_dir=.
17448    for ac_exec_ext in '' $ac_executable_extensions; do
17449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17450    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17452    break 2
17453  fi
17454done
17455  done
17456IFS=$as_save_IFS
17457
17458  ;;
17459esac
17460fi
17461UNZIP=$ac_cv_path_UNZIP
17462if test -n "$UNZIP"; then
17463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17464$as_echo "$UNZIP" >&6; }
17465else
17466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17467$as_echo "no" >&6; }
17468fi
17469
17470
17471        if test "x$UNZIP" = x; then
17472          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17473        fi
17474      else
17475        # Otherwise we believe it is a complete path. Use it as it is.
17476        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17477$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17479$as_echo_n "checking for UNZIP... " >&6; }
17480        if test ! -x "$tool_specified"; then
17481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17482$as_echo "not found" >&6; }
17483          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17484        fi
17485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17486$as_echo "$tool_specified" >&6; }
17487      fi
17488    fi
17489  fi
17490
17491
17492
17493  if test "x$UNZIP" = x; then
17494    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17495  fi
17496
17497
17498
17499
17500
17501  # Publish this variable in the help.
17502
17503
17504  if test "x$ZIP" = x; then
17505    # The variable is not set by user, try to locate tool using the code snippet
17506    for ac_prog in zip
17507do
17508  # Extract the first word of "$ac_prog", so it can be a program name with args.
17509set dummy $ac_prog; ac_word=$2
17510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17511$as_echo_n "checking for $ac_word... " >&6; }
17512if ${ac_cv_path_ZIP+:} false; then :
17513  $as_echo_n "(cached) " >&6
17514else
17515  case $ZIP in
17516  [\\/]* | ?:[\\/]*)
17517  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17518  ;;
17519  *)
17520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17521for as_dir in $PATH
17522do
17523  IFS=$as_save_IFS
17524  test -z "$as_dir" && as_dir=.
17525    for ac_exec_ext in '' $ac_executable_extensions; do
17526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17527    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17529    break 2
17530  fi
17531done
17532  done
17533IFS=$as_save_IFS
17534
17535  ;;
17536esac
17537fi
17538ZIP=$ac_cv_path_ZIP
17539if test -n "$ZIP"; then
17540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17541$as_echo "$ZIP" >&6; }
17542else
17543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17544$as_echo "no" >&6; }
17545fi
17546
17547
17548  test -n "$ZIP" && break
17549done
17550
17551  else
17552    # The variable is set, but is it from the command line or the environment?
17553
17554    # Try to remove the string !ZIP! from our list.
17555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17557      # If it failed, the variable was not from the command line. Ignore it,
17558      # but warn the user (except for BASH, which is always set by the calling BASH).
17559      if test "xZIP" != xBASH; then
17560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17561$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17562      fi
17563      # Try to locate tool using the code snippet
17564      for ac_prog in zip
17565do
17566  # Extract the first word of "$ac_prog", so it can be a program name with args.
17567set dummy $ac_prog; ac_word=$2
17568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17569$as_echo_n "checking for $ac_word... " >&6; }
17570if ${ac_cv_path_ZIP+:} false; then :
17571  $as_echo_n "(cached) " >&6
17572else
17573  case $ZIP in
17574  [\\/]* | ?:[\\/]*)
17575  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17576  ;;
17577  *)
17578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17579for as_dir in $PATH
17580do
17581  IFS=$as_save_IFS
17582  test -z "$as_dir" && as_dir=.
17583    for ac_exec_ext in '' $ac_executable_extensions; do
17584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17585    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17587    break 2
17588  fi
17589done
17590  done
17591IFS=$as_save_IFS
17592
17593  ;;
17594esac
17595fi
17596ZIP=$ac_cv_path_ZIP
17597if test -n "$ZIP"; then
17598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17599$as_echo "$ZIP" >&6; }
17600else
17601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17602$as_echo "no" >&6; }
17603fi
17604
17605
17606  test -n "$ZIP" && break
17607done
17608
17609    else
17610      # If it succeeded, then it was overridden by the user. We will use it
17611      # for the tool.
17612
17613      # First remove it from the list of overridden variables, so we can test
17614      # for unknown variables in the end.
17615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17616
17617      # Check if the provided tool contains a complete path.
17618      tool_specified="$ZIP"
17619      tool_basename="${tool_specified##*/}"
17620      if test "x$tool_basename" = "x$tool_specified"; then
17621        # A command without a complete path is provided, search $PATH.
17622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17623$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17624        # Extract the first word of "$tool_basename", so it can be a program name with args.
17625set dummy $tool_basename; ac_word=$2
17626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17627$as_echo_n "checking for $ac_word... " >&6; }
17628if ${ac_cv_path_ZIP+:} false; then :
17629  $as_echo_n "(cached) " >&6
17630else
17631  case $ZIP in
17632  [\\/]* | ?:[\\/]*)
17633  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17634  ;;
17635  *)
17636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17637for as_dir in $PATH
17638do
17639  IFS=$as_save_IFS
17640  test -z "$as_dir" && as_dir=.
17641    for ac_exec_ext in '' $ac_executable_extensions; do
17642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17643    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17645    break 2
17646  fi
17647done
17648  done
17649IFS=$as_save_IFS
17650
17651  ;;
17652esac
17653fi
17654ZIP=$ac_cv_path_ZIP
17655if test -n "$ZIP"; then
17656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17657$as_echo "$ZIP" >&6; }
17658else
17659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17660$as_echo "no" >&6; }
17661fi
17662
17663
17664        if test "x$ZIP" = x; then
17665          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17666        fi
17667      else
17668        # Otherwise we believe it is a complete path. Use it as it is.
17669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17670$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17672$as_echo_n "checking for ZIP... " >&6; }
17673        if test ! -x "$tool_specified"; then
17674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17675$as_echo "not found" >&6; }
17676          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17677        fi
17678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17679$as_echo "$tool_specified" >&6; }
17680      fi
17681    fi
17682  fi
17683
17684
17685
17686  if test "x$ZIP" = x; then
17687    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17688  fi
17689
17690
17691
17692  # Non-required basic tools
17693
17694
17695
17696  # Publish this variable in the help.
17697
17698
17699  if test "x$LDD" = x; then
17700    # The variable is not set by user, try to locate tool using the code snippet
17701    for ac_prog in ldd
17702do
17703  # Extract the first word of "$ac_prog", so it can be a program name with args.
17704set dummy $ac_prog; ac_word=$2
17705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17706$as_echo_n "checking for $ac_word... " >&6; }
17707if ${ac_cv_path_LDD+:} false; then :
17708  $as_echo_n "(cached) " >&6
17709else
17710  case $LDD in
17711  [\\/]* | ?:[\\/]*)
17712  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17713  ;;
17714  *)
17715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17716for as_dir in $PATH
17717do
17718  IFS=$as_save_IFS
17719  test -z "$as_dir" && as_dir=.
17720    for ac_exec_ext in '' $ac_executable_extensions; do
17721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17722    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17724    break 2
17725  fi
17726done
17727  done
17728IFS=$as_save_IFS
17729
17730  ;;
17731esac
17732fi
17733LDD=$ac_cv_path_LDD
17734if test -n "$LDD"; then
17735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17736$as_echo "$LDD" >&6; }
17737else
17738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17739$as_echo "no" >&6; }
17740fi
17741
17742
17743  test -n "$LDD" && break
17744done
17745
17746  else
17747    # The variable is set, but is it from the command line or the environment?
17748
17749    # Try to remove the string !LDD! from our list.
17750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17752      # If it failed, the variable was not from the command line. Ignore it,
17753      # but warn the user (except for BASH, which is always set by the calling BASH).
17754      if test "xLDD" != xBASH; then
17755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17756$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17757      fi
17758      # Try to locate tool using the code snippet
17759      for ac_prog in ldd
17760do
17761  # Extract the first word of "$ac_prog", so it can be a program name with args.
17762set dummy $ac_prog; ac_word=$2
17763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17764$as_echo_n "checking for $ac_word... " >&6; }
17765if ${ac_cv_path_LDD+:} false; then :
17766  $as_echo_n "(cached) " >&6
17767else
17768  case $LDD in
17769  [\\/]* | ?:[\\/]*)
17770  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17771  ;;
17772  *)
17773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17774for as_dir in $PATH
17775do
17776  IFS=$as_save_IFS
17777  test -z "$as_dir" && as_dir=.
17778    for ac_exec_ext in '' $ac_executable_extensions; do
17779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17780    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17782    break 2
17783  fi
17784done
17785  done
17786IFS=$as_save_IFS
17787
17788  ;;
17789esac
17790fi
17791LDD=$ac_cv_path_LDD
17792if test -n "$LDD"; then
17793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17794$as_echo "$LDD" >&6; }
17795else
17796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17797$as_echo "no" >&6; }
17798fi
17799
17800
17801  test -n "$LDD" && break
17802done
17803
17804    else
17805      # If it succeeded, then it was overridden by the user. We will use it
17806      # for the tool.
17807
17808      # First remove it from the list of overridden variables, so we can test
17809      # for unknown variables in the end.
17810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17811
17812      # Check if the provided tool contains a complete path.
17813      tool_specified="$LDD"
17814      tool_basename="${tool_specified##*/}"
17815      if test "x$tool_basename" = "x$tool_specified"; then
17816        # A command without a complete path is provided, search $PATH.
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17818$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17819        # Extract the first word of "$tool_basename", so it can be a program name with args.
17820set dummy $tool_basename; ac_word=$2
17821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17822$as_echo_n "checking for $ac_word... " >&6; }
17823if ${ac_cv_path_LDD+:} false; then :
17824  $as_echo_n "(cached) " >&6
17825else
17826  case $LDD in
17827  [\\/]* | ?:[\\/]*)
17828  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17829  ;;
17830  *)
17831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17832for as_dir in $PATH
17833do
17834  IFS=$as_save_IFS
17835  test -z "$as_dir" && as_dir=.
17836    for ac_exec_ext in '' $ac_executable_extensions; do
17837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17838    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17840    break 2
17841  fi
17842done
17843  done
17844IFS=$as_save_IFS
17845
17846  ;;
17847esac
17848fi
17849LDD=$ac_cv_path_LDD
17850if test -n "$LDD"; then
17851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17852$as_echo "$LDD" >&6; }
17853else
17854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17855$as_echo "no" >&6; }
17856fi
17857
17858
17859        if test "x$LDD" = x; then
17860          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17861        fi
17862      else
17863        # Otherwise we believe it is a complete path. Use it as it is.
17864        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17865$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17867$as_echo_n "checking for LDD... " >&6; }
17868        if test ! -x "$tool_specified"; then
17869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17870$as_echo "not found" >&6; }
17871          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17872        fi
17873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17874$as_echo "$tool_specified" >&6; }
17875      fi
17876    fi
17877  fi
17878
17879
17880  if test "x$LDD" = "x"; then
17881    # List shared lib dependencies is used for
17882    # debug output and checking for forbidden dependencies.
17883    # We can build without it.
17884    LDD="true"
17885  fi
17886
17887
17888  # Publish this variable in the help.
17889
17890
17891  if test "x$OTOOL" = x; then
17892    # The variable is not set by user, try to locate tool using the code snippet
17893    for ac_prog in otool
17894do
17895  # Extract the first word of "$ac_prog", so it can be a program name with args.
17896set dummy $ac_prog; ac_word=$2
17897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17898$as_echo_n "checking for $ac_word... " >&6; }
17899if ${ac_cv_path_OTOOL+:} false; then :
17900  $as_echo_n "(cached) " >&6
17901else
17902  case $OTOOL in
17903  [\\/]* | ?:[\\/]*)
17904  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17905  ;;
17906  *)
17907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17908for as_dir in $PATH
17909do
17910  IFS=$as_save_IFS
17911  test -z "$as_dir" && as_dir=.
17912    for ac_exec_ext in '' $ac_executable_extensions; do
17913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17914    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17916    break 2
17917  fi
17918done
17919  done
17920IFS=$as_save_IFS
17921
17922  ;;
17923esac
17924fi
17925OTOOL=$ac_cv_path_OTOOL
17926if test -n "$OTOOL"; then
17927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17928$as_echo "$OTOOL" >&6; }
17929else
17930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17931$as_echo "no" >&6; }
17932fi
17933
17934
17935  test -n "$OTOOL" && break
17936done
17937
17938  else
17939    # The variable is set, but is it from the command line or the environment?
17940
17941    # Try to remove the string !OTOOL! from our list.
17942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17944      # If it failed, the variable was not from the command line. Ignore it,
17945      # but warn the user (except for BASH, which is always set by the calling BASH).
17946      if test "xOTOOL" != xBASH; then
17947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17948$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17949      fi
17950      # Try to locate tool using the code snippet
17951      for ac_prog in otool
17952do
17953  # Extract the first word of "$ac_prog", so it can be a program name with args.
17954set dummy $ac_prog; ac_word=$2
17955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17956$as_echo_n "checking for $ac_word... " >&6; }
17957if ${ac_cv_path_OTOOL+:} false; then :
17958  $as_echo_n "(cached) " >&6
17959else
17960  case $OTOOL in
17961  [\\/]* | ?:[\\/]*)
17962  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17963  ;;
17964  *)
17965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17966for as_dir in $PATH
17967do
17968  IFS=$as_save_IFS
17969  test -z "$as_dir" && as_dir=.
17970    for ac_exec_ext in '' $ac_executable_extensions; do
17971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17972    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17974    break 2
17975  fi
17976done
17977  done
17978IFS=$as_save_IFS
17979
17980  ;;
17981esac
17982fi
17983OTOOL=$ac_cv_path_OTOOL
17984if test -n "$OTOOL"; then
17985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17986$as_echo "$OTOOL" >&6; }
17987else
17988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17989$as_echo "no" >&6; }
17990fi
17991
17992
17993  test -n "$OTOOL" && break
17994done
17995
17996    else
17997      # If it succeeded, then it was overridden by the user. We will use it
17998      # for the tool.
17999
18000      # First remove it from the list of overridden variables, so we can test
18001      # for unknown variables in the end.
18002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18003
18004      # Check if the provided tool contains a complete path.
18005      tool_specified="$OTOOL"
18006      tool_basename="${tool_specified##*/}"
18007      if test "x$tool_basename" = "x$tool_specified"; then
18008        # A command without a complete path is provided, search $PATH.
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18010$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18011        # Extract the first word of "$tool_basename", so it can be a program name with args.
18012set dummy $tool_basename; ac_word=$2
18013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18014$as_echo_n "checking for $ac_word... " >&6; }
18015if ${ac_cv_path_OTOOL+:} false; then :
18016  $as_echo_n "(cached) " >&6
18017else
18018  case $OTOOL in
18019  [\\/]* | ?:[\\/]*)
18020  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18021  ;;
18022  *)
18023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18024for as_dir in $PATH
18025do
18026  IFS=$as_save_IFS
18027  test -z "$as_dir" && as_dir=.
18028    for ac_exec_ext in '' $ac_executable_extensions; do
18029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18030    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18032    break 2
18033  fi
18034done
18035  done
18036IFS=$as_save_IFS
18037
18038  ;;
18039esac
18040fi
18041OTOOL=$ac_cv_path_OTOOL
18042if test -n "$OTOOL"; then
18043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18044$as_echo "$OTOOL" >&6; }
18045else
18046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18047$as_echo "no" >&6; }
18048fi
18049
18050
18051        if test "x$OTOOL" = x; then
18052          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18053        fi
18054      else
18055        # Otherwise we believe it is a complete path. Use it as it is.
18056        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18057$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18058        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18059$as_echo_n "checking for OTOOL... " >&6; }
18060        if test ! -x "$tool_specified"; then
18061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18062$as_echo "not found" >&6; }
18063          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18064        fi
18065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18066$as_echo "$tool_specified" >&6; }
18067      fi
18068    fi
18069  fi
18070
18071
18072  if test "x$OTOOL" = "x"; then
18073    OTOOL="true"
18074  fi
18075
18076
18077  # Publish this variable in the help.
18078
18079
18080  if test "x$READELF" = x; then
18081    # The variable is not set by user, try to locate tool using the code snippet
18082    for ac_prog in greadelf readelf
18083do
18084  # Extract the first word of "$ac_prog", so it can be a program name with args.
18085set dummy $ac_prog; ac_word=$2
18086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18087$as_echo_n "checking for $ac_word... " >&6; }
18088if ${ac_cv_path_READELF+:} false; then :
18089  $as_echo_n "(cached) " >&6
18090else
18091  case $READELF in
18092  [\\/]* | ?:[\\/]*)
18093  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18094  ;;
18095  *)
18096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18097for as_dir in $PATH
18098do
18099  IFS=$as_save_IFS
18100  test -z "$as_dir" && as_dir=.
18101    for ac_exec_ext in '' $ac_executable_extensions; do
18102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18103    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18105    break 2
18106  fi
18107done
18108  done
18109IFS=$as_save_IFS
18110
18111  ;;
18112esac
18113fi
18114READELF=$ac_cv_path_READELF
18115if test -n "$READELF"; then
18116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18117$as_echo "$READELF" >&6; }
18118else
18119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18120$as_echo "no" >&6; }
18121fi
18122
18123
18124  test -n "$READELF" && break
18125done
18126
18127  else
18128    # The variable is set, but is it from the command line or the environment?
18129
18130    # Try to remove the string !READELF! from our list.
18131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18133      # If it failed, the variable was not from the command line. Ignore it,
18134      # but warn the user (except for BASH, which is always set by the calling BASH).
18135      if test "xREADELF" != xBASH; then
18136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18137$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18138      fi
18139      # Try to locate tool using the code snippet
18140      for ac_prog in greadelf readelf
18141do
18142  # Extract the first word of "$ac_prog", so it can be a program name with args.
18143set dummy $ac_prog; ac_word=$2
18144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18145$as_echo_n "checking for $ac_word... " >&6; }
18146if ${ac_cv_path_READELF+:} false; then :
18147  $as_echo_n "(cached) " >&6
18148else
18149  case $READELF in
18150  [\\/]* | ?:[\\/]*)
18151  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18152  ;;
18153  *)
18154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18155for as_dir in $PATH
18156do
18157  IFS=$as_save_IFS
18158  test -z "$as_dir" && as_dir=.
18159    for ac_exec_ext in '' $ac_executable_extensions; do
18160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18161    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18163    break 2
18164  fi
18165done
18166  done
18167IFS=$as_save_IFS
18168
18169  ;;
18170esac
18171fi
18172READELF=$ac_cv_path_READELF
18173if test -n "$READELF"; then
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18175$as_echo "$READELF" >&6; }
18176else
18177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18178$as_echo "no" >&6; }
18179fi
18180
18181
18182  test -n "$READELF" && break
18183done
18184
18185    else
18186      # If it succeeded, then it was overridden by the user. We will use it
18187      # for the tool.
18188
18189      # First remove it from the list of overridden variables, so we can test
18190      # for unknown variables in the end.
18191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18192
18193      # Check if the provided tool contains a complete path.
18194      tool_specified="$READELF"
18195      tool_basename="${tool_specified##*/}"
18196      if test "x$tool_basename" = "x$tool_specified"; then
18197        # A command without a complete path is provided, search $PATH.
18198        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18199$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18200        # Extract the first word of "$tool_basename", so it can be a program name with args.
18201set dummy $tool_basename; ac_word=$2
18202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18203$as_echo_n "checking for $ac_word... " >&6; }
18204if ${ac_cv_path_READELF+:} false; then :
18205  $as_echo_n "(cached) " >&6
18206else
18207  case $READELF in
18208  [\\/]* | ?:[\\/]*)
18209  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18210  ;;
18211  *)
18212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18213for as_dir in $PATH
18214do
18215  IFS=$as_save_IFS
18216  test -z "$as_dir" && as_dir=.
18217    for ac_exec_ext in '' $ac_executable_extensions; do
18218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18219    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18221    break 2
18222  fi
18223done
18224  done
18225IFS=$as_save_IFS
18226
18227  ;;
18228esac
18229fi
18230READELF=$ac_cv_path_READELF
18231if test -n "$READELF"; then
18232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18233$as_echo "$READELF" >&6; }
18234else
18235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18236$as_echo "no" >&6; }
18237fi
18238
18239
18240        if test "x$READELF" = x; then
18241          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18242        fi
18243      else
18244        # Otherwise we believe it is a complete path. Use it as it is.
18245        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18246$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18248$as_echo_n "checking for READELF... " >&6; }
18249        if test ! -x "$tool_specified"; then
18250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18251$as_echo "not found" >&6; }
18252          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18253        fi
18254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18255$as_echo "$tool_specified" >&6; }
18256      fi
18257    fi
18258  fi
18259
18260
18261
18262
18263  # Publish this variable in the help.
18264
18265
18266  if test "x$HG" = x; then
18267    # The variable is not set by user, try to locate tool using the code snippet
18268    for ac_prog in hg
18269do
18270  # Extract the first word of "$ac_prog", so it can be a program name with args.
18271set dummy $ac_prog; ac_word=$2
18272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18273$as_echo_n "checking for $ac_word... " >&6; }
18274if ${ac_cv_path_HG+:} false; then :
18275  $as_echo_n "(cached) " >&6
18276else
18277  case $HG in
18278  [\\/]* | ?:[\\/]*)
18279  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18280  ;;
18281  *)
18282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18283for as_dir in $PATH
18284do
18285  IFS=$as_save_IFS
18286  test -z "$as_dir" && as_dir=.
18287    for ac_exec_ext in '' $ac_executable_extensions; do
18288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18289    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18291    break 2
18292  fi
18293done
18294  done
18295IFS=$as_save_IFS
18296
18297  ;;
18298esac
18299fi
18300HG=$ac_cv_path_HG
18301if test -n "$HG"; then
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18303$as_echo "$HG" >&6; }
18304else
18305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18306$as_echo "no" >&6; }
18307fi
18308
18309
18310  test -n "$HG" && break
18311done
18312
18313  else
18314    # The variable is set, but is it from the command line or the environment?
18315
18316    # Try to remove the string !HG! from our list.
18317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18319      # If it failed, the variable was not from the command line. Ignore it,
18320      # but warn the user (except for BASH, which is always set by the calling BASH).
18321      if test "xHG" != xBASH; then
18322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18323$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18324      fi
18325      # Try to locate tool using the code snippet
18326      for ac_prog in hg
18327do
18328  # Extract the first word of "$ac_prog", so it can be a program name with args.
18329set dummy $ac_prog; ac_word=$2
18330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18331$as_echo_n "checking for $ac_word... " >&6; }
18332if ${ac_cv_path_HG+:} false; then :
18333  $as_echo_n "(cached) " >&6
18334else
18335  case $HG in
18336  [\\/]* | ?:[\\/]*)
18337  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18338  ;;
18339  *)
18340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18341for as_dir in $PATH
18342do
18343  IFS=$as_save_IFS
18344  test -z "$as_dir" && as_dir=.
18345    for ac_exec_ext in '' $ac_executable_extensions; do
18346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18347    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18349    break 2
18350  fi
18351done
18352  done
18353IFS=$as_save_IFS
18354
18355  ;;
18356esac
18357fi
18358HG=$ac_cv_path_HG
18359if test -n "$HG"; then
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18361$as_echo "$HG" >&6; }
18362else
18363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18364$as_echo "no" >&6; }
18365fi
18366
18367
18368  test -n "$HG" && break
18369done
18370
18371    else
18372      # If it succeeded, then it was overridden by the user. We will use it
18373      # for the tool.
18374
18375      # First remove it from the list of overridden variables, so we can test
18376      # for unknown variables in the end.
18377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18378
18379      # Check if the provided tool contains a complete path.
18380      tool_specified="$HG"
18381      tool_basename="${tool_specified##*/}"
18382      if test "x$tool_basename" = "x$tool_specified"; then
18383        # A command without a complete path is provided, search $PATH.
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18385$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18386        # Extract the first word of "$tool_basename", so it can be a program name with args.
18387set dummy $tool_basename; ac_word=$2
18388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18389$as_echo_n "checking for $ac_word... " >&6; }
18390if ${ac_cv_path_HG+:} false; then :
18391  $as_echo_n "(cached) " >&6
18392else
18393  case $HG in
18394  [\\/]* | ?:[\\/]*)
18395  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18396  ;;
18397  *)
18398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18399for as_dir in $PATH
18400do
18401  IFS=$as_save_IFS
18402  test -z "$as_dir" && as_dir=.
18403    for ac_exec_ext in '' $ac_executable_extensions; do
18404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18405    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18407    break 2
18408  fi
18409done
18410  done
18411IFS=$as_save_IFS
18412
18413  ;;
18414esac
18415fi
18416HG=$ac_cv_path_HG
18417if test -n "$HG"; then
18418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18419$as_echo "$HG" >&6; }
18420else
18421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18422$as_echo "no" >&6; }
18423fi
18424
18425
18426        if test "x$HG" = x; then
18427          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18428        fi
18429      else
18430        # Otherwise we believe it is a complete path. Use it as it is.
18431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18432$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18433        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18434$as_echo_n "checking for HG... " >&6; }
18435        if test ! -x "$tool_specified"; then
18436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18437$as_echo "not found" >&6; }
18438          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18439        fi
18440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18441$as_echo "$tool_specified" >&6; }
18442      fi
18443    fi
18444  fi
18445
18446
18447
18448
18449  # Publish this variable in the help.
18450
18451
18452  if test "x$STAT" = x; then
18453    # The variable is not set by user, try to locate tool using the code snippet
18454    for ac_prog in stat
18455do
18456  # Extract the first word of "$ac_prog", so it can be a program name with args.
18457set dummy $ac_prog; ac_word=$2
18458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18459$as_echo_n "checking for $ac_word... " >&6; }
18460if ${ac_cv_path_STAT+:} false; then :
18461  $as_echo_n "(cached) " >&6
18462else
18463  case $STAT in
18464  [\\/]* | ?:[\\/]*)
18465  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18466  ;;
18467  *)
18468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18469for as_dir in $PATH
18470do
18471  IFS=$as_save_IFS
18472  test -z "$as_dir" && as_dir=.
18473    for ac_exec_ext in '' $ac_executable_extensions; do
18474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18475    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18477    break 2
18478  fi
18479done
18480  done
18481IFS=$as_save_IFS
18482
18483  ;;
18484esac
18485fi
18486STAT=$ac_cv_path_STAT
18487if test -n "$STAT"; then
18488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18489$as_echo "$STAT" >&6; }
18490else
18491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18492$as_echo "no" >&6; }
18493fi
18494
18495
18496  test -n "$STAT" && break
18497done
18498
18499  else
18500    # The variable is set, but is it from the command line or the environment?
18501
18502    # Try to remove the string !STAT! from our list.
18503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18505      # If it failed, the variable was not from the command line. Ignore it,
18506      # but warn the user (except for BASH, which is always set by the calling BASH).
18507      if test "xSTAT" != xBASH; then
18508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18509$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18510      fi
18511      # Try to locate tool using the code snippet
18512      for ac_prog in stat
18513do
18514  # Extract the first word of "$ac_prog", so it can be a program name with args.
18515set dummy $ac_prog; ac_word=$2
18516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517$as_echo_n "checking for $ac_word... " >&6; }
18518if ${ac_cv_path_STAT+:} false; then :
18519  $as_echo_n "(cached) " >&6
18520else
18521  case $STAT in
18522  [\\/]* | ?:[\\/]*)
18523  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18524  ;;
18525  *)
18526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527for as_dir in $PATH
18528do
18529  IFS=$as_save_IFS
18530  test -z "$as_dir" && as_dir=.
18531    for ac_exec_ext in '' $ac_executable_extensions; do
18532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535    break 2
18536  fi
18537done
18538  done
18539IFS=$as_save_IFS
18540
18541  ;;
18542esac
18543fi
18544STAT=$ac_cv_path_STAT
18545if test -n "$STAT"; then
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18547$as_echo "$STAT" >&6; }
18548else
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550$as_echo "no" >&6; }
18551fi
18552
18553
18554  test -n "$STAT" && break
18555done
18556
18557    else
18558      # If it succeeded, then it was overridden by the user. We will use it
18559      # for the tool.
18560
18561      # First remove it from the list of overridden variables, so we can test
18562      # for unknown variables in the end.
18563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18564
18565      # Check if the provided tool contains a complete path.
18566      tool_specified="$STAT"
18567      tool_basename="${tool_specified##*/}"
18568      if test "x$tool_basename" = "x$tool_specified"; then
18569        # A command without a complete path is provided, search $PATH.
18570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18571$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18572        # Extract the first word of "$tool_basename", so it can be a program name with args.
18573set dummy $tool_basename; ac_word=$2
18574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18575$as_echo_n "checking for $ac_word... " >&6; }
18576if ${ac_cv_path_STAT+:} false; then :
18577  $as_echo_n "(cached) " >&6
18578else
18579  case $STAT in
18580  [\\/]* | ?:[\\/]*)
18581  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18582  ;;
18583  *)
18584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18585for as_dir in $PATH
18586do
18587  IFS=$as_save_IFS
18588  test -z "$as_dir" && as_dir=.
18589    for ac_exec_ext in '' $ac_executable_extensions; do
18590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18591    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18593    break 2
18594  fi
18595done
18596  done
18597IFS=$as_save_IFS
18598
18599  ;;
18600esac
18601fi
18602STAT=$ac_cv_path_STAT
18603if test -n "$STAT"; then
18604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18605$as_echo "$STAT" >&6; }
18606else
18607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608$as_echo "no" >&6; }
18609fi
18610
18611
18612        if test "x$STAT" = x; then
18613          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18614        fi
18615      else
18616        # Otherwise we believe it is a complete path. Use it as it is.
18617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18618$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18620$as_echo_n "checking for STAT... " >&6; }
18621        if test ! -x "$tool_specified"; then
18622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18623$as_echo "not found" >&6; }
18624          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18625        fi
18626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18627$as_echo "$tool_specified" >&6; }
18628      fi
18629    fi
18630  fi
18631
18632
18633
18634
18635  # Publish this variable in the help.
18636
18637
18638  if test "x$TIME" = x; then
18639    # The variable is not set by user, try to locate tool using the code snippet
18640    for ac_prog in time
18641do
18642  # Extract the first word of "$ac_prog", so it can be a program name with args.
18643set dummy $ac_prog; ac_word=$2
18644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18645$as_echo_n "checking for $ac_word... " >&6; }
18646if ${ac_cv_path_TIME+:} false; then :
18647  $as_echo_n "(cached) " >&6
18648else
18649  case $TIME in
18650  [\\/]* | ?:[\\/]*)
18651  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18652  ;;
18653  *)
18654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18655for as_dir in $PATH
18656do
18657  IFS=$as_save_IFS
18658  test -z "$as_dir" && as_dir=.
18659    for ac_exec_ext in '' $ac_executable_extensions; do
18660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18661    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18663    break 2
18664  fi
18665done
18666  done
18667IFS=$as_save_IFS
18668
18669  ;;
18670esac
18671fi
18672TIME=$ac_cv_path_TIME
18673if test -n "$TIME"; then
18674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18675$as_echo "$TIME" >&6; }
18676else
18677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18678$as_echo "no" >&6; }
18679fi
18680
18681
18682  test -n "$TIME" && break
18683done
18684
18685  else
18686    # The variable is set, but is it from the command line or the environment?
18687
18688    # Try to remove the string !TIME! from our list.
18689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18691      # If it failed, the variable was not from the command line. Ignore it,
18692      # but warn the user (except for BASH, which is always set by the calling BASH).
18693      if test "xTIME" != xBASH; then
18694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18695$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18696      fi
18697      # Try to locate tool using the code snippet
18698      for ac_prog in time
18699do
18700  # Extract the first word of "$ac_prog", so it can be a program name with args.
18701set dummy $ac_prog; ac_word=$2
18702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18703$as_echo_n "checking for $ac_word... " >&6; }
18704if ${ac_cv_path_TIME+:} false; then :
18705  $as_echo_n "(cached) " >&6
18706else
18707  case $TIME in
18708  [\\/]* | ?:[\\/]*)
18709  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18710  ;;
18711  *)
18712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713for as_dir in $PATH
18714do
18715  IFS=$as_save_IFS
18716  test -z "$as_dir" && as_dir=.
18717    for ac_exec_ext in '' $ac_executable_extensions; do
18718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18721    break 2
18722  fi
18723done
18724  done
18725IFS=$as_save_IFS
18726
18727  ;;
18728esac
18729fi
18730TIME=$ac_cv_path_TIME
18731if test -n "$TIME"; then
18732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18733$as_echo "$TIME" >&6; }
18734else
18735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18736$as_echo "no" >&6; }
18737fi
18738
18739
18740  test -n "$TIME" && break
18741done
18742
18743    else
18744      # If it succeeded, then it was overridden by the user. We will use it
18745      # for the tool.
18746
18747      # First remove it from the list of overridden variables, so we can test
18748      # for unknown variables in the end.
18749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18750
18751      # Check if the provided tool contains a complete path.
18752      tool_specified="$TIME"
18753      tool_basename="${tool_specified##*/}"
18754      if test "x$tool_basename" = "x$tool_specified"; then
18755        # A command without a complete path is provided, search $PATH.
18756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18757$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18758        # Extract the first word of "$tool_basename", so it can be a program name with args.
18759set dummy $tool_basename; ac_word=$2
18760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18761$as_echo_n "checking for $ac_word... " >&6; }
18762if ${ac_cv_path_TIME+:} false; then :
18763  $as_echo_n "(cached) " >&6
18764else
18765  case $TIME in
18766  [\\/]* | ?:[\\/]*)
18767  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18768  ;;
18769  *)
18770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18771for as_dir in $PATH
18772do
18773  IFS=$as_save_IFS
18774  test -z "$as_dir" && as_dir=.
18775    for ac_exec_ext in '' $ac_executable_extensions; do
18776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18777    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18779    break 2
18780  fi
18781done
18782  done
18783IFS=$as_save_IFS
18784
18785  ;;
18786esac
18787fi
18788TIME=$ac_cv_path_TIME
18789if test -n "$TIME"; then
18790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18791$as_echo "$TIME" >&6; }
18792else
18793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18794$as_echo "no" >&6; }
18795fi
18796
18797
18798        if test "x$TIME" = x; then
18799          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18800        fi
18801      else
18802        # Otherwise we believe it is a complete path. Use it as it is.
18803        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18804$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18806$as_echo_n "checking for TIME... " >&6; }
18807        if test ! -x "$tool_specified"; then
18808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18809$as_echo "not found" >&6; }
18810          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18811        fi
18812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18813$as_echo "$tool_specified" >&6; }
18814      fi
18815    fi
18816  fi
18817
18818
18819  # Check if it's GNU time
18820  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18821  if test "x$IS_GNU_TIME" != x; then
18822    IS_GNU_TIME=yes
18823  else
18824    IS_GNU_TIME=no
18825  fi
18826
18827
18828  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18829
18830
18831
18832  # Publish this variable in the help.
18833
18834
18835  if test "x$COMM" = x; then
18836    # The variable is not set by user, try to locate tool using the code snippet
18837    for ac_prog in comm
18838do
18839  # Extract the first word of "$ac_prog", so it can be a program name with args.
18840set dummy $ac_prog; ac_word=$2
18841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18842$as_echo_n "checking for $ac_word... " >&6; }
18843if ${ac_cv_path_COMM+:} false; then :
18844  $as_echo_n "(cached) " >&6
18845else
18846  case $COMM in
18847  [\\/]* | ?:[\\/]*)
18848  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18849  ;;
18850  *)
18851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18852for as_dir in $PATH
18853do
18854  IFS=$as_save_IFS
18855  test -z "$as_dir" && as_dir=.
18856    for ac_exec_ext in '' $ac_executable_extensions; do
18857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18858    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18860    break 2
18861  fi
18862done
18863  done
18864IFS=$as_save_IFS
18865
18866  ;;
18867esac
18868fi
18869COMM=$ac_cv_path_COMM
18870if test -n "$COMM"; then
18871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18872$as_echo "$COMM" >&6; }
18873else
18874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18875$as_echo "no" >&6; }
18876fi
18877
18878
18879  test -n "$COMM" && break
18880done
18881
18882  else
18883    # The variable is set, but is it from the command line or the environment?
18884
18885    # Try to remove the string !COMM! from our list.
18886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18888      # If it failed, the variable was not from the command line. Ignore it,
18889      # but warn the user (except for BASH, which is always set by the calling BASH).
18890      if test "xCOMM" != xBASH; then
18891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18892$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18893      fi
18894      # Try to locate tool using the code snippet
18895      for ac_prog in comm
18896do
18897  # Extract the first word of "$ac_prog", so it can be a program name with args.
18898set dummy $ac_prog; ac_word=$2
18899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18900$as_echo_n "checking for $ac_word... " >&6; }
18901if ${ac_cv_path_COMM+:} false; then :
18902  $as_echo_n "(cached) " >&6
18903else
18904  case $COMM in
18905  [\\/]* | ?:[\\/]*)
18906  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18907  ;;
18908  *)
18909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18910for as_dir in $PATH
18911do
18912  IFS=$as_save_IFS
18913  test -z "$as_dir" && as_dir=.
18914    for ac_exec_ext in '' $ac_executable_extensions; do
18915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18916    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18918    break 2
18919  fi
18920done
18921  done
18922IFS=$as_save_IFS
18923
18924  ;;
18925esac
18926fi
18927COMM=$ac_cv_path_COMM
18928if test -n "$COMM"; then
18929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18930$as_echo "$COMM" >&6; }
18931else
18932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18933$as_echo "no" >&6; }
18934fi
18935
18936
18937  test -n "$COMM" && break
18938done
18939
18940    else
18941      # If it succeeded, then it was overridden by the user. We will use it
18942      # for the tool.
18943
18944      # First remove it from the list of overridden variables, so we can test
18945      # for unknown variables in the end.
18946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18947
18948      # Check if the provided tool contains a complete path.
18949      tool_specified="$COMM"
18950      tool_basename="${tool_specified##*/}"
18951      if test "x$tool_basename" = "x$tool_specified"; then
18952        # A command without a complete path is provided, search $PATH.
18953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18954$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18955        # Extract the first word of "$tool_basename", so it can be a program name with args.
18956set dummy $tool_basename; ac_word=$2
18957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18958$as_echo_n "checking for $ac_word... " >&6; }
18959if ${ac_cv_path_COMM+:} false; then :
18960  $as_echo_n "(cached) " >&6
18961else
18962  case $COMM in
18963  [\\/]* | ?:[\\/]*)
18964  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18965  ;;
18966  *)
18967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18968for as_dir in $PATH
18969do
18970  IFS=$as_save_IFS
18971  test -z "$as_dir" && as_dir=.
18972    for ac_exec_ext in '' $ac_executable_extensions; do
18973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18974    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18976    break 2
18977  fi
18978done
18979  done
18980IFS=$as_save_IFS
18981
18982  ;;
18983esac
18984fi
18985COMM=$ac_cv_path_COMM
18986if test -n "$COMM"; then
18987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18988$as_echo "$COMM" >&6; }
18989else
18990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18991$as_echo "no" >&6; }
18992fi
18993
18994
18995        if test "x$COMM" = x; then
18996          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18997        fi
18998      else
18999        # Otherwise we believe it is a complete path. Use it as it is.
19000        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
19001$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
19002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19003$as_echo_n "checking for COMM... " >&6; }
19004        if test ! -x "$tool_specified"; then
19005          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19006$as_echo "not found" >&6; }
19007          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19008        fi
19009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19010$as_echo "$tool_specified" >&6; }
19011      fi
19012    fi
19013  fi
19014
19015
19016
19017  if test "x$COMM" = x; then
19018    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19019  fi
19020
19021
19022  fi
19023
19024  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19025
19026
19027
19028  # Publish this variable in the help.
19029
19030
19031  if test "x$DSYMUTIL" = x; then
19032    # The variable is not set by user, try to locate tool using the code snippet
19033    for ac_prog in dsymutil
19034do
19035  # Extract the first word of "$ac_prog", so it can be a program name with args.
19036set dummy $ac_prog; ac_word=$2
19037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19038$as_echo_n "checking for $ac_word... " >&6; }
19039if ${ac_cv_path_DSYMUTIL+:} false; then :
19040  $as_echo_n "(cached) " >&6
19041else
19042  case $DSYMUTIL in
19043  [\\/]* | ?:[\\/]*)
19044  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19045  ;;
19046  *)
19047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19048for as_dir in $PATH
19049do
19050  IFS=$as_save_IFS
19051  test -z "$as_dir" && as_dir=.
19052    for ac_exec_ext in '' $ac_executable_extensions; do
19053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19054    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19056    break 2
19057  fi
19058done
19059  done
19060IFS=$as_save_IFS
19061
19062  ;;
19063esac
19064fi
19065DSYMUTIL=$ac_cv_path_DSYMUTIL
19066if test -n "$DSYMUTIL"; then
19067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19068$as_echo "$DSYMUTIL" >&6; }
19069else
19070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19071$as_echo "no" >&6; }
19072fi
19073
19074
19075  test -n "$DSYMUTIL" && break
19076done
19077
19078  else
19079    # The variable is set, but is it from the command line or the environment?
19080
19081    # Try to remove the string !DSYMUTIL! from our list.
19082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19084      # If it failed, the variable was not from the command line. Ignore it,
19085      # but warn the user (except for BASH, which is always set by the calling BASH).
19086      if test "xDSYMUTIL" != xBASH; then
19087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19088$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19089      fi
19090      # Try to locate tool using the code snippet
19091      for ac_prog in dsymutil
19092do
19093  # Extract the first word of "$ac_prog", so it can be a program name with args.
19094set dummy $ac_prog; ac_word=$2
19095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19096$as_echo_n "checking for $ac_word... " >&6; }
19097if ${ac_cv_path_DSYMUTIL+:} false; then :
19098  $as_echo_n "(cached) " >&6
19099else
19100  case $DSYMUTIL in
19101  [\\/]* | ?:[\\/]*)
19102  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19103  ;;
19104  *)
19105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19106for as_dir in $PATH
19107do
19108  IFS=$as_save_IFS
19109  test -z "$as_dir" && as_dir=.
19110    for ac_exec_ext in '' $ac_executable_extensions; do
19111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19112    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19114    break 2
19115  fi
19116done
19117  done
19118IFS=$as_save_IFS
19119
19120  ;;
19121esac
19122fi
19123DSYMUTIL=$ac_cv_path_DSYMUTIL
19124if test -n "$DSYMUTIL"; then
19125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19126$as_echo "$DSYMUTIL" >&6; }
19127else
19128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19129$as_echo "no" >&6; }
19130fi
19131
19132
19133  test -n "$DSYMUTIL" && break
19134done
19135
19136    else
19137      # If it succeeded, then it was overridden by the user. We will use it
19138      # for the tool.
19139
19140      # First remove it from the list of overridden variables, so we can test
19141      # for unknown variables in the end.
19142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19143
19144      # Check if the provided tool contains a complete path.
19145      tool_specified="$DSYMUTIL"
19146      tool_basename="${tool_specified##*/}"
19147      if test "x$tool_basename" = "x$tool_specified"; then
19148        # A command without a complete path is provided, search $PATH.
19149        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19150$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19151        # Extract the first word of "$tool_basename", so it can be a program name with args.
19152set dummy $tool_basename; ac_word=$2
19153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19154$as_echo_n "checking for $ac_word... " >&6; }
19155if ${ac_cv_path_DSYMUTIL+:} false; then :
19156  $as_echo_n "(cached) " >&6
19157else
19158  case $DSYMUTIL in
19159  [\\/]* | ?:[\\/]*)
19160  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19161  ;;
19162  *)
19163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19164for as_dir in $PATH
19165do
19166  IFS=$as_save_IFS
19167  test -z "$as_dir" && as_dir=.
19168    for ac_exec_ext in '' $ac_executable_extensions; do
19169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19170    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19172    break 2
19173  fi
19174done
19175  done
19176IFS=$as_save_IFS
19177
19178  ;;
19179esac
19180fi
19181DSYMUTIL=$ac_cv_path_DSYMUTIL
19182if test -n "$DSYMUTIL"; then
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19184$as_echo "$DSYMUTIL" >&6; }
19185else
19186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19187$as_echo "no" >&6; }
19188fi
19189
19190
19191        if test "x$DSYMUTIL" = x; then
19192          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19193        fi
19194      else
19195        # Otherwise we believe it is a complete path. Use it as it is.
19196        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19197$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19199$as_echo_n "checking for DSYMUTIL... " >&6; }
19200        if test ! -x "$tool_specified"; then
19201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19202$as_echo "not found" >&6; }
19203          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19204        fi
19205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19206$as_echo "$tool_specified" >&6; }
19207      fi
19208    fi
19209  fi
19210
19211
19212
19213  if test "x$DSYMUTIL" = x; then
19214    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19215  fi
19216
19217
19218
19219
19220
19221  # Publish this variable in the help.
19222
19223
19224  if test "x$XATTR" = x; then
19225    # The variable is not set by user, try to locate tool using the code snippet
19226    for ac_prog in xattr
19227do
19228  # Extract the first word of "$ac_prog", so it can be a program name with args.
19229set dummy $ac_prog; ac_word=$2
19230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19231$as_echo_n "checking for $ac_word... " >&6; }
19232if ${ac_cv_path_XATTR+:} false; then :
19233  $as_echo_n "(cached) " >&6
19234else
19235  case $XATTR in
19236  [\\/]* | ?:[\\/]*)
19237  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19238  ;;
19239  *)
19240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19241for as_dir in $PATH
19242do
19243  IFS=$as_save_IFS
19244  test -z "$as_dir" && as_dir=.
19245    for ac_exec_ext in '' $ac_executable_extensions; do
19246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19247    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19249    break 2
19250  fi
19251done
19252  done
19253IFS=$as_save_IFS
19254
19255  ;;
19256esac
19257fi
19258XATTR=$ac_cv_path_XATTR
19259if test -n "$XATTR"; then
19260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19261$as_echo "$XATTR" >&6; }
19262else
19263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19264$as_echo "no" >&6; }
19265fi
19266
19267
19268  test -n "$XATTR" && break
19269done
19270
19271  else
19272    # The variable is set, but is it from the command line or the environment?
19273
19274    # Try to remove the string !XATTR! from our list.
19275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19277      # If it failed, the variable was not from the command line. Ignore it,
19278      # but warn the user (except for BASH, which is always set by the calling BASH).
19279      if test "xXATTR" != xBASH; then
19280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19281$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19282      fi
19283      # Try to locate tool using the code snippet
19284      for ac_prog in xattr
19285do
19286  # Extract the first word of "$ac_prog", so it can be a program name with args.
19287set dummy $ac_prog; ac_word=$2
19288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19289$as_echo_n "checking for $ac_word... " >&6; }
19290if ${ac_cv_path_XATTR+:} false; then :
19291  $as_echo_n "(cached) " >&6
19292else
19293  case $XATTR in
19294  [\\/]* | ?:[\\/]*)
19295  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19296  ;;
19297  *)
19298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19299for as_dir in $PATH
19300do
19301  IFS=$as_save_IFS
19302  test -z "$as_dir" && as_dir=.
19303    for ac_exec_ext in '' $ac_executable_extensions; do
19304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19305    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19307    break 2
19308  fi
19309done
19310  done
19311IFS=$as_save_IFS
19312
19313  ;;
19314esac
19315fi
19316XATTR=$ac_cv_path_XATTR
19317if test -n "$XATTR"; then
19318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19319$as_echo "$XATTR" >&6; }
19320else
19321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19322$as_echo "no" >&6; }
19323fi
19324
19325
19326  test -n "$XATTR" && break
19327done
19328
19329    else
19330      # If it succeeded, then it was overridden by the user. We will use it
19331      # for the tool.
19332
19333      # First remove it from the list of overridden variables, so we can test
19334      # for unknown variables in the end.
19335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19336
19337      # Check if the provided tool contains a complete path.
19338      tool_specified="$XATTR"
19339      tool_basename="${tool_specified##*/}"
19340      if test "x$tool_basename" = "x$tool_specified"; then
19341        # A command without a complete path is provided, search $PATH.
19342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19343$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19344        # Extract the first word of "$tool_basename", so it can be a program name with args.
19345set dummy $tool_basename; ac_word=$2
19346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19347$as_echo_n "checking for $ac_word... " >&6; }
19348if ${ac_cv_path_XATTR+:} false; then :
19349  $as_echo_n "(cached) " >&6
19350else
19351  case $XATTR in
19352  [\\/]* | ?:[\\/]*)
19353  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19354  ;;
19355  *)
19356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19357for as_dir in $PATH
19358do
19359  IFS=$as_save_IFS
19360  test -z "$as_dir" && as_dir=.
19361    for ac_exec_ext in '' $ac_executable_extensions; do
19362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19363    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19365    break 2
19366  fi
19367done
19368  done
19369IFS=$as_save_IFS
19370
19371  ;;
19372esac
19373fi
19374XATTR=$ac_cv_path_XATTR
19375if test -n "$XATTR"; then
19376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19377$as_echo "$XATTR" >&6; }
19378else
19379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19380$as_echo "no" >&6; }
19381fi
19382
19383
19384        if test "x$XATTR" = x; then
19385          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19386        fi
19387      else
19388        # Otherwise we believe it is a complete path. Use it as it is.
19389        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19390$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19392$as_echo_n "checking for XATTR... " >&6; }
19393        if test ! -x "$tool_specified"; then
19394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19395$as_echo "not found" >&6; }
19396          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19397        fi
19398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19399$as_echo "$tool_specified" >&6; }
19400      fi
19401    fi
19402  fi
19403
19404
19405
19406  if test "x$XATTR" = x; then
19407    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19408  fi
19409
19410
19411
19412
19413  # Publish this variable in the help.
19414
19415
19416  if test "x$CODESIGN" = x; then
19417    # The variable is not set by user, try to locate tool using the code snippet
19418    for ac_prog in codesign
19419do
19420  # Extract the first word of "$ac_prog", so it can be a program name with args.
19421set dummy $ac_prog; ac_word=$2
19422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19423$as_echo_n "checking for $ac_word... " >&6; }
19424if ${ac_cv_path_CODESIGN+:} false; then :
19425  $as_echo_n "(cached) " >&6
19426else
19427  case $CODESIGN in
19428  [\\/]* | ?:[\\/]*)
19429  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19430  ;;
19431  *)
19432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19433for as_dir in $PATH
19434do
19435  IFS=$as_save_IFS
19436  test -z "$as_dir" && as_dir=.
19437    for ac_exec_ext in '' $ac_executable_extensions; do
19438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19439    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19441    break 2
19442  fi
19443done
19444  done
19445IFS=$as_save_IFS
19446
19447  ;;
19448esac
19449fi
19450CODESIGN=$ac_cv_path_CODESIGN
19451if test -n "$CODESIGN"; then
19452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19453$as_echo "$CODESIGN" >&6; }
19454else
19455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19456$as_echo "no" >&6; }
19457fi
19458
19459
19460  test -n "$CODESIGN" && break
19461done
19462
19463  else
19464    # The variable is set, but is it from the command line or the environment?
19465
19466    # Try to remove the string !CODESIGN! from our list.
19467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19469      # If it failed, the variable was not from the command line. Ignore it,
19470      # but warn the user (except for BASH, which is always set by the calling BASH).
19471      if test "xCODESIGN" != xBASH; then
19472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19473$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19474      fi
19475      # Try to locate tool using the code snippet
19476      for ac_prog in codesign
19477do
19478  # Extract the first word of "$ac_prog", so it can be a program name with args.
19479set dummy $ac_prog; ac_word=$2
19480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19481$as_echo_n "checking for $ac_word... " >&6; }
19482if ${ac_cv_path_CODESIGN+:} false; then :
19483  $as_echo_n "(cached) " >&6
19484else
19485  case $CODESIGN in
19486  [\\/]* | ?:[\\/]*)
19487  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19488  ;;
19489  *)
19490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19491for as_dir in $PATH
19492do
19493  IFS=$as_save_IFS
19494  test -z "$as_dir" && as_dir=.
19495    for ac_exec_ext in '' $ac_executable_extensions; do
19496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19497    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19499    break 2
19500  fi
19501done
19502  done
19503IFS=$as_save_IFS
19504
19505  ;;
19506esac
19507fi
19508CODESIGN=$ac_cv_path_CODESIGN
19509if test -n "$CODESIGN"; then
19510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19511$as_echo "$CODESIGN" >&6; }
19512else
19513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19514$as_echo "no" >&6; }
19515fi
19516
19517
19518  test -n "$CODESIGN" && break
19519done
19520
19521    else
19522      # If it succeeded, then it was overridden by the user. We will use it
19523      # for the tool.
19524
19525      # First remove it from the list of overridden variables, so we can test
19526      # for unknown variables in the end.
19527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19528
19529      # Check if the provided tool contains a complete path.
19530      tool_specified="$CODESIGN"
19531      tool_basename="${tool_specified##*/}"
19532      if test "x$tool_basename" = "x$tool_specified"; then
19533        # A command without a complete path is provided, search $PATH.
19534        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19535$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19536        # Extract the first word of "$tool_basename", so it can be a program name with args.
19537set dummy $tool_basename; ac_word=$2
19538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19539$as_echo_n "checking for $ac_word... " >&6; }
19540if ${ac_cv_path_CODESIGN+:} false; then :
19541  $as_echo_n "(cached) " >&6
19542else
19543  case $CODESIGN in
19544  [\\/]* | ?:[\\/]*)
19545  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19546  ;;
19547  *)
19548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19549for as_dir in $PATH
19550do
19551  IFS=$as_save_IFS
19552  test -z "$as_dir" && as_dir=.
19553    for ac_exec_ext in '' $ac_executable_extensions; do
19554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19555    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19557    break 2
19558  fi
19559done
19560  done
19561IFS=$as_save_IFS
19562
19563  ;;
19564esac
19565fi
19566CODESIGN=$ac_cv_path_CODESIGN
19567if test -n "$CODESIGN"; then
19568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19569$as_echo "$CODESIGN" >&6; }
19570else
19571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19572$as_echo "no" >&6; }
19573fi
19574
19575
19576        if test "x$CODESIGN" = x; then
19577          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19578        fi
19579      else
19580        # Otherwise we believe it is a complete path. Use it as it is.
19581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19582$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19584$as_echo_n "checking for CODESIGN... " >&6; }
19585        if test ! -x "$tool_specified"; then
19586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19587$as_echo "not found" >&6; }
19588          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19589        fi
19590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19591$as_echo "$tool_specified" >&6; }
19592      fi
19593    fi
19594  fi
19595
19596
19597    if test "x$CODESIGN" != "x"; then
19598      # Verify that the openjdk_codesign certificate is present
19599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19600$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19601      rm -f codesign-testfile
19602      touch codesign-testfile
19603      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19604      rm -f codesign-testfile
19605      if test "x$CODESIGN" = x; then
19606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19607$as_echo "no" >&6; }
19608      else
19609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19610$as_echo "yes" >&6; }
19611      fi
19612    fi
19613  fi
19614
19615
19616  # Test if bash supports pipefail.
19617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19618$as_echo_n "checking if bash supports pipefail... " >&6; }
19619  if ${BASH} -c 'set -o pipefail'; then
19620    BASH_ARGS="$BASH_ARGS -o pipefail"
19621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19622$as_echo "yes" >&6; }
19623  else
19624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19625$as_echo "no" >&6; }
19626  fi
19627
19628  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19629$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19630  if ${BASH} -e -c 'true'; then
19631    BASH_ARGS="$BASH_ARGS -e"
19632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19633$as_echo "yes" >&6; }
19634  else
19635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19636$as_echo "no" >&6; }
19637  fi
19638
19639
19640
19641
19642# Check if pkg-config is available.
19643
19644
19645if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19646	if test -n "$ac_tool_prefix"; then
19647  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19648set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19650$as_echo_n "checking for $ac_word... " >&6; }
19651if ${ac_cv_path_PKG_CONFIG+:} false; then :
19652  $as_echo_n "(cached) " >&6
19653else
19654  case $PKG_CONFIG in
19655  [\\/]* | ?:[\\/]*)
19656  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19657  ;;
19658  *)
19659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19660for as_dir in $PATH
19661do
19662  IFS=$as_save_IFS
19663  test -z "$as_dir" && as_dir=.
19664    for ac_exec_ext in '' $ac_executable_extensions; do
19665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19666    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19668    break 2
19669  fi
19670done
19671  done
19672IFS=$as_save_IFS
19673
19674  ;;
19675esac
19676fi
19677PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19678if test -n "$PKG_CONFIG"; then
19679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19680$as_echo "$PKG_CONFIG" >&6; }
19681else
19682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19683$as_echo "no" >&6; }
19684fi
19685
19686
19687fi
19688if test -z "$ac_cv_path_PKG_CONFIG"; then
19689  ac_pt_PKG_CONFIG=$PKG_CONFIG
19690  # Extract the first word of "pkg-config", so it can be a program name with args.
19691set dummy pkg-config; ac_word=$2
19692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19693$as_echo_n "checking for $ac_word... " >&6; }
19694if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19695  $as_echo_n "(cached) " >&6
19696else
19697  case $ac_pt_PKG_CONFIG in
19698  [\\/]* | ?:[\\/]*)
19699  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19700  ;;
19701  *)
19702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19703for as_dir in $PATH
19704do
19705  IFS=$as_save_IFS
19706  test -z "$as_dir" && as_dir=.
19707    for ac_exec_ext in '' $ac_executable_extensions; do
19708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19709    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19711    break 2
19712  fi
19713done
19714  done
19715IFS=$as_save_IFS
19716
19717  ;;
19718esac
19719fi
19720ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19721if test -n "$ac_pt_PKG_CONFIG"; then
19722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19723$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19724else
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19726$as_echo "no" >&6; }
19727fi
19728
19729  if test "x$ac_pt_PKG_CONFIG" = x; then
19730    PKG_CONFIG=""
19731  else
19732    case $cross_compiling:$ac_tool_warned in
19733yes:)
19734{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19735$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19736ac_tool_warned=yes ;;
19737esac
19738    PKG_CONFIG=$ac_pt_PKG_CONFIG
19739  fi
19740else
19741  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19742fi
19743
19744fi
19745if test -n "$PKG_CONFIG"; then
19746	_pkg_min_version=0.9.0
19747	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19748$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19749	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19750		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19751$as_echo "yes" >&6; }
19752	else
19753		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19754$as_echo "no" >&6; }
19755		PKG_CONFIG=""
19756	fi
19757
19758fi
19759
19760# After basic tools have been setup, we can check build os specific details.
19761
19762  ###############################################################################
19763
19764  # Note that this is the build platform OS version!
19765
19766  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19767  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19768  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19769  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19770
19771
19772
19773
19774
19775# Setup builddeps, for automatic downloading of tools we need.
19776# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19777# boot-jdk setup, but we need to have basic tools setup first.
19778
19779
19780# Check whether --with-builddeps-conf was given.
19781if test "${with_builddeps_conf+set}" = set; then :
19782  withval=$with_builddeps_conf;
19783fi
19784
19785
19786
19787# Check whether --with-builddeps-server was given.
19788if test "${with_builddeps_server+set}" = set; then :
19789  withval=$with_builddeps_server;
19790fi
19791
19792
19793
19794# Check whether --with-builddeps-dir was given.
19795if test "${with_builddeps_dir+set}" = set; then :
19796  withval=$with_builddeps_dir;
19797else
19798  with_builddeps_dir=/localhome/builddeps
19799fi
19800
19801
19802
19803# Check whether --with-builddeps-group was given.
19804if test "${with_builddeps_group+set}" = set; then :
19805  withval=$with_builddeps_group;
19806fi
19807
19808
19809
19810
19811  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19812    if test "x$with_builddeps_conf" != x; then
19813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19814$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19815      builddepsfile=$with_builddeps_conf
19816      if test -s $builddepsfile; then
19817        . $builddepsfile
19818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19819$as_echo "loaded!" >&6; }
19820      else
19821        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19822      fi
19823    else
19824      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19825$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19826      builddepsfile=`mktemp`
19827      touch $builddepsfile
19828      # Put all found confs into a single file.
19829      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19830      # Source the file to acquire the variables
19831      if test -s $builddepsfile; then
19832        . $builddepsfile
19833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19834$as_echo "found at least one!" >&6; }
19835      else
19836        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19837      fi
19838    fi
19839    # Create build and target names that use _ instead of "-" and ".".
19840    # This is necessary to use them in variable names.
19841    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19842    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19843    # Extract rewrite information for build and target
19844    eval rewritten_build=\${REWRITE_${build_var}}
19845    if test "x$rewritten_build" = x; then
19846      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19847      echo Build stays the same $rewritten_build
19848    else
19849      echo Rewriting build for builddeps into $rewritten_build
19850    fi
19851    eval rewritten_target=\${REWRITE_${target_var}}
19852    if test "x$rewritten_target" = x; then
19853      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19854      echo Target stays the same $rewritten_target
19855    else
19856      echo Rewriting target for builddeps into $rewritten_target
19857    fi
19858    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19859    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19860  fi
19861  for ac_prog in 7z unzip
19862do
19863  # Extract the first word of "$ac_prog", so it can be a program name with args.
19864set dummy $ac_prog; ac_word=$2
19865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19866$as_echo_n "checking for $ac_word... " >&6; }
19867if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19868  $as_echo_n "(cached) " >&6
19869else
19870  if test -n "$BDEPS_UNZIP"; then
19871  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19872else
19873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19874for as_dir in $PATH
19875do
19876  IFS=$as_save_IFS
19877  test -z "$as_dir" && as_dir=.
19878    for ac_exec_ext in '' $ac_executable_extensions; do
19879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19880    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19882    break 2
19883  fi
19884done
19885  done
19886IFS=$as_save_IFS
19887
19888fi
19889fi
19890BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19891if test -n "$BDEPS_UNZIP"; then
19892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19893$as_echo "$BDEPS_UNZIP" >&6; }
19894else
19895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19896$as_echo "no" >&6; }
19897fi
19898
19899
19900  test -n "$BDEPS_UNZIP" && break
19901done
19902
19903  if test "x$BDEPS_UNZIP" = x7z; then
19904    BDEPS_UNZIP="7z x"
19905  fi
19906
19907  for ac_prog in wget lftp ftp
19908do
19909  # Extract the first word of "$ac_prog", so it can be a program name with args.
19910set dummy $ac_prog; ac_word=$2
19911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19912$as_echo_n "checking for $ac_word... " >&6; }
19913if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19914  $as_echo_n "(cached) " >&6
19915else
19916  if test -n "$BDEPS_FTP"; then
19917  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19918else
19919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19920for as_dir in $PATH
19921do
19922  IFS=$as_save_IFS
19923  test -z "$as_dir" && as_dir=.
19924    for ac_exec_ext in '' $ac_executable_extensions; do
19925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19926    ac_cv_prog_BDEPS_FTP="$ac_prog"
19927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19928    break 2
19929  fi
19930done
19931  done
19932IFS=$as_save_IFS
19933
19934fi
19935fi
19936BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19937if test -n "$BDEPS_FTP"; then
19938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19939$as_echo "$BDEPS_FTP" >&6; }
19940else
19941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19942$as_echo "no" >&6; }
19943fi
19944
19945
19946  test -n "$BDEPS_FTP" && break
19947done
19948
19949
19950
19951###############################################################################
19952#
19953# Determine OpenJDK variants, options and version numbers.
19954#
19955###############################################################################
19956
19957# We need build & target for this.
19958
19959
19960  ###############################################################################
19961  #
19962  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19963  # We always build headless support.
19964  #
19965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19966$as_echo_n "checking headful support... " >&6; }
19967  # Check whether --enable-headful was given.
19968if test "${enable_headful+set}" = set; then :
19969  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19970else
19971  SUPPORT_HEADFUL=yes
19972fi
19973
19974
19975  SUPPORT_HEADLESS=yes
19976  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19977
19978  if test "x$SUPPORT_HEADFUL" = xyes; then
19979    # We are building both headful and headless.
19980    headful_msg="include support for both headful and headless"
19981  fi
19982
19983  if test "x$SUPPORT_HEADFUL" = xno; then
19984    # Thus we are building headless only.
19985    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19986    headful_msg="headless only"
19987  fi
19988
19989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19990$as_echo "$headful_msg" >&6; }
19991
19992
19993
19994
19995
19996  # Control wether Hotspot runs Queens test after build.
19997  # Check whether --enable-hotspot-test-in-build was given.
19998if test "${enable_hotspot_test_in_build+set}" = set; then :
19999  enableval=$enable_hotspot_test_in_build;
20000else
20001  enable_hotspot_test_in_build=no
20002fi
20003
20004  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20005    TEST_IN_BUILD=true
20006  else
20007    TEST_IN_BUILD=false
20008  fi
20009
20010
20011  ###############################################################################
20012  #
20013  # Choose cacerts source file
20014  #
20015
20016# Check whether --with-cacerts-file was given.
20017if test "${with_cacerts_file+set}" = set; then :
20018  withval=$with_cacerts_file;
20019fi
20020
20021  if test "x$with_cacerts_file" != x; then
20022    CACERTS_FILE=$with_cacerts_file
20023  fi
20024
20025
20026  ###############################################################################
20027  #
20028  # Enable or disable unlimited crypto
20029  #
20030  # Check whether --enable-unlimited-crypto was given.
20031if test "${enable_unlimited_crypto+set}" = set; then :
20032  enableval=$enable_unlimited_crypto;
20033else
20034  enable_unlimited_crypto=no
20035fi
20036
20037  if test "x$enable_unlimited_crypto" = "xyes"; then
20038    UNLIMITED_CRYPTO=true
20039  else
20040    UNLIMITED_CRYPTO=false
20041  fi
20042
20043
20044  ###############################################################################
20045  #
20046  # Enable or disable the elliptic curve crypto implementation
20047  #
20048
20049
20050  ###############################################################################
20051  #
20052  # --enable-rmiconnector-iiop
20053  #
20054  # Check whether --enable-rmiconnector-iiop was given.
20055if test "${enable_rmiconnector_iiop+set}" = set; then :
20056  enableval=$enable_rmiconnector_iiop;
20057fi
20058
20059  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20060    RMICONNECTOR_IIOP=true
20061  else
20062    RMICONNECTOR_IIOP=false
20063  fi
20064
20065
20066  ###############################################################################
20067  #
20068  # Compress jars
20069  #
20070  COMPRESS_JARS=false
20071
20072
20073
20074
20075  # Source the version numbers
20076  . $AUTOCONF_DIR/version-numbers
20077
20078  # Get the settings from parameters
20079
20080# Check whether --with-milestone was given.
20081if test "${with_milestone+set}" = set; then :
20082  withval=$with_milestone;
20083fi
20084
20085  if test "x$with_milestone" = xyes; then
20086    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20087  elif test "x$with_milestone" != x; then
20088    MILESTONE="$with_milestone"
20089  fi
20090  if test "x$MILESTONE" = x; then
20091    MILESTONE=internal
20092  fi
20093
20094
20095# Check whether --with-update-version was given.
20096if test "${with_update_version+set}" = set; then :
20097  withval=$with_update_version;
20098fi
20099
20100  if test "x$with_update_version" = xyes; then
20101    as_fn_error $? "Update version must have a value" "$LINENO" 5
20102  elif test "x$with_update_version" != x; then
20103    JDK_UPDATE_VERSION="$with_update_version"
20104    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20105    # to a bug in expr (which reduces it to just X). To work around this, we
20106    # always add a 0 to one digit update versions.
20107    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20108      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20109    fi
20110  fi
20111
20112
20113# Check whether --with-user-release-suffix was given.
20114if test "${with_user_release_suffix+set}" = set; then :
20115  withval=$with_user_release_suffix;
20116fi
20117
20118  if test "x$with_user_release_suffix" = xyes; then
20119    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20120  elif test "x$with_user_release_suffix" != x; then
20121    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20122  fi
20123
20124
20125# Check whether --with-build-number was given.
20126if test "${with_build_number+set}" = set; then :
20127  withval=$with_build_number;
20128fi
20129
20130  if test "x$with_build_number" = xyes; then
20131    as_fn_error $? "Build number must have a value" "$LINENO" 5
20132  elif test "x$with_build_number" != x; then
20133    JDK_BUILD_NUMBER="$with_build_number"
20134  fi
20135  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20136  if test "x$JDK_BUILD_NUMBER" = x; then
20137    JDK_BUILD_NUMBER=b00
20138    if test "x$USER_RELEASE_SUFFIX" = x; then
20139      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20140      # Avoid [:alnum:] since it depends on the locale.
20141      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20142      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20143    fi
20144  fi
20145
20146  # Now set the JDK version, milestone, build number etc.
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163# Check whether --with-copyright-year was given.
20164if test "${with_copyright_year+set}" = set; then :
20165  withval=$with_copyright_year;
20166fi
20167
20168  if test "x$with_copyright_year" = xyes; then
20169    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20170  elif test "x$with_copyright_year" != x; then
20171    COPYRIGHT_YEAR="$with_copyright_year"
20172  else
20173    COPYRIGHT_YEAR=`date +'%Y'`
20174  fi
20175
20176
20177  if test "x$JDK_UPDATE_VERSION" != x; then
20178    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20179  else
20180    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20181  fi
20182
20183
20184  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20185
20186
20187
20188###############################################################################
20189#
20190# Setup BootJDK, used to bootstrap the build.
20191#
20192###############################################################################
20193
20194
20195  BOOT_JDK_FOUND=no
20196
20197# Check whether --with-boot-jdk was given.
20198if test "${with_boot_jdk+set}" = set; then :
20199  withval=$with_boot_jdk;
20200fi
20201
20202
20203  # We look for the Boot JDK through various means, going from more certain to
20204  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20205  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20206  # must check if this is indeed valid; otherwise we'll continue looking.
20207
20208  # Test: Is bootjdk explicitely set by command line arguments?
20209
20210  if test "x$BOOT_JDK_FOUND" = xno; then
20211    # Now execute the test
20212
20213  if test "x$with_boot_jdk" != x; then
20214    BOOT_JDK=$with_boot_jdk
20215    BOOT_JDK_FOUND=maybe
20216    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20217$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20218  fi
20219
20220
20221    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20222    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20223      # Do we have a bin/java?
20224      if test ! -x "$BOOT_JDK/bin/java"; then
20225        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20227        BOOT_JDK_FOUND=no
20228      else
20229        # Do we have a bin/javac?
20230        if test ! -x "$BOOT_JDK/bin/javac"; then
20231          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20233          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20234$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20235          BOOT_JDK_FOUND=no
20236        else
20237          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20238          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20239
20240          # Extra M4 quote needed to protect [] in grep expression.
20241          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20242          if test "x$FOUND_CORRECT_VERSION" = x; then
20243            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20245            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20246$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20247            BOOT_JDK_FOUND=no
20248          else
20249            # We're done! :-)
20250            BOOT_JDK_FOUND=yes
20251
20252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20253
20254  # Input might be given as Windows format, start by converting to
20255  # unix format.
20256  path="$BOOT_JDK"
20257  new_path=`$CYGPATH -u "$path"`
20258
20259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20262  # "foo.exe" is OK but "foo" is an error.
20263  #
20264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20265  # It is also a way to make sure we got the proper file name for the real test later on.
20266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20267  if test "x$test_shortpath" = x; then
20268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20271  fi
20272
20273  # Call helper function which possibly converts this using DOS-style short mode.
20274  # If so, the updated path is stored in $new_path.
20275
20276  input_path="$new_path"
20277  # Check if we need to convert this using DOS-style short mode. If the path
20278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20279  # take no chances and rewrite it.
20280  # Note: m4 eats our [], so we need to use [ and ] instead.
20281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20282  if test "x$has_forbidden_chars" != x; then
20283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20287      # Going to short mode and back again did indeed matter. Since short mode is
20288      # case insensitive, let's make it lowercase to improve readability.
20289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20290      # Now convert it back to Unix-stile (cygpath)
20291      input_path=`$CYGPATH -u "$shortmode_path"`
20292      new_path="$input_path"
20293    fi
20294  fi
20295
20296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20297  if test "x$test_cygdrive_prefix" = x; then
20298    # As a simple fix, exclude /usr/bin since it's not a real path.
20299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20301      # a path prefixed by /cygdrive for fixpath to work.
20302      new_path="$CYGWIN_ROOT_PATH$input_path"
20303    fi
20304  fi
20305
20306
20307  if test "x$path" != "x$new_path"; then
20308    BOOT_JDK="$new_path"
20309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20311  fi
20312
20313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20314
20315  path="$BOOT_JDK"
20316  has_colon=`$ECHO $path | $GREP ^.:`
20317  new_path="$path"
20318  if test "x$has_colon" = x; then
20319    # Not in mixed or Windows style, start by that.
20320    new_path=`cmd //c echo $path`
20321  fi
20322
20323
20324  input_path="$new_path"
20325  # Check if we need to convert this using DOS-style short mode. If the path
20326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20327  # take no chances and rewrite it.
20328  # Note: m4 eats our [], so we need to use [ and ] instead.
20329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20330  if test "x$has_forbidden_chars" != x; then
20331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20333  fi
20334
20335
20336  windows_path="$new_path"
20337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20338    unix_path=`$CYGPATH -u "$windows_path"`
20339    new_path="$unix_path"
20340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20342    new_path="$unix_path"
20343  fi
20344
20345  if test "x$path" != "x$new_path"; then
20346    BOOT_JDK="$new_path"
20347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20349  fi
20350
20351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20353
20354  else
20355    # We're on a unix platform. Hooray! :)
20356    path="$BOOT_JDK"
20357    has_space=`$ECHO "$path" | $GREP " "`
20358    if test "x$has_space" != x; then
20359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20361      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20362    fi
20363
20364    # Use eval to expand a potential ~
20365    eval path="$path"
20366    if test ! -f "$path" && test ! -d "$path"; then
20367      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20368    fi
20369
20370    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20371  fi
20372
20373            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20374$as_echo_n "checking for Boot JDK... " >&6; }
20375            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20376$as_echo "$BOOT_JDK" >&6; }
20377            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20378$as_echo_n "checking Boot JDK version... " >&6; }
20379            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20381$as_echo "$BOOT_JDK_VERSION" >&6; }
20382          fi # end check jdk version
20383        fi # end check javac
20384      fi # end check java
20385    fi # end check boot jdk found
20386  fi
20387
20388  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20389    # Having specified an argument which is incorrect will produce an instant failure;
20390    # we should not go on looking
20391    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20392  fi
20393
20394  # Test: Is bootjdk available from builddeps?
20395
20396  if test "x$BOOT_JDK_FOUND" = xno; then
20397    # Now execute the test
20398
20399
20400
20401  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20402    # Source the builddeps file again, to make sure it uses the latest variables!
20403    . $builddepsfile
20404    # Look for a target and build machine specific resource!
20405    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20406    if test "x$resource" = x; then
20407      # Ok, lets instead look for a target specific resource
20408      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20409    fi
20410    if test "x$resource" = x; then
20411      # Ok, lets instead look for a build specific resource
20412      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20413    fi
20414    if test "x$resource" = x; then
20415      # Ok, lets instead look for a generic resource
20416      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20417      resource=${builddep_bootjdk}
20418    fi
20419    if test "x$resource" != x; then
20420      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20421$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20422      # If the resource in the builddeps.conf file is an existing directory,
20423      # for example /java/linux/cups
20424      if test -d ${resource}; then
20425        depdir=${resource}
20426      else
20427
20428  # bootjdk is for example mymodule
20429  # $resource is for example libs/general/libmymod_1_2_3.zip
20430  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20431  # $with_builddeps_dir is for example /localhome/builddeps
20432  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20433  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20434  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20435  filename=`basename $resource`
20436  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20437  filebase=${filename%%.*}
20438  extension=${filename#*.}
20439  installdir=$with_builddeps_dir/$filebase
20440  if test ! -f $installdir/$filename.unpacked; then
20441    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20442$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20443    if test ! -d $installdir; then
20444      mkdir -p $installdir
20445    fi
20446    if test ! -d $installdir; then
20447      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20448    fi
20449    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20450    touch $tmpfile
20451    if test ! -f $tmpfile; then
20452      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20453    fi
20454
20455  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20456  # $tmpfile is the local file name for the downloaded file.
20457  VALID_TOOL=no
20458  if test "x$BDEPS_FTP" = xwget; then
20459    VALID_TOOL=yes
20460    wget -O $tmpfile $with_builddeps_server/$resource
20461  fi
20462  if test "x$BDEPS_FTP" = xlftp; then
20463    VALID_TOOL=yes
20464    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20465  fi
20466  if test "x$BDEPS_FTP" = xftp; then
20467    VALID_TOOL=yes
20468    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20469    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20470    FTPUSERPWD=${FTPSERVER%%@*}
20471    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20472      FTPUSER=${userpwd%%:*}
20473      FTPPWD=${userpwd#*@}
20474      FTPSERVER=${FTPSERVER#*@}
20475    else
20476      FTPUSER=ftp
20477      FTPPWD=ftp
20478    fi
20479    # the "pass" command does not work on some
20480    # ftp clients (read ftp.exe) but if it works,
20481    # passive mode is better!
20482    ( \
20483        echo "user $FTPUSER $FTPPWD"        ; \
20484        echo "pass"                         ; \
20485        echo "bin"                          ; \
20486        echo "get $FTPPATH $tmpfile"              ; \
20487    ) | ftp -in $FTPSERVER
20488  fi
20489  if test "x$VALID_TOOL" != xyes; then
20490    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20491  fi
20492
20493    mv $tmpfile $installdir/$filename
20494    if test ! -s $installdir/$filename; then
20495      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20496    fi
20497    case "$extension" in
20498      zip)  echo "Unzipping $installdir/$filename..."
20499        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20500        ;;
20501      tar.gz) echo "Untaring $installdir/$filename..."
20502        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20503        ;;
20504      tgz) echo "Untaring $installdir/$filename..."
20505        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20506        ;;
20507      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20508        ;;
20509    esac
20510  fi
20511  if test -f $installdir/$filename.unpacked; then
20512    depdir=$installdir
20513  fi
20514
20515      fi
20516      # Source the builddeps file again, because in the previous command, the depdir
20517      # was updated to point at the current build dependency install directory.
20518      . $builddepsfile
20519      # Now extract variables from the builddeps.conf files.
20520      theroot=${builddep_bootjdk_ROOT}
20521      thecflags=${builddep_bootjdk_CFLAGS}
20522      thelibs=${builddep_bootjdk_LIBS}
20523      if test "x$depdir" = x; then
20524        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20525      fi
20526      BOOT_JDK=$depdir
20527      if test "x$theroot" != x; then
20528        BOOT_JDK="$theroot"
20529      fi
20530      if test "x$thecflags" != x; then
20531        BOOT_JDK_CFLAGS="$thecflags"
20532      fi
20533      if test "x$thelibs" != x; then
20534        BOOT_JDK_LIBS="$thelibs"
20535      fi
20536      BOOT_JDK_FOUND=maybe
20537      else BOOT_JDK_FOUND=no
20538
20539    fi
20540    else BOOT_JDK_FOUND=no
20541
20542  fi
20543
20544
20545
20546    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20547    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20548      # Do we have a bin/java?
20549      if test ! -x "$BOOT_JDK/bin/java"; then
20550        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20552        BOOT_JDK_FOUND=no
20553      else
20554        # Do we have a bin/javac?
20555        if test ! -x "$BOOT_JDK/bin/javac"; then
20556          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20558          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20559$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20560          BOOT_JDK_FOUND=no
20561        else
20562          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20563          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20564
20565          # Extra M4 quote needed to protect [] in grep expression.
20566          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20567          if test "x$FOUND_CORRECT_VERSION" = x; then
20568            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20570            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20571$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20572            BOOT_JDK_FOUND=no
20573          else
20574            # We're done! :-)
20575            BOOT_JDK_FOUND=yes
20576
20577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20578
20579  # Input might be given as Windows format, start by converting to
20580  # unix format.
20581  path="$BOOT_JDK"
20582  new_path=`$CYGPATH -u "$path"`
20583
20584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20587  # "foo.exe" is OK but "foo" is an error.
20588  #
20589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20590  # It is also a way to make sure we got the proper file name for the real test later on.
20591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20592  if test "x$test_shortpath" = x; then
20593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20596  fi
20597
20598  # Call helper function which possibly converts this using DOS-style short mode.
20599  # If so, the updated path is stored in $new_path.
20600
20601  input_path="$new_path"
20602  # Check if we need to convert this using DOS-style short mode. If the path
20603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20604  # take no chances and rewrite it.
20605  # Note: m4 eats our [], so we need to use [ and ] instead.
20606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20607  if test "x$has_forbidden_chars" != x; then
20608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20612      # Going to short mode and back again did indeed matter. Since short mode is
20613      # case insensitive, let's make it lowercase to improve readability.
20614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20615      # Now convert it back to Unix-stile (cygpath)
20616      input_path=`$CYGPATH -u "$shortmode_path"`
20617      new_path="$input_path"
20618    fi
20619  fi
20620
20621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20622  if test "x$test_cygdrive_prefix" = x; then
20623    # As a simple fix, exclude /usr/bin since it's not a real path.
20624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20626      # a path prefixed by /cygdrive for fixpath to work.
20627      new_path="$CYGWIN_ROOT_PATH$input_path"
20628    fi
20629  fi
20630
20631
20632  if test "x$path" != "x$new_path"; then
20633    BOOT_JDK="$new_path"
20634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20636  fi
20637
20638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20639
20640  path="$BOOT_JDK"
20641  has_colon=`$ECHO $path | $GREP ^.:`
20642  new_path="$path"
20643  if test "x$has_colon" = x; then
20644    # Not in mixed or Windows style, start by that.
20645    new_path=`cmd //c echo $path`
20646  fi
20647
20648
20649  input_path="$new_path"
20650  # Check if we need to convert this using DOS-style short mode. If the path
20651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20652  # take no chances and rewrite it.
20653  # Note: m4 eats our [], so we need to use [ and ] instead.
20654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20655  if test "x$has_forbidden_chars" != x; then
20656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20658  fi
20659
20660
20661  windows_path="$new_path"
20662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20663    unix_path=`$CYGPATH -u "$windows_path"`
20664    new_path="$unix_path"
20665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20667    new_path="$unix_path"
20668  fi
20669
20670  if test "x$path" != "x$new_path"; then
20671    BOOT_JDK="$new_path"
20672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20674  fi
20675
20676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20678
20679  else
20680    # We're on a unix platform. Hooray! :)
20681    path="$BOOT_JDK"
20682    has_space=`$ECHO "$path" | $GREP " "`
20683    if test "x$has_space" != x; then
20684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20686      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20687    fi
20688
20689    # Use eval to expand a potential ~
20690    eval path="$path"
20691    if test ! -f "$path" && test ! -d "$path"; then
20692      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20693    fi
20694
20695    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20696  fi
20697
20698            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20699$as_echo_n "checking for Boot JDK... " >&6; }
20700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20701$as_echo "$BOOT_JDK" >&6; }
20702            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20703$as_echo_n "checking Boot JDK version... " >&6; }
20704            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20706$as_echo "$BOOT_JDK_VERSION" >&6; }
20707          fi # end check jdk version
20708        fi # end check javac
20709      fi # end check java
20710    fi # end check boot jdk found
20711  fi
20712
20713
20714  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20715
20716  if test "x$BOOT_JDK_FOUND" = xno; then
20717    # Now execute the test
20718
20719  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20720    # First check at user selected default
20721
20722  if test "x$BOOT_JDK_FOUND" = xno; then
20723    # Now execute the test
20724
20725  if test -x /usr/libexec/java_home; then
20726    BOOT_JDK=`/usr/libexec/java_home `
20727    BOOT_JDK_FOUND=maybe
20728    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20729$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20730  fi
20731
20732
20733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20734    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20735      # Do we have a bin/java?
20736      if test ! -x "$BOOT_JDK/bin/java"; then
20737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20739        BOOT_JDK_FOUND=no
20740      else
20741        # Do we have a bin/javac?
20742        if test ! -x "$BOOT_JDK/bin/javac"; then
20743          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20745          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20746$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20747          BOOT_JDK_FOUND=no
20748        else
20749          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20750          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20751
20752          # Extra M4 quote needed to protect [] in grep expression.
20753          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20754          if test "x$FOUND_CORRECT_VERSION" = x; then
20755            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20757            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20758$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20759            BOOT_JDK_FOUND=no
20760          else
20761            # We're done! :-)
20762            BOOT_JDK_FOUND=yes
20763
20764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20765
20766  # Input might be given as Windows format, start by converting to
20767  # unix format.
20768  path="$BOOT_JDK"
20769  new_path=`$CYGPATH -u "$path"`
20770
20771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20774  # "foo.exe" is OK but "foo" is an error.
20775  #
20776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20777  # It is also a way to make sure we got the proper file name for the real test later on.
20778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20779  if test "x$test_shortpath" = x; then
20780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20781$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20782    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20783  fi
20784
20785  # Call helper function which possibly converts this using DOS-style short mode.
20786  # If so, the updated path is stored in $new_path.
20787
20788  input_path="$new_path"
20789  # Check if we need to convert this using DOS-style short mode. If the path
20790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20791  # take no chances and rewrite it.
20792  # Note: m4 eats our [], so we need to use [ and ] instead.
20793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20794  if test "x$has_forbidden_chars" != x; then
20795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20799      # Going to short mode and back again did indeed matter. Since short mode is
20800      # case insensitive, let's make it lowercase to improve readability.
20801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20802      # Now convert it back to Unix-stile (cygpath)
20803      input_path=`$CYGPATH -u "$shortmode_path"`
20804      new_path="$input_path"
20805    fi
20806  fi
20807
20808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20809  if test "x$test_cygdrive_prefix" = x; then
20810    # As a simple fix, exclude /usr/bin since it's not a real path.
20811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20813      # a path prefixed by /cygdrive for fixpath to work.
20814      new_path="$CYGWIN_ROOT_PATH$input_path"
20815    fi
20816  fi
20817
20818
20819  if test "x$path" != "x$new_path"; then
20820    BOOT_JDK="$new_path"
20821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20823  fi
20824
20825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20826
20827  path="$BOOT_JDK"
20828  has_colon=`$ECHO $path | $GREP ^.:`
20829  new_path="$path"
20830  if test "x$has_colon" = x; then
20831    # Not in mixed or Windows style, start by that.
20832    new_path=`cmd //c echo $path`
20833  fi
20834
20835
20836  input_path="$new_path"
20837  # Check if we need to convert this using DOS-style short mode. If the path
20838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20839  # take no chances and rewrite it.
20840  # Note: m4 eats our [], so we need to use [ and ] instead.
20841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20842  if test "x$has_forbidden_chars" != x; then
20843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20845  fi
20846
20847
20848  windows_path="$new_path"
20849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20850    unix_path=`$CYGPATH -u "$windows_path"`
20851    new_path="$unix_path"
20852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20854    new_path="$unix_path"
20855  fi
20856
20857  if test "x$path" != "x$new_path"; then
20858    BOOT_JDK="$new_path"
20859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20861  fi
20862
20863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20865
20866  else
20867    # We're on a unix platform. Hooray! :)
20868    path="$BOOT_JDK"
20869    has_space=`$ECHO "$path" | $GREP " "`
20870    if test "x$has_space" != x; then
20871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20872$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20873      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20874    fi
20875
20876    # Use eval to expand a potential ~
20877    eval path="$path"
20878    if test ! -f "$path" && test ! -d "$path"; then
20879      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20880    fi
20881
20882    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20883  fi
20884
20885            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20886$as_echo_n "checking for Boot JDK... " >&6; }
20887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20888$as_echo "$BOOT_JDK" >&6; }
20889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20890$as_echo_n "checking Boot JDK version... " >&6; }
20891            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20893$as_echo "$BOOT_JDK_VERSION" >&6; }
20894          fi # end check jdk version
20895        fi # end check javac
20896      fi # end check java
20897    fi # end check boot jdk found
20898  fi
20899
20900    # If that did not work out (e.g. too old), try explicit versions instead
20901
20902  if test "x$BOOT_JDK_FOUND" = xno; then
20903    # Now execute the test
20904
20905  if test -x /usr/libexec/java_home; then
20906    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20907    BOOT_JDK_FOUND=maybe
20908    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20909$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20910  fi
20911
20912
20913    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20914    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20915      # Do we have a bin/java?
20916      if test ! -x "$BOOT_JDK/bin/java"; then
20917        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20919        BOOT_JDK_FOUND=no
20920      else
20921        # Do we have a bin/javac?
20922        if test ! -x "$BOOT_JDK/bin/javac"; then
20923          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20925          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20926$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20927          BOOT_JDK_FOUND=no
20928        else
20929          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20930          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20931
20932          # Extra M4 quote needed to protect [] in grep expression.
20933          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20934          if test "x$FOUND_CORRECT_VERSION" = x; then
20935            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20937            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20938$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20939            BOOT_JDK_FOUND=no
20940          else
20941            # We're done! :-)
20942            BOOT_JDK_FOUND=yes
20943
20944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20945
20946  # Input might be given as Windows format, start by converting to
20947  # unix format.
20948  path="$BOOT_JDK"
20949  new_path=`$CYGPATH -u "$path"`
20950
20951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20954  # "foo.exe" is OK but "foo" is an error.
20955  #
20956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20957  # It is also a way to make sure we got the proper file name for the real test later on.
20958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20959  if test "x$test_shortpath" = x; then
20960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20962    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20963  fi
20964
20965  # Call helper function which possibly converts this using DOS-style short mode.
20966  # If so, the updated path is stored in $new_path.
20967
20968  input_path="$new_path"
20969  # Check if we need to convert this using DOS-style short mode. If the path
20970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20971  # take no chances and rewrite it.
20972  # Note: m4 eats our [], so we need to use [ and ] instead.
20973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20974  if test "x$has_forbidden_chars" != x; then
20975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20979      # Going to short mode and back again did indeed matter. Since short mode is
20980      # case insensitive, let's make it lowercase to improve readability.
20981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20982      # Now convert it back to Unix-stile (cygpath)
20983      input_path=`$CYGPATH -u "$shortmode_path"`
20984      new_path="$input_path"
20985    fi
20986  fi
20987
20988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20989  if test "x$test_cygdrive_prefix" = x; then
20990    # As a simple fix, exclude /usr/bin since it's not a real path.
20991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20993      # a path prefixed by /cygdrive for fixpath to work.
20994      new_path="$CYGWIN_ROOT_PATH$input_path"
20995    fi
20996  fi
20997
20998
20999  if test "x$path" != "x$new_path"; then
21000    BOOT_JDK="$new_path"
21001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21003  fi
21004
21005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21006
21007  path="$BOOT_JDK"
21008  has_colon=`$ECHO $path | $GREP ^.:`
21009  new_path="$path"
21010  if test "x$has_colon" = x; then
21011    # Not in mixed or Windows style, start by that.
21012    new_path=`cmd //c echo $path`
21013  fi
21014
21015
21016  input_path="$new_path"
21017  # Check if we need to convert this using DOS-style short mode. If the path
21018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21019  # take no chances and rewrite it.
21020  # Note: m4 eats our [], so we need to use [ and ] instead.
21021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21022  if test "x$has_forbidden_chars" != x; then
21023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21025  fi
21026
21027
21028  windows_path="$new_path"
21029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21030    unix_path=`$CYGPATH -u "$windows_path"`
21031    new_path="$unix_path"
21032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21034    new_path="$unix_path"
21035  fi
21036
21037  if test "x$path" != "x$new_path"; then
21038    BOOT_JDK="$new_path"
21039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21041  fi
21042
21043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21045
21046  else
21047    # We're on a unix platform. Hooray! :)
21048    path="$BOOT_JDK"
21049    has_space=`$ECHO "$path" | $GREP " "`
21050    if test "x$has_space" != x; then
21051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21053      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21054    fi
21055
21056    # Use eval to expand a potential ~
21057    eval path="$path"
21058    if test ! -f "$path" && test ! -d "$path"; then
21059      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21060    fi
21061
21062    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21063  fi
21064
21065            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21066$as_echo_n "checking for Boot JDK... " >&6; }
21067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21068$as_echo "$BOOT_JDK" >&6; }
21069            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21070$as_echo_n "checking Boot JDK version... " >&6; }
21071            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21073$as_echo "$BOOT_JDK_VERSION" >&6; }
21074          fi # end check jdk version
21075        fi # end check javac
21076      fi # end check java
21077    fi # end check boot jdk found
21078  fi
21079
21080
21081  if test "x$BOOT_JDK_FOUND" = xno; then
21082    # Now execute the test
21083
21084  if test -x /usr/libexec/java_home; then
21085    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21086    BOOT_JDK_FOUND=maybe
21087    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21088$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21089  fi
21090
21091
21092    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21093    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21094      # Do we have a bin/java?
21095      if test ! -x "$BOOT_JDK/bin/java"; then
21096        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21098        BOOT_JDK_FOUND=no
21099      else
21100        # Do we have a bin/javac?
21101        if test ! -x "$BOOT_JDK/bin/javac"; then
21102          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21104          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21105$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21106          BOOT_JDK_FOUND=no
21107        else
21108          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21109          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21110
21111          # Extra M4 quote needed to protect [] in grep expression.
21112          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21113          if test "x$FOUND_CORRECT_VERSION" = x; then
21114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21116            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21117$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21118            BOOT_JDK_FOUND=no
21119          else
21120            # We're done! :-)
21121            BOOT_JDK_FOUND=yes
21122
21123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21124
21125  # Input might be given as Windows format, start by converting to
21126  # unix format.
21127  path="$BOOT_JDK"
21128  new_path=`$CYGPATH -u "$path"`
21129
21130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21133  # "foo.exe" is OK but "foo" is an error.
21134  #
21135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21136  # It is also a way to make sure we got the proper file name for the real test later on.
21137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21138  if test "x$test_shortpath" = x; then
21139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21141    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21142  fi
21143
21144  # Call helper function which possibly converts this using DOS-style short mode.
21145  # If so, the updated path is stored in $new_path.
21146
21147  input_path="$new_path"
21148  # Check if we need to convert this using DOS-style short mode. If the path
21149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21150  # take no chances and rewrite it.
21151  # Note: m4 eats our [], so we need to use [ and ] instead.
21152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21153  if test "x$has_forbidden_chars" != x; then
21154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21158      # Going to short mode and back again did indeed matter. Since short mode is
21159      # case insensitive, let's make it lowercase to improve readability.
21160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21161      # Now convert it back to Unix-stile (cygpath)
21162      input_path=`$CYGPATH -u "$shortmode_path"`
21163      new_path="$input_path"
21164    fi
21165  fi
21166
21167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21168  if test "x$test_cygdrive_prefix" = x; then
21169    # As a simple fix, exclude /usr/bin since it's not a real path.
21170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21172      # a path prefixed by /cygdrive for fixpath to work.
21173      new_path="$CYGWIN_ROOT_PATH$input_path"
21174    fi
21175  fi
21176
21177
21178  if test "x$path" != "x$new_path"; then
21179    BOOT_JDK="$new_path"
21180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21181$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21182  fi
21183
21184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21185
21186  path="$BOOT_JDK"
21187  has_colon=`$ECHO $path | $GREP ^.:`
21188  new_path="$path"
21189  if test "x$has_colon" = x; then
21190    # Not in mixed or Windows style, start by that.
21191    new_path=`cmd //c echo $path`
21192  fi
21193
21194
21195  input_path="$new_path"
21196  # Check if we need to convert this using DOS-style short mode. If the path
21197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21198  # take no chances and rewrite it.
21199  # Note: m4 eats our [], so we need to use [ and ] instead.
21200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21201  if test "x$has_forbidden_chars" != x; then
21202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21204  fi
21205
21206
21207  windows_path="$new_path"
21208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21209    unix_path=`$CYGPATH -u "$windows_path"`
21210    new_path="$unix_path"
21211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21213    new_path="$unix_path"
21214  fi
21215
21216  if test "x$path" != "x$new_path"; then
21217    BOOT_JDK="$new_path"
21218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21220  fi
21221
21222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21224
21225  else
21226    # We're on a unix platform. Hooray! :)
21227    path="$BOOT_JDK"
21228    has_space=`$ECHO "$path" | $GREP " "`
21229    if test "x$has_space" != x; then
21230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21232      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21233    fi
21234
21235    # Use eval to expand a potential ~
21236    eval path="$path"
21237    if test ! -f "$path" && test ! -d "$path"; then
21238      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21239    fi
21240
21241    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21242  fi
21243
21244            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21245$as_echo_n "checking for Boot JDK... " >&6; }
21246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21247$as_echo "$BOOT_JDK" >&6; }
21248            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21249$as_echo_n "checking Boot JDK version... " >&6; }
21250            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21252$as_echo "$BOOT_JDK_VERSION" >&6; }
21253          fi # end check jdk version
21254        fi # end check javac
21255      fi # end check java
21256    fi # end check boot jdk found
21257  fi
21258
21259
21260  if test "x$BOOT_JDK_FOUND" = xno; then
21261    # Now execute the test
21262
21263  if test -x /usr/libexec/java_home; then
21264    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21265    BOOT_JDK_FOUND=maybe
21266    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21267$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21268  fi
21269
21270
21271    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21272    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21273      # Do we have a bin/java?
21274      if test ! -x "$BOOT_JDK/bin/java"; then
21275        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21277        BOOT_JDK_FOUND=no
21278      else
21279        # Do we have a bin/javac?
21280        if test ! -x "$BOOT_JDK/bin/javac"; then
21281          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21283          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21284$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21285          BOOT_JDK_FOUND=no
21286        else
21287          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21288          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21289
21290          # Extra M4 quote needed to protect [] in grep expression.
21291          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21292          if test "x$FOUND_CORRECT_VERSION" = x; then
21293            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21295            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21296$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21297            BOOT_JDK_FOUND=no
21298          else
21299            # We're done! :-)
21300            BOOT_JDK_FOUND=yes
21301
21302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21303
21304  # Input might be given as Windows format, start by converting to
21305  # unix format.
21306  path="$BOOT_JDK"
21307  new_path=`$CYGPATH -u "$path"`
21308
21309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21312  # "foo.exe" is OK but "foo" is an error.
21313  #
21314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21315  # It is also a way to make sure we got the proper file name for the real test later on.
21316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21317  if test "x$test_shortpath" = x; then
21318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21319$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21320    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21321  fi
21322
21323  # Call helper function which possibly converts this using DOS-style short mode.
21324  # If so, the updated path is stored in $new_path.
21325
21326  input_path="$new_path"
21327  # Check if we need to convert this using DOS-style short mode. If the path
21328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21329  # take no chances and rewrite it.
21330  # Note: m4 eats our [], so we need to use [ and ] instead.
21331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21332  if test "x$has_forbidden_chars" != x; then
21333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21337      # Going to short mode and back again did indeed matter. Since short mode is
21338      # case insensitive, let's make it lowercase to improve readability.
21339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21340      # Now convert it back to Unix-stile (cygpath)
21341      input_path=`$CYGPATH -u "$shortmode_path"`
21342      new_path="$input_path"
21343    fi
21344  fi
21345
21346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21347  if test "x$test_cygdrive_prefix" = x; then
21348    # As a simple fix, exclude /usr/bin since it's not a real path.
21349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21351      # a path prefixed by /cygdrive for fixpath to work.
21352      new_path="$CYGWIN_ROOT_PATH$input_path"
21353    fi
21354  fi
21355
21356
21357  if test "x$path" != "x$new_path"; then
21358    BOOT_JDK="$new_path"
21359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21360$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21361  fi
21362
21363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21364
21365  path="$BOOT_JDK"
21366  has_colon=`$ECHO $path | $GREP ^.:`
21367  new_path="$path"
21368  if test "x$has_colon" = x; then
21369    # Not in mixed or Windows style, start by that.
21370    new_path=`cmd //c echo $path`
21371  fi
21372
21373
21374  input_path="$new_path"
21375  # Check if we need to convert this using DOS-style short mode. If the path
21376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21377  # take no chances and rewrite it.
21378  # Note: m4 eats our [], so we need to use [ and ] instead.
21379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21380  if test "x$has_forbidden_chars" != x; then
21381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21383  fi
21384
21385
21386  windows_path="$new_path"
21387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21388    unix_path=`$CYGPATH -u "$windows_path"`
21389    new_path="$unix_path"
21390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21392    new_path="$unix_path"
21393  fi
21394
21395  if test "x$path" != "x$new_path"; then
21396    BOOT_JDK="$new_path"
21397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21398$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21399  fi
21400
21401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21403
21404  else
21405    # We're on a unix platform. Hooray! :)
21406    path="$BOOT_JDK"
21407    has_space=`$ECHO "$path" | $GREP " "`
21408    if test "x$has_space" != x; then
21409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21411      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21412    fi
21413
21414    # Use eval to expand a potential ~
21415    eval path="$path"
21416    if test ! -f "$path" && test ! -d "$path"; then
21417      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21418    fi
21419
21420    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21421  fi
21422
21423            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21424$as_echo_n "checking for Boot JDK... " >&6; }
21425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21426$as_echo "$BOOT_JDK" >&6; }
21427            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21428$as_echo_n "checking Boot JDK version... " >&6; }
21429            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21431$as_echo "$BOOT_JDK_VERSION" >&6; }
21432          fi # end check jdk version
21433        fi # end check javac
21434      fi # end check java
21435    fi # end check boot jdk found
21436  fi
21437
21438  fi
21439
21440
21441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21443      # Do we have a bin/java?
21444      if test ! -x "$BOOT_JDK/bin/java"; then
21445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21447        BOOT_JDK_FOUND=no
21448      else
21449        # Do we have a bin/javac?
21450        if test ! -x "$BOOT_JDK/bin/javac"; then
21451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21455          BOOT_JDK_FOUND=no
21456        else
21457          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21458          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21459
21460          # Extra M4 quote needed to protect [] in grep expression.
21461          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21462          if test "x$FOUND_CORRECT_VERSION" = x; then
21463            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21465            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21466$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21467            BOOT_JDK_FOUND=no
21468          else
21469            # We're done! :-)
21470            BOOT_JDK_FOUND=yes
21471
21472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21473
21474  # Input might be given as Windows format, start by converting to
21475  # unix format.
21476  path="$BOOT_JDK"
21477  new_path=`$CYGPATH -u "$path"`
21478
21479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21482  # "foo.exe" is OK but "foo" is an error.
21483  #
21484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21485  # It is also a way to make sure we got the proper file name for the real test later on.
21486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21487  if test "x$test_shortpath" = x; then
21488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21489$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21490    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21491  fi
21492
21493  # Call helper function which possibly converts this using DOS-style short mode.
21494  # If so, the updated path is stored in $new_path.
21495
21496  input_path="$new_path"
21497  # Check if we need to convert this using DOS-style short mode. If the path
21498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21499  # take no chances and rewrite it.
21500  # Note: m4 eats our [], so we need to use [ and ] instead.
21501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21502  if test "x$has_forbidden_chars" != x; then
21503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21507      # Going to short mode and back again did indeed matter. Since short mode is
21508      # case insensitive, let's make it lowercase to improve readability.
21509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21510      # Now convert it back to Unix-stile (cygpath)
21511      input_path=`$CYGPATH -u "$shortmode_path"`
21512      new_path="$input_path"
21513    fi
21514  fi
21515
21516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21517  if test "x$test_cygdrive_prefix" = x; then
21518    # As a simple fix, exclude /usr/bin since it's not a real path.
21519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21521      # a path prefixed by /cygdrive for fixpath to work.
21522      new_path="$CYGWIN_ROOT_PATH$input_path"
21523    fi
21524  fi
21525
21526
21527  if test "x$path" != "x$new_path"; then
21528    BOOT_JDK="$new_path"
21529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21531  fi
21532
21533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21534
21535  path="$BOOT_JDK"
21536  has_colon=`$ECHO $path | $GREP ^.:`
21537  new_path="$path"
21538  if test "x$has_colon" = x; then
21539    # Not in mixed or Windows style, start by that.
21540    new_path=`cmd //c echo $path`
21541  fi
21542
21543
21544  input_path="$new_path"
21545  # Check if we need to convert this using DOS-style short mode. If the path
21546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21547  # take no chances and rewrite it.
21548  # Note: m4 eats our [], so we need to use [ and ] instead.
21549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21550  if test "x$has_forbidden_chars" != x; then
21551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21553  fi
21554
21555
21556  windows_path="$new_path"
21557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21558    unix_path=`$CYGPATH -u "$windows_path"`
21559    new_path="$unix_path"
21560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21562    new_path="$unix_path"
21563  fi
21564
21565  if test "x$path" != "x$new_path"; then
21566    BOOT_JDK="$new_path"
21567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21568$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21569  fi
21570
21571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21573
21574  else
21575    # We're on a unix platform. Hooray! :)
21576    path="$BOOT_JDK"
21577    has_space=`$ECHO "$path" | $GREP " "`
21578    if test "x$has_space" != x; then
21579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21580$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21581      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21582    fi
21583
21584    # Use eval to expand a potential ~
21585    eval path="$path"
21586    if test ! -f "$path" && test ! -d "$path"; then
21587      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21588    fi
21589
21590    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21591  fi
21592
21593            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21594$as_echo_n "checking for Boot JDK... " >&6; }
21595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21596$as_echo "$BOOT_JDK" >&6; }
21597            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21598$as_echo_n "checking Boot JDK version... " >&6; }
21599            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21601$as_echo "$BOOT_JDK_VERSION" >&6; }
21602          fi # end check jdk version
21603        fi # end check javac
21604      fi # end check java
21605    fi # end check boot jdk found
21606  fi
21607
21608
21609  # Test: Is $JAVA_HOME set?
21610
21611  if test "x$BOOT_JDK_FOUND" = xno; then
21612    # Now execute the test
21613
21614  if test "x$JAVA_HOME" != x; then
21615    JAVA_HOME_PROCESSED="$JAVA_HOME"
21616
21617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21618
21619  # Input might be given as Windows format, start by converting to
21620  # unix format.
21621  path="$JAVA_HOME_PROCESSED"
21622  new_path=`$CYGPATH -u "$path"`
21623
21624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21627  # "foo.exe" is OK but "foo" is an error.
21628  #
21629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21630  # It is also a way to make sure we got the proper file name for the real test later on.
21631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21632  if test "x$test_shortpath" = x; then
21633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21634$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21635    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21636  fi
21637
21638  # Call helper function which possibly converts this using DOS-style short mode.
21639  # If so, the updated path is stored in $new_path.
21640
21641  input_path="$new_path"
21642  # Check if we need to convert this using DOS-style short mode. If the path
21643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21644  # take no chances and rewrite it.
21645  # Note: m4 eats our [], so we need to use [ and ] instead.
21646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21647  if test "x$has_forbidden_chars" != x; then
21648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21652      # Going to short mode and back again did indeed matter. Since short mode is
21653      # case insensitive, let's make it lowercase to improve readability.
21654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21655      # Now convert it back to Unix-stile (cygpath)
21656      input_path=`$CYGPATH -u "$shortmode_path"`
21657      new_path="$input_path"
21658    fi
21659  fi
21660
21661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21662  if test "x$test_cygdrive_prefix" = x; then
21663    # As a simple fix, exclude /usr/bin since it's not a real path.
21664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21666      # a path prefixed by /cygdrive for fixpath to work.
21667      new_path="$CYGWIN_ROOT_PATH$input_path"
21668    fi
21669  fi
21670
21671
21672  if test "x$path" != "x$new_path"; then
21673    JAVA_HOME_PROCESSED="$new_path"
21674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21675$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21676  fi
21677
21678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21679
21680  path="$JAVA_HOME_PROCESSED"
21681  has_colon=`$ECHO $path | $GREP ^.:`
21682  new_path="$path"
21683  if test "x$has_colon" = x; then
21684    # Not in mixed or Windows style, start by that.
21685    new_path=`cmd //c echo $path`
21686  fi
21687
21688
21689  input_path="$new_path"
21690  # Check if we need to convert this using DOS-style short mode. If the path
21691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21692  # take no chances and rewrite it.
21693  # Note: m4 eats our [], so we need to use [ and ] instead.
21694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21695  if test "x$has_forbidden_chars" != x; then
21696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21698  fi
21699
21700
21701  windows_path="$new_path"
21702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21703    unix_path=`$CYGPATH -u "$windows_path"`
21704    new_path="$unix_path"
21705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21707    new_path="$unix_path"
21708  fi
21709
21710  if test "x$path" != "x$new_path"; then
21711    JAVA_HOME_PROCESSED="$new_path"
21712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21713$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21714  fi
21715
21716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21718
21719  else
21720    # We're on a unix platform. Hooray! :)
21721    path="$JAVA_HOME_PROCESSED"
21722    has_space=`$ECHO "$path" | $GREP " "`
21723    if test "x$has_space" != x; then
21724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21725$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21726      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21727    fi
21728
21729    # Use eval to expand a potential ~
21730    eval path="$path"
21731    if test ! -f "$path" && test ! -d "$path"; then
21732      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21733    fi
21734
21735    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21736  fi
21737
21738    if test ! -d "$JAVA_HOME_PROCESSED"; then
21739      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21740$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21741    else
21742      # Aha, the user has set a JAVA_HOME
21743      # let us use that as the Boot JDK.
21744      BOOT_JDK="$JAVA_HOME_PROCESSED"
21745      BOOT_JDK_FOUND=maybe
21746      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21747$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21748    fi
21749  fi
21750
21751
21752    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21753    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21754      # Do we have a bin/java?
21755      if test ! -x "$BOOT_JDK/bin/java"; then
21756        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21757$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21758        BOOT_JDK_FOUND=no
21759      else
21760        # Do we have a bin/javac?
21761        if test ! -x "$BOOT_JDK/bin/javac"; then
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21765$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21766          BOOT_JDK_FOUND=no
21767        else
21768          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21769          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21770
21771          # Extra M4 quote needed to protect [] in grep expression.
21772          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21773          if test "x$FOUND_CORRECT_VERSION" = x; then
21774            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21776            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21777$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21778            BOOT_JDK_FOUND=no
21779          else
21780            # We're done! :-)
21781            BOOT_JDK_FOUND=yes
21782
21783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21784
21785  # Input might be given as Windows format, start by converting to
21786  # unix format.
21787  path="$BOOT_JDK"
21788  new_path=`$CYGPATH -u "$path"`
21789
21790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21793  # "foo.exe" is OK but "foo" is an error.
21794  #
21795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21796  # It is also a way to make sure we got the proper file name for the real test later on.
21797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21798  if test "x$test_shortpath" = x; then
21799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21800$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21801    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21802  fi
21803
21804  # Call helper function which possibly converts this using DOS-style short mode.
21805  # If so, the updated path is stored in $new_path.
21806
21807  input_path="$new_path"
21808  # Check if we need to convert this using DOS-style short mode. If the path
21809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21810  # take no chances and rewrite it.
21811  # Note: m4 eats our [], so we need to use [ and ] instead.
21812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21813  if test "x$has_forbidden_chars" != x; then
21814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21818      # Going to short mode and back again did indeed matter. Since short mode is
21819      # case insensitive, let's make it lowercase to improve readability.
21820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21821      # Now convert it back to Unix-stile (cygpath)
21822      input_path=`$CYGPATH -u "$shortmode_path"`
21823      new_path="$input_path"
21824    fi
21825  fi
21826
21827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21828  if test "x$test_cygdrive_prefix" = x; then
21829    # As a simple fix, exclude /usr/bin since it's not a real path.
21830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21832      # a path prefixed by /cygdrive for fixpath to work.
21833      new_path="$CYGWIN_ROOT_PATH$input_path"
21834    fi
21835  fi
21836
21837
21838  if test "x$path" != "x$new_path"; then
21839    BOOT_JDK="$new_path"
21840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21842  fi
21843
21844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21845
21846  path="$BOOT_JDK"
21847  has_colon=`$ECHO $path | $GREP ^.:`
21848  new_path="$path"
21849  if test "x$has_colon" = x; then
21850    # Not in mixed or Windows style, start by that.
21851    new_path=`cmd //c echo $path`
21852  fi
21853
21854
21855  input_path="$new_path"
21856  # Check if we need to convert this using DOS-style short mode. If the path
21857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21858  # take no chances and rewrite it.
21859  # Note: m4 eats our [], so we need to use [ and ] instead.
21860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21861  if test "x$has_forbidden_chars" != x; then
21862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21864  fi
21865
21866
21867  windows_path="$new_path"
21868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21869    unix_path=`$CYGPATH -u "$windows_path"`
21870    new_path="$unix_path"
21871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21873    new_path="$unix_path"
21874  fi
21875
21876  if test "x$path" != "x$new_path"; then
21877    BOOT_JDK="$new_path"
21878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21880  fi
21881
21882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21884
21885  else
21886    # We're on a unix platform. Hooray! :)
21887    path="$BOOT_JDK"
21888    has_space=`$ECHO "$path" | $GREP " "`
21889    if test "x$has_space" != x; then
21890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21892      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21893    fi
21894
21895    # Use eval to expand a potential ~
21896    eval path="$path"
21897    if test ! -f "$path" && test ! -d "$path"; then
21898      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21899    fi
21900
21901    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21902  fi
21903
21904            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21905$as_echo_n "checking for Boot JDK... " >&6; }
21906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21907$as_echo "$BOOT_JDK" >&6; }
21908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21909$as_echo_n "checking Boot JDK version... " >&6; }
21910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21912$as_echo "$BOOT_JDK_VERSION" >&6; }
21913          fi # end check jdk version
21914        fi # end check javac
21915      fi # end check java
21916    fi # end check boot jdk found
21917  fi
21918
21919
21920  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21921
21922  if test "x$BOOT_JDK_FOUND" = xno; then
21923    # Now execute the test
21924
21925  # Extract the first word of "javac", so it can be a program name with args.
21926set dummy javac; ac_word=$2
21927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21928$as_echo_n "checking for $ac_word... " >&6; }
21929if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21930  $as_echo_n "(cached) " >&6
21931else
21932  case $JAVAC_CHECK in
21933  [\\/]* | ?:[\\/]*)
21934  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21935  ;;
21936  *)
21937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21938for as_dir in $PATH
21939do
21940  IFS=$as_save_IFS
21941  test -z "$as_dir" && as_dir=.
21942    for ac_exec_ext in '' $ac_executable_extensions; do
21943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21944    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21946    break 2
21947  fi
21948done
21949  done
21950IFS=$as_save_IFS
21951
21952  ;;
21953esac
21954fi
21955JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21956if test -n "$JAVAC_CHECK"; then
21957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21958$as_echo "$JAVAC_CHECK" >&6; }
21959else
21960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21961$as_echo "no" >&6; }
21962fi
21963
21964
21965  # Extract the first word of "java", so it can be a program name with args.
21966set dummy java; ac_word=$2
21967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21968$as_echo_n "checking for $ac_word... " >&6; }
21969if ${ac_cv_path_JAVA_CHECK+:} false; then :
21970  $as_echo_n "(cached) " >&6
21971else
21972  case $JAVA_CHECK in
21973  [\\/]* | ?:[\\/]*)
21974  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21975  ;;
21976  *)
21977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21978for as_dir in $PATH
21979do
21980  IFS=$as_save_IFS
21981  test -z "$as_dir" && as_dir=.
21982    for ac_exec_ext in '' $ac_executable_extensions; do
21983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21984    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21986    break 2
21987  fi
21988done
21989  done
21990IFS=$as_save_IFS
21991
21992  ;;
21993esac
21994fi
21995JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21996if test -n "$JAVA_CHECK"; then
21997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21998$as_echo "$JAVA_CHECK" >&6; }
21999else
22000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22001$as_echo "no" >&6; }
22002fi
22003
22004
22005  BINARY="$JAVAC_CHECK"
22006  if test "x$JAVAC_CHECK" = x; then
22007    BINARY="$JAVA_CHECK"
22008  fi
22009  if test "x$BINARY" != x; then
22010    # So there is a java(c) binary, it might be part of a JDK.
22011    # Lets find the JDK/JRE directory by following symbolic links.
22012    # Linux/GNU systems often have links from /usr/bin/java to
22013    # /etc/alternatives/java to the real JDK binary.
22014
22015  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22016    # Follow a chain of symbolic links. Use readlink
22017    # where it exists, else fall back to horribly
22018    # complicated shell code.
22019    if test "x$READLINK_TESTED" != yes; then
22020      # On MacOSX there is a readlink tool with a different
22021      # purpose than the GNU readlink tool. Check the found readlink.
22022      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22023      if test "x$ISGNU" = x; then
22024        # A readlink that we do not know how to use.
22025        # Are there other non-GNU readlinks out there?
22026        READLINK_TESTED=yes
22027        READLINK=
22028      fi
22029    fi
22030
22031    if test "x$READLINK" != x; then
22032      BINARY=`$READLINK -f $BINARY`
22033    else
22034      # Save the current directory for restoring afterwards
22035      STARTDIR=$PWD
22036      COUNTER=0
22037      sym_link_dir=`$DIRNAME $BINARY`
22038      sym_link_file=`$BASENAME $BINARY`
22039      cd $sym_link_dir
22040      # Use -P flag to resolve symlinks in directories.
22041      cd `$THEPWDCMD -P`
22042      sym_link_dir=`$THEPWDCMD -P`
22043      # Resolve file symlinks
22044      while test $COUNTER -lt 20; do
22045        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22046        if test "x$ISLINK" == x; then
22047          # This is not a symbolic link! We are done!
22048          break
22049        fi
22050        # Again resolve directory symlinks since the target of the just found
22051        # link could be in a different directory
22052        cd `$DIRNAME $ISLINK`
22053        sym_link_dir=`$THEPWDCMD -P`
22054        sym_link_file=`$BASENAME $ISLINK`
22055        let COUNTER=COUNTER+1
22056      done
22057      cd $STARTDIR
22058      BINARY=$sym_link_dir/$sym_link_file
22059    fi
22060  fi
22061
22062    BOOT_JDK=`dirname "$BINARY"`
22063    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22064    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22065      # Looks like we found ourselves an JDK
22066      BOOT_JDK_FOUND=maybe
22067      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22068$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22069    fi
22070  fi
22071
22072
22073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22075      # Do we have a bin/java?
22076      if test ! -x "$BOOT_JDK/bin/java"; then
22077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22079        BOOT_JDK_FOUND=no
22080      else
22081        # Do we have a bin/javac?
22082        if test ! -x "$BOOT_JDK/bin/javac"; then
22083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22087          BOOT_JDK_FOUND=no
22088        else
22089          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22090          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22091
22092          # Extra M4 quote needed to protect [] in grep expression.
22093          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22094          if test "x$FOUND_CORRECT_VERSION" = x; then
22095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22097            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22098$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22099            BOOT_JDK_FOUND=no
22100          else
22101            # We're done! :-)
22102            BOOT_JDK_FOUND=yes
22103
22104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22105
22106  # Input might be given as Windows format, start by converting to
22107  # unix format.
22108  path="$BOOT_JDK"
22109  new_path=`$CYGPATH -u "$path"`
22110
22111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22114  # "foo.exe" is OK but "foo" is an error.
22115  #
22116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22117  # It is also a way to make sure we got the proper file name for the real test later on.
22118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22119  if test "x$test_shortpath" = x; then
22120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22122    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22123  fi
22124
22125  # Call helper function which possibly converts this using DOS-style short mode.
22126  # If so, the updated path is stored in $new_path.
22127
22128  input_path="$new_path"
22129  # Check if we need to convert this using DOS-style short mode. If the path
22130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22131  # take no chances and rewrite it.
22132  # Note: m4 eats our [], so we need to use [ and ] instead.
22133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22134  if test "x$has_forbidden_chars" != x; then
22135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22139      # Going to short mode and back again did indeed matter. Since short mode is
22140      # case insensitive, let's make it lowercase to improve readability.
22141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22142      # Now convert it back to Unix-stile (cygpath)
22143      input_path=`$CYGPATH -u "$shortmode_path"`
22144      new_path="$input_path"
22145    fi
22146  fi
22147
22148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22149  if test "x$test_cygdrive_prefix" = x; then
22150    # As a simple fix, exclude /usr/bin since it's not a real path.
22151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22153      # a path prefixed by /cygdrive for fixpath to work.
22154      new_path="$CYGWIN_ROOT_PATH$input_path"
22155    fi
22156  fi
22157
22158
22159  if test "x$path" != "x$new_path"; then
22160    BOOT_JDK="$new_path"
22161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22163  fi
22164
22165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22166
22167  path="$BOOT_JDK"
22168  has_colon=`$ECHO $path | $GREP ^.:`
22169  new_path="$path"
22170  if test "x$has_colon" = x; then
22171    # Not in mixed or Windows style, start by that.
22172    new_path=`cmd //c echo $path`
22173  fi
22174
22175
22176  input_path="$new_path"
22177  # Check if we need to convert this using DOS-style short mode. If the path
22178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22179  # take no chances and rewrite it.
22180  # Note: m4 eats our [], so we need to use [ and ] instead.
22181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22182  if test "x$has_forbidden_chars" != x; then
22183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22185  fi
22186
22187
22188  windows_path="$new_path"
22189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22190    unix_path=`$CYGPATH -u "$windows_path"`
22191    new_path="$unix_path"
22192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22194    new_path="$unix_path"
22195  fi
22196
22197  if test "x$path" != "x$new_path"; then
22198    BOOT_JDK="$new_path"
22199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22201  fi
22202
22203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22205
22206  else
22207    # We're on a unix platform. Hooray! :)
22208    path="$BOOT_JDK"
22209    has_space=`$ECHO "$path" | $GREP " "`
22210    if test "x$has_space" != x; then
22211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22213      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22214    fi
22215
22216    # Use eval to expand a potential ~
22217    eval path="$path"
22218    if test ! -f "$path" && test ! -d "$path"; then
22219      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22220    fi
22221
22222    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22223  fi
22224
22225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22226$as_echo_n "checking for Boot JDK... " >&6; }
22227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22228$as_echo "$BOOT_JDK" >&6; }
22229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22230$as_echo_n "checking Boot JDK version... " >&6; }
22231            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22233$as_echo "$BOOT_JDK_VERSION" >&6; }
22234          fi # end check jdk version
22235        fi # end check javac
22236      fi # end check java
22237    fi # end check boot jdk found
22238  fi
22239
22240
22241  # Test: Is there a JDK installed in default, well-known locations?
22242
22243  if test "x$BOOT_JDK_FOUND" = xno; then
22244    # Now execute the test
22245
22246  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22247
22248  if test "x$BOOT_JDK_FOUND" = xno; then
22249    # Now execute the test
22250
22251  if test "x$ProgramW6432" != x; then
22252    VIRTUAL_DIR="$ProgramW6432/Java"
22253
22254  windows_path="$VIRTUAL_DIR"
22255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22256    unix_path=`$CYGPATH -u "$windows_path"`
22257    VIRTUAL_DIR="$unix_path"
22258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22260    VIRTUAL_DIR="$unix_path"
22261  fi
22262
22263
22264  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22265  BOOT_JDK_SUFFIX=""
22266  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22267  if test "x$ALL_JDKS_FOUND" != x; then
22268    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22269
22270  if test "x$BOOT_JDK_FOUND" = xno; then
22271    # Now execute the test
22272
22273        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22274        if test -d "$BOOT_JDK"; then
22275          BOOT_JDK_FOUND=maybe
22276          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22277$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22278        fi
22279
22280
22281    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22282    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22283      # Do we have a bin/java?
22284      if test ! -x "$BOOT_JDK/bin/java"; then
22285        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22287        BOOT_JDK_FOUND=no
22288      else
22289        # Do we have a bin/javac?
22290        if test ! -x "$BOOT_JDK/bin/javac"; then
22291          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22293          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22294$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22295          BOOT_JDK_FOUND=no
22296        else
22297          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22298          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22299
22300          # Extra M4 quote needed to protect [] in grep expression.
22301          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22302          if test "x$FOUND_CORRECT_VERSION" = x; then
22303            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22305            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22306$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22307            BOOT_JDK_FOUND=no
22308          else
22309            # We're done! :-)
22310            BOOT_JDK_FOUND=yes
22311
22312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22313
22314  # Input might be given as Windows format, start by converting to
22315  # unix format.
22316  path="$BOOT_JDK"
22317  new_path=`$CYGPATH -u "$path"`
22318
22319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22322  # "foo.exe" is OK but "foo" is an error.
22323  #
22324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22325  # It is also a way to make sure we got the proper file name for the real test later on.
22326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22327  if test "x$test_shortpath" = x; then
22328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22329$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22330    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22331  fi
22332
22333  # Call helper function which possibly converts this using DOS-style short mode.
22334  # If so, the updated path is stored in $new_path.
22335
22336  input_path="$new_path"
22337  # Check if we need to convert this using DOS-style short mode. If the path
22338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22339  # take no chances and rewrite it.
22340  # Note: m4 eats our [], so we need to use [ and ] instead.
22341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22342  if test "x$has_forbidden_chars" != x; then
22343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22347      # Going to short mode and back again did indeed matter. Since short mode is
22348      # case insensitive, let's make it lowercase to improve readability.
22349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22350      # Now convert it back to Unix-stile (cygpath)
22351      input_path=`$CYGPATH -u "$shortmode_path"`
22352      new_path="$input_path"
22353    fi
22354  fi
22355
22356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22357  if test "x$test_cygdrive_prefix" = x; then
22358    # As a simple fix, exclude /usr/bin since it's not a real path.
22359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22361      # a path prefixed by /cygdrive for fixpath to work.
22362      new_path="$CYGWIN_ROOT_PATH$input_path"
22363    fi
22364  fi
22365
22366
22367  if test "x$path" != "x$new_path"; then
22368    BOOT_JDK="$new_path"
22369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22371  fi
22372
22373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22374
22375  path="$BOOT_JDK"
22376  has_colon=`$ECHO $path | $GREP ^.:`
22377  new_path="$path"
22378  if test "x$has_colon" = x; then
22379    # Not in mixed or Windows style, start by that.
22380    new_path=`cmd //c echo $path`
22381  fi
22382
22383
22384  input_path="$new_path"
22385  # Check if we need to convert this using DOS-style short mode. If the path
22386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22387  # take no chances and rewrite it.
22388  # Note: m4 eats our [], so we need to use [ and ] instead.
22389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22390  if test "x$has_forbidden_chars" != x; then
22391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22393  fi
22394
22395
22396  windows_path="$new_path"
22397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22398    unix_path=`$CYGPATH -u "$windows_path"`
22399    new_path="$unix_path"
22400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22402    new_path="$unix_path"
22403  fi
22404
22405  if test "x$path" != "x$new_path"; then
22406    BOOT_JDK="$new_path"
22407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22409  fi
22410
22411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22413
22414  else
22415    # We're on a unix platform. Hooray! :)
22416    path="$BOOT_JDK"
22417    has_space=`$ECHO "$path" | $GREP " "`
22418    if test "x$has_space" != x; then
22419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22421      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22422    fi
22423
22424    # Use eval to expand a potential ~
22425    eval path="$path"
22426    if test ! -f "$path" && test ! -d "$path"; then
22427      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22428    fi
22429
22430    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22431  fi
22432
22433            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22434$as_echo_n "checking for Boot JDK... " >&6; }
22435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22436$as_echo "$BOOT_JDK" >&6; }
22437            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22438$as_echo_n "checking Boot JDK version... " >&6; }
22439            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22441$as_echo "$BOOT_JDK_VERSION" >&6; }
22442          fi # end check jdk version
22443        fi # end check javac
22444      fi # end check java
22445    fi # end check boot jdk found
22446  fi
22447
22448    done
22449  fi
22450
22451  fi
22452
22453
22454    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22455    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22456      # Do we have a bin/java?
22457      if test ! -x "$BOOT_JDK/bin/java"; then
22458        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22460        BOOT_JDK_FOUND=no
22461      else
22462        # Do we have a bin/javac?
22463        if test ! -x "$BOOT_JDK/bin/javac"; then
22464          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22466          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22467$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22468          BOOT_JDK_FOUND=no
22469        else
22470          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22471          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22472
22473          # Extra M4 quote needed to protect [] in grep expression.
22474          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22475          if test "x$FOUND_CORRECT_VERSION" = x; then
22476            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22478            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22479$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22480            BOOT_JDK_FOUND=no
22481          else
22482            # We're done! :-)
22483            BOOT_JDK_FOUND=yes
22484
22485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22486
22487  # Input might be given as Windows format, start by converting to
22488  # unix format.
22489  path="$BOOT_JDK"
22490  new_path=`$CYGPATH -u "$path"`
22491
22492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22495  # "foo.exe" is OK but "foo" is an error.
22496  #
22497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22498  # It is also a way to make sure we got the proper file name for the real test later on.
22499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22500  if test "x$test_shortpath" = x; then
22501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22502$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22503    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22504  fi
22505
22506  # Call helper function which possibly converts this using DOS-style short mode.
22507  # If so, the updated path is stored in $new_path.
22508
22509  input_path="$new_path"
22510  # Check if we need to convert this using DOS-style short mode. If the path
22511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22512  # take no chances and rewrite it.
22513  # Note: m4 eats our [], so we need to use [ and ] instead.
22514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22515  if test "x$has_forbidden_chars" != x; then
22516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22520      # Going to short mode and back again did indeed matter. Since short mode is
22521      # case insensitive, let's make it lowercase to improve readability.
22522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22523      # Now convert it back to Unix-stile (cygpath)
22524      input_path=`$CYGPATH -u "$shortmode_path"`
22525      new_path="$input_path"
22526    fi
22527  fi
22528
22529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22530  if test "x$test_cygdrive_prefix" = x; then
22531    # As a simple fix, exclude /usr/bin since it's not a real path.
22532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22534      # a path prefixed by /cygdrive for fixpath to work.
22535      new_path="$CYGWIN_ROOT_PATH$input_path"
22536    fi
22537  fi
22538
22539
22540  if test "x$path" != "x$new_path"; then
22541    BOOT_JDK="$new_path"
22542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22544  fi
22545
22546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22547
22548  path="$BOOT_JDK"
22549  has_colon=`$ECHO $path | $GREP ^.:`
22550  new_path="$path"
22551  if test "x$has_colon" = x; then
22552    # Not in mixed or Windows style, start by that.
22553    new_path=`cmd //c echo $path`
22554  fi
22555
22556
22557  input_path="$new_path"
22558  # Check if we need to convert this using DOS-style short mode. If the path
22559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22560  # take no chances and rewrite it.
22561  # Note: m4 eats our [], so we need to use [ and ] instead.
22562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22563  if test "x$has_forbidden_chars" != x; then
22564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22566  fi
22567
22568
22569  windows_path="$new_path"
22570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22571    unix_path=`$CYGPATH -u "$windows_path"`
22572    new_path="$unix_path"
22573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22575    new_path="$unix_path"
22576  fi
22577
22578  if test "x$path" != "x$new_path"; then
22579    BOOT_JDK="$new_path"
22580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22582  fi
22583
22584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22586
22587  else
22588    # We're on a unix platform. Hooray! :)
22589    path="$BOOT_JDK"
22590    has_space=`$ECHO "$path" | $GREP " "`
22591    if test "x$has_space" != x; then
22592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22593$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22594      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22595    fi
22596
22597    # Use eval to expand a potential ~
22598    eval path="$path"
22599    if test ! -f "$path" && test ! -d "$path"; then
22600      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22601    fi
22602
22603    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22604  fi
22605
22606            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22607$as_echo_n "checking for Boot JDK... " >&6; }
22608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22609$as_echo "$BOOT_JDK" >&6; }
22610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22611$as_echo_n "checking Boot JDK version... " >&6; }
22612            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22614$as_echo "$BOOT_JDK_VERSION" >&6; }
22615          fi # end check jdk version
22616        fi # end check javac
22617      fi # end check java
22618    fi # end check boot jdk found
22619  fi
22620
22621
22622  if test "x$BOOT_JDK_FOUND" = xno; then
22623    # Now execute the test
22624
22625  if test "x$PROGRAMW6432" != x; then
22626    VIRTUAL_DIR="$PROGRAMW6432/Java"
22627
22628  windows_path="$VIRTUAL_DIR"
22629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22630    unix_path=`$CYGPATH -u "$windows_path"`
22631    VIRTUAL_DIR="$unix_path"
22632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22634    VIRTUAL_DIR="$unix_path"
22635  fi
22636
22637
22638  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22639  BOOT_JDK_SUFFIX=""
22640  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22641  if test "x$ALL_JDKS_FOUND" != x; then
22642    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22643
22644  if test "x$BOOT_JDK_FOUND" = xno; then
22645    # Now execute the test
22646
22647        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22648        if test -d "$BOOT_JDK"; then
22649          BOOT_JDK_FOUND=maybe
22650          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22651$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22652        fi
22653
22654
22655    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22656    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22657      # Do we have a bin/java?
22658      if test ! -x "$BOOT_JDK/bin/java"; then
22659        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22661        BOOT_JDK_FOUND=no
22662      else
22663        # Do we have a bin/javac?
22664        if test ! -x "$BOOT_JDK/bin/javac"; then
22665          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22667          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22668$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22669          BOOT_JDK_FOUND=no
22670        else
22671          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22672          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22673
22674          # Extra M4 quote needed to protect [] in grep expression.
22675          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22676          if test "x$FOUND_CORRECT_VERSION" = x; then
22677            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22679            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22680$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22681            BOOT_JDK_FOUND=no
22682          else
22683            # We're done! :-)
22684            BOOT_JDK_FOUND=yes
22685
22686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22687
22688  # Input might be given as Windows format, start by converting to
22689  # unix format.
22690  path="$BOOT_JDK"
22691  new_path=`$CYGPATH -u "$path"`
22692
22693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22696  # "foo.exe" is OK but "foo" is an error.
22697  #
22698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22699  # It is also a way to make sure we got the proper file name for the real test later on.
22700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22701  if test "x$test_shortpath" = x; then
22702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22703$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22704    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22705  fi
22706
22707  # Call helper function which possibly converts this using DOS-style short mode.
22708  # If so, the updated path is stored in $new_path.
22709
22710  input_path="$new_path"
22711  # Check if we need to convert this using DOS-style short mode. If the path
22712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22713  # take no chances and rewrite it.
22714  # Note: m4 eats our [], so we need to use [ and ] instead.
22715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22716  if test "x$has_forbidden_chars" != x; then
22717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22721      # Going to short mode and back again did indeed matter. Since short mode is
22722      # case insensitive, let's make it lowercase to improve readability.
22723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22724      # Now convert it back to Unix-stile (cygpath)
22725      input_path=`$CYGPATH -u "$shortmode_path"`
22726      new_path="$input_path"
22727    fi
22728  fi
22729
22730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22731  if test "x$test_cygdrive_prefix" = x; then
22732    # As a simple fix, exclude /usr/bin since it's not a real path.
22733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22735      # a path prefixed by /cygdrive for fixpath to work.
22736      new_path="$CYGWIN_ROOT_PATH$input_path"
22737    fi
22738  fi
22739
22740
22741  if test "x$path" != "x$new_path"; then
22742    BOOT_JDK="$new_path"
22743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22744$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22745  fi
22746
22747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22748
22749  path="$BOOT_JDK"
22750  has_colon=`$ECHO $path | $GREP ^.:`
22751  new_path="$path"
22752  if test "x$has_colon" = x; then
22753    # Not in mixed or Windows style, start by that.
22754    new_path=`cmd //c echo $path`
22755  fi
22756
22757
22758  input_path="$new_path"
22759  # Check if we need to convert this using DOS-style short mode. If the path
22760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22761  # take no chances and rewrite it.
22762  # Note: m4 eats our [], so we need to use [ and ] instead.
22763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22764  if test "x$has_forbidden_chars" != x; then
22765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22767  fi
22768
22769
22770  windows_path="$new_path"
22771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22772    unix_path=`$CYGPATH -u "$windows_path"`
22773    new_path="$unix_path"
22774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22776    new_path="$unix_path"
22777  fi
22778
22779  if test "x$path" != "x$new_path"; then
22780    BOOT_JDK="$new_path"
22781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22782$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22783  fi
22784
22785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22787
22788  else
22789    # We're on a unix platform. Hooray! :)
22790    path="$BOOT_JDK"
22791    has_space=`$ECHO "$path" | $GREP " "`
22792    if test "x$has_space" != x; then
22793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22795      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22796    fi
22797
22798    # Use eval to expand a potential ~
22799    eval path="$path"
22800    if test ! -f "$path" && test ! -d "$path"; then
22801      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22802    fi
22803
22804    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22805  fi
22806
22807            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22808$as_echo_n "checking for Boot JDK... " >&6; }
22809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22810$as_echo "$BOOT_JDK" >&6; }
22811            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22812$as_echo_n "checking Boot JDK version... " >&6; }
22813            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22815$as_echo "$BOOT_JDK_VERSION" >&6; }
22816          fi # end check jdk version
22817        fi # end check javac
22818      fi # end check java
22819    fi # end check boot jdk found
22820  fi
22821
22822    done
22823  fi
22824
22825  fi
22826
22827
22828    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22829    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22830      # Do we have a bin/java?
22831      if test ! -x "$BOOT_JDK/bin/java"; then
22832        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22834        BOOT_JDK_FOUND=no
22835      else
22836        # Do we have a bin/javac?
22837        if test ! -x "$BOOT_JDK/bin/javac"; then
22838          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22840          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22841$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22842          BOOT_JDK_FOUND=no
22843        else
22844          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22845          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22846
22847          # Extra M4 quote needed to protect [] in grep expression.
22848          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22849          if test "x$FOUND_CORRECT_VERSION" = x; then
22850            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22852            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22853$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22854            BOOT_JDK_FOUND=no
22855          else
22856            # We're done! :-)
22857            BOOT_JDK_FOUND=yes
22858
22859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22860
22861  # Input might be given as Windows format, start by converting to
22862  # unix format.
22863  path="$BOOT_JDK"
22864  new_path=`$CYGPATH -u "$path"`
22865
22866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22869  # "foo.exe" is OK but "foo" is an error.
22870  #
22871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22872  # It is also a way to make sure we got the proper file name for the real test later on.
22873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22874  if test "x$test_shortpath" = x; then
22875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22876$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22877    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22878  fi
22879
22880  # Call helper function which possibly converts this using DOS-style short mode.
22881  # If so, the updated path is stored in $new_path.
22882
22883  input_path="$new_path"
22884  # Check if we need to convert this using DOS-style short mode. If the path
22885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22886  # take no chances and rewrite it.
22887  # Note: m4 eats our [], so we need to use [ and ] instead.
22888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22889  if test "x$has_forbidden_chars" != x; then
22890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22894      # Going to short mode and back again did indeed matter. Since short mode is
22895      # case insensitive, let's make it lowercase to improve readability.
22896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22897      # Now convert it back to Unix-stile (cygpath)
22898      input_path=`$CYGPATH -u "$shortmode_path"`
22899      new_path="$input_path"
22900    fi
22901  fi
22902
22903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22904  if test "x$test_cygdrive_prefix" = x; then
22905    # As a simple fix, exclude /usr/bin since it's not a real path.
22906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22908      # a path prefixed by /cygdrive for fixpath to work.
22909      new_path="$CYGWIN_ROOT_PATH$input_path"
22910    fi
22911  fi
22912
22913
22914  if test "x$path" != "x$new_path"; then
22915    BOOT_JDK="$new_path"
22916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22918  fi
22919
22920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22921
22922  path="$BOOT_JDK"
22923  has_colon=`$ECHO $path | $GREP ^.:`
22924  new_path="$path"
22925  if test "x$has_colon" = x; then
22926    # Not in mixed or Windows style, start by that.
22927    new_path=`cmd //c echo $path`
22928  fi
22929
22930
22931  input_path="$new_path"
22932  # Check if we need to convert this using DOS-style short mode. If the path
22933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22934  # take no chances and rewrite it.
22935  # Note: m4 eats our [], so we need to use [ and ] instead.
22936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22937  if test "x$has_forbidden_chars" != x; then
22938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22940  fi
22941
22942
22943  windows_path="$new_path"
22944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22945    unix_path=`$CYGPATH -u "$windows_path"`
22946    new_path="$unix_path"
22947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22949    new_path="$unix_path"
22950  fi
22951
22952  if test "x$path" != "x$new_path"; then
22953    BOOT_JDK="$new_path"
22954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22956  fi
22957
22958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22960
22961  else
22962    # We're on a unix platform. Hooray! :)
22963    path="$BOOT_JDK"
22964    has_space=`$ECHO "$path" | $GREP " "`
22965    if test "x$has_space" != x; then
22966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22968      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22969    fi
22970
22971    # Use eval to expand a potential ~
22972    eval path="$path"
22973    if test ! -f "$path" && test ! -d "$path"; then
22974      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22975    fi
22976
22977    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22978  fi
22979
22980            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22981$as_echo_n "checking for Boot JDK... " >&6; }
22982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22983$as_echo "$BOOT_JDK" >&6; }
22984            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22985$as_echo_n "checking Boot JDK version... " >&6; }
22986            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22988$as_echo "$BOOT_JDK_VERSION" >&6; }
22989          fi # end check jdk version
22990        fi # end check javac
22991      fi # end check java
22992    fi # end check boot jdk found
22993  fi
22994
22995
22996  if test "x$BOOT_JDK_FOUND" = xno; then
22997    # Now execute the test
22998
22999  if test "x$PROGRAMFILES" != x; then
23000    VIRTUAL_DIR="$PROGRAMFILES/Java"
23001
23002  windows_path="$VIRTUAL_DIR"
23003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23004    unix_path=`$CYGPATH -u "$windows_path"`
23005    VIRTUAL_DIR="$unix_path"
23006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23008    VIRTUAL_DIR="$unix_path"
23009  fi
23010
23011
23012  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23013  BOOT_JDK_SUFFIX=""
23014  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23015  if test "x$ALL_JDKS_FOUND" != x; then
23016    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23017
23018  if test "x$BOOT_JDK_FOUND" = xno; then
23019    # Now execute the test
23020
23021        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23022        if test -d "$BOOT_JDK"; then
23023          BOOT_JDK_FOUND=maybe
23024          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23025$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23026        fi
23027
23028
23029    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23030    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23031      # Do we have a bin/java?
23032      if test ! -x "$BOOT_JDK/bin/java"; then
23033        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23035        BOOT_JDK_FOUND=no
23036      else
23037        # Do we have a bin/javac?
23038        if test ! -x "$BOOT_JDK/bin/javac"; then
23039          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23041          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23042$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23043          BOOT_JDK_FOUND=no
23044        else
23045          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23046          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23047
23048          # Extra M4 quote needed to protect [] in grep expression.
23049          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23050          if test "x$FOUND_CORRECT_VERSION" = x; then
23051            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23053            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23054$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23055            BOOT_JDK_FOUND=no
23056          else
23057            # We're done! :-)
23058            BOOT_JDK_FOUND=yes
23059
23060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23061
23062  # Input might be given as Windows format, start by converting to
23063  # unix format.
23064  path="$BOOT_JDK"
23065  new_path=`$CYGPATH -u "$path"`
23066
23067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23070  # "foo.exe" is OK but "foo" is an error.
23071  #
23072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23073  # It is also a way to make sure we got the proper file name for the real test later on.
23074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23075  if test "x$test_shortpath" = x; then
23076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23078    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23079  fi
23080
23081  # Call helper function which possibly converts this using DOS-style short mode.
23082  # If so, the updated path is stored in $new_path.
23083
23084  input_path="$new_path"
23085  # Check if we need to convert this using DOS-style short mode. If the path
23086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23087  # take no chances and rewrite it.
23088  # Note: m4 eats our [], so we need to use [ and ] instead.
23089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23090  if test "x$has_forbidden_chars" != x; then
23091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23095      # Going to short mode and back again did indeed matter. Since short mode is
23096      # case insensitive, let's make it lowercase to improve readability.
23097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23098      # Now convert it back to Unix-stile (cygpath)
23099      input_path=`$CYGPATH -u "$shortmode_path"`
23100      new_path="$input_path"
23101    fi
23102  fi
23103
23104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23105  if test "x$test_cygdrive_prefix" = x; then
23106    # As a simple fix, exclude /usr/bin since it's not a real path.
23107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23109      # a path prefixed by /cygdrive for fixpath to work.
23110      new_path="$CYGWIN_ROOT_PATH$input_path"
23111    fi
23112  fi
23113
23114
23115  if test "x$path" != "x$new_path"; then
23116    BOOT_JDK="$new_path"
23117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23119  fi
23120
23121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23122
23123  path="$BOOT_JDK"
23124  has_colon=`$ECHO $path | $GREP ^.:`
23125  new_path="$path"
23126  if test "x$has_colon" = x; then
23127    # Not in mixed or Windows style, start by that.
23128    new_path=`cmd //c echo $path`
23129  fi
23130
23131
23132  input_path="$new_path"
23133  # Check if we need to convert this using DOS-style short mode. If the path
23134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23135  # take no chances and rewrite it.
23136  # Note: m4 eats our [], so we need to use [ and ] instead.
23137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23138  if test "x$has_forbidden_chars" != x; then
23139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23141  fi
23142
23143
23144  windows_path="$new_path"
23145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23146    unix_path=`$CYGPATH -u "$windows_path"`
23147    new_path="$unix_path"
23148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23150    new_path="$unix_path"
23151  fi
23152
23153  if test "x$path" != "x$new_path"; then
23154    BOOT_JDK="$new_path"
23155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23157  fi
23158
23159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23161
23162  else
23163    # We're on a unix platform. Hooray! :)
23164    path="$BOOT_JDK"
23165    has_space=`$ECHO "$path" | $GREP " "`
23166    if test "x$has_space" != x; then
23167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23169      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23170    fi
23171
23172    # Use eval to expand a potential ~
23173    eval path="$path"
23174    if test ! -f "$path" && test ! -d "$path"; then
23175      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23176    fi
23177
23178    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23179  fi
23180
23181            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23182$as_echo_n "checking for Boot JDK... " >&6; }
23183            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23184$as_echo "$BOOT_JDK" >&6; }
23185            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23186$as_echo_n "checking Boot JDK version... " >&6; }
23187            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23189$as_echo "$BOOT_JDK_VERSION" >&6; }
23190          fi # end check jdk version
23191        fi # end check javac
23192      fi # end check java
23193    fi # end check boot jdk found
23194  fi
23195
23196    done
23197  fi
23198
23199  fi
23200
23201
23202    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23203    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23204      # Do we have a bin/java?
23205      if test ! -x "$BOOT_JDK/bin/java"; then
23206        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23208        BOOT_JDK_FOUND=no
23209      else
23210        # Do we have a bin/javac?
23211        if test ! -x "$BOOT_JDK/bin/javac"; then
23212          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23214          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23215$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23216          BOOT_JDK_FOUND=no
23217        else
23218          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23219          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23220
23221          # Extra M4 quote needed to protect [] in grep expression.
23222          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23223          if test "x$FOUND_CORRECT_VERSION" = x; then
23224            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23226            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23227$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23228            BOOT_JDK_FOUND=no
23229          else
23230            # We're done! :-)
23231            BOOT_JDK_FOUND=yes
23232
23233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23234
23235  # Input might be given as Windows format, start by converting to
23236  # unix format.
23237  path="$BOOT_JDK"
23238  new_path=`$CYGPATH -u "$path"`
23239
23240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23243  # "foo.exe" is OK but "foo" is an error.
23244  #
23245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23246  # It is also a way to make sure we got the proper file name for the real test later on.
23247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23248  if test "x$test_shortpath" = x; then
23249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23251    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23252  fi
23253
23254  # Call helper function which possibly converts this using DOS-style short mode.
23255  # If so, the updated path is stored in $new_path.
23256
23257  input_path="$new_path"
23258  # Check if we need to convert this using DOS-style short mode. If the path
23259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23260  # take no chances and rewrite it.
23261  # Note: m4 eats our [], so we need to use [ and ] instead.
23262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23263  if test "x$has_forbidden_chars" != x; then
23264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23268      # Going to short mode and back again did indeed matter. Since short mode is
23269      # case insensitive, let's make it lowercase to improve readability.
23270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23271      # Now convert it back to Unix-stile (cygpath)
23272      input_path=`$CYGPATH -u "$shortmode_path"`
23273      new_path="$input_path"
23274    fi
23275  fi
23276
23277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23278  if test "x$test_cygdrive_prefix" = x; then
23279    # As a simple fix, exclude /usr/bin since it's not a real path.
23280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23282      # a path prefixed by /cygdrive for fixpath to work.
23283      new_path="$CYGWIN_ROOT_PATH$input_path"
23284    fi
23285  fi
23286
23287
23288  if test "x$path" != "x$new_path"; then
23289    BOOT_JDK="$new_path"
23290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23292  fi
23293
23294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23295
23296  path="$BOOT_JDK"
23297  has_colon=`$ECHO $path | $GREP ^.:`
23298  new_path="$path"
23299  if test "x$has_colon" = x; then
23300    # Not in mixed or Windows style, start by that.
23301    new_path=`cmd //c echo $path`
23302  fi
23303
23304
23305  input_path="$new_path"
23306  # Check if we need to convert this using DOS-style short mode. If the path
23307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23308  # take no chances and rewrite it.
23309  # Note: m4 eats our [], so we need to use [ and ] instead.
23310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23311  if test "x$has_forbidden_chars" != x; then
23312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23314  fi
23315
23316
23317  windows_path="$new_path"
23318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23319    unix_path=`$CYGPATH -u "$windows_path"`
23320    new_path="$unix_path"
23321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23323    new_path="$unix_path"
23324  fi
23325
23326  if test "x$path" != "x$new_path"; then
23327    BOOT_JDK="$new_path"
23328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23329$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23330  fi
23331
23332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23334
23335  else
23336    # We're on a unix platform. Hooray! :)
23337    path="$BOOT_JDK"
23338    has_space=`$ECHO "$path" | $GREP " "`
23339    if test "x$has_space" != x; then
23340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23341$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23342      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23343    fi
23344
23345    # Use eval to expand a potential ~
23346    eval path="$path"
23347    if test ! -f "$path" && test ! -d "$path"; then
23348      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23349    fi
23350
23351    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23352  fi
23353
23354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23355$as_echo_n "checking for Boot JDK... " >&6; }
23356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23357$as_echo "$BOOT_JDK" >&6; }
23358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23359$as_echo_n "checking Boot JDK version... " >&6; }
23360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23362$as_echo "$BOOT_JDK_VERSION" >&6; }
23363          fi # end check jdk version
23364        fi # end check javac
23365      fi # end check java
23366    fi # end check boot jdk found
23367  fi
23368
23369
23370  if test "x$BOOT_JDK_FOUND" = xno; then
23371    # Now execute the test
23372
23373  if test "x$ProgramFiles" != x; then
23374    VIRTUAL_DIR="$ProgramFiles/Java"
23375
23376  windows_path="$VIRTUAL_DIR"
23377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23378    unix_path=`$CYGPATH -u "$windows_path"`
23379    VIRTUAL_DIR="$unix_path"
23380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23382    VIRTUAL_DIR="$unix_path"
23383  fi
23384
23385
23386  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23387  BOOT_JDK_SUFFIX=""
23388  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23389  if test "x$ALL_JDKS_FOUND" != x; then
23390    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23391
23392  if test "x$BOOT_JDK_FOUND" = xno; then
23393    # Now execute the test
23394
23395        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23396        if test -d "$BOOT_JDK"; then
23397          BOOT_JDK_FOUND=maybe
23398          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23399$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23400        fi
23401
23402
23403    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23404    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23405      # Do we have a bin/java?
23406      if test ! -x "$BOOT_JDK/bin/java"; then
23407        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23409        BOOT_JDK_FOUND=no
23410      else
23411        # Do we have a bin/javac?
23412        if test ! -x "$BOOT_JDK/bin/javac"; then
23413          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23415          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23416$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23417          BOOT_JDK_FOUND=no
23418        else
23419          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23420          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23421
23422          # Extra M4 quote needed to protect [] in grep expression.
23423          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23424          if test "x$FOUND_CORRECT_VERSION" = x; then
23425            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23427            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23428$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23429            BOOT_JDK_FOUND=no
23430          else
23431            # We're done! :-)
23432            BOOT_JDK_FOUND=yes
23433
23434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23435
23436  # Input might be given as Windows format, start by converting to
23437  # unix format.
23438  path="$BOOT_JDK"
23439  new_path=`$CYGPATH -u "$path"`
23440
23441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23444  # "foo.exe" is OK but "foo" is an error.
23445  #
23446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23447  # It is also a way to make sure we got the proper file name for the real test later on.
23448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23449  if test "x$test_shortpath" = x; then
23450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23452    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23453  fi
23454
23455  # Call helper function which possibly converts this using DOS-style short mode.
23456  # If so, the updated path is stored in $new_path.
23457
23458  input_path="$new_path"
23459  # Check if we need to convert this using DOS-style short mode. If the path
23460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23461  # take no chances and rewrite it.
23462  # Note: m4 eats our [], so we need to use [ and ] instead.
23463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23464  if test "x$has_forbidden_chars" != x; then
23465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23469      # Going to short mode and back again did indeed matter. Since short mode is
23470      # case insensitive, let's make it lowercase to improve readability.
23471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23472      # Now convert it back to Unix-stile (cygpath)
23473      input_path=`$CYGPATH -u "$shortmode_path"`
23474      new_path="$input_path"
23475    fi
23476  fi
23477
23478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23479  if test "x$test_cygdrive_prefix" = x; then
23480    # As a simple fix, exclude /usr/bin since it's not a real path.
23481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23483      # a path prefixed by /cygdrive for fixpath to work.
23484      new_path="$CYGWIN_ROOT_PATH$input_path"
23485    fi
23486  fi
23487
23488
23489  if test "x$path" != "x$new_path"; then
23490    BOOT_JDK="$new_path"
23491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23492$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23493  fi
23494
23495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23496
23497  path="$BOOT_JDK"
23498  has_colon=`$ECHO $path | $GREP ^.:`
23499  new_path="$path"
23500  if test "x$has_colon" = x; then
23501    # Not in mixed or Windows style, start by that.
23502    new_path=`cmd //c echo $path`
23503  fi
23504
23505
23506  input_path="$new_path"
23507  # Check if we need to convert this using DOS-style short mode. If the path
23508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23509  # take no chances and rewrite it.
23510  # Note: m4 eats our [], so we need to use [ and ] instead.
23511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23512  if test "x$has_forbidden_chars" != x; then
23513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23515  fi
23516
23517
23518  windows_path="$new_path"
23519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23520    unix_path=`$CYGPATH -u "$windows_path"`
23521    new_path="$unix_path"
23522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23524    new_path="$unix_path"
23525  fi
23526
23527  if test "x$path" != "x$new_path"; then
23528    BOOT_JDK="$new_path"
23529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23530$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23531  fi
23532
23533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23535
23536  else
23537    # We're on a unix platform. Hooray! :)
23538    path="$BOOT_JDK"
23539    has_space=`$ECHO "$path" | $GREP " "`
23540    if test "x$has_space" != x; then
23541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23544    fi
23545
23546    # Use eval to expand a potential ~
23547    eval path="$path"
23548    if test ! -f "$path" && test ! -d "$path"; then
23549      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23550    fi
23551
23552    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23553  fi
23554
23555            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23556$as_echo_n "checking for Boot JDK... " >&6; }
23557            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23558$as_echo "$BOOT_JDK" >&6; }
23559            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23560$as_echo_n "checking Boot JDK version... " >&6; }
23561            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23563$as_echo "$BOOT_JDK_VERSION" >&6; }
23564          fi # end check jdk version
23565        fi # end check javac
23566      fi # end check java
23567    fi # end check boot jdk found
23568  fi
23569
23570    done
23571  fi
23572
23573  fi
23574
23575
23576    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23577    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23578      # Do we have a bin/java?
23579      if test ! -x "$BOOT_JDK/bin/java"; then
23580        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23582        BOOT_JDK_FOUND=no
23583      else
23584        # Do we have a bin/javac?
23585        if test ! -x "$BOOT_JDK/bin/javac"; then
23586          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23588          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23589$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23590          BOOT_JDK_FOUND=no
23591        else
23592          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23593          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23594
23595          # Extra M4 quote needed to protect [] in grep expression.
23596          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23597          if test "x$FOUND_CORRECT_VERSION" = x; then
23598            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23600            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23601$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23602            BOOT_JDK_FOUND=no
23603          else
23604            # We're done! :-)
23605            BOOT_JDK_FOUND=yes
23606
23607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23608
23609  # Input might be given as Windows format, start by converting to
23610  # unix format.
23611  path="$BOOT_JDK"
23612  new_path=`$CYGPATH -u "$path"`
23613
23614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23617  # "foo.exe" is OK but "foo" is an error.
23618  #
23619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23620  # It is also a way to make sure we got the proper file name for the real test later on.
23621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23622  if test "x$test_shortpath" = x; then
23623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23624$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23625    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23626  fi
23627
23628  # Call helper function which possibly converts this using DOS-style short mode.
23629  # If so, the updated path is stored in $new_path.
23630
23631  input_path="$new_path"
23632  # Check if we need to convert this using DOS-style short mode. If the path
23633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23634  # take no chances and rewrite it.
23635  # Note: m4 eats our [], so we need to use [ and ] instead.
23636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23637  if test "x$has_forbidden_chars" != x; then
23638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23642      # Going to short mode and back again did indeed matter. Since short mode is
23643      # case insensitive, let's make it lowercase to improve readability.
23644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23645      # Now convert it back to Unix-stile (cygpath)
23646      input_path=`$CYGPATH -u "$shortmode_path"`
23647      new_path="$input_path"
23648    fi
23649  fi
23650
23651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23652  if test "x$test_cygdrive_prefix" = x; then
23653    # As a simple fix, exclude /usr/bin since it's not a real path.
23654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23656      # a path prefixed by /cygdrive for fixpath to work.
23657      new_path="$CYGWIN_ROOT_PATH$input_path"
23658    fi
23659  fi
23660
23661
23662  if test "x$path" != "x$new_path"; then
23663    BOOT_JDK="$new_path"
23664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23665$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23666  fi
23667
23668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23669
23670  path="$BOOT_JDK"
23671  has_colon=`$ECHO $path | $GREP ^.:`
23672  new_path="$path"
23673  if test "x$has_colon" = x; then
23674    # Not in mixed or Windows style, start by that.
23675    new_path=`cmd //c echo $path`
23676  fi
23677
23678
23679  input_path="$new_path"
23680  # Check if we need to convert this using DOS-style short mode. If the path
23681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23682  # take no chances and rewrite it.
23683  # Note: m4 eats our [], so we need to use [ and ] instead.
23684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23685  if test "x$has_forbidden_chars" != x; then
23686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23688  fi
23689
23690
23691  windows_path="$new_path"
23692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23693    unix_path=`$CYGPATH -u "$windows_path"`
23694    new_path="$unix_path"
23695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23697    new_path="$unix_path"
23698  fi
23699
23700  if test "x$path" != "x$new_path"; then
23701    BOOT_JDK="$new_path"
23702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23703$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23704  fi
23705
23706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23708
23709  else
23710    # We're on a unix platform. Hooray! :)
23711    path="$BOOT_JDK"
23712    has_space=`$ECHO "$path" | $GREP " "`
23713    if test "x$has_space" != x; then
23714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23715$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23716      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23717    fi
23718
23719    # Use eval to expand a potential ~
23720    eval path="$path"
23721    if test ! -f "$path" && test ! -d "$path"; then
23722      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23723    fi
23724
23725    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23726  fi
23727
23728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23729$as_echo_n "checking for Boot JDK... " >&6; }
23730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23731$as_echo "$BOOT_JDK" >&6; }
23732            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23733$as_echo_n "checking Boot JDK version... " >&6; }
23734            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23736$as_echo "$BOOT_JDK_VERSION" >&6; }
23737          fi # end check jdk version
23738        fi # end check javac
23739      fi # end check java
23740    fi # end check boot jdk found
23741  fi
23742
23743
23744  if test "x$BOOT_JDK_FOUND" = xno; then
23745    # Now execute the test
23746
23747  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23748  BOOT_JDK_SUFFIX=""
23749  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23750  if test "x$ALL_JDKS_FOUND" != x; then
23751    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23752
23753  if test "x$BOOT_JDK_FOUND" = xno; then
23754    # Now execute the test
23755
23756        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23757        if test -d "$BOOT_JDK"; then
23758          BOOT_JDK_FOUND=maybe
23759          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23760$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23761        fi
23762
23763
23764    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23765    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23766      # Do we have a bin/java?
23767      if test ! -x "$BOOT_JDK/bin/java"; then
23768        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23770        BOOT_JDK_FOUND=no
23771      else
23772        # Do we have a bin/javac?
23773        if test ! -x "$BOOT_JDK/bin/javac"; then
23774          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23776          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23777$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23778          BOOT_JDK_FOUND=no
23779        else
23780          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23781          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23782
23783          # Extra M4 quote needed to protect [] in grep expression.
23784          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23785          if test "x$FOUND_CORRECT_VERSION" = x; then
23786            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23788            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23789$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23790            BOOT_JDK_FOUND=no
23791          else
23792            # We're done! :-)
23793            BOOT_JDK_FOUND=yes
23794
23795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23796
23797  # Input might be given as Windows format, start by converting to
23798  # unix format.
23799  path="$BOOT_JDK"
23800  new_path=`$CYGPATH -u "$path"`
23801
23802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23805  # "foo.exe" is OK but "foo" is an error.
23806  #
23807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23808  # It is also a way to make sure we got the proper file name for the real test later on.
23809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23810  if test "x$test_shortpath" = x; then
23811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23814  fi
23815
23816  # Call helper function which possibly converts this using DOS-style short mode.
23817  # If so, the updated path is stored in $new_path.
23818
23819  input_path="$new_path"
23820  # Check if we need to convert this using DOS-style short mode. If the path
23821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23822  # take no chances and rewrite it.
23823  # Note: m4 eats our [], so we need to use [ and ] instead.
23824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23825  if test "x$has_forbidden_chars" != x; then
23826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23830      # Going to short mode and back again did indeed matter. Since short mode is
23831      # case insensitive, let's make it lowercase to improve readability.
23832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23833      # Now convert it back to Unix-stile (cygpath)
23834      input_path=`$CYGPATH -u "$shortmode_path"`
23835      new_path="$input_path"
23836    fi
23837  fi
23838
23839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23840  if test "x$test_cygdrive_prefix" = x; then
23841    # As a simple fix, exclude /usr/bin since it's not a real path.
23842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23844      # a path prefixed by /cygdrive for fixpath to work.
23845      new_path="$CYGWIN_ROOT_PATH$input_path"
23846    fi
23847  fi
23848
23849
23850  if test "x$path" != "x$new_path"; then
23851    BOOT_JDK="$new_path"
23852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23854  fi
23855
23856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23857
23858  path="$BOOT_JDK"
23859  has_colon=`$ECHO $path | $GREP ^.:`
23860  new_path="$path"
23861  if test "x$has_colon" = x; then
23862    # Not in mixed or Windows style, start by that.
23863    new_path=`cmd //c echo $path`
23864  fi
23865
23866
23867  input_path="$new_path"
23868  # Check if we need to convert this using DOS-style short mode. If the path
23869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23870  # take no chances and rewrite it.
23871  # Note: m4 eats our [], so we need to use [ and ] instead.
23872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23873  if test "x$has_forbidden_chars" != x; then
23874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23876  fi
23877
23878
23879  windows_path="$new_path"
23880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23881    unix_path=`$CYGPATH -u "$windows_path"`
23882    new_path="$unix_path"
23883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23885    new_path="$unix_path"
23886  fi
23887
23888  if test "x$path" != "x$new_path"; then
23889    BOOT_JDK="$new_path"
23890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23892  fi
23893
23894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23896
23897  else
23898    # We're on a unix platform. Hooray! :)
23899    path="$BOOT_JDK"
23900    has_space=`$ECHO "$path" | $GREP " "`
23901    if test "x$has_space" != x; then
23902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23904      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23905    fi
23906
23907    # Use eval to expand a potential ~
23908    eval path="$path"
23909    if test ! -f "$path" && test ! -d "$path"; then
23910      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23911    fi
23912
23913    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23914  fi
23915
23916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23917$as_echo_n "checking for Boot JDK... " >&6; }
23918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23919$as_echo "$BOOT_JDK" >&6; }
23920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23921$as_echo_n "checking Boot JDK version... " >&6; }
23922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23924$as_echo "$BOOT_JDK_VERSION" >&6; }
23925          fi # end check jdk version
23926        fi # end check javac
23927      fi # end check java
23928    fi # end check boot jdk found
23929  fi
23930
23931    done
23932  fi
23933
23934
23935    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23936    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23937      # Do we have a bin/java?
23938      if test ! -x "$BOOT_JDK/bin/java"; then
23939        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23941        BOOT_JDK_FOUND=no
23942      else
23943        # Do we have a bin/javac?
23944        if test ! -x "$BOOT_JDK/bin/javac"; then
23945          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23947          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23948$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23949          BOOT_JDK_FOUND=no
23950        else
23951          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23952          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23953
23954          # Extra M4 quote needed to protect [] in grep expression.
23955          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23956          if test "x$FOUND_CORRECT_VERSION" = x; then
23957            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23959            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23960$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23961            BOOT_JDK_FOUND=no
23962          else
23963            # We're done! :-)
23964            BOOT_JDK_FOUND=yes
23965
23966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23967
23968  # Input might be given as Windows format, start by converting to
23969  # unix format.
23970  path="$BOOT_JDK"
23971  new_path=`$CYGPATH -u "$path"`
23972
23973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23976  # "foo.exe" is OK but "foo" is an error.
23977  #
23978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23979  # It is also a way to make sure we got the proper file name for the real test later on.
23980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23981  if test "x$test_shortpath" = x; then
23982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23984    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23985  fi
23986
23987  # Call helper function which possibly converts this using DOS-style short mode.
23988  # If so, the updated path is stored in $new_path.
23989
23990  input_path="$new_path"
23991  # Check if we need to convert this using DOS-style short mode. If the path
23992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23993  # take no chances and rewrite it.
23994  # Note: m4 eats our [], so we need to use [ and ] instead.
23995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23996  if test "x$has_forbidden_chars" != x; then
23997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24001      # Going to short mode and back again did indeed matter. Since short mode is
24002      # case insensitive, let's make it lowercase to improve readability.
24003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24004      # Now convert it back to Unix-stile (cygpath)
24005      input_path=`$CYGPATH -u "$shortmode_path"`
24006      new_path="$input_path"
24007    fi
24008  fi
24009
24010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24011  if test "x$test_cygdrive_prefix" = x; then
24012    # As a simple fix, exclude /usr/bin since it's not a real path.
24013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24015      # a path prefixed by /cygdrive for fixpath to work.
24016      new_path="$CYGWIN_ROOT_PATH$input_path"
24017    fi
24018  fi
24019
24020
24021  if test "x$path" != "x$new_path"; then
24022    BOOT_JDK="$new_path"
24023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24025  fi
24026
24027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24028
24029  path="$BOOT_JDK"
24030  has_colon=`$ECHO $path | $GREP ^.:`
24031  new_path="$path"
24032  if test "x$has_colon" = x; then
24033    # Not in mixed or Windows style, start by that.
24034    new_path=`cmd //c echo $path`
24035  fi
24036
24037
24038  input_path="$new_path"
24039  # Check if we need to convert this using DOS-style short mode. If the path
24040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24041  # take no chances and rewrite it.
24042  # Note: m4 eats our [], so we need to use [ and ] instead.
24043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24044  if test "x$has_forbidden_chars" != x; then
24045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24047  fi
24048
24049
24050  windows_path="$new_path"
24051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24052    unix_path=`$CYGPATH -u "$windows_path"`
24053    new_path="$unix_path"
24054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24056    new_path="$unix_path"
24057  fi
24058
24059  if test "x$path" != "x$new_path"; then
24060    BOOT_JDK="$new_path"
24061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24063  fi
24064
24065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24067
24068  else
24069    # We're on a unix platform. Hooray! :)
24070    path="$BOOT_JDK"
24071    has_space=`$ECHO "$path" | $GREP " "`
24072    if test "x$has_space" != x; then
24073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24075      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24076    fi
24077
24078    # Use eval to expand a potential ~
24079    eval path="$path"
24080    if test ! -f "$path" && test ! -d "$path"; then
24081      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24082    fi
24083
24084    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24085  fi
24086
24087            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24088$as_echo_n "checking for Boot JDK... " >&6; }
24089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24090$as_echo "$BOOT_JDK" >&6; }
24091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24092$as_echo_n "checking Boot JDK version... " >&6; }
24093            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24095$as_echo "$BOOT_JDK_VERSION" >&6; }
24096          fi # end check jdk version
24097        fi # end check javac
24098      fi # end check java
24099    fi # end check boot jdk found
24100  fi
24101
24102  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24103
24104  if test "x$BOOT_JDK_FOUND" = xno; then
24105    # Now execute the test
24106
24107  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24108  BOOT_JDK_SUFFIX="/Contents/Home"
24109  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24110  if test "x$ALL_JDKS_FOUND" != x; then
24111    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24112
24113  if test "x$BOOT_JDK_FOUND" = xno; then
24114    # Now execute the test
24115
24116        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24117        if test -d "$BOOT_JDK"; then
24118          BOOT_JDK_FOUND=maybe
24119          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24120$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24121        fi
24122
24123
24124    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24125    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24126      # Do we have a bin/java?
24127      if test ! -x "$BOOT_JDK/bin/java"; then
24128        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24130        BOOT_JDK_FOUND=no
24131      else
24132        # Do we have a bin/javac?
24133        if test ! -x "$BOOT_JDK/bin/javac"; then
24134          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24136          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24137$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24138          BOOT_JDK_FOUND=no
24139        else
24140          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24141          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24142
24143          # Extra M4 quote needed to protect [] in grep expression.
24144          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24145          if test "x$FOUND_CORRECT_VERSION" = x; then
24146            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24148            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24149$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24150            BOOT_JDK_FOUND=no
24151          else
24152            # We're done! :-)
24153            BOOT_JDK_FOUND=yes
24154
24155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24156
24157  # Input might be given as Windows format, start by converting to
24158  # unix format.
24159  path="$BOOT_JDK"
24160  new_path=`$CYGPATH -u "$path"`
24161
24162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24165  # "foo.exe" is OK but "foo" is an error.
24166  #
24167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24168  # It is also a way to make sure we got the proper file name for the real test later on.
24169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24170  if test "x$test_shortpath" = x; then
24171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24174  fi
24175
24176  # Call helper function which possibly converts this using DOS-style short mode.
24177  # If so, the updated path is stored in $new_path.
24178
24179  input_path="$new_path"
24180  # Check if we need to convert this using DOS-style short mode. If the path
24181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24182  # take no chances and rewrite it.
24183  # Note: m4 eats our [], so we need to use [ and ] instead.
24184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24185  if test "x$has_forbidden_chars" != x; then
24186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24190      # Going to short mode and back again did indeed matter. Since short mode is
24191      # case insensitive, let's make it lowercase to improve readability.
24192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24193      # Now convert it back to Unix-stile (cygpath)
24194      input_path=`$CYGPATH -u "$shortmode_path"`
24195      new_path="$input_path"
24196    fi
24197  fi
24198
24199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24200  if test "x$test_cygdrive_prefix" = x; then
24201    # As a simple fix, exclude /usr/bin since it's not a real path.
24202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24204      # a path prefixed by /cygdrive for fixpath to work.
24205      new_path="$CYGWIN_ROOT_PATH$input_path"
24206    fi
24207  fi
24208
24209
24210  if test "x$path" != "x$new_path"; then
24211    BOOT_JDK="$new_path"
24212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24214  fi
24215
24216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24217
24218  path="$BOOT_JDK"
24219  has_colon=`$ECHO $path | $GREP ^.:`
24220  new_path="$path"
24221  if test "x$has_colon" = x; then
24222    # Not in mixed or Windows style, start by that.
24223    new_path=`cmd //c echo $path`
24224  fi
24225
24226
24227  input_path="$new_path"
24228  # Check if we need to convert this using DOS-style short mode. If the path
24229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24230  # take no chances and rewrite it.
24231  # Note: m4 eats our [], so we need to use [ and ] instead.
24232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24233  if test "x$has_forbidden_chars" != x; then
24234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24236  fi
24237
24238
24239  windows_path="$new_path"
24240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24241    unix_path=`$CYGPATH -u "$windows_path"`
24242    new_path="$unix_path"
24243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24245    new_path="$unix_path"
24246  fi
24247
24248  if test "x$path" != "x$new_path"; then
24249    BOOT_JDK="$new_path"
24250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24252  fi
24253
24254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24256
24257  else
24258    # We're on a unix platform. Hooray! :)
24259    path="$BOOT_JDK"
24260    has_space=`$ECHO "$path" | $GREP " "`
24261    if test "x$has_space" != x; then
24262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24264      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24265    fi
24266
24267    # Use eval to expand a potential ~
24268    eval path="$path"
24269    if test ! -f "$path" && test ! -d "$path"; then
24270      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24271    fi
24272
24273    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24274  fi
24275
24276            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24277$as_echo_n "checking for Boot JDK... " >&6; }
24278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24279$as_echo "$BOOT_JDK" >&6; }
24280            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24281$as_echo_n "checking Boot JDK version... " >&6; }
24282            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24284$as_echo "$BOOT_JDK_VERSION" >&6; }
24285          fi # end check jdk version
24286        fi # end check javac
24287      fi # end check java
24288    fi # end check boot jdk found
24289  fi
24290
24291    done
24292  fi
24293
24294
24295    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24296    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24297      # Do we have a bin/java?
24298      if test ! -x "$BOOT_JDK/bin/java"; then
24299        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24301        BOOT_JDK_FOUND=no
24302      else
24303        # Do we have a bin/javac?
24304        if test ! -x "$BOOT_JDK/bin/javac"; then
24305          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24307          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24308$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24309          BOOT_JDK_FOUND=no
24310        else
24311          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24312          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24313
24314          # Extra M4 quote needed to protect [] in grep expression.
24315          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24316          if test "x$FOUND_CORRECT_VERSION" = x; then
24317            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24319            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24320$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24321            BOOT_JDK_FOUND=no
24322          else
24323            # We're done! :-)
24324            BOOT_JDK_FOUND=yes
24325
24326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24327
24328  # Input might be given as Windows format, start by converting to
24329  # unix format.
24330  path="$BOOT_JDK"
24331  new_path=`$CYGPATH -u "$path"`
24332
24333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24336  # "foo.exe" is OK but "foo" is an error.
24337  #
24338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24339  # It is also a way to make sure we got the proper file name for the real test later on.
24340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24341  if test "x$test_shortpath" = x; then
24342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24344    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24345  fi
24346
24347  # Call helper function which possibly converts this using DOS-style short mode.
24348  # If so, the updated path is stored in $new_path.
24349
24350  input_path="$new_path"
24351  # Check if we need to convert this using DOS-style short mode. If the path
24352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24353  # take no chances and rewrite it.
24354  # Note: m4 eats our [], so we need to use [ and ] instead.
24355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24356  if test "x$has_forbidden_chars" != x; then
24357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24361      # Going to short mode and back again did indeed matter. Since short mode is
24362      # case insensitive, let's make it lowercase to improve readability.
24363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24364      # Now convert it back to Unix-stile (cygpath)
24365      input_path=`$CYGPATH -u "$shortmode_path"`
24366      new_path="$input_path"
24367    fi
24368  fi
24369
24370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24371  if test "x$test_cygdrive_prefix" = x; then
24372    # As a simple fix, exclude /usr/bin since it's not a real path.
24373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24375      # a path prefixed by /cygdrive for fixpath to work.
24376      new_path="$CYGWIN_ROOT_PATH$input_path"
24377    fi
24378  fi
24379
24380
24381  if test "x$path" != "x$new_path"; then
24382    BOOT_JDK="$new_path"
24383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24385  fi
24386
24387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24388
24389  path="$BOOT_JDK"
24390  has_colon=`$ECHO $path | $GREP ^.:`
24391  new_path="$path"
24392  if test "x$has_colon" = x; then
24393    # Not in mixed or Windows style, start by that.
24394    new_path=`cmd //c echo $path`
24395  fi
24396
24397
24398  input_path="$new_path"
24399  # Check if we need to convert this using DOS-style short mode. If the path
24400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24401  # take no chances and rewrite it.
24402  # Note: m4 eats our [], so we need to use [ and ] instead.
24403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24404  if test "x$has_forbidden_chars" != x; then
24405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24407  fi
24408
24409
24410  windows_path="$new_path"
24411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24412    unix_path=`$CYGPATH -u "$windows_path"`
24413    new_path="$unix_path"
24414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24416    new_path="$unix_path"
24417  fi
24418
24419  if test "x$path" != "x$new_path"; then
24420    BOOT_JDK="$new_path"
24421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24423  fi
24424
24425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24427
24428  else
24429    # We're on a unix platform. Hooray! :)
24430    path="$BOOT_JDK"
24431    has_space=`$ECHO "$path" | $GREP " "`
24432    if test "x$has_space" != x; then
24433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24435      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24436    fi
24437
24438    # Use eval to expand a potential ~
24439    eval path="$path"
24440    if test ! -f "$path" && test ! -d "$path"; then
24441      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24442    fi
24443
24444    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24445  fi
24446
24447            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24448$as_echo_n "checking for Boot JDK... " >&6; }
24449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24450$as_echo "$BOOT_JDK" >&6; }
24451            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24452$as_echo_n "checking Boot JDK version... " >&6; }
24453            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24455$as_echo "$BOOT_JDK_VERSION" >&6; }
24456          fi # end check jdk version
24457        fi # end check javac
24458      fi # end check java
24459    fi # end check boot jdk found
24460  fi
24461
24462
24463  if test "x$BOOT_JDK_FOUND" = xno; then
24464    # Now execute the test
24465
24466  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24467  BOOT_JDK_SUFFIX="/Contents/Home"
24468  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24469  if test "x$ALL_JDKS_FOUND" != x; then
24470    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24471
24472  if test "x$BOOT_JDK_FOUND" = xno; then
24473    # Now execute the test
24474
24475        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24476        if test -d "$BOOT_JDK"; then
24477          BOOT_JDK_FOUND=maybe
24478          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24479$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24480        fi
24481
24482
24483    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24484    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24485      # Do we have a bin/java?
24486      if test ! -x "$BOOT_JDK/bin/java"; then
24487        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24489        BOOT_JDK_FOUND=no
24490      else
24491        # Do we have a bin/javac?
24492        if test ! -x "$BOOT_JDK/bin/javac"; then
24493          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24495          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24496$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24497          BOOT_JDK_FOUND=no
24498        else
24499          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24500          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24501
24502          # Extra M4 quote needed to protect [] in grep expression.
24503          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24504          if test "x$FOUND_CORRECT_VERSION" = x; then
24505            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24507            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24508$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24509            BOOT_JDK_FOUND=no
24510          else
24511            # We're done! :-)
24512            BOOT_JDK_FOUND=yes
24513
24514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24515
24516  # Input might be given as Windows format, start by converting to
24517  # unix format.
24518  path="$BOOT_JDK"
24519  new_path=`$CYGPATH -u "$path"`
24520
24521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24524  # "foo.exe" is OK but "foo" is an error.
24525  #
24526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24527  # It is also a way to make sure we got the proper file name for the real test later on.
24528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24529  if test "x$test_shortpath" = x; then
24530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24532    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24533  fi
24534
24535  # Call helper function which possibly converts this using DOS-style short mode.
24536  # If so, the updated path is stored in $new_path.
24537
24538  input_path="$new_path"
24539  # Check if we need to convert this using DOS-style short mode. If the path
24540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24541  # take no chances and rewrite it.
24542  # Note: m4 eats our [], so we need to use [ and ] instead.
24543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24544  if test "x$has_forbidden_chars" != x; then
24545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24549      # Going to short mode and back again did indeed matter. Since short mode is
24550      # case insensitive, let's make it lowercase to improve readability.
24551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24552      # Now convert it back to Unix-stile (cygpath)
24553      input_path=`$CYGPATH -u "$shortmode_path"`
24554      new_path="$input_path"
24555    fi
24556  fi
24557
24558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24559  if test "x$test_cygdrive_prefix" = x; then
24560    # As a simple fix, exclude /usr/bin since it's not a real path.
24561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24563      # a path prefixed by /cygdrive for fixpath to work.
24564      new_path="$CYGWIN_ROOT_PATH$input_path"
24565    fi
24566  fi
24567
24568
24569  if test "x$path" != "x$new_path"; then
24570    BOOT_JDK="$new_path"
24571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24573  fi
24574
24575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24576
24577  path="$BOOT_JDK"
24578  has_colon=`$ECHO $path | $GREP ^.:`
24579  new_path="$path"
24580  if test "x$has_colon" = x; then
24581    # Not in mixed or Windows style, start by that.
24582    new_path=`cmd //c echo $path`
24583  fi
24584
24585
24586  input_path="$new_path"
24587  # Check if we need to convert this using DOS-style short mode. If the path
24588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24589  # take no chances and rewrite it.
24590  # Note: m4 eats our [], so we need to use [ and ] instead.
24591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24592  if test "x$has_forbidden_chars" != x; then
24593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24595  fi
24596
24597
24598  windows_path="$new_path"
24599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24600    unix_path=`$CYGPATH -u "$windows_path"`
24601    new_path="$unix_path"
24602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24604    new_path="$unix_path"
24605  fi
24606
24607  if test "x$path" != "x$new_path"; then
24608    BOOT_JDK="$new_path"
24609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24611  fi
24612
24613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24615
24616  else
24617    # We're on a unix platform. Hooray! :)
24618    path="$BOOT_JDK"
24619    has_space=`$ECHO "$path" | $GREP " "`
24620    if test "x$has_space" != x; then
24621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24624    fi
24625
24626    # Use eval to expand a potential ~
24627    eval path="$path"
24628    if test ! -f "$path" && test ! -d "$path"; then
24629      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24630    fi
24631
24632    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24633  fi
24634
24635            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24636$as_echo_n "checking for Boot JDK... " >&6; }
24637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24638$as_echo "$BOOT_JDK" >&6; }
24639            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24640$as_echo_n "checking Boot JDK version... " >&6; }
24641            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24643$as_echo "$BOOT_JDK_VERSION" >&6; }
24644          fi # end check jdk version
24645        fi # end check javac
24646      fi # end check java
24647    fi # end check boot jdk found
24648  fi
24649
24650    done
24651  fi
24652
24653
24654    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24655    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24656      # Do we have a bin/java?
24657      if test ! -x "$BOOT_JDK/bin/java"; then
24658        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24660        BOOT_JDK_FOUND=no
24661      else
24662        # Do we have a bin/javac?
24663        if test ! -x "$BOOT_JDK/bin/javac"; then
24664          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24666          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24667$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24668          BOOT_JDK_FOUND=no
24669        else
24670          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24671          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24672
24673          # Extra M4 quote needed to protect [] in grep expression.
24674          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24675          if test "x$FOUND_CORRECT_VERSION" = x; then
24676            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24678            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24679$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24680            BOOT_JDK_FOUND=no
24681          else
24682            # We're done! :-)
24683            BOOT_JDK_FOUND=yes
24684
24685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24686
24687  # Input might be given as Windows format, start by converting to
24688  # unix format.
24689  path="$BOOT_JDK"
24690  new_path=`$CYGPATH -u "$path"`
24691
24692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24695  # "foo.exe" is OK but "foo" is an error.
24696  #
24697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24698  # It is also a way to make sure we got the proper file name for the real test later on.
24699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24700  if test "x$test_shortpath" = x; then
24701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24703    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24704  fi
24705
24706  # Call helper function which possibly converts this using DOS-style short mode.
24707  # If so, the updated path is stored in $new_path.
24708
24709  input_path="$new_path"
24710  # Check if we need to convert this using DOS-style short mode. If the path
24711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24712  # take no chances and rewrite it.
24713  # Note: m4 eats our [], so we need to use [ and ] instead.
24714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24715  if test "x$has_forbidden_chars" != x; then
24716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24720      # Going to short mode and back again did indeed matter. Since short mode is
24721      # case insensitive, let's make it lowercase to improve readability.
24722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24723      # Now convert it back to Unix-stile (cygpath)
24724      input_path=`$CYGPATH -u "$shortmode_path"`
24725      new_path="$input_path"
24726    fi
24727  fi
24728
24729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24730  if test "x$test_cygdrive_prefix" = x; then
24731    # As a simple fix, exclude /usr/bin since it's not a real path.
24732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24734      # a path prefixed by /cygdrive for fixpath to work.
24735      new_path="$CYGWIN_ROOT_PATH$input_path"
24736    fi
24737  fi
24738
24739
24740  if test "x$path" != "x$new_path"; then
24741    BOOT_JDK="$new_path"
24742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24744  fi
24745
24746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24747
24748  path="$BOOT_JDK"
24749  has_colon=`$ECHO $path | $GREP ^.:`
24750  new_path="$path"
24751  if test "x$has_colon" = x; then
24752    # Not in mixed or Windows style, start by that.
24753    new_path=`cmd //c echo $path`
24754  fi
24755
24756
24757  input_path="$new_path"
24758  # Check if we need to convert this using DOS-style short mode. If the path
24759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24760  # take no chances and rewrite it.
24761  # Note: m4 eats our [], so we need to use [ and ] instead.
24762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24763  if test "x$has_forbidden_chars" != x; then
24764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24766  fi
24767
24768
24769  windows_path="$new_path"
24770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24771    unix_path=`$CYGPATH -u "$windows_path"`
24772    new_path="$unix_path"
24773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24775    new_path="$unix_path"
24776  fi
24777
24778  if test "x$path" != "x$new_path"; then
24779    BOOT_JDK="$new_path"
24780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24782  fi
24783
24784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24786
24787  else
24788    # We're on a unix platform. Hooray! :)
24789    path="$BOOT_JDK"
24790    has_space=`$ECHO "$path" | $GREP " "`
24791    if test "x$has_space" != x; then
24792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24794      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24795    fi
24796
24797    # Use eval to expand a potential ~
24798    eval path="$path"
24799    if test ! -f "$path" && test ! -d "$path"; then
24800      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24801    fi
24802
24803    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24804  fi
24805
24806            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24807$as_echo_n "checking for Boot JDK... " >&6; }
24808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24809$as_echo "$BOOT_JDK" >&6; }
24810            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24811$as_echo_n "checking Boot JDK version... " >&6; }
24812            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24813            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24814$as_echo "$BOOT_JDK_VERSION" >&6; }
24815          fi # end check jdk version
24816        fi # end check javac
24817      fi # end check java
24818    fi # end check boot jdk found
24819  fi
24820
24821  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24822
24823  if test "x$BOOT_JDK_FOUND" = xno; then
24824    # Now execute the test
24825
24826  BOOT_JDK_PREFIX="/usr/lib/jvm"
24827  BOOT_JDK_SUFFIX=""
24828  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24829  if test "x$ALL_JDKS_FOUND" != x; then
24830    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24831
24832  if test "x$BOOT_JDK_FOUND" = xno; then
24833    # Now execute the test
24834
24835        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24836        if test -d "$BOOT_JDK"; then
24837          BOOT_JDK_FOUND=maybe
24838          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24839$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24840        fi
24841
24842
24843    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24844    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24845      # Do we have a bin/java?
24846      if test ! -x "$BOOT_JDK/bin/java"; then
24847        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24849        BOOT_JDK_FOUND=no
24850      else
24851        # Do we have a bin/javac?
24852        if test ! -x "$BOOT_JDK/bin/javac"; then
24853          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24855          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24856$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24857          BOOT_JDK_FOUND=no
24858        else
24859          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24860          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24861
24862          # Extra M4 quote needed to protect [] in grep expression.
24863          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24864          if test "x$FOUND_CORRECT_VERSION" = x; then
24865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24867            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24868$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24869            BOOT_JDK_FOUND=no
24870          else
24871            # We're done! :-)
24872            BOOT_JDK_FOUND=yes
24873
24874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24875
24876  # Input might be given as Windows format, start by converting to
24877  # unix format.
24878  path="$BOOT_JDK"
24879  new_path=`$CYGPATH -u "$path"`
24880
24881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24884  # "foo.exe" is OK but "foo" is an error.
24885  #
24886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24887  # It is also a way to make sure we got the proper file name for the real test later on.
24888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24889  if test "x$test_shortpath" = x; then
24890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24893  fi
24894
24895  # Call helper function which possibly converts this using DOS-style short mode.
24896  # If so, the updated path is stored in $new_path.
24897
24898  input_path="$new_path"
24899  # Check if we need to convert this using DOS-style short mode. If the path
24900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24901  # take no chances and rewrite it.
24902  # Note: m4 eats our [], so we need to use [ and ] instead.
24903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24904  if test "x$has_forbidden_chars" != x; then
24905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24909      # Going to short mode and back again did indeed matter. Since short mode is
24910      # case insensitive, let's make it lowercase to improve readability.
24911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24912      # Now convert it back to Unix-stile (cygpath)
24913      input_path=`$CYGPATH -u "$shortmode_path"`
24914      new_path="$input_path"
24915    fi
24916  fi
24917
24918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24919  if test "x$test_cygdrive_prefix" = x; then
24920    # As a simple fix, exclude /usr/bin since it's not a real path.
24921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24923      # a path prefixed by /cygdrive for fixpath to work.
24924      new_path="$CYGWIN_ROOT_PATH$input_path"
24925    fi
24926  fi
24927
24928
24929  if test "x$path" != "x$new_path"; then
24930    BOOT_JDK="$new_path"
24931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24933  fi
24934
24935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24936
24937  path="$BOOT_JDK"
24938  has_colon=`$ECHO $path | $GREP ^.:`
24939  new_path="$path"
24940  if test "x$has_colon" = x; then
24941    # Not in mixed or Windows style, start by that.
24942    new_path=`cmd //c echo $path`
24943  fi
24944
24945
24946  input_path="$new_path"
24947  # Check if we need to convert this using DOS-style short mode. If the path
24948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24949  # take no chances and rewrite it.
24950  # Note: m4 eats our [], so we need to use [ and ] instead.
24951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24952  if test "x$has_forbidden_chars" != x; then
24953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24955  fi
24956
24957
24958  windows_path="$new_path"
24959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24960    unix_path=`$CYGPATH -u "$windows_path"`
24961    new_path="$unix_path"
24962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24964    new_path="$unix_path"
24965  fi
24966
24967  if test "x$path" != "x$new_path"; then
24968    BOOT_JDK="$new_path"
24969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24971  fi
24972
24973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24975
24976  else
24977    # We're on a unix platform. Hooray! :)
24978    path="$BOOT_JDK"
24979    has_space=`$ECHO "$path" | $GREP " "`
24980    if test "x$has_space" != x; then
24981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24984    fi
24985
24986    # Use eval to expand a potential ~
24987    eval path="$path"
24988    if test ! -f "$path" && test ! -d "$path"; then
24989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24990    fi
24991
24992    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24993  fi
24994
24995            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24996$as_echo_n "checking for Boot JDK... " >&6; }
24997            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24998$as_echo "$BOOT_JDK" >&6; }
24999            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25000$as_echo_n "checking Boot JDK version... " >&6; }
25001            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25003$as_echo "$BOOT_JDK_VERSION" >&6; }
25004          fi # end check jdk version
25005        fi # end check javac
25006      fi # end check java
25007    fi # end check boot jdk found
25008  fi
25009
25010    done
25011  fi
25012
25013
25014    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25015    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25016      # Do we have a bin/java?
25017      if test ! -x "$BOOT_JDK/bin/java"; then
25018        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25020        BOOT_JDK_FOUND=no
25021      else
25022        # Do we have a bin/javac?
25023        if test ! -x "$BOOT_JDK/bin/javac"; then
25024          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25026          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25027$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25028          BOOT_JDK_FOUND=no
25029        else
25030          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25031          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25032
25033          # Extra M4 quote needed to protect [] in grep expression.
25034          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25035          if test "x$FOUND_CORRECT_VERSION" = x; then
25036            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25038            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25039$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25040            BOOT_JDK_FOUND=no
25041          else
25042            # We're done! :-)
25043            BOOT_JDK_FOUND=yes
25044
25045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25046
25047  # Input might be given as Windows format, start by converting to
25048  # unix format.
25049  path="$BOOT_JDK"
25050  new_path=`$CYGPATH -u "$path"`
25051
25052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25055  # "foo.exe" is OK but "foo" is an error.
25056  #
25057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25058  # It is also a way to make sure we got the proper file name for the real test later on.
25059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25060  if test "x$test_shortpath" = x; then
25061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25064  fi
25065
25066  # Call helper function which possibly converts this using DOS-style short mode.
25067  # If so, the updated path is stored in $new_path.
25068
25069  input_path="$new_path"
25070  # Check if we need to convert this using DOS-style short mode. If the path
25071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25072  # take no chances and rewrite it.
25073  # Note: m4 eats our [], so we need to use [ and ] instead.
25074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25075  if test "x$has_forbidden_chars" != x; then
25076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25080      # Going to short mode and back again did indeed matter. Since short mode is
25081      # case insensitive, let's make it lowercase to improve readability.
25082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25083      # Now convert it back to Unix-stile (cygpath)
25084      input_path=`$CYGPATH -u "$shortmode_path"`
25085      new_path="$input_path"
25086    fi
25087  fi
25088
25089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25090  if test "x$test_cygdrive_prefix" = x; then
25091    # As a simple fix, exclude /usr/bin since it's not a real path.
25092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25094      # a path prefixed by /cygdrive for fixpath to work.
25095      new_path="$CYGWIN_ROOT_PATH$input_path"
25096    fi
25097  fi
25098
25099
25100  if test "x$path" != "x$new_path"; then
25101    BOOT_JDK="$new_path"
25102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25104  fi
25105
25106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25107
25108  path="$BOOT_JDK"
25109  has_colon=`$ECHO $path | $GREP ^.:`
25110  new_path="$path"
25111  if test "x$has_colon" = x; then
25112    # Not in mixed or Windows style, start by that.
25113    new_path=`cmd //c echo $path`
25114  fi
25115
25116
25117  input_path="$new_path"
25118  # Check if we need to convert this using DOS-style short mode. If the path
25119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25120  # take no chances and rewrite it.
25121  # Note: m4 eats our [], so we need to use [ and ] instead.
25122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25123  if test "x$has_forbidden_chars" != x; then
25124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25126  fi
25127
25128
25129  windows_path="$new_path"
25130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25131    unix_path=`$CYGPATH -u "$windows_path"`
25132    new_path="$unix_path"
25133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25135    new_path="$unix_path"
25136  fi
25137
25138  if test "x$path" != "x$new_path"; then
25139    BOOT_JDK="$new_path"
25140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25142  fi
25143
25144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25146
25147  else
25148    # We're on a unix platform. Hooray! :)
25149    path="$BOOT_JDK"
25150    has_space=`$ECHO "$path" | $GREP " "`
25151    if test "x$has_space" != x; then
25152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25154      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25155    fi
25156
25157    # Use eval to expand a potential ~
25158    eval path="$path"
25159    if test ! -f "$path" && test ! -d "$path"; then
25160      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25161    fi
25162
25163    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25164  fi
25165
25166            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25167$as_echo_n "checking for Boot JDK... " >&6; }
25168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25169$as_echo "$BOOT_JDK" >&6; }
25170            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25171$as_echo_n "checking Boot JDK version... " >&6; }
25172            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25174$as_echo "$BOOT_JDK_VERSION" >&6; }
25175          fi # end check jdk version
25176        fi # end check javac
25177      fi # end check java
25178    fi # end check boot jdk found
25179  fi
25180
25181  fi
25182
25183
25184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25186      # Do we have a bin/java?
25187      if test ! -x "$BOOT_JDK/bin/java"; then
25188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25190        BOOT_JDK_FOUND=no
25191      else
25192        # Do we have a bin/javac?
25193        if test ! -x "$BOOT_JDK/bin/javac"; then
25194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25198          BOOT_JDK_FOUND=no
25199        else
25200          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25201          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25202
25203          # Extra M4 quote needed to protect [] in grep expression.
25204          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25205          if test "x$FOUND_CORRECT_VERSION" = x; then
25206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25208            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25210            BOOT_JDK_FOUND=no
25211          else
25212            # We're done! :-)
25213            BOOT_JDK_FOUND=yes
25214
25215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25216
25217  # Input might be given as Windows format, start by converting to
25218  # unix format.
25219  path="$BOOT_JDK"
25220  new_path=`$CYGPATH -u "$path"`
25221
25222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25225  # "foo.exe" is OK but "foo" is an error.
25226  #
25227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25228  # It is also a way to make sure we got the proper file name for the real test later on.
25229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25230  if test "x$test_shortpath" = x; then
25231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25234  fi
25235
25236  # Call helper function which possibly converts this using DOS-style short mode.
25237  # If so, the updated path is stored in $new_path.
25238
25239  input_path="$new_path"
25240  # Check if we need to convert this using DOS-style short mode. If the path
25241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25242  # take no chances and rewrite it.
25243  # Note: m4 eats our [], so we need to use [ and ] instead.
25244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25245  if test "x$has_forbidden_chars" != x; then
25246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25250      # Going to short mode and back again did indeed matter. Since short mode is
25251      # case insensitive, let's make it lowercase to improve readability.
25252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25253      # Now convert it back to Unix-stile (cygpath)
25254      input_path=`$CYGPATH -u "$shortmode_path"`
25255      new_path="$input_path"
25256    fi
25257  fi
25258
25259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25260  if test "x$test_cygdrive_prefix" = x; then
25261    # As a simple fix, exclude /usr/bin since it's not a real path.
25262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25264      # a path prefixed by /cygdrive for fixpath to work.
25265      new_path="$CYGWIN_ROOT_PATH$input_path"
25266    fi
25267  fi
25268
25269
25270  if test "x$path" != "x$new_path"; then
25271    BOOT_JDK="$new_path"
25272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25274  fi
25275
25276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25277
25278  path="$BOOT_JDK"
25279  has_colon=`$ECHO $path | $GREP ^.:`
25280  new_path="$path"
25281  if test "x$has_colon" = x; then
25282    # Not in mixed or Windows style, start by that.
25283    new_path=`cmd //c echo $path`
25284  fi
25285
25286
25287  input_path="$new_path"
25288  # Check if we need to convert this using DOS-style short mode. If the path
25289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25290  # take no chances and rewrite it.
25291  # Note: m4 eats our [], so we need to use [ and ] instead.
25292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25293  if test "x$has_forbidden_chars" != x; then
25294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25296  fi
25297
25298
25299  windows_path="$new_path"
25300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25301    unix_path=`$CYGPATH -u "$windows_path"`
25302    new_path="$unix_path"
25303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25305    new_path="$unix_path"
25306  fi
25307
25308  if test "x$path" != "x$new_path"; then
25309    BOOT_JDK="$new_path"
25310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25312  fi
25313
25314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25316
25317  else
25318    # We're on a unix platform. Hooray! :)
25319    path="$BOOT_JDK"
25320    has_space=`$ECHO "$path" | $GREP " "`
25321    if test "x$has_space" != x; then
25322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25324      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25325    fi
25326
25327    # Use eval to expand a potential ~
25328    eval path="$path"
25329    if test ! -f "$path" && test ! -d "$path"; then
25330      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25331    fi
25332
25333    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25334  fi
25335
25336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25337$as_echo_n "checking for Boot JDK... " >&6; }
25338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25339$as_echo "$BOOT_JDK" >&6; }
25340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25341$as_echo_n "checking Boot JDK version... " >&6; }
25342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25344$as_echo "$BOOT_JDK_VERSION" >&6; }
25345          fi # end check jdk version
25346        fi # end check javac
25347      fi # end check java
25348    fi # end check boot jdk found
25349  fi
25350
25351
25352  # If we haven't found anything yet, we've truly lost. Give up.
25353  if test "x$BOOT_JDK_FOUND" = xno; then
25354
25355  # Print a helpful message on how to acquire the necessary build dependency.
25356  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25357  MISSING_DEPENDENCY=openjdk
25358
25359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25360    cygwin_help $MISSING_DEPENDENCY
25361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25362    msys_help $MISSING_DEPENDENCY
25363  else
25364    PKGHANDLER_COMMAND=
25365
25366    case $PKGHANDLER in
25367      apt-get)
25368        apt_help     $MISSING_DEPENDENCY ;;
25369      yum)
25370        yum_help     $MISSING_DEPENDENCY ;;
25371      port)
25372        port_help    $MISSING_DEPENDENCY ;;
25373      pkgutil)
25374        pkgutil_help $MISSING_DEPENDENCY ;;
25375      pkgadd)
25376        pkgadd_help  $MISSING_DEPENDENCY ;;
25377    esac
25378
25379    if test "x$PKGHANDLER_COMMAND" != x; then
25380      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25381    fi
25382  fi
25383
25384    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25385$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25386    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25387$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25388    as_fn_error $? "Cannot continue" "$LINENO" 5
25389  fi
25390
25391
25392
25393  # Setup tools from the Boot JDK.
25394
25395  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25396
25397  # Publish this variable in the help.
25398
25399
25400  if test "x$JAVA" = x; then
25401    # The variable is not set by user, try to locate tool using the code snippet
25402
25403      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25404$as_echo_n "checking for java in Boot JDK... " >&6; }
25405      JAVA=$BOOT_JDK/bin/java
25406      if test ! -x $JAVA; then
25407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25408$as_echo "not found" >&6; }
25409        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25410$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25411        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25412      fi
25413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25414$as_echo "ok" >&6; }
25415
25416
25417  else
25418    # The variable is set, but is it from the command line or the environment?
25419
25420    # Try to remove the string !JAVA! from our list.
25421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25423      # If it failed, the variable was not from the command line. Ignore it,
25424      # but warn the user (except for BASH, which is always set by the calling BASH).
25425      if test "xJAVA" != xBASH; then
25426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25427$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25428      fi
25429      # Try to locate tool using the code snippet
25430
25431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25432$as_echo_n "checking for java in Boot JDK... " >&6; }
25433      JAVA=$BOOT_JDK/bin/java
25434      if test ! -x $JAVA; then
25435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25436$as_echo "not found" >&6; }
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25438$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25439        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25440      fi
25441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25442$as_echo "ok" >&6; }
25443
25444
25445    else
25446      # If it succeeded, then it was overridden by the user. We will use it
25447      # for the tool.
25448
25449      # First remove it from the list of overridden variables, so we can test
25450      # for unknown variables in the end.
25451      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25452
25453      # Check if the provided tool contains a complete path.
25454      tool_specified="$JAVA"
25455      tool_basename="${tool_specified##*/}"
25456      if test "x$tool_basename" = "x$tool_specified"; then
25457        # A command without a complete path is provided, search $PATH.
25458        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25459$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25460        # Extract the first word of "$tool_basename", so it can be a program name with args.
25461set dummy $tool_basename; ac_word=$2
25462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25463$as_echo_n "checking for $ac_word... " >&6; }
25464if ${ac_cv_path_JAVA+:} false; then :
25465  $as_echo_n "(cached) " >&6
25466else
25467  case $JAVA in
25468  [\\/]* | ?:[\\/]*)
25469  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25470  ;;
25471  *)
25472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25473for as_dir in $PATH
25474do
25475  IFS=$as_save_IFS
25476  test -z "$as_dir" && as_dir=.
25477    for ac_exec_ext in '' $ac_executable_extensions; do
25478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25479    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25481    break 2
25482  fi
25483done
25484  done
25485IFS=$as_save_IFS
25486
25487  ;;
25488esac
25489fi
25490JAVA=$ac_cv_path_JAVA
25491if test -n "$JAVA"; then
25492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25493$as_echo "$JAVA" >&6; }
25494else
25495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25496$as_echo "no" >&6; }
25497fi
25498
25499
25500        if test "x$JAVA" = x; then
25501          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25502        fi
25503      else
25504        # Otherwise we believe it is a complete path. Use it as it is.
25505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25506$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25508$as_echo_n "checking for JAVA... " >&6; }
25509        if test ! -x "$tool_specified"; then
25510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25511$as_echo "not found" >&6; }
25512          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25513        fi
25514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25515$as_echo "$tool_specified" >&6; }
25516      fi
25517    fi
25518  fi
25519
25520
25521
25522  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25523
25524  # Publish this variable in the help.
25525
25526
25527  if test "x$JAVAC" = x; then
25528    # The variable is not set by user, try to locate tool using the code snippet
25529
25530      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25531$as_echo_n "checking for javac in Boot JDK... " >&6; }
25532      JAVAC=$BOOT_JDK/bin/javac
25533      if test ! -x $JAVAC; then
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25535$as_echo "not found" >&6; }
25536        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25537$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25538        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25539      fi
25540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25541$as_echo "ok" >&6; }
25542
25543
25544  else
25545    # The variable is set, but is it from the command line or the environment?
25546
25547    # Try to remove the string !JAVAC! from our list.
25548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25550      # If it failed, the variable was not from the command line. Ignore it,
25551      # but warn the user (except for BASH, which is always set by the calling BASH).
25552      if test "xJAVAC" != xBASH; then
25553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25554$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25555      fi
25556      # Try to locate tool using the code snippet
25557
25558      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25559$as_echo_n "checking for javac in Boot JDK... " >&6; }
25560      JAVAC=$BOOT_JDK/bin/javac
25561      if test ! -x $JAVAC; then
25562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25563$as_echo "not found" >&6; }
25564        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25565$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25566        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25567      fi
25568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25569$as_echo "ok" >&6; }
25570
25571
25572    else
25573      # If it succeeded, then it was overridden by the user. We will use it
25574      # for the tool.
25575
25576      # First remove it from the list of overridden variables, so we can test
25577      # for unknown variables in the end.
25578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25579
25580      # Check if the provided tool contains a complete path.
25581      tool_specified="$JAVAC"
25582      tool_basename="${tool_specified##*/}"
25583      if test "x$tool_basename" = "x$tool_specified"; then
25584        # A command without a complete path is provided, search $PATH.
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25586$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25587        # Extract the first word of "$tool_basename", so it can be a program name with args.
25588set dummy $tool_basename; ac_word=$2
25589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25590$as_echo_n "checking for $ac_word... " >&6; }
25591if ${ac_cv_path_JAVAC+:} false; then :
25592  $as_echo_n "(cached) " >&6
25593else
25594  case $JAVAC in
25595  [\\/]* | ?:[\\/]*)
25596  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25597  ;;
25598  *)
25599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25600for as_dir in $PATH
25601do
25602  IFS=$as_save_IFS
25603  test -z "$as_dir" && as_dir=.
25604    for ac_exec_ext in '' $ac_executable_extensions; do
25605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25606    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25608    break 2
25609  fi
25610done
25611  done
25612IFS=$as_save_IFS
25613
25614  ;;
25615esac
25616fi
25617JAVAC=$ac_cv_path_JAVAC
25618if test -n "$JAVAC"; then
25619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25620$as_echo "$JAVAC" >&6; }
25621else
25622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25623$as_echo "no" >&6; }
25624fi
25625
25626
25627        if test "x$JAVAC" = x; then
25628          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25629        fi
25630      else
25631        # Otherwise we believe it is a complete path. Use it as it is.
25632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25633$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25635$as_echo_n "checking for JAVAC... " >&6; }
25636        if test ! -x "$tool_specified"; then
25637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25638$as_echo "not found" >&6; }
25639          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25640        fi
25641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25642$as_echo "$tool_specified" >&6; }
25643      fi
25644    fi
25645  fi
25646
25647
25648
25649  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25650
25651  # Publish this variable in the help.
25652
25653
25654  if test "x$JAVAH" = x; then
25655    # The variable is not set by user, try to locate tool using the code snippet
25656
25657      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25658$as_echo_n "checking for javah in Boot JDK... " >&6; }
25659      JAVAH=$BOOT_JDK/bin/javah
25660      if test ! -x $JAVAH; then
25661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25662$as_echo "not found" >&6; }
25663        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25664$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25665        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25666      fi
25667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25668$as_echo "ok" >&6; }
25669
25670
25671  else
25672    # The variable is set, but is it from the command line or the environment?
25673
25674    # Try to remove the string !JAVAH! from our list.
25675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25677      # If it failed, the variable was not from the command line. Ignore it,
25678      # but warn the user (except for BASH, which is always set by the calling BASH).
25679      if test "xJAVAH" != xBASH; then
25680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25681$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25682      fi
25683      # Try to locate tool using the code snippet
25684
25685      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25686$as_echo_n "checking for javah in Boot JDK... " >&6; }
25687      JAVAH=$BOOT_JDK/bin/javah
25688      if test ! -x $JAVAH; then
25689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25690$as_echo "not found" >&6; }
25691        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25692$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25693        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25694      fi
25695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25696$as_echo "ok" >&6; }
25697
25698
25699    else
25700      # If it succeeded, then it was overridden by the user. We will use it
25701      # for the tool.
25702
25703      # First remove it from the list of overridden variables, so we can test
25704      # for unknown variables in the end.
25705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25706
25707      # Check if the provided tool contains a complete path.
25708      tool_specified="$JAVAH"
25709      tool_basename="${tool_specified##*/}"
25710      if test "x$tool_basename" = "x$tool_specified"; then
25711        # A command without a complete path is provided, search $PATH.
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25713$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25714        # Extract the first word of "$tool_basename", so it can be a program name with args.
25715set dummy $tool_basename; ac_word=$2
25716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25717$as_echo_n "checking for $ac_word... " >&6; }
25718if ${ac_cv_path_JAVAH+:} false; then :
25719  $as_echo_n "(cached) " >&6
25720else
25721  case $JAVAH in
25722  [\\/]* | ?:[\\/]*)
25723  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25724  ;;
25725  *)
25726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25727for as_dir in $PATH
25728do
25729  IFS=$as_save_IFS
25730  test -z "$as_dir" && as_dir=.
25731    for ac_exec_ext in '' $ac_executable_extensions; do
25732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25733    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25735    break 2
25736  fi
25737done
25738  done
25739IFS=$as_save_IFS
25740
25741  ;;
25742esac
25743fi
25744JAVAH=$ac_cv_path_JAVAH
25745if test -n "$JAVAH"; then
25746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25747$as_echo "$JAVAH" >&6; }
25748else
25749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25750$as_echo "no" >&6; }
25751fi
25752
25753
25754        if test "x$JAVAH" = x; then
25755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25756        fi
25757      else
25758        # Otherwise we believe it is a complete path. Use it as it is.
25759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25760$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25762$as_echo_n "checking for JAVAH... " >&6; }
25763        if test ! -x "$tool_specified"; then
25764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25765$as_echo "not found" >&6; }
25766          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25767        fi
25768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25769$as_echo "$tool_specified" >&6; }
25770      fi
25771    fi
25772  fi
25773
25774
25775
25776  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25777
25778  # Publish this variable in the help.
25779
25780
25781  if test "x$JAR" = x; then
25782    # The variable is not set by user, try to locate tool using the code snippet
25783
25784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25785$as_echo_n "checking for jar in Boot JDK... " >&6; }
25786      JAR=$BOOT_JDK/bin/jar
25787      if test ! -x $JAR; then
25788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25789$as_echo "not found" >&6; }
25790        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25791$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25792        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25793      fi
25794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25795$as_echo "ok" >&6; }
25796
25797
25798  else
25799    # The variable is set, but is it from the command line or the environment?
25800
25801    # Try to remove the string !JAR! from our list.
25802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25804      # If it failed, the variable was not from the command line. Ignore it,
25805      # but warn the user (except for BASH, which is always set by the calling BASH).
25806      if test "xJAR" != xBASH; then
25807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25808$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25809      fi
25810      # Try to locate tool using the code snippet
25811
25812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25813$as_echo_n "checking for jar in Boot JDK... " >&6; }
25814      JAR=$BOOT_JDK/bin/jar
25815      if test ! -x $JAR; then
25816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25817$as_echo "not found" >&6; }
25818        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25819$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25820        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25821      fi
25822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25823$as_echo "ok" >&6; }
25824
25825
25826    else
25827      # If it succeeded, then it was overridden by the user. We will use it
25828      # for the tool.
25829
25830      # First remove it from the list of overridden variables, so we can test
25831      # for unknown variables in the end.
25832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25833
25834      # Check if the provided tool contains a complete path.
25835      tool_specified="$JAR"
25836      tool_basename="${tool_specified##*/}"
25837      if test "x$tool_basename" = "x$tool_specified"; then
25838        # A command without a complete path is provided, search $PATH.
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25840$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25841        # Extract the first word of "$tool_basename", so it can be a program name with args.
25842set dummy $tool_basename; ac_word=$2
25843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25844$as_echo_n "checking for $ac_word... " >&6; }
25845if ${ac_cv_path_JAR+:} false; then :
25846  $as_echo_n "(cached) " >&6
25847else
25848  case $JAR in
25849  [\\/]* | ?:[\\/]*)
25850  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25851  ;;
25852  *)
25853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25854for as_dir in $PATH
25855do
25856  IFS=$as_save_IFS
25857  test -z "$as_dir" && as_dir=.
25858    for ac_exec_ext in '' $ac_executable_extensions; do
25859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25860    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25862    break 2
25863  fi
25864done
25865  done
25866IFS=$as_save_IFS
25867
25868  ;;
25869esac
25870fi
25871JAR=$ac_cv_path_JAR
25872if test -n "$JAR"; then
25873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25874$as_echo "$JAR" >&6; }
25875else
25876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25877$as_echo "no" >&6; }
25878fi
25879
25880
25881        if test "x$JAR" = x; then
25882          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25883        fi
25884      else
25885        # Otherwise we believe it is a complete path. Use it as it is.
25886        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25887$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25888        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25889$as_echo_n "checking for JAR... " >&6; }
25890        if test ! -x "$tool_specified"; then
25891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25892$as_echo "not found" >&6; }
25893          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25894        fi
25895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25896$as_echo "$tool_specified" >&6; }
25897      fi
25898    fi
25899  fi
25900
25901
25902
25903  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25904
25905  # Publish this variable in the help.
25906
25907
25908  if test "x$NATIVE2ASCII" = x; then
25909    # The variable is not set by user, try to locate tool using the code snippet
25910
25911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25912$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25913      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25914      if test ! -x $NATIVE2ASCII; then
25915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25916$as_echo "not found" >&6; }
25917        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25918$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25919        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25920      fi
25921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25922$as_echo "ok" >&6; }
25923
25924
25925  else
25926    # The variable is set, but is it from the command line or the environment?
25927
25928    # Try to remove the string !NATIVE2ASCII! from our list.
25929    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25930    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25931      # If it failed, the variable was not from the command line. Ignore it,
25932      # but warn the user (except for BASH, which is always set by the calling BASH).
25933      if test "xNATIVE2ASCII" != xBASH; then
25934        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25935$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25936      fi
25937      # Try to locate tool using the code snippet
25938
25939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25940$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25941      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25942      if test ! -x $NATIVE2ASCII; then
25943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25944$as_echo "not found" >&6; }
25945        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25946$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25947        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25948      fi
25949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25950$as_echo "ok" >&6; }
25951
25952
25953    else
25954      # If it succeeded, then it was overridden by the user. We will use it
25955      # for the tool.
25956
25957      # First remove it from the list of overridden variables, so we can test
25958      # for unknown variables in the end.
25959      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25960
25961      # Check if the provided tool contains a complete path.
25962      tool_specified="$NATIVE2ASCII"
25963      tool_basename="${tool_specified##*/}"
25964      if test "x$tool_basename" = "x$tool_specified"; then
25965        # A command without a complete path is provided, search $PATH.
25966        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25967$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25968        # Extract the first word of "$tool_basename", so it can be a program name with args.
25969set dummy $tool_basename; ac_word=$2
25970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25971$as_echo_n "checking for $ac_word... " >&6; }
25972if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25973  $as_echo_n "(cached) " >&6
25974else
25975  case $NATIVE2ASCII in
25976  [\\/]* | ?:[\\/]*)
25977  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25978  ;;
25979  *)
25980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25981for as_dir in $PATH
25982do
25983  IFS=$as_save_IFS
25984  test -z "$as_dir" && as_dir=.
25985    for ac_exec_ext in '' $ac_executable_extensions; do
25986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25987    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25989    break 2
25990  fi
25991done
25992  done
25993IFS=$as_save_IFS
25994
25995  ;;
25996esac
25997fi
25998NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25999if test -n "$NATIVE2ASCII"; then
26000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26001$as_echo "$NATIVE2ASCII" >&6; }
26002else
26003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26004$as_echo "no" >&6; }
26005fi
26006
26007
26008        if test "x$NATIVE2ASCII" = x; then
26009          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26010        fi
26011      else
26012        # Otherwise we believe it is a complete path. Use it as it is.
26013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26014$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26016$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26017        if test ! -x "$tool_specified"; then
26018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26019$as_echo "not found" >&6; }
26020          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26021        fi
26022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26023$as_echo "$tool_specified" >&6; }
26024      fi
26025    fi
26026  fi
26027
26028
26029
26030  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26031
26032  # Publish this variable in the help.
26033
26034
26035  if test "x$JARSIGNER" = x; then
26036    # The variable is not set by user, try to locate tool using the code snippet
26037
26038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26039$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26040      JARSIGNER=$BOOT_JDK/bin/jarsigner
26041      if test ! -x $JARSIGNER; then
26042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26043$as_echo "not found" >&6; }
26044        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26045$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26046        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26047      fi
26048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26049$as_echo "ok" >&6; }
26050
26051
26052  else
26053    # The variable is set, but is it from the command line or the environment?
26054
26055    # Try to remove the string !JARSIGNER! from our list.
26056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26058      # If it failed, the variable was not from the command line. Ignore it,
26059      # but warn the user (except for BASH, which is always set by the calling BASH).
26060      if test "xJARSIGNER" != xBASH; then
26061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26062$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26063      fi
26064      # Try to locate tool using the code snippet
26065
26066      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26067$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26068      JARSIGNER=$BOOT_JDK/bin/jarsigner
26069      if test ! -x $JARSIGNER; then
26070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26071$as_echo "not found" >&6; }
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26073$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26074        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26075      fi
26076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26077$as_echo "ok" >&6; }
26078
26079
26080    else
26081      # If it succeeded, then it was overridden by the user. We will use it
26082      # for the tool.
26083
26084      # First remove it from the list of overridden variables, so we can test
26085      # for unknown variables in the end.
26086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26087
26088      # Check if the provided tool contains a complete path.
26089      tool_specified="$JARSIGNER"
26090      tool_basename="${tool_specified##*/}"
26091      if test "x$tool_basename" = "x$tool_specified"; then
26092        # A command without a complete path is provided, search $PATH.
26093        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26094$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26095        # Extract the first word of "$tool_basename", so it can be a program name with args.
26096set dummy $tool_basename; ac_word=$2
26097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26098$as_echo_n "checking for $ac_word... " >&6; }
26099if ${ac_cv_path_JARSIGNER+:} false; then :
26100  $as_echo_n "(cached) " >&6
26101else
26102  case $JARSIGNER in
26103  [\\/]* | ?:[\\/]*)
26104  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26105  ;;
26106  *)
26107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26108for as_dir in $PATH
26109do
26110  IFS=$as_save_IFS
26111  test -z "$as_dir" && as_dir=.
26112    for ac_exec_ext in '' $ac_executable_extensions; do
26113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26114    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26116    break 2
26117  fi
26118done
26119  done
26120IFS=$as_save_IFS
26121
26122  ;;
26123esac
26124fi
26125JARSIGNER=$ac_cv_path_JARSIGNER
26126if test -n "$JARSIGNER"; then
26127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26128$as_echo "$JARSIGNER" >&6; }
26129else
26130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26131$as_echo "no" >&6; }
26132fi
26133
26134
26135        if test "x$JARSIGNER" = x; then
26136          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26137        fi
26138      else
26139        # Otherwise we believe it is a complete path. Use it as it is.
26140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26141$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26143$as_echo_n "checking for JARSIGNER... " >&6; }
26144        if test ! -x "$tool_specified"; then
26145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26146$as_echo "not found" >&6; }
26147          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26148        fi
26149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26150$as_echo "$tool_specified" >&6; }
26151      fi
26152    fi
26153  fi
26154
26155
26156
26157  # Finally, set some other options...
26158
26159  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26160  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26161
26162
26163
26164
26165###############################################################################
26166#
26167# Configure the sources to use. We can add or override individual directories.
26168#
26169###############################################################################
26170
26171
26172  # Where are the sources. Any of these can be overridden
26173  # using --with-override-corba and the likes.
26174  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26175  CORBA_TOPDIR="$SRC_ROOT/corba"
26176  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26177  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26178  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26179  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26180  JDK_TOPDIR="$SRC_ROOT/jdk"
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191  ###############################################################################
26192  #
26193  # Pickup additional source for a component from outside of the source root
26194  # or override source for a component.
26195  #
26196
26197# Check whether --with-add-source-root was given.
26198if test "${with_add_source_root+set}" = set; then :
26199  withval=$with_add_source_root;
26200fi
26201
26202
26203
26204# Check whether --with-override-source-root was given.
26205if test "${with_override_source_root+set}" = set; then :
26206  withval=$with_override_source_root;
26207fi
26208
26209
26210
26211# Check whether --with-adds-and-overrides was given.
26212if test "${with_adds_and_overrides+set}" = set; then :
26213  withval=$with_adds_and_overrides;
26214fi
26215
26216
26217  if test "x$with_adds_and_overrides" != x; then
26218    with_add_source_root="$with_adds_and_overrides/adds"
26219    with_override_source_root="$with_adds_and_overrides/overrides"
26220  fi
26221
26222  if test "x$with_add_source_root" != x; then
26223    if ! test -d $with_add_source_root; then
26224      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26225    fi
26226    CURDIR="$PWD"
26227    cd "$with_add_source_root"
26228    ADD_SRC_ROOT="`pwd`"
26229    cd "$CURDIR"
26230    # Verify that the addon source root does not have any root makefiles.
26231    # If it does, then it is usually an error, prevent this.
26232    if test -f $with_add_source_root/langtools/make/Makefile; then
26233      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
26234    fi
26235    if test -f $with_add_source_root/corba/make/Makefile; then
26236      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
26237    fi
26238    if test -f $with_add_source_root/jaxp/make/Makefile; then
26239      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
26240    fi
26241    if test -f $with_add_source_root/jaxws/make/Makefile; then
26242      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
26243    fi
26244    if test -f $with_add_source_root/hotspot/make/Makefile; then
26245      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
26246    fi
26247    if test -f $with_add_source_root/nashorn/make/Makefile; then
26248      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
26249    fi
26250    if test -f $with_add_source_root/jdk/make/Makefile; then
26251      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
26252    fi
26253  fi
26254
26255
26256  if test "x$with_override_source_root" != x; then
26257    if ! test -d $with_override_source_root; then
26258      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26259    fi
26260    CURDIR="$PWD"
26261    cd "$with_override_source_root"
26262    OVERRIDE_SRC_ROOT="`pwd`"
26263    cd "$CURDIR"
26264    if test -f $with_override_source_root/langtools/make/Makefile; then
26265      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
26266    fi
26267    if test -f $with_override_source_root/corba/make/Makefile; then
26268      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
26269    fi
26270    if test -f $with_override_source_root/jaxp/make/Makefile; then
26271      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
26272    fi
26273    if test -f $with_override_source_root/jaxws/make/Makefile; then
26274      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
26275    fi
26276    if test -f $with_override_source_root/hotspot/make/Makefile; then
26277      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
26278    fi
26279    if test -f $with_override_source_root/nashorn/make/Makefile; then
26280      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
26281    fi
26282    if test -f $with_override_source_root/jdk/make/Makefile; then
26283      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
26284    fi
26285  fi
26286
26287
26288  ###############################################################################
26289  #
26290  # Override a repo completely, this is used for example when you have 3 small
26291  # development sandboxes of the langtools sources and want to avoid having 3 full
26292  # OpenJDK sources checked out on disk.
26293  #
26294  # Assuming that the 3 langtools sandboxes are located here:
26295  # /home/fredrik/sandbox1/langtools
26296  # /home/fredrik/sandbox2/langtools
26297  # /home/fredrik/sandbox3/langtools
26298  #
26299  # From the source root you create build subdirs manually:
26300  #     mkdir -p build1 build2 build3
26301  # in each build directory run:
26302  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26303  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26304  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26305  #
26306
26307
26308# Check whether --with-override-langtools was given.
26309if test "${with_override_langtools+set}" = set; then :
26310  withval=$with_override_langtools;
26311fi
26312
26313
26314
26315# Check whether --with-override-corba was given.
26316if test "${with_override_corba+set}" = set; then :
26317  withval=$with_override_corba;
26318fi
26319
26320
26321
26322# Check whether --with-override-jaxp was given.
26323if test "${with_override_jaxp+set}" = set; then :
26324  withval=$with_override_jaxp;
26325fi
26326
26327
26328
26329# Check whether --with-override-jaxws was given.
26330if test "${with_override_jaxws+set}" = set; then :
26331  withval=$with_override_jaxws;
26332fi
26333
26334
26335
26336# Check whether --with-override-hotspot was given.
26337if test "${with_override_hotspot+set}" = set; then :
26338  withval=$with_override_hotspot;
26339fi
26340
26341
26342
26343# Check whether --with-override-nashorn was given.
26344if test "${with_override_nashorn+set}" = set; then :
26345  withval=$with_override_nashorn;
26346fi
26347
26348
26349
26350# Check whether --with-override-jdk was given.
26351if test "${with_override_jdk+set}" = set; then :
26352  withval=$with_override_jdk;
26353fi
26354
26355
26356  if test "x$with_override_langtools" != x; then
26357    CURDIR="$PWD"
26358    cd "$with_override_langtools"
26359    LANGTOOLS_TOPDIR="`pwd`"
26360    cd "$CURDIR"
26361    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26362      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26363    fi
26364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26365$as_echo_n "checking if langtools should be overridden... " >&6; }
26366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26367$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26368  fi
26369  if test "x$with_override_corba" != x; then
26370    CURDIR="$PWD"
26371    cd "$with_override_corba"
26372    CORBA_TOPDIR="`pwd`"
26373    cd "$CURDIR"
26374    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26375      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26376    fi
26377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26378$as_echo_n "checking if corba should be overridden... " >&6; }
26379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26380$as_echo "yes with $CORBA_TOPDIR" >&6; }
26381  fi
26382  if test "x$with_override_jaxp" != x; then
26383    CURDIR="$PWD"
26384    cd "$with_override_jaxp"
26385    JAXP_TOPDIR="`pwd`"
26386    cd "$CURDIR"
26387    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26388      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26389    fi
26390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26391$as_echo_n "checking if jaxp should be overridden... " >&6; }
26392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26393$as_echo "yes with $JAXP_TOPDIR" >&6; }
26394  fi
26395  if test "x$with_override_jaxws" != x; then
26396    CURDIR="$PWD"
26397    cd "$with_override_jaxws"
26398    JAXWS_TOPDIR="`pwd`"
26399    cd "$CURDIR"
26400    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26401      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26402    fi
26403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26404$as_echo_n "checking if jaxws should be overridden... " >&6; }
26405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26406$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26407  fi
26408  if test "x$with_override_hotspot" != x; then
26409    CURDIR="$PWD"
26410    cd "$with_override_hotspot"
26411    HOTSPOT_TOPDIR="`pwd`"
26412    cd "$CURDIR"
26413    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26414      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26415    fi
26416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26417$as_echo_n "checking if hotspot should be overridden... " >&6; }
26418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26419$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26420  fi
26421  if test "x$with_override_nashorn" != x; then
26422    CURDIR="$PWD"
26423    cd "$with_override_nashorn"
26424    NASHORN_TOPDIR="`pwd`"
26425    cd "$CURDIR"
26426    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26427      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26428    fi
26429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26430$as_echo_n "checking if nashorn should be overridden... " >&6; }
26431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26432$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26433  fi
26434  if test "x$with_override_jdk" != x; then
26435    CURDIR="$PWD"
26436    cd "$with_override_jdk"
26437    JDK_TOPDIR="`pwd`"
26438    cd "$CURDIR"
26439    if ! test -f $JDK_TOPDIR/make/Makefile; then
26440      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26441    fi
26442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26443$as_echo_n "checking if JDK should be overridden... " >&6; }
26444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26445$as_echo "yes with $JDK_TOPDIR" >&6; }
26446  fi
26447
26448
26449  BUILD_OUTPUT="$OUTPUT_ROOT"
26450
26451
26452  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26453  BUILD_HOTSPOT=true
26454
26455
26456
26457# Check whether --with-import-hotspot was given.
26458if test "${with_import_hotspot+set}" = set; then :
26459  withval=$with_import_hotspot;
26460fi
26461
26462  if test "x$with_import_hotspot" != x; then
26463    CURDIR="$PWD"
26464    cd "$with_import_hotspot"
26465    HOTSPOT_DIST="`pwd`"
26466    cd "$CURDIR"
26467    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26468      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26469    fi
26470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26471$as_echo_n "checking if hotspot should be imported... " >&6; }
26472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26473$as_echo "yes from $HOTSPOT_DIST" >&6; }
26474    BUILD_HOTSPOT=false
26475  fi
26476
26477  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26478
26479
26480###############################################################################
26481#
26482# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26483# native code.
26484#
26485###############################################################################
26486
26487# First determine the toolchain type (compiler family)
26488
26489
26490# Check whether --with-toolchain-type was given.
26491if test "${with_toolchain_type+set}" = set; then :
26492  withval=$with_toolchain_type;
26493fi
26494
26495
26496  # Use indirect variable referencing
26497  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26498  VALID_TOOLCHAINS=${!toolchain_var_name}
26499
26500  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26501    if test -n "$XCODEBUILD"; then
26502      # On Mac OS X, default toolchain to clang after Xcode 5
26503      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26504      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26505      if test $? -ne 0; then
26506        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26507      fi
26508      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26509          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26510          $CUT -f 1 -d .`
26511      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26512$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26513      if test $XCODE_MAJOR_VERSION -ge 5; then
26514          DEFAULT_TOOLCHAIN="clang"
26515      else
26516          DEFAULT_TOOLCHAIN="gcc"
26517      fi
26518    else
26519      # If Xcode is not installed, but the command line tools are
26520      # then we can't run xcodebuild. On these systems we should
26521      # default to clang
26522      DEFAULT_TOOLCHAIN="clang"
26523    fi
26524  else
26525    # First toolchain type in the list is the default
26526    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26527  fi
26528
26529  if test "x$with_toolchain_type" = xlist; then
26530    # List all toolchains
26531    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26532$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26533    for toolchain in $VALID_TOOLCHAINS; do
26534      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26535      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26536      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26537    done
26538
26539    exit 0
26540  elif test "x$with_toolchain_type" != x; then
26541    # User override; check that it is valid
26542    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26543      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26544$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26545      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26546$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26547      as_fn_error $? "Cannot continue." "$LINENO" 5
26548    fi
26549    TOOLCHAIN_TYPE=$with_toolchain_type
26550  else
26551    # No flag given, use default
26552    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26553  fi
26554
26555
26556  TOOLCHAIN_CC_BINARY_clang="clang"
26557  TOOLCHAIN_CC_BINARY_gcc="gcc"
26558  TOOLCHAIN_CC_BINARY_microsoft="cl"
26559  TOOLCHAIN_CC_BINARY_solstudio="cc"
26560  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26561
26562  TOOLCHAIN_CXX_BINARY_clang="clang++"
26563  TOOLCHAIN_CXX_BINARY_gcc="g++"
26564  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26565  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26566  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26567
26568  # Use indirect variable referencing
26569  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26570  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26571  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26572  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26573  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26574  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26575
26576
26577  # Define filename patterns
26578  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26579    LIBRARY_PREFIX=
26580    SHARED_LIBRARY_SUFFIX='.dll'
26581    STATIC_LIBRARY_SUFFIX='.lib'
26582    SHARED_LIBRARY='$1.dll'
26583    STATIC_LIBRARY='$1.lib'
26584    OBJ_SUFFIX='.obj'
26585    EXE_SUFFIX='.exe'
26586  else
26587    LIBRARY_PREFIX=lib
26588    SHARED_LIBRARY_SUFFIX='.so'
26589    STATIC_LIBRARY_SUFFIX='.a'
26590    SHARED_LIBRARY='lib$1.so'
26591    STATIC_LIBRARY='lib$1.a'
26592    OBJ_SUFFIX='.o'
26593    EXE_SUFFIX=''
26594    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26595      SHARED_LIBRARY='lib$1.dylib'
26596      SHARED_LIBRARY_SUFFIX='.dylib'
26597    fi
26598  fi
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26610    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26611$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26612  else
26613    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26614$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26615  fi
26616
26617
26618# Then detect the actual binaries needed
26619
26620  # FIXME: Is this needed?
26621  ac_ext=cpp
26622ac_cpp='$CXXCPP $CPPFLAGS'
26623ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26624ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26625ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26626
26627
26628  # Store the CFLAGS etc passed to the configure script.
26629  ORG_CFLAGS="$CFLAGS"
26630  ORG_CXXFLAGS="$CXXFLAGS"
26631  ORG_OBJCFLAGS="$OBJCFLAGS"
26632
26633  # On Windows, we need to detect the visual studio installation first.
26634  # This will change the PATH, but we need to keep that new PATH even
26635  # after toolchain detection is done, since the compiler (on x86) uses
26636  # it for DLL resolution in runtime.
26637  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26638
26639  # Store path to cygwin link.exe to help excluding it when searching for
26640  # VS linker. This must be done before changing the PATH when looking for VS.
26641  # Extract the first word of "link", so it can be a program name with args.
26642set dummy link; ac_word=$2
26643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26644$as_echo_n "checking for $ac_word... " >&6; }
26645if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26646  $as_echo_n "(cached) " >&6
26647else
26648  case $CYGWIN_LINK in
26649  [\\/]* | ?:[\\/]*)
26650  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26651  ;;
26652  *)
26653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26654for as_dir in $PATH
26655do
26656  IFS=$as_save_IFS
26657  test -z "$as_dir" && as_dir=.
26658    for ac_exec_ext in '' $ac_executable_extensions; do
26659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26660    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26662    break 2
26663  fi
26664done
26665  done
26666IFS=$as_save_IFS
26667
26668  ;;
26669esac
26670fi
26671CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26672if test -n "$CYGWIN_LINK"; then
26673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26674$as_echo "$CYGWIN_LINK" >&6; }
26675else
26676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26677$as_echo "no" >&6; }
26678fi
26679
26680
26681  if test "x$CYGWIN_LINK" != x; then
26682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26683$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26684    "$CYGWIN_LINK" --version > /dev/null
26685    if test $? -eq 0 ; then
26686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26687$as_echo "yes" >&6; }
26688    else
26689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26690$as_echo "no" >&6; }
26691      # This might be the VS linker. Don't exclude it later on.
26692      CYGWIN_LINK=""
26693    fi
26694  fi
26695
26696  # First-hand choice is to locate and run the vsvars bat file.
26697
26698  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26699    VCVARSFILE="vc/bin/vcvars32.bat"
26700  else
26701    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26702  fi
26703
26704  VS_ENV_CMD=""
26705  VS_ENV_ARGS=""
26706  if test "x$with_toolsdir" != x; then
26707
26708  if test "x$VS_ENV_CMD" = x; then
26709    VS100BASE="$with_toolsdir/../.."
26710    METHOD="--with-tools-dir"
26711
26712  windows_path="$VS100BASE"
26713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26714    unix_path=`$CYGPATH -u "$windows_path"`
26715    VS100BASE="$unix_path"
26716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26718    VS100BASE="$unix_path"
26719  fi
26720
26721    if test -d "$VS100BASE"; then
26722      if test -f "$VS100BASE/$VCVARSFILE"; then
26723        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26724$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26725        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26726        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26727        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26728        # TODO: improve detection for other versions of VS
26729        PLATFORM_TOOLSET="v100"
26730      else
26731        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26732$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26733        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26734$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26735      fi
26736    fi
26737  fi
26738
26739  fi
26740
26741  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26742    # Having specified an argument which is incorrect will produce an instant failure;
26743    # we should not go on looking
26744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26745$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26746    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26747$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26748    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26749  fi
26750
26751  if test "x$VS100COMNTOOLS" != x; then
26752
26753  if test "x$VS_ENV_CMD" = x; then
26754    VS100BASE="$VS100COMNTOOLS/../.."
26755    METHOD="VS100COMNTOOLS variable"
26756
26757  windows_path="$VS100BASE"
26758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26759    unix_path=`$CYGPATH -u "$windows_path"`
26760    VS100BASE="$unix_path"
26761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26763    VS100BASE="$unix_path"
26764  fi
26765
26766    if test -d "$VS100BASE"; then
26767      if test -f "$VS100BASE/$VCVARSFILE"; then
26768        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26769$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26770        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26771        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26772        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26773        # TODO: improve detection for other versions of VS
26774        PLATFORM_TOOLSET="v100"
26775      else
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26777$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26778        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26779$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26780      fi
26781    fi
26782  fi
26783
26784  fi
26785  if test "x$PROGRAMFILES" != x; then
26786
26787  if test "x$VS_ENV_CMD" = x; then
26788    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26789    METHOD="well-known name"
26790
26791  windows_path="$VS100BASE"
26792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26793    unix_path=`$CYGPATH -u "$windows_path"`
26794    VS100BASE="$unix_path"
26795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26797    VS100BASE="$unix_path"
26798  fi
26799
26800    if test -d "$VS100BASE"; then
26801      if test -f "$VS100BASE/$VCVARSFILE"; then
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26803$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26804        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26805        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26806        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26807        # TODO: improve detection for other versions of VS
26808        PLATFORM_TOOLSET="v100"
26809      else
26810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26811$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26813$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26814      fi
26815    fi
26816  fi
26817
26818  fi
26819
26820  if test "x$VS_ENV_CMD" = x; then
26821    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26822    METHOD="well-known name"
26823
26824  windows_path="$VS100BASE"
26825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26826    unix_path=`$CYGPATH -u "$windows_path"`
26827    VS100BASE="$unix_path"
26828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26830    VS100BASE="$unix_path"
26831  fi
26832
26833    if test -d "$VS100BASE"; then
26834      if test -f "$VS100BASE/$VCVARSFILE"; then
26835        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26836$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26837        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26838        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26839        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26840        # TODO: improve detection for other versions of VS
26841        PLATFORM_TOOLSET="v100"
26842      else
26843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26844$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26845        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26846$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26847      fi
26848    fi
26849  fi
26850
26851
26852  if test "x$VS_ENV_CMD" = x; then
26853    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26854    METHOD="well-known name"
26855
26856  windows_path="$VS100BASE"
26857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26858    unix_path=`$CYGPATH -u "$windows_path"`
26859    VS100BASE="$unix_path"
26860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26862    VS100BASE="$unix_path"
26863  fi
26864
26865    if test -d "$VS100BASE"; then
26866      if test -f "$VS100BASE/$VCVARSFILE"; then
26867        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26868$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26869        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26870        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26871        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26872        # TODO: improve detection for other versions of VS
26873        PLATFORM_TOOLSET="v100"
26874      else
26875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26876$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26877        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26878$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26879      fi
26880    fi
26881  fi
26882
26883
26884  if test "x$ProgramW6432" != x; then
26885
26886  if test "x$VS_ENV_CMD" = x; then
26887    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26888    METHOD="well-known name"
26889
26890  windows_path="$WIN_SDK_BASE"
26891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26892    unix_path=`$CYGPATH -u "$windows_path"`
26893    WIN_SDK_BASE="$unix_path"
26894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26896    WIN_SDK_BASE="$unix_path"
26897  fi
26898
26899    if test -d "$WIN_SDK_BASE"; then
26900      # There have been cases of partial or broken SDK installations. A missing
26901      # lib dir is not going to work.
26902      if test ! -d "$WIN_SDK_BASE/../lib"; then
26903        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26904$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26905        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26906$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26907      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26909$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26910        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26911        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26912          VS_ENV_ARGS="/x86"
26913        else
26914          VS_ENV_ARGS="/x64"
26915        fi
26916        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26917        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26918        # TODO: improve detection for other versions of SDK
26919        PLATFORM_TOOLSET="Windows7.1SDK"
26920      else
26921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26922$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26923        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26924$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26925      fi
26926    fi
26927  fi
26928
26929  fi
26930  if test "x$PROGRAMW6432" != x; then
26931
26932  if test "x$VS_ENV_CMD" = x; then
26933    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26934    METHOD="well-known name"
26935
26936  windows_path="$WIN_SDK_BASE"
26937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26938    unix_path=`$CYGPATH -u "$windows_path"`
26939    WIN_SDK_BASE="$unix_path"
26940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26942    WIN_SDK_BASE="$unix_path"
26943  fi
26944
26945    if test -d "$WIN_SDK_BASE"; then
26946      # There have been cases of partial or broken SDK installations. A missing
26947      # lib dir is not going to work.
26948      if test ! -d "$WIN_SDK_BASE/../lib"; then
26949        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26950$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26951        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26952$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26953      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26954        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26955$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26956        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26957        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26958          VS_ENV_ARGS="/x86"
26959        else
26960          VS_ENV_ARGS="/x64"
26961        fi
26962        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26963        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26964        # TODO: improve detection for other versions of SDK
26965        PLATFORM_TOOLSET="Windows7.1SDK"
26966      else
26967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26968$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26969        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26970$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26971      fi
26972    fi
26973  fi
26974
26975  fi
26976  if test "x$PROGRAMFILES" != x; then
26977
26978  if test "x$VS_ENV_CMD" = x; then
26979    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26980    METHOD="well-known name"
26981
26982  windows_path="$WIN_SDK_BASE"
26983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26984    unix_path=`$CYGPATH -u "$windows_path"`
26985    WIN_SDK_BASE="$unix_path"
26986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26988    WIN_SDK_BASE="$unix_path"
26989  fi
26990
26991    if test -d "$WIN_SDK_BASE"; then
26992      # There have been cases of partial or broken SDK installations. A missing
26993      # lib dir is not going to work.
26994      if test ! -d "$WIN_SDK_BASE/../lib"; then
26995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26996$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26997        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26998$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26999      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27000        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27001$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27002        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27003        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27004          VS_ENV_ARGS="/x86"
27005        else
27006          VS_ENV_ARGS="/x64"
27007        fi
27008        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27009        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27010        # TODO: improve detection for other versions of SDK
27011        PLATFORM_TOOLSET="Windows7.1SDK"
27012      else
27013        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27014$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27016$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27017      fi
27018    fi
27019  fi
27020
27021  fi
27022
27023  if test "x$VS_ENV_CMD" = x; then
27024    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27025    METHOD="well-known name"
27026
27027  windows_path="$WIN_SDK_BASE"
27028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27029    unix_path=`$CYGPATH -u "$windows_path"`
27030    WIN_SDK_BASE="$unix_path"
27031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27033    WIN_SDK_BASE="$unix_path"
27034  fi
27035
27036    if test -d "$WIN_SDK_BASE"; then
27037      # There have been cases of partial or broken SDK installations. A missing
27038      # lib dir is not going to work.
27039      if test ! -d "$WIN_SDK_BASE/../lib"; then
27040        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27041$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27042        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27043$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27044      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27046$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27047        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27048        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27049          VS_ENV_ARGS="/x86"
27050        else
27051          VS_ENV_ARGS="/x64"
27052        fi
27053        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27054        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27055        # TODO: improve detection for other versions of SDK
27056        PLATFORM_TOOLSET="Windows7.1SDK"
27057      else
27058        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27059$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27060        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27061$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27062      fi
27063    fi
27064  fi
27065
27066
27067  if test "x$VS_ENV_CMD" = x; then
27068    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27069    METHOD="well-known name"
27070
27071  windows_path="$WIN_SDK_BASE"
27072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073    unix_path=`$CYGPATH -u "$windows_path"`
27074    WIN_SDK_BASE="$unix_path"
27075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27077    WIN_SDK_BASE="$unix_path"
27078  fi
27079
27080    if test -d "$WIN_SDK_BASE"; then
27081      # There have been cases of partial or broken SDK installations. A missing
27082      # lib dir is not going to work.
27083      if test ! -d "$WIN_SDK_BASE/../lib"; then
27084        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27085$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27086        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27087$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27088      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27090$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27091        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27092        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27093          VS_ENV_ARGS="/x86"
27094        else
27095          VS_ENV_ARGS="/x64"
27096        fi
27097        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27098        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27099        # TODO: improve detection for other versions of SDK
27100        PLATFORM_TOOLSET="Windows7.1SDK"
27101      else
27102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27103$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27104        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27105$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27106      fi
27107    fi
27108  fi
27109
27110
27111  if test "x$VS_ENV_CMD" != x; then
27112    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27113
27114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27115
27116  # First separate the path from the arguments. This will split at the first
27117  # space.
27118  complete="$VS_ENV_CMD"
27119  path="${complete%% *}"
27120  tmp="$complete EOL"
27121  arguments="${tmp#* }"
27122
27123  # Input might be given as Windows format, start by converting to
27124  # unix format.
27125  new_path=`$CYGPATH -u "$path"`
27126
27127  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
27138    # The splitting of arguments from the executable at a space might have been incorrect,
27139    # since paths with space are more likely in Windows. Give it another try with the whole
27140    # argument.
27141    path="$complete"
27142    arguments="EOL"
27143    new_path=`$CYGPATH -u "$path"`
27144    new_path=`$WHICH "$new_path" 2> /dev/null`
27145    # bat and cmd files are not always considered executable in cygwin causing which
27146    # to not find them
27147    if test "x$new_path" = x \
27148        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27149        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27150      new_path=`$CYGPATH -u "$path"`
27151    fi
27152    if test "x$new_path" = x; then
27153      # It's still not found. Now this is an unrecoverable error.
27154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27155$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27156      has_space=`$ECHO "$complete" | $GREP " "`
27157      if test "x$has_space" != x; then
27158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27160      fi
27161      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27162    fi
27163  fi
27164
27165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27168  # "foo.exe" is OK but "foo" is an error.
27169  #
27170  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27171  # It is also a way to make sure we got the proper file name for the real test later on.
27172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27173  if test "x$test_shortpath" = x; then
27174    # Short path failed, file does not exist as specified.
27175    # Try adding .exe or .cmd
27176    if test -f "${new_path}.exe"; then
27177      input_to_shortpath="${new_path}.exe"
27178    elif test -f "${new_path}.cmd"; then
27179      input_to_shortpath="${new_path}.cmd"
27180    else
27181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27182$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27183      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27184$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27185      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27186    fi
27187  else
27188    input_to_shortpath="$new_path"
27189  fi
27190
27191  # Call helper function which possibly converts this using DOS-style short mode.
27192  # If so, the updated path is stored in $new_path.
27193  new_path="$input_to_shortpath"
27194
27195  input_path="$input_to_shortpath"
27196  # Check if we need to convert this using DOS-style short mode. If the path
27197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27198  # take no chances and rewrite it.
27199  # Note: m4 eats our [], so we need to use [ and ] instead.
27200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27201  if test "x$has_forbidden_chars" != x; then
27202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27206      # Going to short mode and back again did indeed matter. Since short mode is
27207      # case insensitive, let's make it lowercase to improve readability.
27208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27209      # Now convert it back to Unix-stile (cygpath)
27210      input_path=`$CYGPATH -u "$shortmode_path"`
27211      new_path="$input_path"
27212    fi
27213  fi
27214
27215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27216  if test "x$test_cygdrive_prefix" = x; then
27217    # As a simple fix, exclude /usr/bin since it's not a real path.
27218    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27220      # a path prefixed by /cygdrive for fixpath to work.
27221      new_path="$CYGWIN_ROOT_PATH$input_path"
27222    fi
27223  fi
27224
27225  # remove trailing .exe if any
27226  new_path="${new_path/%.exe/}"
27227
27228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27229
27230  # First separate the path from the arguments. This will split at the first
27231  # space.
27232  complete="$VS_ENV_CMD"
27233  path="${complete%% *}"
27234  tmp="$complete EOL"
27235  arguments="${tmp#* }"
27236
27237  # Input might be given as Windows format, start by converting to
27238  # unix format.
27239  new_path="$path"
27240
27241  windows_path="$new_path"
27242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27243    unix_path=`$CYGPATH -u "$windows_path"`
27244    new_path="$unix_path"
27245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27247    new_path="$unix_path"
27248  fi
27249
27250
27251  # Now try to locate executable using which
27252  new_path=`$WHICH "$new_path" 2> /dev/null`
27253
27254  if test "x$new_path" = x; then
27255    # Oops. Which didn't find the executable.
27256    # The splitting of arguments from the executable at a space might have been incorrect,
27257    # since paths with space are more likely in Windows. Give it another try with the whole
27258    # argument.
27259    path="$complete"
27260    arguments="EOL"
27261    new_path="$path"
27262
27263  windows_path="$new_path"
27264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27265    unix_path=`$CYGPATH -u "$windows_path"`
27266    new_path="$unix_path"
27267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27269    new_path="$unix_path"
27270  fi
27271
27272
27273    new_path=`$WHICH "$new_path" 2> /dev/null`
27274    # bat and cmd files are not always considered executable in MSYS causing which
27275    # to not find them
27276    if test "x$new_path" = x \
27277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27279      new_path="$path"
27280
27281  windows_path="$new_path"
27282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27283    unix_path=`$CYGPATH -u "$windows_path"`
27284    new_path="$unix_path"
27285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27287    new_path="$unix_path"
27288  fi
27289
27290    fi
27291
27292    if test "x$new_path" = x; then
27293      # It's still not found. Now this is an unrecoverable error.
27294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27295$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27296      has_space=`$ECHO "$complete" | $GREP " "`
27297      if test "x$has_space" != x; then
27298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27300      fi
27301      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27302    fi
27303  fi
27304
27305  # Now new_path has a complete unix path to the binary
27306  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27307    # Keep paths in /bin as-is, but remove trailing .exe if any
27308    new_path="${new_path/%.exe/}"
27309    # Do not save /bin paths to all_fixpath_prefixes!
27310  else
27311    # Not in mixed or Windows style, start by that.
27312    new_path=`cmd //c echo $new_path`
27313
27314  input_path="$new_path"
27315  # Check if we need to convert this using DOS-style short mode. If the path
27316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27317  # take no chances and rewrite it.
27318  # Note: m4 eats our [], so we need to use [ and ] instead.
27319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27320  if test "x$has_forbidden_chars" != x; then
27321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27323  fi
27324
27325    # Output is in $new_path
27326
27327  windows_path="$new_path"
27328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27329    unix_path=`$CYGPATH -u "$windows_path"`
27330    new_path="$unix_path"
27331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27333    new_path="$unix_path"
27334  fi
27335
27336    # remove trailing .exe if any
27337    new_path="${new_path/%.exe/}"
27338
27339    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27340    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27341  fi
27342
27343  else
27344    # We're on a unix platform. Hooray! :)
27345    # First separate the path from the arguments. This will split at the first
27346    # space.
27347    complete="$VS_ENV_CMD"
27348    path="${complete%% *}"
27349    tmp="$complete EOL"
27350    arguments="${tmp#* }"
27351
27352    # Cannot rely on the command "which" here since it doesn't always work.
27353    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27354    if test -z "$is_absolute_path"; then
27355      # Path to executable is not absolute. Find it.
27356      IFS_save="$IFS"
27357      IFS=:
27358      for p in $PATH; do
27359        if test -f "$p/$path" && test -x "$p/$path"; then
27360          new_path="$p/$path"
27361          break
27362        fi
27363      done
27364      IFS="$IFS_save"
27365    else
27366      # This is an absolute path, we can use it without further modifications.
27367      new_path="$path"
27368    fi
27369
27370    if test "x$new_path" = x; then
27371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27372$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27373      has_space=`$ECHO "$complete" | $GREP " "`
27374      if test "x$has_space" != x; then
27375        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27376$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27377      fi
27378      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27379    fi
27380  fi
27381
27382  # Now join together the path and the arguments once again
27383  if test "x$arguments" != xEOL; then
27384    new_complete="$new_path ${arguments% *}"
27385  else
27386    new_complete="$new_path"
27387  fi
27388
27389  if test "x$complete" != "x$new_complete"; then
27390    VS_ENV_CMD="$new_complete"
27391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27392$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27393  fi
27394
27395
27396    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27397    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27398$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27399
27400    # We need to create a couple of temporary files.
27401    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27402    $MKDIR -p $VS_ENV_TMP_DIR
27403
27404    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27405    # Instead create a shell script which will set the relevant variables when run.
27406    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27407
27408  unix_path="$WINPATH_VS_ENV_CMD"
27409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27410    windows_path=`$CYGPATH -m "$unix_path"`
27411    WINPATH_VS_ENV_CMD="$windows_path"
27412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27413    windows_path=`cmd //c echo $unix_path`
27414    WINPATH_VS_ENV_CMD="$windows_path"
27415  fi
27416
27417    WINPATH_BASH="$BASH"
27418
27419  unix_path="$WINPATH_BASH"
27420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27421    windows_path=`$CYGPATH -m "$unix_path"`
27422    WINPATH_BASH="$windows_path"
27423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27424    windows_path=`cmd //c echo $unix_path`
27425    WINPATH_BASH="$windows_path"
27426  fi
27427
27428
27429    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27430    # script (executable by bash) that will setup the important variables.
27431    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27432    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27433    # This will end up something like:
27434    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27435    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27436    # These will end up something like:
27437    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27438    # The trailing space for everyone except PATH is no typo, but is needed due
27439    # to trailing \ in the Windows paths. These will be stripped later.
27440    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27441    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27442    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27443    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27444    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27445    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27446
27447    # Now execute the newly created bat file.
27448    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27449    # Change directory so we don't need to mess with Windows paths in redirects.
27450    cd $VS_ENV_TMP_DIR
27451    cmd /c extract-vs-env.bat | $CAT
27452    cd $CURDIR
27453
27454    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27455      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27456$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27457      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27458$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27459      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27460$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27461      as_fn_error $? "Cannot continue" "$LINENO" 5
27462    fi
27463
27464    # Now set all paths and other env variables. This will allow the rest of
27465    # the configure script to find and run the compiler in the proper way.
27466    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27467$as_echo "$as_me: Setting extracted environment variables" >&6;}
27468    . $VS_ENV_TMP_DIR/set-vs-env.sh
27469    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27470    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27471  else
27472    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27473    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27474$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27475  fi
27476
27477  # At this point, we should have correct variables in the environment, or we can't continue.
27478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27479$as_echo_n "checking for Visual Studio variables... " >&6; }
27480
27481  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27482    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27484$as_echo "present but broken" >&6; }
27485      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27486    else
27487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27488$as_echo "ok" >&6; }
27489      # Remove any trailing "\" and " " from the variables.
27490      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27491      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27492      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27493      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27494      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27495      # Remove any paths containing # (typically F#) as that messes up make. This
27496      # is needed if visual studio was installed with F# support.
27497      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27498
27499
27500
27501
27502    fi
27503  else
27504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27505$as_echo "not found" >&6; }
27506
27507    if test "x$VS_ENV_CMD" = x; then
27508      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27509$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27510      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27511$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27512    else
27513      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27514$as_echo "$as_me: Running the extraction script failed." >&6;}
27515    fi
27516    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27517$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27518    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27519$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27520    as_fn_error $? "Cannot continue" "$LINENO" 5
27521  fi
27522
27523    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27524    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27525    PATH="$VS_PATH"
27526    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27527    export INCLUDE="$VS_INCLUDE"
27528    export LIB="$VS_LIB"
27529  fi
27530
27531  # autoconf magic only relies on PATH, so update it if tools dir is specified
27532  OLD_PATH="$PATH"
27533
27534  # For solaris we really need solaris tools, and not the GNU equivalent.
27535  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27536  # so add that to path before starting to probe.
27537  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27538  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27539    PATH="/usr/ccs/bin:$PATH"
27540  fi
27541
27542  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27543  # override all other locations.
27544  if test "x$TOOLCHAIN_PATH" != x; then
27545    PATH=$TOOLCHAIN_PATH:$PATH
27546  fi
27547
27548
27549  #
27550  # Setup the compilers (CC and CXX)
27551  #
27552
27553  COMPILER_NAME=C
27554  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27555
27556  if test "x$CC" != x; then
27557    # User has supplied compiler name already, always let that override.
27558    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27559$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27560    if test "x`basename $CC`" = "x$CC"; then
27561      # A command without a complete path is provided, search $PATH.
27562
27563      for ac_prog in $CC
27564do
27565  # Extract the first word of "$ac_prog", so it can be a program name with args.
27566set dummy $ac_prog; ac_word=$2
27567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27568$as_echo_n "checking for $ac_word... " >&6; }
27569if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27570  $as_echo_n "(cached) " >&6
27571else
27572  case $POTENTIAL_CC in
27573  [\\/]* | ?:[\\/]*)
27574  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27575  ;;
27576  *)
27577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27578for as_dir in $PATH
27579do
27580  IFS=$as_save_IFS
27581  test -z "$as_dir" && as_dir=.
27582    for ac_exec_ext in '' $ac_executable_extensions; do
27583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27584    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27586    break 2
27587  fi
27588done
27589  done
27590IFS=$as_save_IFS
27591
27592  ;;
27593esac
27594fi
27595POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27596if test -n "$POTENTIAL_CC"; then
27597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27598$as_echo "$POTENTIAL_CC" >&6; }
27599else
27600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27601$as_echo "no" >&6; }
27602fi
27603
27604
27605  test -n "$POTENTIAL_CC" && break
27606done
27607
27608      if test "x$POTENTIAL_CC" != x; then
27609        CC=$POTENTIAL_CC
27610      else
27611        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27612      fi
27613    else
27614      # Otherwise it might already be a complete path
27615      if test ! -x "$CC"; then
27616        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27617      fi
27618    fi
27619  else
27620    # No user supplied value. Locate compiler ourselves.
27621
27622    # If we are cross compiling, assume cross compilation tools follows the
27623    # cross compilation standard where they are prefixed with the autoconf
27624    # standard name for the target. For example the binary
27625    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27626    # If we are not cross compiling, then the default compiler name will be
27627    # used.
27628
27629    CC=
27630    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27631    # before checking the rest of the PATH.
27632    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27633    # step, this should not be necessary.
27634    if test -n "$TOOLCHAIN_PATH"; then
27635      PATH_save="$PATH"
27636      PATH="$TOOLCHAIN_PATH"
27637      for ac_prog in $SEARCH_LIST
27638do
27639  # Extract the first word of "$ac_prog", so it can be a program name with args.
27640set dummy $ac_prog; ac_word=$2
27641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27642$as_echo_n "checking for $ac_word... " >&6; }
27643if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27644  $as_echo_n "(cached) " >&6
27645else
27646  case $TOOLCHAIN_PATH_CC in
27647  [\\/]* | ?:[\\/]*)
27648  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27649  ;;
27650  *)
27651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27652for as_dir in $PATH
27653do
27654  IFS=$as_save_IFS
27655  test -z "$as_dir" && as_dir=.
27656    for ac_exec_ext in '' $ac_executable_extensions; do
27657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27658    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27660    break 2
27661  fi
27662done
27663  done
27664IFS=$as_save_IFS
27665
27666  ;;
27667esac
27668fi
27669TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27670if test -n "$TOOLCHAIN_PATH_CC"; then
27671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27672$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27673else
27674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27675$as_echo "no" >&6; }
27676fi
27677
27678
27679  test -n "$TOOLCHAIN_PATH_CC" && break
27680done
27681
27682      CC=$TOOLCHAIN_PATH_CC
27683      PATH="$PATH_save"
27684    fi
27685
27686    # AC_PATH_PROGS can't be run multiple times with the same variable,
27687    # so create a new name for this run.
27688    if test "x$CC" = x; then
27689      for ac_prog in $SEARCH_LIST
27690do
27691  # Extract the first word of "$ac_prog", so it can be a program name with args.
27692set dummy $ac_prog; ac_word=$2
27693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27694$as_echo_n "checking for $ac_word... " >&6; }
27695if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27696  $as_echo_n "(cached) " >&6
27697else
27698  case $POTENTIAL_CC in
27699  [\\/]* | ?:[\\/]*)
27700  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27701  ;;
27702  *)
27703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27704for as_dir in $PATH
27705do
27706  IFS=$as_save_IFS
27707  test -z "$as_dir" && as_dir=.
27708    for ac_exec_ext in '' $ac_executable_extensions; do
27709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27710    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27712    break 2
27713  fi
27714done
27715  done
27716IFS=$as_save_IFS
27717
27718  ;;
27719esac
27720fi
27721POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27722if test -n "$POTENTIAL_CC"; then
27723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27724$as_echo "$POTENTIAL_CC" >&6; }
27725else
27726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27727$as_echo "no" >&6; }
27728fi
27729
27730
27731  test -n "$POTENTIAL_CC" && break
27732done
27733
27734      CC=$POTENTIAL_CC
27735    fi
27736
27737    if test "x$CC" = x; then
27738
27739  # Print a helpful message on how to acquire the necessary build dependency.
27740  # devkit is the help tag: freetype, cups, pulse, alsa etc
27741  MISSING_DEPENDENCY=devkit
27742
27743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27744    cygwin_help $MISSING_DEPENDENCY
27745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27746    msys_help $MISSING_DEPENDENCY
27747  else
27748    PKGHANDLER_COMMAND=
27749
27750    case $PKGHANDLER in
27751      apt-get)
27752        apt_help     $MISSING_DEPENDENCY ;;
27753      yum)
27754        yum_help     $MISSING_DEPENDENCY ;;
27755      port)
27756        port_help    $MISSING_DEPENDENCY ;;
27757      pkgutil)
27758        pkgutil_help $MISSING_DEPENDENCY ;;
27759      pkgadd)
27760        pkgadd_help  $MISSING_DEPENDENCY ;;
27761    esac
27762
27763    if test "x$PKGHANDLER_COMMAND" != x; then
27764      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27765    fi
27766  fi
27767
27768      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27769    fi
27770  fi
27771
27772  # Now we have a compiler binary in CC. Make sure it's okay.
27773
27774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27775
27776  # First separate the path from the arguments. This will split at the first
27777  # space.
27778  complete="$CC"
27779  path="${complete%% *}"
27780  tmp="$complete EOL"
27781  arguments="${tmp#* }"
27782
27783  # Input might be given as Windows format, start by converting to
27784  # unix format.
27785  new_path=`$CYGPATH -u "$path"`
27786
27787  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
27798    # The splitting of arguments from the executable at a space might have been incorrect,
27799    # since paths with space are more likely in Windows. Give it another try with the whole
27800    # argument.
27801    path="$complete"
27802    arguments="EOL"
27803    new_path=`$CYGPATH -u "$path"`
27804    new_path=`$WHICH "$new_path" 2> /dev/null`
27805    # bat and cmd files are not always considered executable in cygwin causing which
27806    # to not find them
27807    if test "x$new_path" = x \
27808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27810      new_path=`$CYGPATH -u "$path"`
27811    fi
27812    if test "x$new_path" = x; then
27813      # It's still not found. Now this is an unrecoverable error.
27814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27815$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27816      has_space=`$ECHO "$complete" | $GREP " "`
27817      if test "x$has_space" != x; then
27818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27820      fi
27821      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27822    fi
27823  fi
27824
27825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27828  # "foo.exe" is OK but "foo" is an error.
27829  #
27830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27831  # It is also a way to make sure we got the proper file name for the real test later on.
27832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27833  if test "x$test_shortpath" = x; then
27834    # Short path failed, file does not exist as specified.
27835    # Try adding .exe or .cmd
27836    if test -f "${new_path}.exe"; then
27837      input_to_shortpath="${new_path}.exe"
27838    elif test -f "${new_path}.cmd"; then
27839      input_to_shortpath="${new_path}.cmd"
27840    else
27841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27842$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27845      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27846    fi
27847  else
27848    input_to_shortpath="$new_path"
27849  fi
27850
27851  # Call helper function which possibly converts this using DOS-style short mode.
27852  # If so, the updated path is stored in $new_path.
27853  new_path="$input_to_shortpath"
27854
27855  input_path="$input_to_shortpath"
27856  # Check if we need to convert this using DOS-style short mode. If the path
27857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27858  # take no chances and rewrite it.
27859  # Note: m4 eats our [], so we need to use [ and ] instead.
27860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27861  if test "x$has_forbidden_chars" != x; then
27862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27866      # Going to short mode and back again did indeed matter. Since short mode is
27867      # case insensitive, let's make it lowercase to improve readability.
27868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27869      # Now convert it back to Unix-stile (cygpath)
27870      input_path=`$CYGPATH -u "$shortmode_path"`
27871      new_path="$input_path"
27872    fi
27873  fi
27874
27875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27876  if test "x$test_cygdrive_prefix" = x; then
27877    # As a simple fix, exclude /usr/bin since it's not a real path.
27878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27880      # a path prefixed by /cygdrive for fixpath to work.
27881      new_path="$CYGWIN_ROOT_PATH$input_path"
27882    fi
27883  fi
27884
27885  # remove trailing .exe if any
27886  new_path="${new_path/%.exe/}"
27887
27888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27889
27890  # First separate the path from the arguments. This will split at the first
27891  # space.
27892  complete="$CC"
27893  path="${complete%% *}"
27894  tmp="$complete EOL"
27895  arguments="${tmp#* }"
27896
27897  # Input might be given as Windows format, start by converting to
27898  # unix format.
27899  new_path="$path"
27900
27901  windows_path="$new_path"
27902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27903    unix_path=`$CYGPATH -u "$windows_path"`
27904    new_path="$unix_path"
27905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27907    new_path="$unix_path"
27908  fi
27909
27910
27911  # Now try to locate executable using which
27912  new_path=`$WHICH "$new_path" 2> /dev/null`
27913
27914  if test "x$new_path" = x; then
27915    # Oops. Which didn't find the executable.
27916    # The splitting of arguments from the executable at a space might have been incorrect,
27917    # since paths with space are more likely in Windows. Give it another try with the whole
27918    # argument.
27919    path="$complete"
27920    arguments="EOL"
27921    new_path="$path"
27922
27923  windows_path="$new_path"
27924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27925    unix_path=`$CYGPATH -u "$windows_path"`
27926    new_path="$unix_path"
27927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27929    new_path="$unix_path"
27930  fi
27931
27932
27933    new_path=`$WHICH "$new_path" 2> /dev/null`
27934    # bat and cmd files are not always considered executable in MSYS causing which
27935    # to not find them
27936    if test "x$new_path" = x \
27937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27939      new_path="$path"
27940
27941  windows_path="$new_path"
27942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27943    unix_path=`$CYGPATH -u "$windows_path"`
27944    new_path="$unix_path"
27945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27947    new_path="$unix_path"
27948  fi
27949
27950    fi
27951
27952    if test "x$new_path" = x; then
27953      # It's still not found. Now this is an unrecoverable error.
27954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27955$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27956      has_space=`$ECHO "$complete" | $GREP " "`
27957      if test "x$has_space" != x; then
27958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27960      fi
27961      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27962    fi
27963  fi
27964
27965  # Now new_path has a complete unix path to the binary
27966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27967    # Keep paths in /bin as-is, but remove trailing .exe if any
27968    new_path="${new_path/%.exe/}"
27969    # Do not save /bin paths to all_fixpath_prefixes!
27970  else
27971    # Not in mixed or Windows style, start by that.
27972    new_path=`cmd //c echo $new_path`
27973
27974  input_path="$new_path"
27975  # Check if we need to convert this using DOS-style short mode. If the path
27976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27977  # take no chances and rewrite it.
27978  # Note: m4 eats our [], so we need to use [ and ] instead.
27979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27980  if test "x$has_forbidden_chars" != x; then
27981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27983  fi
27984
27985    # Output is in $new_path
27986
27987  windows_path="$new_path"
27988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27989    unix_path=`$CYGPATH -u "$windows_path"`
27990    new_path="$unix_path"
27991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27993    new_path="$unix_path"
27994  fi
27995
27996    # remove trailing .exe if any
27997    new_path="${new_path/%.exe/}"
27998
27999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28001  fi
28002
28003  else
28004    # We're on a unix platform. Hooray! :)
28005    # First separate the path from the arguments. This will split at the first
28006    # space.
28007    complete="$CC"
28008    path="${complete%% *}"
28009    tmp="$complete EOL"
28010    arguments="${tmp#* }"
28011
28012    # Cannot rely on the command "which" here since it doesn't always work.
28013    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28014    if test -z "$is_absolute_path"; then
28015      # Path to executable is not absolute. Find it.
28016      IFS_save="$IFS"
28017      IFS=:
28018      for p in $PATH; do
28019        if test -f "$p/$path" && test -x "$p/$path"; then
28020          new_path="$p/$path"
28021          break
28022        fi
28023      done
28024      IFS="$IFS_save"
28025    else
28026      # This is an absolute path, we can use it without further modifications.
28027      new_path="$path"
28028    fi
28029
28030    if test "x$new_path" = x; then
28031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28032$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28033      has_space=`$ECHO "$complete" | $GREP " "`
28034      if test "x$has_space" != x; then
28035        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28037      fi
28038      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28039    fi
28040  fi
28041
28042  # Now join together the path and the arguments once again
28043  if test "x$arguments" != xEOL; then
28044    new_complete="$new_path ${arguments% *}"
28045  else
28046    new_complete="$new_path"
28047  fi
28048
28049  if test "x$complete" != "x$new_complete"; then
28050    CC="$new_complete"
28051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28052$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28053  fi
28054
28055  TEST_COMPILER="$CC"
28056  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28057  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28058  if test "x$OPENJDK_BUILD_OS" != xaix; then
28059    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28061$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28062
28063  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28064    # Follow a chain of symbolic links. Use readlink
28065    # where it exists, else fall back to horribly
28066    # complicated shell code.
28067    if test "x$READLINK_TESTED" != yes; then
28068      # On MacOSX there is a readlink tool with a different
28069      # purpose than the GNU readlink tool. Check the found readlink.
28070      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28071      if test "x$ISGNU" = x; then
28072        # A readlink that we do not know how to use.
28073        # Are there other non-GNU readlinks out there?
28074        READLINK_TESTED=yes
28075        READLINK=
28076      fi
28077    fi
28078
28079    if test "x$READLINK" != x; then
28080      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28081    else
28082      # Save the current directory for restoring afterwards
28083      STARTDIR=$PWD
28084      COUNTER=0
28085      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28086      sym_link_file=`$BASENAME $TEST_COMPILER`
28087      cd $sym_link_dir
28088      # Use -P flag to resolve symlinks in directories.
28089      cd `$THEPWDCMD -P`
28090      sym_link_dir=`$THEPWDCMD -P`
28091      # Resolve file symlinks
28092      while test $COUNTER -lt 20; do
28093        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28094        if test "x$ISLINK" == x; then
28095          # This is not a symbolic link! We are done!
28096          break
28097        fi
28098        # Again resolve directory symlinks since the target of the just found
28099        # link could be in a different directory
28100        cd `$DIRNAME $ISLINK`
28101        sym_link_dir=`$THEPWDCMD -P`
28102        sym_link_file=`$BASENAME $ISLINK`
28103        let COUNTER=COUNTER+1
28104      done
28105      cd $STARTDIR
28106      TEST_COMPILER=$sym_link_dir/$sym_link_file
28107    fi
28108  fi
28109
28110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28111$as_echo "$TEST_COMPILER" >&6; }
28112  fi
28113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28114$as_echo_n "checking if CC is disguised ccache... " >&6; }
28115
28116  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28117  if test "x$COMPILER_BASENAME" = "xccache"; then
28118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28119$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28120    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28121    # We want to control ccache invocation ourselves, so ignore this cc and try
28122    # searching again.
28123
28124    # Remove the path to the fake ccache cc from the PATH
28125    RETRY_COMPILER_SAVED_PATH="$PATH"
28126    COMPILER_DIRNAME=`$DIRNAME $CC`
28127    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28128
28129    # Try again looking for our compiler
28130    if test -n "$ac_tool_prefix"; then
28131  for ac_prog in $TOOLCHAIN_CC_BINARY
28132  do
28133    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28134set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28136$as_echo_n "checking for $ac_word... " >&6; }
28137if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28138  $as_echo_n "(cached) " >&6
28139else
28140  if test -n "$PROPER_COMPILER_CC"; then
28141  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28142else
28143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28144for as_dir in $PATH
28145do
28146  IFS=$as_save_IFS
28147  test -z "$as_dir" && as_dir=.
28148    for ac_exec_ext in '' $ac_executable_extensions; do
28149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28150    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28152    break 2
28153  fi
28154done
28155  done
28156IFS=$as_save_IFS
28157
28158fi
28159fi
28160PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28161if test -n "$PROPER_COMPILER_CC"; then
28162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28163$as_echo "$PROPER_COMPILER_CC" >&6; }
28164else
28165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28166$as_echo "no" >&6; }
28167fi
28168
28169
28170    test -n "$PROPER_COMPILER_CC" && break
28171  done
28172fi
28173if test -z "$PROPER_COMPILER_CC"; then
28174  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28175  for ac_prog in $TOOLCHAIN_CC_BINARY
28176do
28177  # Extract the first word of "$ac_prog", so it can be a program name with args.
28178set dummy $ac_prog; ac_word=$2
28179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28180$as_echo_n "checking for $ac_word... " >&6; }
28181if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28182  $as_echo_n "(cached) " >&6
28183else
28184  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28185  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28186else
28187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28188for as_dir in $PATH
28189do
28190  IFS=$as_save_IFS
28191  test -z "$as_dir" && as_dir=.
28192    for ac_exec_ext in '' $ac_executable_extensions; do
28193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28194    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28196    break 2
28197  fi
28198done
28199  done
28200IFS=$as_save_IFS
28201
28202fi
28203fi
28204ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28205if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28207$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28208else
28209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28210$as_echo "no" >&6; }
28211fi
28212
28213
28214  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28215done
28216
28217  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28218    PROPER_COMPILER_CC=""
28219  else
28220    case $cross_compiling:$ac_tool_warned in
28221yes:)
28222{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28223$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28224ac_tool_warned=yes ;;
28225esac
28226    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28227  fi
28228fi
28229
28230
28231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28232
28233  # First separate the path from the arguments. This will split at the first
28234  # space.
28235  complete="$PROPER_COMPILER_CC"
28236  path="${complete%% *}"
28237  tmp="$complete EOL"
28238  arguments="${tmp#* }"
28239
28240  # Input might be given as Windows format, start by converting to
28241  # unix format.
28242  new_path=`$CYGPATH -u "$path"`
28243
28244  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
28255    # The splitting of arguments from the executable at a space might have been incorrect,
28256    # since paths with space are more likely in Windows. Give it another try with the whole
28257    # argument.
28258    path="$complete"
28259    arguments="EOL"
28260    new_path=`$CYGPATH -u "$path"`
28261    new_path=`$WHICH "$new_path" 2> /dev/null`
28262    # bat and cmd files are not always considered executable in cygwin causing which
28263    # to not find them
28264    if test "x$new_path" = x \
28265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28267      new_path=`$CYGPATH -u "$path"`
28268    fi
28269    if test "x$new_path" = x; then
28270      # It's still not found. Now this is an unrecoverable error.
28271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28272$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28273      has_space=`$ECHO "$complete" | $GREP " "`
28274      if test "x$has_space" != x; then
28275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28277      fi
28278      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28279    fi
28280  fi
28281
28282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28285  # "foo.exe" is OK but "foo" is an error.
28286  #
28287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28288  # It is also a way to make sure we got the proper file name for the real test later on.
28289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28290  if test "x$test_shortpath" = x; then
28291    # Short path failed, file does not exist as specified.
28292    # Try adding .exe or .cmd
28293    if test -f "${new_path}.exe"; then
28294      input_to_shortpath="${new_path}.exe"
28295    elif test -f "${new_path}.cmd"; then
28296      input_to_shortpath="${new_path}.cmd"
28297    else
28298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28299$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28302      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28303    fi
28304  else
28305    input_to_shortpath="$new_path"
28306  fi
28307
28308  # Call helper function which possibly converts this using DOS-style short mode.
28309  # If so, the updated path is stored in $new_path.
28310  new_path="$input_to_shortpath"
28311
28312  input_path="$input_to_shortpath"
28313  # Check if we need to convert this using DOS-style short mode. If the path
28314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28315  # take no chances and rewrite it.
28316  # Note: m4 eats our [], so we need to use [ and ] instead.
28317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28318  if test "x$has_forbidden_chars" != x; then
28319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28323      # Going to short mode and back again did indeed matter. Since short mode is
28324      # case insensitive, let's make it lowercase to improve readability.
28325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28326      # Now convert it back to Unix-stile (cygpath)
28327      input_path=`$CYGPATH -u "$shortmode_path"`
28328      new_path="$input_path"
28329    fi
28330  fi
28331
28332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28333  if test "x$test_cygdrive_prefix" = x; then
28334    # As a simple fix, exclude /usr/bin since it's not a real path.
28335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28337      # a path prefixed by /cygdrive for fixpath to work.
28338      new_path="$CYGWIN_ROOT_PATH$input_path"
28339    fi
28340  fi
28341
28342  # remove trailing .exe if any
28343  new_path="${new_path/%.exe/}"
28344
28345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28346
28347  # First separate the path from the arguments. This will split at the first
28348  # space.
28349  complete="$PROPER_COMPILER_CC"
28350  path="${complete%% *}"
28351  tmp="$complete EOL"
28352  arguments="${tmp#* }"
28353
28354  # Input might be given as Windows format, start by converting to
28355  # unix format.
28356  new_path="$path"
28357
28358  windows_path="$new_path"
28359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28360    unix_path=`$CYGPATH -u "$windows_path"`
28361    new_path="$unix_path"
28362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28364    new_path="$unix_path"
28365  fi
28366
28367
28368  # Now try to locate executable using which
28369  new_path=`$WHICH "$new_path" 2> /dev/null`
28370
28371  if test "x$new_path" = x; then
28372    # Oops. Which didn't find the executable.
28373    # The splitting of arguments from the executable at a space might have been incorrect,
28374    # since paths with space are more likely in Windows. Give it another try with the whole
28375    # argument.
28376    path="$complete"
28377    arguments="EOL"
28378    new_path="$path"
28379
28380  windows_path="$new_path"
28381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28382    unix_path=`$CYGPATH -u "$windows_path"`
28383    new_path="$unix_path"
28384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28386    new_path="$unix_path"
28387  fi
28388
28389
28390    new_path=`$WHICH "$new_path" 2> /dev/null`
28391    # bat and cmd files are not always considered executable in MSYS causing which
28392    # to not find them
28393    if test "x$new_path" = x \
28394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28396      new_path="$path"
28397
28398  windows_path="$new_path"
28399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28400    unix_path=`$CYGPATH -u "$windows_path"`
28401    new_path="$unix_path"
28402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28404    new_path="$unix_path"
28405  fi
28406
28407    fi
28408
28409    if test "x$new_path" = x; then
28410      # It's still not found. Now this is an unrecoverable error.
28411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28412$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28413      has_space=`$ECHO "$complete" | $GREP " "`
28414      if test "x$has_space" != x; then
28415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28417      fi
28418      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28419    fi
28420  fi
28421
28422  # Now new_path has a complete unix path to the binary
28423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28424    # Keep paths in /bin as-is, but remove trailing .exe if any
28425    new_path="${new_path/%.exe/}"
28426    # Do not save /bin paths to all_fixpath_prefixes!
28427  else
28428    # Not in mixed or Windows style, start by that.
28429    new_path=`cmd //c echo $new_path`
28430
28431  input_path="$new_path"
28432  # Check if we need to convert this using DOS-style short mode. If the path
28433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28434  # take no chances and rewrite it.
28435  # Note: m4 eats our [], so we need to use [ and ] instead.
28436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28437  if test "x$has_forbidden_chars" != x; then
28438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28440  fi
28441
28442    # Output is in $new_path
28443
28444  windows_path="$new_path"
28445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28446    unix_path=`$CYGPATH -u "$windows_path"`
28447    new_path="$unix_path"
28448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28450    new_path="$unix_path"
28451  fi
28452
28453    # remove trailing .exe if any
28454    new_path="${new_path/%.exe/}"
28455
28456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28458  fi
28459
28460  else
28461    # We're on a unix platform. Hooray! :)
28462    # First separate the path from the arguments. This will split at the first
28463    # space.
28464    complete="$PROPER_COMPILER_CC"
28465    path="${complete%% *}"
28466    tmp="$complete EOL"
28467    arguments="${tmp#* }"
28468
28469    # Cannot rely on the command "which" here since it doesn't always work.
28470    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28471    if test -z "$is_absolute_path"; then
28472      # Path to executable is not absolute. Find it.
28473      IFS_save="$IFS"
28474      IFS=:
28475      for p in $PATH; do
28476        if test -f "$p/$path" && test -x "$p/$path"; then
28477          new_path="$p/$path"
28478          break
28479        fi
28480      done
28481      IFS="$IFS_save"
28482    else
28483      # This is an absolute path, we can use it without further modifications.
28484      new_path="$path"
28485    fi
28486
28487    if test "x$new_path" = x; then
28488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28489$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28490      has_space=`$ECHO "$complete" | $GREP " "`
28491      if test "x$has_space" != x; then
28492        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28494      fi
28495      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28496    fi
28497  fi
28498
28499  # Now join together the path and the arguments once again
28500  if test "x$arguments" != xEOL; then
28501    new_complete="$new_path ${arguments% *}"
28502  else
28503    new_complete="$new_path"
28504  fi
28505
28506  if test "x$complete" != "x$new_complete"; then
28507    PROPER_COMPILER_CC="$new_complete"
28508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28509$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28510  fi
28511
28512    PATH="$RETRY_COMPILER_SAVED_PATH"
28513
28514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28515$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28516
28517  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28518    # Follow a chain of symbolic links. Use readlink
28519    # where it exists, else fall back to horribly
28520    # complicated shell code.
28521    if test "x$READLINK_TESTED" != yes; then
28522      # On MacOSX there is a readlink tool with a different
28523      # purpose than the GNU readlink tool. Check the found readlink.
28524      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28525      if test "x$ISGNU" = x; then
28526        # A readlink that we do not know how to use.
28527        # Are there other non-GNU readlinks out there?
28528        READLINK_TESTED=yes
28529        READLINK=
28530      fi
28531    fi
28532
28533    if test "x$READLINK" != x; then
28534      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28535    else
28536      # Save the current directory for restoring afterwards
28537      STARTDIR=$PWD
28538      COUNTER=0
28539      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28540      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28541      cd $sym_link_dir
28542      # Use -P flag to resolve symlinks in directories.
28543      cd `$THEPWDCMD -P`
28544      sym_link_dir=`$THEPWDCMD -P`
28545      # Resolve file symlinks
28546      while test $COUNTER -lt 20; do
28547        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28548        if test "x$ISLINK" == x; then
28549          # This is not a symbolic link! We are done!
28550          break
28551        fi
28552        # Again resolve directory symlinks since the target of the just found
28553        # link could be in a different directory
28554        cd `$DIRNAME $ISLINK`
28555        sym_link_dir=`$THEPWDCMD -P`
28556        sym_link_file=`$BASENAME $ISLINK`
28557        let COUNTER=COUNTER+1
28558      done
28559      cd $STARTDIR
28560      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28561    fi
28562  fi
28563
28564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28565$as_echo "$PROPER_COMPILER_CC" >&6; }
28566    CC="$PROPER_COMPILER_CC"
28567  else
28568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28569$as_echo "no, keeping CC" >&6; }
28570  fi
28571
28572
28573  COMPILER=$CC
28574  COMPILER_NAME=$COMPILER_NAME
28575
28576  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28577    # cc -V output typically looks like
28578    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28579    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28580    # Check that this is likely to be the Solaris Studio cc.
28581    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28582    if test $? -ne 0; then
28583      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28584      { $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
28585$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28586      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28587$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28588      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28589$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28590      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28591    fi
28592    # Remove usage instructions (if present), and
28593    # collapse compiler output into a single line
28594    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28595        $SED -e 's/ *[Uu]sage:.*//'`
28596    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28597        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28598  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28599    # xlc -qversion output typically looks like
28600    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28601    #     Version: 11.01.0000.0015
28602    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28603    # Check that this is likely to be the IBM XL C compiler.
28604    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28605    if test $? -ne 0; then
28606      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28607      { $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
28608$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28609      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28610$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28611      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28612$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28613      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28614    fi
28615    # Collapse compiler output into a single line
28616    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28617    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28618        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28619  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28620    # There is no specific version flag, but all output starts with a version string.
28621    # First line typically looks something like:
28622    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28623    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28624    # Check that this is likely to be Microsoft CL.EXE.
28625    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28626    if test $? -ne 0; then
28627      { $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
28628$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28629      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28630$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28631      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28632    fi
28633    # Collapse compiler output into a single line
28634    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28635    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28636        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28637  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28638    # gcc --version output typically looks like
28639    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28640    #     Copyright (C) 2013 Free Software Foundation, Inc.
28641    #     This is free software; see the source for copying conditions.  There is NO
28642    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28643    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28644    # Check that this is likely to be GCC.
28645    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28646    if test $? -ne 0; then
28647      { $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
28648$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28649      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28650$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28651      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28652    fi
28653    # Remove Copyright and legalese from version string, and
28654    # collapse into a single line
28655    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28656        $SED -e 's/ *Copyright .*//'`
28657    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28658        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28659  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28660    # clang --version output typically looks like
28661    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28662    #    clang version 3.3 (tags/RELEASE_33/final)
28663    # or
28664    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28665    #    Target: x86_64-pc-linux-gnu
28666    #    Thread model: posix
28667    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28668    # Check that this is likely to be clang
28669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28670    if test $? -ne 0; then
28671      { $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
28672$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28673      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28674$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28675      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28676    fi
28677    # Collapse compiler output into a single line
28678    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28679    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28680        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28681  else
28682      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28683  fi
28684  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28685  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28686  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28687  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28688
28689  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28690$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28691
28692
28693  # Now that we have resolved CC ourself, let autoconf have its go at it
28694  ac_ext=c
28695ac_cpp='$CPP $CPPFLAGS'
28696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28698ac_compiler_gnu=$ac_cv_c_compiler_gnu
28699if test -n "$ac_tool_prefix"; then
28700  for ac_prog in $CC
28701  do
28702    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28705$as_echo_n "checking for $ac_word... " >&6; }
28706if ${ac_cv_prog_CC+:} false; then :
28707  $as_echo_n "(cached) " >&6
28708else
28709  if test -n "$CC"; then
28710  ac_cv_prog_CC="$CC" # Let the user override the test.
28711else
28712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28713for as_dir in $PATH
28714do
28715  IFS=$as_save_IFS
28716  test -z "$as_dir" && as_dir=.
28717    for ac_exec_ext in '' $ac_executable_extensions; do
28718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28719    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28721    break 2
28722  fi
28723done
28724  done
28725IFS=$as_save_IFS
28726
28727fi
28728fi
28729CC=$ac_cv_prog_CC
28730if test -n "$CC"; then
28731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28732$as_echo "$CC" >&6; }
28733else
28734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28735$as_echo "no" >&6; }
28736fi
28737
28738
28739    test -n "$CC" && break
28740  done
28741fi
28742if test -z "$CC"; then
28743  ac_ct_CC=$CC
28744  for ac_prog in $CC
28745do
28746  # Extract the first word of "$ac_prog", so it can be a program name with args.
28747set dummy $ac_prog; ac_word=$2
28748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28749$as_echo_n "checking for $ac_word... " >&6; }
28750if ${ac_cv_prog_ac_ct_CC+:} false; then :
28751  $as_echo_n "(cached) " >&6
28752else
28753  if test -n "$ac_ct_CC"; then
28754  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28755else
28756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28757for as_dir in $PATH
28758do
28759  IFS=$as_save_IFS
28760  test -z "$as_dir" && as_dir=.
28761    for ac_exec_ext in '' $ac_executable_extensions; do
28762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28763    ac_cv_prog_ac_ct_CC="$ac_prog"
28764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28765    break 2
28766  fi
28767done
28768  done
28769IFS=$as_save_IFS
28770
28771fi
28772fi
28773ac_ct_CC=$ac_cv_prog_ac_ct_CC
28774if test -n "$ac_ct_CC"; then
28775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28776$as_echo "$ac_ct_CC" >&6; }
28777else
28778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28779$as_echo "no" >&6; }
28780fi
28781
28782
28783  test -n "$ac_ct_CC" && break
28784done
28785
28786  if test "x$ac_ct_CC" = x; then
28787    CC=""
28788  else
28789    case $cross_compiling:$ac_tool_warned in
28790yes:)
28791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28793ac_tool_warned=yes ;;
28794esac
28795    CC=$ac_ct_CC
28796  fi
28797fi
28798
28799
28800test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28802as_fn_error $? "no acceptable C compiler found in \$PATH
28803See \`config.log' for more details" "$LINENO" 5; }
28804
28805# Provide some information about the compiler.
28806$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28807set X $ac_compile
28808ac_compiler=$2
28809for ac_option in --version -v -V -qversion; do
28810  { { ac_try="$ac_compiler $ac_option >&5"
28811case "(($ac_try" in
28812  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28813  *) ac_try_echo=$ac_try;;
28814esac
28815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28816$as_echo "$ac_try_echo"; } >&5
28817  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28818  ac_status=$?
28819  if test -s conftest.err; then
28820    sed '10a\
28821... rest of stderr output deleted ...
28822         10q' conftest.err >conftest.er1
28823    cat conftest.er1 >&5
28824  fi
28825  rm -f conftest.er1 conftest.err
28826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28827  test $ac_status = 0; }
28828done
28829
28830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28831/* end confdefs.h.  */
28832
28833int
28834main ()
28835{
28836
28837  ;
28838  return 0;
28839}
28840_ACEOF
28841ac_clean_files_save=$ac_clean_files
28842ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28843# Try to create an executable without -o first, disregard a.out.
28844# It will help us diagnose broken compilers, and finding out an intuition
28845# of exeext.
28846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28847$as_echo_n "checking whether the C compiler works... " >&6; }
28848ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28849
28850# The possible output files:
28851ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28852
28853ac_rmfiles=
28854for ac_file in $ac_files
28855do
28856  case $ac_file in
28857    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28858    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28859  esac
28860done
28861rm -f $ac_rmfiles
28862
28863if { { ac_try="$ac_link_default"
28864case "(($ac_try" in
28865  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28866  *) ac_try_echo=$ac_try;;
28867esac
28868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28869$as_echo "$ac_try_echo"; } >&5
28870  (eval "$ac_link_default") 2>&5
28871  ac_status=$?
28872  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28873  test $ac_status = 0; }; then :
28874  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28875# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28876# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28877# so that the user can short-circuit this test for compilers unknown to
28878# Autoconf.
28879for ac_file in $ac_files ''
28880do
28881  test -f "$ac_file" || continue
28882  case $ac_file in
28883    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28884	;;
28885    [ab].out )
28886	# We found the default executable, but exeext='' is most
28887	# certainly right.
28888	break;;
28889    *.* )
28890	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28891	then :; else
28892	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28893	fi
28894	# We set ac_cv_exeext here because the later test for it is not
28895	# safe: cross compilers may not add the suffix if given an `-o'
28896	# argument, so we may need to know it at that point already.
28897	# Even if this section looks crufty: it has the advantage of
28898	# actually working.
28899	break;;
28900    * )
28901	break;;
28902  esac
28903done
28904test "$ac_cv_exeext" = no && ac_cv_exeext=
28905
28906else
28907  ac_file=''
28908fi
28909if test -z "$ac_file"; then :
28910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28911$as_echo "no" >&6; }
28912$as_echo "$as_me: failed program was:" >&5
28913sed 's/^/| /' conftest.$ac_ext >&5
28914
28915{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28917as_fn_error 77 "C compiler cannot create executables
28918See \`config.log' for more details" "$LINENO" 5; }
28919else
28920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28921$as_echo "yes" >&6; }
28922fi
28923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28924$as_echo_n "checking for C compiler default output file name... " >&6; }
28925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28926$as_echo "$ac_file" >&6; }
28927ac_exeext=$ac_cv_exeext
28928
28929rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28930ac_clean_files=$ac_clean_files_save
28931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28932$as_echo_n "checking for suffix of executables... " >&6; }
28933if { { ac_try="$ac_link"
28934case "(($ac_try" in
28935  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28936  *) ac_try_echo=$ac_try;;
28937esac
28938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28939$as_echo "$ac_try_echo"; } >&5
28940  (eval "$ac_link") 2>&5
28941  ac_status=$?
28942  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28943  test $ac_status = 0; }; then :
28944  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28945# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28946# work properly (i.e., refer to `conftest.exe'), while it won't with
28947# `rm'.
28948for ac_file in conftest.exe conftest conftest.*; do
28949  test -f "$ac_file" || continue
28950  case $ac_file in
28951    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28952    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28953	  break;;
28954    * ) break;;
28955  esac
28956done
28957else
28958  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28960as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28961See \`config.log' for more details" "$LINENO" 5; }
28962fi
28963rm -f conftest conftest$ac_cv_exeext
28964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28965$as_echo "$ac_cv_exeext" >&6; }
28966
28967rm -f conftest.$ac_ext
28968EXEEXT=$ac_cv_exeext
28969ac_exeext=$EXEEXT
28970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28971/* end confdefs.h.  */
28972#include <stdio.h>
28973int
28974main ()
28975{
28976FILE *f = fopen ("conftest.out", "w");
28977 return ferror (f) || fclose (f) != 0;
28978
28979  ;
28980  return 0;
28981}
28982_ACEOF
28983ac_clean_files="$ac_clean_files conftest.out"
28984# Check that the compiler produces executables we can run.  If not, either
28985# the compiler is broken, or we cross compile.
28986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28987$as_echo_n "checking whether we are cross compiling... " >&6; }
28988if test "$cross_compiling" != yes; then
28989  { { ac_try="$ac_link"
28990case "(($ac_try" in
28991  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28992  *) ac_try_echo=$ac_try;;
28993esac
28994eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28995$as_echo "$ac_try_echo"; } >&5
28996  (eval "$ac_link") 2>&5
28997  ac_status=$?
28998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28999  test $ac_status = 0; }
29000  if { ac_try='./conftest$ac_cv_exeext'
29001  { { case "(($ac_try" in
29002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29003  *) ac_try_echo=$ac_try;;
29004esac
29005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29006$as_echo "$ac_try_echo"; } >&5
29007  (eval "$ac_try") 2>&5
29008  ac_status=$?
29009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29010  test $ac_status = 0; }; }; then
29011    cross_compiling=no
29012  else
29013    if test "$cross_compiling" = maybe; then
29014	cross_compiling=yes
29015    else
29016	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29018as_fn_error $? "cannot run C compiled programs.
29019If you meant to cross compile, use \`--host'.
29020See \`config.log' for more details" "$LINENO" 5; }
29021    fi
29022  fi
29023fi
29024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29025$as_echo "$cross_compiling" >&6; }
29026
29027rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29028ac_clean_files=$ac_clean_files_save
29029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29030$as_echo_n "checking for suffix of object files... " >&6; }
29031if ${ac_cv_objext+:} false; then :
29032  $as_echo_n "(cached) " >&6
29033else
29034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29035/* end confdefs.h.  */
29036
29037int
29038main ()
29039{
29040
29041  ;
29042  return 0;
29043}
29044_ACEOF
29045rm -f conftest.o conftest.obj
29046if { { ac_try="$ac_compile"
29047case "(($ac_try" in
29048  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29049  *) ac_try_echo=$ac_try;;
29050esac
29051eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29052$as_echo "$ac_try_echo"; } >&5
29053  (eval "$ac_compile") 2>&5
29054  ac_status=$?
29055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29056  test $ac_status = 0; }; then :
29057  for ac_file in conftest.o conftest.obj conftest.*; do
29058  test -f "$ac_file" || continue;
29059  case $ac_file in
29060    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29061    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29062       break;;
29063  esac
29064done
29065else
29066  $as_echo "$as_me: failed program was:" >&5
29067sed 's/^/| /' conftest.$ac_ext >&5
29068
29069{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29071as_fn_error $? "cannot compute suffix of object files: cannot compile
29072See \`config.log' for more details" "$LINENO" 5; }
29073fi
29074rm -f conftest.$ac_cv_objext conftest.$ac_ext
29075fi
29076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29077$as_echo "$ac_cv_objext" >&6; }
29078OBJEXT=$ac_cv_objext
29079ac_objext=$OBJEXT
29080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29081$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29082if ${ac_cv_c_compiler_gnu+:} false; then :
29083  $as_echo_n "(cached) " >&6
29084else
29085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29086/* end confdefs.h.  */
29087
29088int
29089main ()
29090{
29091#ifndef __GNUC__
29092       choke me
29093#endif
29094
29095  ;
29096  return 0;
29097}
29098_ACEOF
29099if ac_fn_c_try_compile "$LINENO"; then :
29100  ac_compiler_gnu=yes
29101else
29102  ac_compiler_gnu=no
29103fi
29104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29105ac_cv_c_compiler_gnu=$ac_compiler_gnu
29106
29107fi
29108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29109$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29110if test $ac_compiler_gnu = yes; then
29111  GCC=yes
29112else
29113  GCC=
29114fi
29115ac_test_CFLAGS=${CFLAGS+set}
29116ac_save_CFLAGS=$CFLAGS
29117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29118$as_echo_n "checking whether $CC accepts -g... " >&6; }
29119if ${ac_cv_prog_cc_g+:} false; then :
29120  $as_echo_n "(cached) " >&6
29121else
29122  ac_save_c_werror_flag=$ac_c_werror_flag
29123   ac_c_werror_flag=yes
29124   ac_cv_prog_cc_g=no
29125   CFLAGS="-g"
29126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29127/* end confdefs.h.  */
29128
29129int
29130main ()
29131{
29132
29133  ;
29134  return 0;
29135}
29136_ACEOF
29137if ac_fn_c_try_compile "$LINENO"; then :
29138  ac_cv_prog_cc_g=yes
29139else
29140  CFLAGS=""
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
29154else
29155  ac_c_werror_flag=$ac_save_c_werror_flag
29156	 CFLAGS="-g"
29157	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29158/* end confdefs.h.  */
29159
29160int
29161main ()
29162{
29163
29164  ;
29165  return 0;
29166}
29167_ACEOF
29168if ac_fn_c_try_compile "$LINENO"; then :
29169  ac_cv_prog_cc_g=yes
29170fi
29171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29172fi
29173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29174fi
29175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29176   ac_c_werror_flag=$ac_save_c_werror_flag
29177fi
29178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29179$as_echo "$ac_cv_prog_cc_g" >&6; }
29180if test "$ac_test_CFLAGS" = set; then
29181  CFLAGS=$ac_save_CFLAGS
29182elif test $ac_cv_prog_cc_g = yes; then
29183  if test "$GCC" = yes; then
29184    CFLAGS="-g -O2"
29185  else
29186    CFLAGS="-g"
29187  fi
29188else
29189  if test "$GCC" = yes; then
29190    CFLAGS="-O2"
29191  else
29192    CFLAGS=
29193  fi
29194fi
29195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29196$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29197if ${ac_cv_prog_cc_c89+:} false; then :
29198  $as_echo_n "(cached) " >&6
29199else
29200  ac_cv_prog_cc_c89=no
29201ac_save_CC=$CC
29202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29203/* end confdefs.h.  */
29204#include <stdarg.h>
29205#include <stdio.h>
29206struct stat;
29207/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29208struct buf { int x; };
29209FILE * (*rcsopen) (struct buf *, struct stat *, int);
29210static char *e (p, i)
29211     char **p;
29212     int i;
29213{
29214  return p[i];
29215}
29216static char *f (char * (*g) (char **, int), char **p, ...)
29217{
29218  char *s;
29219  va_list v;
29220  va_start (v,p);
29221  s = g (p, va_arg (v,int));
29222  va_end (v);
29223  return s;
29224}
29225
29226/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29227   function prototypes and stuff, but not '\xHH' hex character constants.
29228   These don't provoke an error unfortunately, instead are silently treated
29229   as 'x'.  The following induces an error, until -std is added to get
29230   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29231   array size at least.  It's necessary to write '\x00'==0 to get something
29232   that's true only with -std.  */
29233int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29234
29235/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29236   inside strings and character constants.  */
29237#define FOO(x) 'x'
29238int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29239
29240int test (int i, double x);
29241struct s1 {int (*f) (int a);};
29242struct s2 {int (*f) (double a);};
29243int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29244int argc;
29245char **argv;
29246int
29247main ()
29248{
29249return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29250  ;
29251  return 0;
29252}
29253_ACEOF
29254for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29255	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29256do
29257  CC="$ac_save_CC $ac_arg"
29258  if ac_fn_c_try_compile "$LINENO"; then :
29259  ac_cv_prog_cc_c89=$ac_arg
29260fi
29261rm -f core conftest.err conftest.$ac_objext
29262  test "x$ac_cv_prog_cc_c89" != "xno" && break
29263done
29264rm -f conftest.$ac_ext
29265CC=$ac_save_CC
29266
29267fi
29268# AC_CACHE_VAL
29269case "x$ac_cv_prog_cc_c89" in
29270  x)
29271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29272$as_echo "none needed" >&6; } ;;
29273  xno)
29274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29275$as_echo "unsupported" >&6; } ;;
29276  *)
29277    CC="$CC $ac_cv_prog_cc_c89"
29278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29279$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29280esac
29281if test "x$ac_cv_prog_cc_c89" != xno; then :
29282
29283fi
29284
29285ac_ext=cpp
29286ac_cpp='$CXXCPP $CPPFLAGS'
29287ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29288ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29289ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29290
29291
29292
29293  COMPILER_NAME=C++
29294  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29295
29296  if test "x$CXX" != x; then
29297    # User has supplied compiler name already, always let that override.
29298    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29299$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29300    if test "x`basename $CXX`" = "x$CXX"; then
29301      # A command without a complete path is provided, search $PATH.
29302
29303      for ac_prog in $CXX
29304do
29305  # Extract the first word of "$ac_prog", so it can be a program name with args.
29306set dummy $ac_prog; ac_word=$2
29307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29308$as_echo_n "checking for $ac_word... " >&6; }
29309if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29310  $as_echo_n "(cached) " >&6
29311else
29312  case $POTENTIAL_CXX in
29313  [\\/]* | ?:[\\/]*)
29314  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29315  ;;
29316  *)
29317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29318for as_dir in $PATH
29319do
29320  IFS=$as_save_IFS
29321  test -z "$as_dir" && as_dir=.
29322    for ac_exec_ext in '' $ac_executable_extensions; do
29323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29324    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29326    break 2
29327  fi
29328done
29329  done
29330IFS=$as_save_IFS
29331
29332  ;;
29333esac
29334fi
29335POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29336if test -n "$POTENTIAL_CXX"; then
29337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29338$as_echo "$POTENTIAL_CXX" >&6; }
29339else
29340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29341$as_echo "no" >&6; }
29342fi
29343
29344
29345  test -n "$POTENTIAL_CXX" && break
29346done
29347
29348      if test "x$POTENTIAL_CXX" != x; then
29349        CXX=$POTENTIAL_CXX
29350      else
29351        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29352      fi
29353    else
29354      # Otherwise it might already be a complete path
29355      if test ! -x "$CXX"; then
29356        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29357      fi
29358    fi
29359  else
29360    # No user supplied value. Locate compiler ourselves.
29361
29362    # If we are cross compiling, assume cross compilation tools follows the
29363    # cross compilation standard where they are prefixed with the autoconf
29364    # standard name for the target. For example the binary
29365    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29366    # If we are not cross compiling, then the default compiler name will be
29367    # used.
29368
29369    CXX=
29370    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29371    # before checking the rest of the PATH.
29372    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29373    # step, this should not be necessary.
29374    if test -n "$TOOLCHAIN_PATH"; then
29375      PATH_save="$PATH"
29376      PATH="$TOOLCHAIN_PATH"
29377      for ac_prog in $SEARCH_LIST
29378do
29379  # Extract the first word of "$ac_prog", so it can be a program name with args.
29380set dummy $ac_prog; ac_word=$2
29381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29382$as_echo_n "checking for $ac_word... " >&6; }
29383if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29384  $as_echo_n "(cached) " >&6
29385else
29386  case $TOOLCHAIN_PATH_CXX in
29387  [\\/]* | ?:[\\/]*)
29388  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29389  ;;
29390  *)
29391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29392for as_dir in $PATH
29393do
29394  IFS=$as_save_IFS
29395  test -z "$as_dir" && as_dir=.
29396    for ac_exec_ext in '' $ac_executable_extensions; do
29397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29398    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29400    break 2
29401  fi
29402done
29403  done
29404IFS=$as_save_IFS
29405
29406  ;;
29407esac
29408fi
29409TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29410if test -n "$TOOLCHAIN_PATH_CXX"; then
29411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29412$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29413else
29414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29415$as_echo "no" >&6; }
29416fi
29417
29418
29419  test -n "$TOOLCHAIN_PATH_CXX" && break
29420done
29421
29422      CXX=$TOOLCHAIN_PATH_CXX
29423      PATH="$PATH_save"
29424    fi
29425
29426    # AC_PATH_PROGS can't be run multiple times with the same variable,
29427    # so create a new name for this run.
29428    if test "x$CXX" = x; then
29429      for ac_prog in $SEARCH_LIST
29430do
29431  # Extract the first word of "$ac_prog", so it can be a program name with args.
29432set dummy $ac_prog; ac_word=$2
29433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29434$as_echo_n "checking for $ac_word... " >&6; }
29435if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29436  $as_echo_n "(cached) " >&6
29437else
29438  case $POTENTIAL_CXX in
29439  [\\/]* | ?:[\\/]*)
29440  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29441  ;;
29442  *)
29443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29444for as_dir in $PATH
29445do
29446  IFS=$as_save_IFS
29447  test -z "$as_dir" && as_dir=.
29448    for ac_exec_ext in '' $ac_executable_extensions; do
29449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29450    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29452    break 2
29453  fi
29454done
29455  done
29456IFS=$as_save_IFS
29457
29458  ;;
29459esac
29460fi
29461POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29462if test -n "$POTENTIAL_CXX"; then
29463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29464$as_echo "$POTENTIAL_CXX" >&6; }
29465else
29466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29467$as_echo "no" >&6; }
29468fi
29469
29470
29471  test -n "$POTENTIAL_CXX" && break
29472done
29473
29474      CXX=$POTENTIAL_CXX
29475    fi
29476
29477    if test "x$CXX" = x; then
29478
29479  # Print a helpful message on how to acquire the necessary build dependency.
29480  # devkit is the help tag: freetype, cups, pulse, alsa etc
29481  MISSING_DEPENDENCY=devkit
29482
29483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29484    cygwin_help $MISSING_DEPENDENCY
29485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29486    msys_help $MISSING_DEPENDENCY
29487  else
29488    PKGHANDLER_COMMAND=
29489
29490    case $PKGHANDLER in
29491      apt-get)
29492        apt_help     $MISSING_DEPENDENCY ;;
29493      yum)
29494        yum_help     $MISSING_DEPENDENCY ;;
29495      port)
29496        port_help    $MISSING_DEPENDENCY ;;
29497      pkgutil)
29498        pkgutil_help $MISSING_DEPENDENCY ;;
29499      pkgadd)
29500        pkgadd_help  $MISSING_DEPENDENCY ;;
29501    esac
29502
29503    if test "x$PKGHANDLER_COMMAND" != x; then
29504      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29505    fi
29506  fi
29507
29508      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29509    fi
29510  fi
29511
29512  # Now we have a compiler binary in CXX. Make sure it's okay.
29513
29514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29515
29516  # First separate the path from the arguments. This will split at the first
29517  # space.
29518  complete="$CXX"
29519  path="${complete%% *}"
29520  tmp="$complete EOL"
29521  arguments="${tmp#* }"
29522
29523  # Input might be given as Windows format, start by converting to
29524  # unix format.
29525  new_path=`$CYGPATH -u "$path"`
29526
29527  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
29538    # The splitting of arguments from the executable at a space might have been incorrect,
29539    # since paths with space are more likely in Windows. Give it another try with the whole
29540    # argument.
29541    path="$complete"
29542    arguments="EOL"
29543    new_path=`$CYGPATH -u "$path"`
29544    new_path=`$WHICH "$new_path" 2> /dev/null`
29545    # bat and cmd files are not always considered executable in cygwin causing which
29546    # to not find them
29547    if test "x$new_path" = x \
29548        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29549        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29550      new_path=`$CYGPATH -u "$path"`
29551    fi
29552    if test "x$new_path" = x; then
29553      # It's still not found. Now this is an unrecoverable error.
29554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29555$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29556      has_space=`$ECHO "$complete" | $GREP " "`
29557      if test "x$has_space" != x; then
29558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29560      fi
29561      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29562    fi
29563  fi
29564
29565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29568  # "foo.exe" is OK but "foo" is an error.
29569  #
29570  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29571  # It is also a way to make sure we got the proper file name for the real test later on.
29572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29573  if test "x$test_shortpath" = x; then
29574    # Short path failed, file does not exist as specified.
29575    # Try adding .exe or .cmd
29576    if test -f "${new_path}.exe"; then
29577      input_to_shortpath="${new_path}.exe"
29578    elif test -f "${new_path}.cmd"; then
29579      input_to_shortpath="${new_path}.cmd"
29580    else
29581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29582$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29583      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29584$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29585      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29586    fi
29587  else
29588    input_to_shortpath="$new_path"
29589  fi
29590
29591  # Call helper function which possibly converts this using DOS-style short mode.
29592  # If so, the updated path is stored in $new_path.
29593  new_path="$input_to_shortpath"
29594
29595  input_path="$input_to_shortpath"
29596  # Check if we need to convert this using DOS-style short mode. If the path
29597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29598  # take no chances and rewrite it.
29599  # Note: m4 eats our [], so we need to use [ and ] instead.
29600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29601  if test "x$has_forbidden_chars" != x; then
29602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29606      # Going to short mode and back again did indeed matter. Since short mode is
29607      # case insensitive, let's make it lowercase to improve readability.
29608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29609      # Now convert it back to Unix-stile (cygpath)
29610      input_path=`$CYGPATH -u "$shortmode_path"`
29611      new_path="$input_path"
29612    fi
29613  fi
29614
29615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29616  if test "x$test_cygdrive_prefix" = x; then
29617    # As a simple fix, exclude /usr/bin since it's not a real path.
29618    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29620      # a path prefixed by /cygdrive for fixpath to work.
29621      new_path="$CYGWIN_ROOT_PATH$input_path"
29622    fi
29623  fi
29624
29625  # remove trailing .exe if any
29626  new_path="${new_path/%.exe/}"
29627
29628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29629
29630  # First separate the path from the arguments. This will split at the first
29631  # space.
29632  complete="$CXX"
29633  path="${complete%% *}"
29634  tmp="$complete EOL"
29635  arguments="${tmp#* }"
29636
29637  # Input might be given as Windows format, start by converting to
29638  # unix format.
29639  new_path="$path"
29640
29641  windows_path="$new_path"
29642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29643    unix_path=`$CYGPATH -u "$windows_path"`
29644    new_path="$unix_path"
29645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29647    new_path="$unix_path"
29648  fi
29649
29650
29651  # Now try to locate executable using which
29652  new_path=`$WHICH "$new_path" 2> /dev/null`
29653
29654  if test "x$new_path" = x; then
29655    # Oops. Which didn't find the executable.
29656    # The splitting of arguments from the executable at a space might have been incorrect,
29657    # since paths with space are more likely in Windows. Give it another try with the whole
29658    # argument.
29659    path="$complete"
29660    arguments="EOL"
29661    new_path="$path"
29662
29663  windows_path="$new_path"
29664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29665    unix_path=`$CYGPATH -u "$windows_path"`
29666    new_path="$unix_path"
29667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29669    new_path="$unix_path"
29670  fi
29671
29672
29673    new_path=`$WHICH "$new_path" 2> /dev/null`
29674    # bat and cmd files are not always considered executable in MSYS causing which
29675    # to not find them
29676    if test "x$new_path" = x \
29677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29679      new_path="$path"
29680
29681  windows_path="$new_path"
29682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29683    unix_path=`$CYGPATH -u "$windows_path"`
29684    new_path="$unix_path"
29685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29687    new_path="$unix_path"
29688  fi
29689
29690    fi
29691
29692    if test "x$new_path" = x; then
29693      # It's still not found. Now this is an unrecoverable error.
29694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29695$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29696      has_space=`$ECHO "$complete" | $GREP " "`
29697      if test "x$has_space" != x; then
29698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29700      fi
29701      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29702    fi
29703  fi
29704
29705  # Now new_path has a complete unix path to the binary
29706  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29707    # Keep paths in /bin as-is, but remove trailing .exe if any
29708    new_path="${new_path/%.exe/}"
29709    # Do not save /bin paths to all_fixpath_prefixes!
29710  else
29711    # Not in mixed or Windows style, start by that.
29712    new_path=`cmd //c echo $new_path`
29713
29714  input_path="$new_path"
29715  # Check if we need to convert this using DOS-style short mode. If the path
29716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29717  # take no chances and rewrite it.
29718  # Note: m4 eats our [], so we need to use [ and ] instead.
29719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29720  if test "x$has_forbidden_chars" != x; then
29721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29723  fi
29724
29725    # Output is in $new_path
29726
29727  windows_path="$new_path"
29728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29729    unix_path=`$CYGPATH -u "$windows_path"`
29730    new_path="$unix_path"
29731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29733    new_path="$unix_path"
29734  fi
29735
29736    # remove trailing .exe if any
29737    new_path="${new_path/%.exe/}"
29738
29739    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29740    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29741  fi
29742
29743  else
29744    # We're on a unix platform. Hooray! :)
29745    # First separate the path from the arguments. This will split at the first
29746    # space.
29747    complete="$CXX"
29748    path="${complete%% *}"
29749    tmp="$complete EOL"
29750    arguments="${tmp#* }"
29751
29752    # Cannot rely on the command "which" here since it doesn't always work.
29753    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29754    if test -z "$is_absolute_path"; then
29755      # Path to executable is not absolute. Find it.
29756      IFS_save="$IFS"
29757      IFS=:
29758      for p in $PATH; do
29759        if test -f "$p/$path" && test -x "$p/$path"; then
29760          new_path="$p/$path"
29761          break
29762        fi
29763      done
29764      IFS="$IFS_save"
29765    else
29766      # This is an absolute path, we can use it without further modifications.
29767      new_path="$path"
29768    fi
29769
29770    if test "x$new_path" = x; then
29771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29772$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29773      has_space=`$ECHO "$complete" | $GREP " "`
29774      if test "x$has_space" != x; then
29775        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29776$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29777      fi
29778      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29779    fi
29780  fi
29781
29782  # Now join together the path and the arguments once again
29783  if test "x$arguments" != xEOL; then
29784    new_complete="$new_path ${arguments% *}"
29785  else
29786    new_complete="$new_path"
29787  fi
29788
29789  if test "x$complete" != "x$new_complete"; then
29790    CXX="$new_complete"
29791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29792$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29793  fi
29794
29795  TEST_COMPILER="$CXX"
29796  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29797  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29798  if test "x$OPENJDK_BUILD_OS" != xaix; then
29799    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29801$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29802
29803  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29804    # Follow a chain of symbolic links. Use readlink
29805    # where it exists, else fall back to horribly
29806    # complicated shell code.
29807    if test "x$READLINK_TESTED" != yes; then
29808      # On MacOSX there is a readlink tool with a different
29809      # purpose than the GNU readlink tool. Check the found readlink.
29810      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29811      if test "x$ISGNU" = x; then
29812        # A readlink that we do not know how to use.
29813        # Are there other non-GNU readlinks out there?
29814        READLINK_TESTED=yes
29815        READLINK=
29816      fi
29817    fi
29818
29819    if test "x$READLINK" != x; then
29820      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29821    else
29822      # Save the current directory for restoring afterwards
29823      STARTDIR=$PWD
29824      COUNTER=0
29825      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29826      sym_link_file=`$BASENAME $TEST_COMPILER`
29827      cd $sym_link_dir
29828      # Use -P flag to resolve symlinks in directories.
29829      cd `$THEPWDCMD -P`
29830      sym_link_dir=`$THEPWDCMD -P`
29831      # Resolve file symlinks
29832      while test $COUNTER -lt 20; do
29833        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29834        if test "x$ISLINK" == x; then
29835          # This is not a symbolic link! We are done!
29836          break
29837        fi
29838        # Again resolve directory symlinks since the target of the just found
29839        # link could be in a different directory
29840        cd `$DIRNAME $ISLINK`
29841        sym_link_dir=`$THEPWDCMD -P`
29842        sym_link_file=`$BASENAME $ISLINK`
29843        let COUNTER=COUNTER+1
29844      done
29845      cd $STARTDIR
29846      TEST_COMPILER=$sym_link_dir/$sym_link_file
29847    fi
29848  fi
29849
29850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29851$as_echo "$TEST_COMPILER" >&6; }
29852  fi
29853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29854$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29855
29856  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29857  if test "x$COMPILER_BASENAME" = "xccache"; then
29858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29859$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29860    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29861    # We want to control ccache invocation ourselves, so ignore this cc and try
29862    # searching again.
29863
29864    # Remove the path to the fake ccache cc from the PATH
29865    RETRY_COMPILER_SAVED_PATH="$PATH"
29866    COMPILER_DIRNAME=`$DIRNAME $CXX`
29867    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29868
29869    # Try again looking for our compiler
29870    if test -n "$ac_tool_prefix"; then
29871  for ac_prog in $TOOLCHAIN_CXX_BINARY
29872  do
29873    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29874set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29876$as_echo_n "checking for $ac_word... " >&6; }
29877if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29878  $as_echo_n "(cached) " >&6
29879else
29880  if test -n "$PROPER_COMPILER_CXX"; then
29881  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29882else
29883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29884for as_dir in $PATH
29885do
29886  IFS=$as_save_IFS
29887  test -z "$as_dir" && as_dir=.
29888    for ac_exec_ext in '' $ac_executable_extensions; do
29889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29890    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29892    break 2
29893  fi
29894done
29895  done
29896IFS=$as_save_IFS
29897
29898fi
29899fi
29900PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29901if test -n "$PROPER_COMPILER_CXX"; then
29902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29903$as_echo "$PROPER_COMPILER_CXX" >&6; }
29904else
29905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29906$as_echo "no" >&6; }
29907fi
29908
29909
29910    test -n "$PROPER_COMPILER_CXX" && break
29911  done
29912fi
29913if test -z "$PROPER_COMPILER_CXX"; then
29914  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29915  for ac_prog in $TOOLCHAIN_CXX_BINARY
29916do
29917  # Extract the first word of "$ac_prog", so it can be a program name with args.
29918set dummy $ac_prog; ac_word=$2
29919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29920$as_echo_n "checking for $ac_word... " >&6; }
29921if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29922  $as_echo_n "(cached) " >&6
29923else
29924  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29925  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29926else
29927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29928for as_dir in $PATH
29929do
29930  IFS=$as_save_IFS
29931  test -z "$as_dir" && as_dir=.
29932    for ac_exec_ext in '' $ac_executable_extensions; do
29933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29934    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29936    break 2
29937  fi
29938done
29939  done
29940IFS=$as_save_IFS
29941
29942fi
29943fi
29944ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29945if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29947$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29948else
29949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29950$as_echo "no" >&6; }
29951fi
29952
29953
29954  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29955done
29956
29957  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29958    PROPER_COMPILER_CXX=""
29959  else
29960    case $cross_compiling:$ac_tool_warned in
29961yes:)
29962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29964ac_tool_warned=yes ;;
29965esac
29966    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29967  fi
29968fi
29969
29970
29971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29972
29973  # First separate the path from the arguments. This will split at the first
29974  # space.
29975  complete="$PROPER_COMPILER_CXX"
29976  path="${complete%% *}"
29977  tmp="$complete EOL"
29978  arguments="${tmp#* }"
29979
29980  # Input might be given as Windows format, start by converting to
29981  # unix format.
29982  new_path=`$CYGPATH -u "$path"`
29983
29984  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
29995    # The splitting of arguments from the executable at a space might have been incorrect,
29996    # since paths with space are more likely in Windows. Give it another try with the whole
29997    # argument.
29998    path="$complete"
29999    arguments="EOL"
30000    new_path=`$CYGPATH -u "$path"`
30001    new_path=`$WHICH "$new_path" 2> /dev/null`
30002    # bat and cmd files are not always considered executable in cygwin causing which
30003    # to not find them
30004    if test "x$new_path" = x \
30005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30007      new_path=`$CYGPATH -u "$path"`
30008    fi
30009    if test "x$new_path" = x; then
30010      # It's still not found. Now this is an unrecoverable error.
30011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30012$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30013      has_space=`$ECHO "$complete" | $GREP " "`
30014      if test "x$has_space" != x; then
30015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30017      fi
30018      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30019    fi
30020  fi
30021
30022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30025  # "foo.exe" is OK but "foo" is an error.
30026  #
30027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30028  # It is also a way to make sure we got the proper file name for the real test later on.
30029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30030  if test "x$test_shortpath" = x; then
30031    # Short path failed, file does not exist as specified.
30032    # Try adding .exe or .cmd
30033    if test -f "${new_path}.exe"; then
30034      input_to_shortpath="${new_path}.exe"
30035    elif test -f "${new_path}.cmd"; then
30036      input_to_shortpath="${new_path}.cmd"
30037    else
30038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30039$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30042      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30043    fi
30044  else
30045    input_to_shortpath="$new_path"
30046  fi
30047
30048  # Call helper function which possibly converts this using DOS-style short mode.
30049  # If so, the updated path is stored in $new_path.
30050  new_path="$input_to_shortpath"
30051
30052  input_path="$input_to_shortpath"
30053  # Check if we need to convert this using DOS-style short mode. If the path
30054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30055  # take no chances and rewrite it.
30056  # Note: m4 eats our [], so we need to use [ and ] instead.
30057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30058  if test "x$has_forbidden_chars" != x; then
30059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30063      # Going to short mode and back again did indeed matter. Since short mode is
30064      # case insensitive, let's make it lowercase to improve readability.
30065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30066      # Now convert it back to Unix-stile (cygpath)
30067      input_path=`$CYGPATH -u "$shortmode_path"`
30068      new_path="$input_path"
30069    fi
30070  fi
30071
30072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30073  if test "x$test_cygdrive_prefix" = x; then
30074    # As a simple fix, exclude /usr/bin since it's not a real path.
30075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30077      # a path prefixed by /cygdrive for fixpath to work.
30078      new_path="$CYGWIN_ROOT_PATH$input_path"
30079    fi
30080  fi
30081
30082  # remove trailing .exe if any
30083  new_path="${new_path/%.exe/}"
30084
30085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30086
30087  # First separate the path from the arguments. This will split at the first
30088  # space.
30089  complete="$PROPER_COMPILER_CXX"
30090  path="${complete%% *}"
30091  tmp="$complete EOL"
30092  arguments="${tmp#* }"
30093
30094  # Input might be given as Windows format, start by converting to
30095  # unix format.
30096  new_path="$path"
30097
30098  windows_path="$new_path"
30099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30100    unix_path=`$CYGPATH -u "$windows_path"`
30101    new_path="$unix_path"
30102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30104    new_path="$unix_path"
30105  fi
30106
30107
30108  # Now try to locate executable using which
30109  new_path=`$WHICH "$new_path" 2> /dev/null`
30110
30111  if test "x$new_path" = x; then
30112    # Oops. Which didn't find the executable.
30113    # The splitting of arguments from the executable at a space might have been incorrect,
30114    # since paths with space are more likely in Windows. Give it another try with the whole
30115    # argument.
30116    path="$complete"
30117    arguments="EOL"
30118    new_path="$path"
30119
30120  windows_path="$new_path"
30121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30122    unix_path=`$CYGPATH -u "$windows_path"`
30123    new_path="$unix_path"
30124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30126    new_path="$unix_path"
30127  fi
30128
30129
30130    new_path=`$WHICH "$new_path" 2> /dev/null`
30131    # bat and cmd files are not always considered executable in MSYS causing which
30132    # to not find them
30133    if test "x$new_path" = x \
30134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30136      new_path="$path"
30137
30138  windows_path="$new_path"
30139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30140    unix_path=`$CYGPATH -u "$windows_path"`
30141    new_path="$unix_path"
30142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30144    new_path="$unix_path"
30145  fi
30146
30147    fi
30148
30149    if test "x$new_path" = x; then
30150      # It's still not found. Now this is an unrecoverable error.
30151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30152$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30153      has_space=`$ECHO "$complete" | $GREP " "`
30154      if test "x$has_space" != x; then
30155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30157      fi
30158      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30159    fi
30160  fi
30161
30162  # Now new_path has a complete unix path to the binary
30163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30164    # Keep paths in /bin as-is, but remove trailing .exe if any
30165    new_path="${new_path/%.exe/}"
30166    # Do not save /bin paths to all_fixpath_prefixes!
30167  else
30168    # Not in mixed or Windows style, start by that.
30169    new_path=`cmd //c echo $new_path`
30170
30171  input_path="$new_path"
30172  # Check if we need to convert this using DOS-style short mode. If the path
30173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30174  # take no chances and rewrite it.
30175  # Note: m4 eats our [], so we need to use [ and ] instead.
30176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30177  if test "x$has_forbidden_chars" != x; then
30178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30180  fi
30181
30182    # Output is in $new_path
30183
30184  windows_path="$new_path"
30185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30186    unix_path=`$CYGPATH -u "$windows_path"`
30187    new_path="$unix_path"
30188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30190    new_path="$unix_path"
30191  fi
30192
30193    # remove trailing .exe if any
30194    new_path="${new_path/%.exe/}"
30195
30196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30198  fi
30199
30200  else
30201    # We're on a unix platform. Hooray! :)
30202    # First separate the path from the arguments. This will split at the first
30203    # space.
30204    complete="$PROPER_COMPILER_CXX"
30205    path="${complete%% *}"
30206    tmp="$complete EOL"
30207    arguments="${tmp#* }"
30208
30209    # Cannot rely on the command "which" here since it doesn't always work.
30210    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30211    if test -z "$is_absolute_path"; then
30212      # Path to executable is not absolute. Find it.
30213      IFS_save="$IFS"
30214      IFS=:
30215      for p in $PATH; do
30216        if test -f "$p/$path" && test -x "$p/$path"; then
30217          new_path="$p/$path"
30218          break
30219        fi
30220      done
30221      IFS="$IFS_save"
30222    else
30223      # This is an absolute path, we can use it without further modifications.
30224      new_path="$path"
30225    fi
30226
30227    if test "x$new_path" = x; then
30228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30229$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30230      has_space=`$ECHO "$complete" | $GREP " "`
30231      if test "x$has_space" != x; then
30232        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30234      fi
30235      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30236    fi
30237  fi
30238
30239  # Now join together the path and the arguments once again
30240  if test "x$arguments" != xEOL; then
30241    new_complete="$new_path ${arguments% *}"
30242  else
30243    new_complete="$new_path"
30244  fi
30245
30246  if test "x$complete" != "x$new_complete"; then
30247    PROPER_COMPILER_CXX="$new_complete"
30248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30249$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30250  fi
30251
30252    PATH="$RETRY_COMPILER_SAVED_PATH"
30253
30254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30255$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30256
30257  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30258    # Follow a chain of symbolic links. Use readlink
30259    # where it exists, else fall back to horribly
30260    # complicated shell code.
30261    if test "x$READLINK_TESTED" != yes; then
30262      # On MacOSX there is a readlink tool with a different
30263      # purpose than the GNU readlink tool. Check the found readlink.
30264      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30265      if test "x$ISGNU" = x; then
30266        # A readlink that we do not know how to use.
30267        # Are there other non-GNU readlinks out there?
30268        READLINK_TESTED=yes
30269        READLINK=
30270      fi
30271    fi
30272
30273    if test "x$READLINK" != x; then
30274      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30275    else
30276      # Save the current directory for restoring afterwards
30277      STARTDIR=$PWD
30278      COUNTER=0
30279      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30280      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30281      cd $sym_link_dir
30282      # Use -P flag to resolve symlinks in directories.
30283      cd `$THEPWDCMD -P`
30284      sym_link_dir=`$THEPWDCMD -P`
30285      # Resolve file symlinks
30286      while test $COUNTER -lt 20; do
30287        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30288        if test "x$ISLINK" == x; then
30289          # This is not a symbolic link! We are done!
30290          break
30291        fi
30292        # Again resolve directory symlinks since the target of the just found
30293        # link could be in a different directory
30294        cd `$DIRNAME $ISLINK`
30295        sym_link_dir=`$THEPWDCMD -P`
30296        sym_link_file=`$BASENAME $ISLINK`
30297        let COUNTER=COUNTER+1
30298      done
30299      cd $STARTDIR
30300      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30301    fi
30302  fi
30303
30304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30305$as_echo "$PROPER_COMPILER_CXX" >&6; }
30306    CXX="$PROPER_COMPILER_CXX"
30307  else
30308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30309$as_echo "no, keeping CXX" >&6; }
30310  fi
30311
30312
30313  COMPILER=$CXX
30314  COMPILER_NAME=$COMPILER_NAME
30315
30316  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30317    # cc -V output typically looks like
30318    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30319    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30320    # Check that this is likely to be the Solaris Studio cc.
30321    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30322    if test $? -ne 0; then
30323      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30324      { $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
30325$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30326      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30327$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30328      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30329$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30330      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30331    fi
30332    # Remove usage instructions (if present), and
30333    # collapse compiler output into a single line
30334    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30335        $SED -e 's/ *[Uu]sage:.*//'`
30336    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30337        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30338  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30339    # xlc -qversion output typically looks like
30340    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30341    #     Version: 11.01.0000.0015
30342    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30343    # Check that this is likely to be the IBM XL C compiler.
30344    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30345    if test $? -ne 0; then
30346      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30347      { $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
30348$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30349      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30350$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30351      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30352$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30353      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30354    fi
30355    # Collapse compiler output into a single line
30356    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30357    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30358        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30359  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30360    # There is no specific version flag, but all output starts with a version string.
30361    # First line typically looks something like:
30362    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30363    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30364    # Check that this is likely to be Microsoft CL.EXE.
30365    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30366    if test $? -ne 0; then
30367      { $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
30368$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30369      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30370$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30371      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30372    fi
30373    # Collapse compiler output into a single line
30374    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30375    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30376        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30377  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30378    # gcc --version output typically looks like
30379    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30380    #     Copyright (C) 2013 Free Software Foundation, Inc.
30381    #     This is free software; see the source for copying conditions.  There is NO
30382    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30383    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30384    # Check that this is likely to be GCC.
30385    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30386    if test $? -ne 0; then
30387      { $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
30388$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30389      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30390$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30391      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30392    fi
30393    # Remove Copyright and legalese from version string, and
30394    # collapse into a single line
30395    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30396        $SED -e 's/ *Copyright .*//'`
30397    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30398        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30399  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30400    # clang --version output typically looks like
30401    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30402    #    clang version 3.3 (tags/RELEASE_33/final)
30403    # or
30404    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30405    #    Target: x86_64-pc-linux-gnu
30406    #    Thread model: posix
30407    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30408    # Check that this is likely to be clang
30409    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30410    if test $? -ne 0; then
30411      { $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
30412$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30413      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30414$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30415      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30416    fi
30417    # Collapse compiler output into a single line
30418    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30419    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30420        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30421  else
30422      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30423  fi
30424  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30425  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30426  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30427  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30428
30429  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30430$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30431
30432
30433  # Now that we have resolved CXX ourself, let autoconf have its go at it
30434  ac_ext=cpp
30435ac_cpp='$CXXCPP $CPPFLAGS'
30436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30439if test -z "$CXX"; then
30440  if test -n "$CCC"; then
30441    CXX=$CCC
30442  else
30443    if test -n "$ac_tool_prefix"; then
30444  for ac_prog in $CXX
30445  do
30446    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30447set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30449$as_echo_n "checking for $ac_word... " >&6; }
30450if ${ac_cv_prog_CXX+:} false; then :
30451  $as_echo_n "(cached) " >&6
30452else
30453  if test -n "$CXX"; then
30454  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30455else
30456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30457for as_dir in $PATH
30458do
30459  IFS=$as_save_IFS
30460  test -z "$as_dir" && as_dir=.
30461    for ac_exec_ext in '' $ac_executable_extensions; do
30462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30463    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30465    break 2
30466  fi
30467done
30468  done
30469IFS=$as_save_IFS
30470
30471fi
30472fi
30473CXX=$ac_cv_prog_CXX
30474if test -n "$CXX"; then
30475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30476$as_echo "$CXX" >&6; }
30477else
30478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30479$as_echo "no" >&6; }
30480fi
30481
30482
30483    test -n "$CXX" && break
30484  done
30485fi
30486if test -z "$CXX"; then
30487  ac_ct_CXX=$CXX
30488  for ac_prog in $CXX
30489do
30490  # Extract the first word of "$ac_prog", so it can be a program name with args.
30491set dummy $ac_prog; ac_word=$2
30492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30493$as_echo_n "checking for $ac_word... " >&6; }
30494if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30495  $as_echo_n "(cached) " >&6
30496else
30497  if test -n "$ac_ct_CXX"; then
30498  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30499else
30500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30501for as_dir in $PATH
30502do
30503  IFS=$as_save_IFS
30504  test -z "$as_dir" && as_dir=.
30505    for ac_exec_ext in '' $ac_executable_extensions; do
30506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30507    ac_cv_prog_ac_ct_CXX="$ac_prog"
30508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30509    break 2
30510  fi
30511done
30512  done
30513IFS=$as_save_IFS
30514
30515fi
30516fi
30517ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30518if test -n "$ac_ct_CXX"; then
30519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30520$as_echo "$ac_ct_CXX" >&6; }
30521else
30522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30523$as_echo "no" >&6; }
30524fi
30525
30526
30527  test -n "$ac_ct_CXX" && break
30528done
30529
30530  if test "x$ac_ct_CXX" = x; then
30531    CXX="g++"
30532  else
30533    case $cross_compiling:$ac_tool_warned in
30534yes:)
30535{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30536$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30537ac_tool_warned=yes ;;
30538esac
30539    CXX=$ac_ct_CXX
30540  fi
30541fi
30542
30543  fi
30544fi
30545# Provide some information about the compiler.
30546$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30547set X $ac_compile
30548ac_compiler=$2
30549for ac_option in --version -v -V -qversion; do
30550  { { ac_try="$ac_compiler $ac_option >&5"
30551case "(($ac_try" in
30552  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30553  *) ac_try_echo=$ac_try;;
30554esac
30555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30556$as_echo "$ac_try_echo"; } >&5
30557  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30558  ac_status=$?
30559  if test -s conftest.err; then
30560    sed '10a\
30561... rest of stderr output deleted ...
30562         10q' conftest.err >conftest.er1
30563    cat conftest.er1 >&5
30564  fi
30565  rm -f conftest.er1 conftest.err
30566  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30567  test $ac_status = 0; }
30568done
30569
30570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30571$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30572if ${ac_cv_cxx_compiler_gnu+:} false; then :
30573  $as_echo_n "(cached) " >&6
30574else
30575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30576/* end confdefs.h.  */
30577
30578int
30579main ()
30580{
30581#ifndef __GNUC__
30582       choke me
30583#endif
30584
30585  ;
30586  return 0;
30587}
30588_ACEOF
30589if ac_fn_cxx_try_compile "$LINENO"; then :
30590  ac_compiler_gnu=yes
30591else
30592  ac_compiler_gnu=no
30593fi
30594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30595ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30596
30597fi
30598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30599$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30600if test $ac_compiler_gnu = yes; then
30601  GXX=yes
30602else
30603  GXX=
30604fi
30605ac_test_CXXFLAGS=${CXXFLAGS+set}
30606ac_save_CXXFLAGS=$CXXFLAGS
30607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30608$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30609if ${ac_cv_prog_cxx_g+:} false; then :
30610  $as_echo_n "(cached) " >&6
30611else
30612  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30613   ac_cxx_werror_flag=yes
30614   ac_cv_prog_cxx_g=no
30615   CXXFLAGS="-g"
30616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30617/* end confdefs.h.  */
30618
30619int
30620main ()
30621{
30622
30623  ;
30624  return 0;
30625}
30626_ACEOF
30627if ac_fn_cxx_try_compile "$LINENO"; then :
30628  ac_cv_prog_cxx_g=yes
30629else
30630  CXXFLAGS=""
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
30644else
30645  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30646	 CXXFLAGS="-g"
30647	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30648/* end confdefs.h.  */
30649
30650int
30651main ()
30652{
30653
30654  ;
30655  return 0;
30656}
30657_ACEOF
30658if ac_fn_cxx_try_compile "$LINENO"; then :
30659  ac_cv_prog_cxx_g=yes
30660fi
30661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30662fi
30663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30664fi
30665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30666   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30667fi
30668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30669$as_echo "$ac_cv_prog_cxx_g" >&6; }
30670if test "$ac_test_CXXFLAGS" = set; then
30671  CXXFLAGS=$ac_save_CXXFLAGS
30672elif test $ac_cv_prog_cxx_g = yes; then
30673  if test "$GXX" = yes; then
30674    CXXFLAGS="-g -O2"
30675  else
30676    CXXFLAGS="-g"
30677  fi
30678else
30679  if test "$GXX" = yes; then
30680    CXXFLAGS="-O2"
30681  else
30682    CXXFLAGS=
30683  fi
30684fi
30685ac_ext=cpp
30686ac_cpp='$CXXCPP $CPPFLAGS'
30687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30690
30691
30692  #
30693  # Setup the preprocessor (CPP and CXXCPP)
30694  #
30695  ac_ext=c
30696ac_cpp='$CPP $CPPFLAGS'
30697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30699ac_compiler_gnu=$ac_cv_c_compiler_gnu
30700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30701$as_echo_n "checking how to run the C preprocessor... " >&6; }
30702# On Suns, sometimes $CPP names a directory.
30703if test -n "$CPP" && test -d "$CPP"; then
30704  CPP=
30705fi
30706if test -z "$CPP"; then
30707  if ${ac_cv_prog_CPP+:} false; then :
30708  $as_echo_n "(cached) " >&6
30709else
30710      # Double quotes because CPP needs to be expanded
30711    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30712    do
30713      ac_preproc_ok=false
30714for ac_c_preproc_warn_flag in '' yes
30715do
30716  # Use a header file that comes with gcc, so configuring glibc
30717  # with a fresh cross-compiler works.
30718  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30719  # <limits.h> exists even on freestanding compilers.
30720  # On the NeXT, cc -E runs the code through the compiler's parser,
30721  # not just through cpp. "Syntax error" is here to catch this case.
30722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30723/* end confdefs.h.  */
30724#ifdef __STDC__
30725# include <limits.h>
30726#else
30727# include <assert.h>
30728#endif
30729		     Syntax error
30730_ACEOF
30731if ac_fn_c_try_cpp "$LINENO"; then :
30732
30733else
30734  # Broken: fails on valid input.
30735continue
30736fi
30737rm -f conftest.err conftest.i conftest.$ac_ext
30738
30739  # OK, works on sane cases.  Now check whether nonexistent headers
30740  # can be detected and how.
30741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30742/* end confdefs.h.  */
30743#include <ac_nonexistent.h>
30744_ACEOF
30745if ac_fn_c_try_cpp "$LINENO"; then :
30746  # Broken: success on invalid input.
30747continue
30748else
30749  # Passes both tests.
30750ac_preproc_ok=:
30751break
30752fi
30753rm -f conftest.err conftest.i conftest.$ac_ext
30754
30755done
30756# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30757rm -f conftest.i conftest.err conftest.$ac_ext
30758if $ac_preproc_ok; then :
30759  break
30760fi
30761
30762    done
30763    ac_cv_prog_CPP=$CPP
30764
30765fi
30766  CPP=$ac_cv_prog_CPP
30767else
30768  ac_cv_prog_CPP=$CPP
30769fi
30770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30771$as_echo "$CPP" >&6; }
30772ac_preproc_ok=false
30773for ac_c_preproc_warn_flag in '' yes
30774do
30775  # Use a header file that comes with gcc, so configuring glibc
30776  # with a fresh cross-compiler works.
30777  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30778  # <limits.h> exists even on freestanding compilers.
30779  # On the NeXT, cc -E runs the code through the compiler's parser,
30780  # not just through cpp. "Syntax error" is here to catch this case.
30781  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30782/* end confdefs.h.  */
30783#ifdef __STDC__
30784# include <limits.h>
30785#else
30786# include <assert.h>
30787#endif
30788		     Syntax error
30789_ACEOF
30790if ac_fn_c_try_cpp "$LINENO"; then :
30791
30792else
30793  # Broken: fails on valid input.
30794continue
30795fi
30796rm -f conftest.err conftest.i conftest.$ac_ext
30797
30798  # OK, works on sane cases.  Now check whether nonexistent headers
30799  # can be detected and how.
30800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30801/* end confdefs.h.  */
30802#include <ac_nonexistent.h>
30803_ACEOF
30804if ac_fn_c_try_cpp "$LINENO"; then :
30805  # Broken: success on invalid input.
30806continue
30807else
30808  # Passes both tests.
30809ac_preproc_ok=:
30810break
30811fi
30812rm -f conftest.err conftest.i conftest.$ac_ext
30813
30814done
30815# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30816rm -f conftest.i conftest.err conftest.$ac_ext
30817if $ac_preproc_ok; then :
30818
30819else
30820  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30822as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30823See \`config.log' for more details" "$LINENO" 5; }
30824fi
30825
30826ac_ext=cpp
30827ac_cpp='$CXXCPP $CPPFLAGS'
30828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30829ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30831
30832
30833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30834
30835  # First separate the path from the arguments. This will split at the first
30836  # space.
30837  complete="$CPP"
30838  path="${complete%% *}"
30839  tmp="$complete EOL"
30840  arguments="${tmp#* }"
30841
30842  # Input might be given as Windows format, start by converting to
30843  # unix format.
30844  new_path=`$CYGPATH -u "$path"`
30845
30846  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
30857    # The splitting of arguments from the executable at a space might have been incorrect,
30858    # since paths with space are more likely in Windows. Give it another try with the whole
30859    # argument.
30860    path="$complete"
30861    arguments="EOL"
30862    new_path=`$CYGPATH -u "$path"`
30863    new_path=`$WHICH "$new_path" 2> /dev/null`
30864    # bat and cmd files are not always considered executable in cygwin causing which
30865    # to not find them
30866    if test "x$new_path" = x \
30867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30869      new_path=`$CYGPATH -u "$path"`
30870    fi
30871    if test "x$new_path" = x; then
30872      # It's still not found. Now this is an unrecoverable error.
30873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30874$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30875      has_space=`$ECHO "$complete" | $GREP " "`
30876      if test "x$has_space" != x; then
30877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30879      fi
30880      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30881    fi
30882  fi
30883
30884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30887  # "foo.exe" is OK but "foo" is an error.
30888  #
30889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30890  # It is also a way to make sure we got the proper file name for the real test later on.
30891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30892  if test "x$test_shortpath" = x; then
30893    # Short path failed, file does not exist as specified.
30894    # Try adding .exe or .cmd
30895    if test -f "${new_path}.exe"; then
30896      input_to_shortpath="${new_path}.exe"
30897    elif test -f "${new_path}.cmd"; then
30898      input_to_shortpath="${new_path}.cmd"
30899    else
30900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30901$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30904      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30905    fi
30906  else
30907    input_to_shortpath="$new_path"
30908  fi
30909
30910  # Call helper function which possibly converts this using DOS-style short mode.
30911  # If so, the updated path is stored in $new_path.
30912  new_path="$input_to_shortpath"
30913
30914  input_path="$input_to_shortpath"
30915  # Check if we need to convert this using DOS-style short mode. If the path
30916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30917  # take no chances and rewrite it.
30918  # Note: m4 eats our [], so we need to use [ and ] instead.
30919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30920  if test "x$has_forbidden_chars" != x; then
30921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30925      # Going to short mode and back again did indeed matter. Since short mode is
30926      # case insensitive, let's make it lowercase to improve readability.
30927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30928      # Now convert it back to Unix-stile (cygpath)
30929      input_path=`$CYGPATH -u "$shortmode_path"`
30930      new_path="$input_path"
30931    fi
30932  fi
30933
30934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30935  if test "x$test_cygdrive_prefix" = x; then
30936    # As a simple fix, exclude /usr/bin since it's not a real path.
30937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30939      # a path prefixed by /cygdrive for fixpath to work.
30940      new_path="$CYGWIN_ROOT_PATH$input_path"
30941    fi
30942  fi
30943
30944  # remove trailing .exe if any
30945  new_path="${new_path/%.exe/}"
30946
30947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30948
30949  # First separate the path from the arguments. This will split at the first
30950  # space.
30951  complete="$CPP"
30952  path="${complete%% *}"
30953  tmp="$complete EOL"
30954  arguments="${tmp#* }"
30955
30956  # Input might be given as Windows format, start by converting to
30957  # unix format.
30958  new_path="$path"
30959
30960  windows_path="$new_path"
30961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30962    unix_path=`$CYGPATH -u "$windows_path"`
30963    new_path="$unix_path"
30964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30966    new_path="$unix_path"
30967  fi
30968
30969
30970  # Now try to locate executable using which
30971  new_path=`$WHICH "$new_path" 2> /dev/null`
30972
30973  if test "x$new_path" = x; then
30974    # Oops. Which didn't find the executable.
30975    # The splitting of arguments from the executable at a space might have been incorrect,
30976    # since paths with space are more likely in Windows. Give it another try with the whole
30977    # argument.
30978    path="$complete"
30979    arguments="EOL"
30980    new_path="$path"
30981
30982  windows_path="$new_path"
30983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30984    unix_path=`$CYGPATH -u "$windows_path"`
30985    new_path="$unix_path"
30986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30988    new_path="$unix_path"
30989  fi
30990
30991
30992    new_path=`$WHICH "$new_path" 2> /dev/null`
30993    # bat and cmd files are not always considered executable in MSYS causing which
30994    # to not find them
30995    if test "x$new_path" = x \
30996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30998      new_path="$path"
30999
31000  windows_path="$new_path"
31001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31002    unix_path=`$CYGPATH -u "$windows_path"`
31003    new_path="$unix_path"
31004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31006    new_path="$unix_path"
31007  fi
31008
31009    fi
31010
31011    if test "x$new_path" = x; then
31012      # It's still not found. Now this is an unrecoverable error.
31013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31014$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31015      has_space=`$ECHO "$complete" | $GREP " "`
31016      if test "x$has_space" != x; then
31017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31019      fi
31020      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31021    fi
31022  fi
31023
31024  # Now new_path has a complete unix path to the binary
31025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31026    # Keep paths in /bin as-is, but remove trailing .exe if any
31027    new_path="${new_path/%.exe/}"
31028    # Do not save /bin paths to all_fixpath_prefixes!
31029  else
31030    # Not in mixed or Windows style, start by that.
31031    new_path=`cmd //c echo $new_path`
31032
31033  input_path="$new_path"
31034  # Check if we need to convert this using DOS-style short mode. If the path
31035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31036  # take no chances and rewrite it.
31037  # Note: m4 eats our [], so we need to use [ and ] instead.
31038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31039  if test "x$has_forbidden_chars" != x; then
31040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31042  fi
31043
31044    # Output is in $new_path
31045
31046  windows_path="$new_path"
31047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31048    unix_path=`$CYGPATH -u "$windows_path"`
31049    new_path="$unix_path"
31050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31052    new_path="$unix_path"
31053  fi
31054
31055    # remove trailing .exe if any
31056    new_path="${new_path/%.exe/}"
31057
31058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31060  fi
31061
31062  else
31063    # We're on a unix platform. Hooray! :)
31064    # First separate the path from the arguments. This will split at the first
31065    # space.
31066    complete="$CPP"
31067    path="${complete%% *}"
31068    tmp="$complete EOL"
31069    arguments="${tmp#* }"
31070
31071    # Cannot rely on the command "which" here since it doesn't always work.
31072    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31073    if test -z "$is_absolute_path"; then
31074      # Path to executable is not absolute. Find it.
31075      IFS_save="$IFS"
31076      IFS=:
31077      for p in $PATH; do
31078        if test -f "$p/$path" && test -x "$p/$path"; then
31079          new_path="$p/$path"
31080          break
31081        fi
31082      done
31083      IFS="$IFS_save"
31084    else
31085      # This is an absolute path, we can use it without further modifications.
31086      new_path="$path"
31087    fi
31088
31089    if test "x$new_path" = x; then
31090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31091$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31092      has_space=`$ECHO "$complete" | $GREP " "`
31093      if test "x$has_space" != x; then
31094        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31096      fi
31097      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31098    fi
31099  fi
31100
31101  # Now join together the path and the arguments once again
31102  if test "x$arguments" != xEOL; then
31103    new_complete="$new_path ${arguments% *}"
31104  else
31105    new_complete="$new_path"
31106  fi
31107
31108  if test "x$complete" != "x$new_complete"; then
31109    CPP="$new_complete"
31110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31111$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31112  fi
31113
31114  ac_ext=cpp
31115ac_cpp='$CXXCPP $CPPFLAGS'
31116ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31117ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31118ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31120$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31121if test -z "$CXXCPP"; then
31122  if ${ac_cv_prog_CXXCPP+:} false; then :
31123  $as_echo_n "(cached) " >&6
31124else
31125      # Double quotes because CXXCPP needs to be expanded
31126    for CXXCPP in "$CXX -E" "/lib/cpp"
31127    do
31128      ac_preproc_ok=false
31129for ac_cxx_preproc_warn_flag in '' yes
31130do
31131  # Use a header file that comes with gcc, so configuring glibc
31132  # with a fresh cross-compiler works.
31133  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31134  # <limits.h> exists even on freestanding compilers.
31135  # On the NeXT, cc -E runs the code through the compiler's parser,
31136  # not just through cpp. "Syntax error" is here to catch this case.
31137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31138/* end confdefs.h.  */
31139#ifdef __STDC__
31140# include <limits.h>
31141#else
31142# include <assert.h>
31143#endif
31144		     Syntax error
31145_ACEOF
31146if ac_fn_cxx_try_cpp "$LINENO"; then :
31147
31148else
31149  # Broken: fails on valid input.
31150continue
31151fi
31152rm -f conftest.err conftest.i conftest.$ac_ext
31153
31154  # OK, works on sane cases.  Now check whether nonexistent headers
31155  # can be detected and how.
31156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31157/* end confdefs.h.  */
31158#include <ac_nonexistent.h>
31159_ACEOF
31160if ac_fn_cxx_try_cpp "$LINENO"; then :
31161  # Broken: success on invalid input.
31162continue
31163else
31164  # Passes both tests.
31165ac_preproc_ok=:
31166break
31167fi
31168rm -f conftest.err conftest.i conftest.$ac_ext
31169
31170done
31171# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31172rm -f conftest.i conftest.err conftest.$ac_ext
31173if $ac_preproc_ok; then :
31174  break
31175fi
31176
31177    done
31178    ac_cv_prog_CXXCPP=$CXXCPP
31179
31180fi
31181  CXXCPP=$ac_cv_prog_CXXCPP
31182else
31183  ac_cv_prog_CXXCPP=$CXXCPP
31184fi
31185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31186$as_echo "$CXXCPP" >&6; }
31187ac_preproc_ok=false
31188for ac_cxx_preproc_warn_flag in '' yes
31189do
31190  # Use a header file that comes with gcc, so configuring glibc
31191  # with a fresh cross-compiler works.
31192  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31193  # <limits.h> exists even on freestanding compilers.
31194  # On the NeXT, cc -E runs the code through the compiler's parser,
31195  # not just through cpp. "Syntax error" is here to catch this case.
31196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31197/* end confdefs.h.  */
31198#ifdef __STDC__
31199# include <limits.h>
31200#else
31201# include <assert.h>
31202#endif
31203		     Syntax error
31204_ACEOF
31205if ac_fn_cxx_try_cpp "$LINENO"; then :
31206
31207else
31208  # Broken: fails on valid input.
31209continue
31210fi
31211rm -f conftest.err conftest.i conftest.$ac_ext
31212
31213  # OK, works on sane cases.  Now check whether nonexistent headers
31214  # can be detected and how.
31215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31216/* end confdefs.h.  */
31217#include <ac_nonexistent.h>
31218_ACEOF
31219if ac_fn_cxx_try_cpp "$LINENO"; then :
31220  # Broken: success on invalid input.
31221continue
31222else
31223  # Passes both tests.
31224ac_preproc_ok=:
31225break
31226fi
31227rm -f conftest.err conftest.i conftest.$ac_ext
31228
31229done
31230# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31231rm -f conftest.i conftest.err conftest.$ac_ext
31232if $ac_preproc_ok; then :
31233
31234else
31235  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31237as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31238See \`config.log' for more details" "$LINENO" 5; }
31239fi
31240
31241ac_ext=cpp
31242ac_cpp='$CXXCPP $CPPFLAGS'
31243ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31244ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31245ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31246
31247
31248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31249
31250  # First separate the path from the arguments. This will split at the first
31251  # space.
31252  complete="$CXXCPP"
31253  path="${complete%% *}"
31254  tmp="$complete EOL"
31255  arguments="${tmp#* }"
31256
31257  # Input might be given as Windows format, start by converting to
31258  # unix format.
31259  new_path=`$CYGPATH -u "$path"`
31260
31261  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
31272    # The splitting of arguments from the executable at a space might have been incorrect,
31273    # since paths with space are more likely in Windows. Give it another try with the whole
31274    # argument.
31275    path="$complete"
31276    arguments="EOL"
31277    new_path=`$CYGPATH -u "$path"`
31278    new_path=`$WHICH "$new_path" 2> /dev/null`
31279    # bat and cmd files are not always considered executable in cygwin causing which
31280    # to not find them
31281    if test "x$new_path" = x \
31282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31284      new_path=`$CYGPATH -u "$path"`
31285    fi
31286    if test "x$new_path" = x; then
31287      # It's still not found. Now this is an unrecoverable error.
31288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31289$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31290      has_space=`$ECHO "$complete" | $GREP " "`
31291      if test "x$has_space" != x; then
31292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31294      fi
31295      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31296    fi
31297  fi
31298
31299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31302  # "foo.exe" is OK but "foo" is an error.
31303  #
31304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31305  # It is also a way to make sure we got the proper file name for the real test later on.
31306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31307  if test "x$test_shortpath" = x; then
31308    # Short path failed, file does not exist as specified.
31309    # Try adding .exe or .cmd
31310    if test -f "${new_path}.exe"; then
31311      input_to_shortpath="${new_path}.exe"
31312    elif test -f "${new_path}.cmd"; then
31313      input_to_shortpath="${new_path}.cmd"
31314    else
31315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31316$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31319      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31320    fi
31321  else
31322    input_to_shortpath="$new_path"
31323  fi
31324
31325  # Call helper function which possibly converts this using DOS-style short mode.
31326  # If so, the updated path is stored in $new_path.
31327  new_path="$input_to_shortpath"
31328
31329  input_path="$input_to_shortpath"
31330  # Check if we need to convert this using DOS-style short mode. If the path
31331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31332  # take no chances and rewrite it.
31333  # Note: m4 eats our [], so we need to use [ and ] instead.
31334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31335  if test "x$has_forbidden_chars" != x; then
31336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31340      # Going to short mode and back again did indeed matter. Since short mode is
31341      # case insensitive, let's make it lowercase to improve readability.
31342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31343      # Now convert it back to Unix-stile (cygpath)
31344      input_path=`$CYGPATH -u "$shortmode_path"`
31345      new_path="$input_path"
31346    fi
31347  fi
31348
31349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31350  if test "x$test_cygdrive_prefix" = x; then
31351    # As a simple fix, exclude /usr/bin since it's not a real path.
31352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31354      # a path prefixed by /cygdrive for fixpath to work.
31355      new_path="$CYGWIN_ROOT_PATH$input_path"
31356    fi
31357  fi
31358
31359  # remove trailing .exe if any
31360  new_path="${new_path/%.exe/}"
31361
31362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31363
31364  # First separate the path from the arguments. This will split at the first
31365  # space.
31366  complete="$CXXCPP"
31367  path="${complete%% *}"
31368  tmp="$complete EOL"
31369  arguments="${tmp#* }"
31370
31371  # Input might be given as Windows format, start by converting to
31372  # unix format.
31373  new_path="$path"
31374
31375  windows_path="$new_path"
31376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31377    unix_path=`$CYGPATH -u "$windows_path"`
31378    new_path="$unix_path"
31379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31381    new_path="$unix_path"
31382  fi
31383
31384
31385  # Now try to locate executable using which
31386  new_path=`$WHICH "$new_path" 2> /dev/null`
31387
31388  if test "x$new_path" = x; then
31389    # Oops. Which didn't find the executable.
31390    # The splitting of arguments from the executable at a space might have been incorrect,
31391    # since paths with space are more likely in Windows. Give it another try with the whole
31392    # argument.
31393    path="$complete"
31394    arguments="EOL"
31395    new_path="$path"
31396
31397  windows_path="$new_path"
31398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31399    unix_path=`$CYGPATH -u "$windows_path"`
31400    new_path="$unix_path"
31401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31403    new_path="$unix_path"
31404  fi
31405
31406
31407    new_path=`$WHICH "$new_path" 2> /dev/null`
31408    # bat and cmd files are not always considered executable in MSYS causing which
31409    # to not find them
31410    if test "x$new_path" = x \
31411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31413      new_path="$path"
31414
31415  windows_path="$new_path"
31416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31417    unix_path=`$CYGPATH -u "$windows_path"`
31418    new_path="$unix_path"
31419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31421    new_path="$unix_path"
31422  fi
31423
31424    fi
31425
31426    if test "x$new_path" = x; then
31427      # It's still not found. Now this is an unrecoverable error.
31428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31429$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31430      has_space=`$ECHO "$complete" | $GREP " "`
31431      if test "x$has_space" != x; then
31432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31434      fi
31435      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31436    fi
31437  fi
31438
31439  # Now new_path has a complete unix path to the binary
31440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31441    # Keep paths in /bin as-is, but remove trailing .exe if any
31442    new_path="${new_path/%.exe/}"
31443    # Do not save /bin paths to all_fixpath_prefixes!
31444  else
31445    # Not in mixed or Windows style, start by that.
31446    new_path=`cmd //c echo $new_path`
31447
31448  input_path="$new_path"
31449  # Check if we need to convert this using DOS-style short mode. If the path
31450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31451  # take no chances and rewrite it.
31452  # Note: m4 eats our [], so we need to use [ and ] instead.
31453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31454  if test "x$has_forbidden_chars" != x; then
31455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31457  fi
31458
31459    # Output is in $new_path
31460
31461  windows_path="$new_path"
31462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31463    unix_path=`$CYGPATH -u "$windows_path"`
31464    new_path="$unix_path"
31465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31467    new_path="$unix_path"
31468  fi
31469
31470    # remove trailing .exe if any
31471    new_path="${new_path/%.exe/}"
31472
31473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31475  fi
31476
31477  else
31478    # We're on a unix platform. Hooray! :)
31479    # First separate the path from the arguments. This will split at the first
31480    # space.
31481    complete="$CXXCPP"
31482    path="${complete%% *}"
31483    tmp="$complete EOL"
31484    arguments="${tmp#* }"
31485
31486    # Cannot rely on the command "which" here since it doesn't always work.
31487    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31488    if test -z "$is_absolute_path"; then
31489      # Path to executable is not absolute. Find it.
31490      IFS_save="$IFS"
31491      IFS=:
31492      for p in $PATH; do
31493        if test -f "$p/$path" && test -x "$p/$path"; then
31494          new_path="$p/$path"
31495          break
31496        fi
31497      done
31498      IFS="$IFS_save"
31499    else
31500      # This is an absolute path, we can use it without further modifications.
31501      new_path="$path"
31502    fi
31503
31504    if test "x$new_path" = x; then
31505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31506$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31507      has_space=`$ECHO "$complete" | $GREP " "`
31508      if test "x$has_space" != x; then
31509        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31511      fi
31512      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31513    fi
31514  fi
31515
31516  # Now join together the path and the arguments once again
31517  if test "x$arguments" != xEOL; then
31518    new_complete="$new_path ${arguments% *}"
31519  else
31520    new_complete="$new_path"
31521  fi
31522
31523  if test "x$complete" != "x$new_complete"; then
31524    CXXCPP="$new_complete"
31525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31526$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31527  fi
31528
31529
31530  #
31531  # Setup the linker (LD)
31532  #
31533  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31534    # In the Microsoft toolchain we have a separate LD command "link".
31535    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31536    # a cygwin program for something completely different.
31537    # Extract the first word of "link", so it can be a program name with args.
31538set dummy link; ac_word=$2
31539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31540$as_echo_n "checking for $ac_word... " >&6; }
31541if ${ac_cv_prog_LD+:} false; then :
31542  $as_echo_n "(cached) " >&6
31543else
31544  if test -n "$LD"; then
31545  ac_cv_prog_LD="$LD" # Let the user override the test.
31546else
31547  ac_prog_rejected=no
31548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31549for as_dir in $PATH
31550do
31551  IFS=$as_save_IFS
31552  test -z "$as_dir" && as_dir=.
31553    for ac_exec_ext in '' $ac_executable_extensions; do
31554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31555    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31556       ac_prog_rejected=yes
31557       continue
31558     fi
31559    ac_cv_prog_LD="link"
31560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31561    break 2
31562  fi
31563done
31564  done
31565IFS=$as_save_IFS
31566
31567if test $ac_prog_rejected = yes; then
31568  # We found a bogon in the path, so make sure we never use it.
31569  set dummy $ac_cv_prog_LD
31570  shift
31571  if test $# != 0; then
31572    # We chose a different compiler from the bogus one.
31573    # However, it has the same basename, so the bogon will be chosen
31574    # first if we set LD to just the basename; use the full file name.
31575    shift
31576    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31577  fi
31578fi
31579fi
31580fi
31581LD=$ac_cv_prog_LD
31582if test -n "$LD"; then
31583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31584$as_echo "$LD" >&6; }
31585else
31586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31587$as_echo "no" >&6; }
31588fi
31589
31590
31591
31592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31593
31594  # First separate the path from the arguments. This will split at the first
31595  # space.
31596  complete="$LD"
31597  path="${complete%% *}"
31598  tmp="$complete EOL"
31599  arguments="${tmp#* }"
31600
31601  # Input might be given as Windows format, start by converting to
31602  # unix format.
31603  new_path=`$CYGPATH -u "$path"`
31604
31605  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
31616    # The splitting of arguments from the executable at a space might have been incorrect,
31617    # since paths with space are more likely in Windows. Give it another try with the whole
31618    # argument.
31619    path="$complete"
31620    arguments="EOL"
31621    new_path=`$CYGPATH -u "$path"`
31622    new_path=`$WHICH "$new_path" 2> /dev/null`
31623    # bat and cmd files are not always considered executable in cygwin causing which
31624    # to not find them
31625    if test "x$new_path" = x \
31626        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31627        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31628      new_path=`$CYGPATH -u "$path"`
31629    fi
31630    if test "x$new_path" = x; then
31631      # It's still not found. Now this is an unrecoverable error.
31632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31633$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31634      has_space=`$ECHO "$complete" | $GREP " "`
31635      if test "x$has_space" != x; then
31636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31638      fi
31639      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31640    fi
31641  fi
31642
31643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31646  # "foo.exe" is OK but "foo" is an error.
31647  #
31648  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31649  # It is also a way to make sure we got the proper file name for the real test later on.
31650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31651  if test "x$test_shortpath" = x; then
31652    # Short path failed, file does not exist as specified.
31653    # Try adding .exe or .cmd
31654    if test -f "${new_path}.exe"; then
31655      input_to_shortpath="${new_path}.exe"
31656    elif test -f "${new_path}.cmd"; then
31657      input_to_shortpath="${new_path}.cmd"
31658    else
31659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31660$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31661      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31662$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31663      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31664    fi
31665  else
31666    input_to_shortpath="$new_path"
31667  fi
31668
31669  # Call helper function which possibly converts this using DOS-style short mode.
31670  # If so, the updated path is stored in $new_path.
31671  new_path="$input_to_shortpath"
31672
31673  input_path="$input_to_shortpath"
31674  # Check if we need to convert this using DOS-style short mode. If the path
31675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31676  # take no chances and rewrite it.
31677  # Note: m4 eats our [], so we need to use [ and ] instead.
31678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31679  if test "x$has_forbidden_chars" != x; then
31680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31684      # Going to short mode and back again did indeed matter. Since short mode is
31685      # case insensitive, let's make it lowercase to improve readability.
31686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31687      # Now convert it back to Unix-stile (cygpath)
31688      input_path=`$CYGPATH -u "$shortmode_path"`
31689      new_path="$input_path"
31690    fi
31691  fi
31692
31693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31694  if test "x$test_cygdrive_prefix" = x; then
31695    # As a simple fix, exclude /usr/bin since it's not a real path.
31696    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31698      # a path prefixed by /cygdrive for fixpath to work.
31699      new_path="$CYGWIN_ROOT_PATH$input_path"
31700    fi
31701  fi
31702
31703  # remove trailing .exe if any
31704  new_path="${new_path/%.exe/}"
31705
31706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31707
31708  # First separate the path from the arguments. This will split at the first
31709  # space.
31710  complete="$LD"
31711  path="${complete%% *}"
31712  tmp="$complete EOL"
31713  arguments="${tmp#* }"
31714
31715  # Input might be given as Windows format, start by converting to
31716  # unix format.
31717  new_path="$path"
31718
31719  windows_path="$new_path"
31720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31721    unix_path=`$CYGPATH -u "$windows_path"`
31722    new_path="$unix_path"
31723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31725    new_path="$unix_path"
31726  fi
31727
31728
31729  # Now try to locate executable using which
31730  new_path=`$WHICH "$new_path" 2> /dev/null`
31731
31732  if test "x$new_path" = x; then
31733    # Oops. Which didn't find the executable.
31734    # The splitting of arguments from the executable at a space might have been incorrect,
31735    # since paths with space are more likely in Windows. Give it another try with the whole
31736    # argument.
31737    path="$complete"
31738    arguments="EOL"
31739    new_path="$path"
31740
31741  windows_path="$new_path"
31742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31743    unix_path=`$CYGPATH -u "$windows_path"`
31744    new_path="$unix_path"
31745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31747    new_path="$unix_path"
31748  fi
31749
31750
31751    new_path=`$WHICH "$new_path" 2> /dev/null`
31752    # bat and cmd files are not always considered executable in MSYS causing which
31753    # to not find them
31754    if test "x$new_path" = x \
31755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31757      new_path="$path"
31758
31759  windows_path="$new_path"
31760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31761    unix_path=`$CYGPATH -u "$windows_path"`
31762    new_path="$unix_path"
31763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31765    new_path="$unix_path"
31766  fi
31767
31768    fi
31769
31770    if test "x$new_path" = x; then
31771      # It's still not found. Now this is an unrecoverable error.
31772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31773$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31774      has_space=`$ECHO "$complete" | $GREP " "`
31775      if test "x$has_space" != x; then
31776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31778      fi
31779      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31780    fi
31781  fi
31782
31783  # Now new_path has a complete unix path to the binary
31784  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31785    # Keep paths in /bin as-is, but remove trailing .exe if any
31786    new_path="${new_path/%.exe/}"
31787    # Do not save /bin paths to all_fixpath_prefixes!
31788  else
31789    # Not in mixed or Windows style, start by that.
31790    new_path=`cmd //c echo $new_path`
31791
31792  input_path="$new_path"
31793  # Check if we need to convert this using DOS-style short mode. If the path
31794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31795  # take no chances and rewrite it.
31796  # Note: m4 eats our [], so we need to use [ and ] instead.
31797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31798  if test "x$has_forbidden_chars" != x; then
31799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31801  fi
31802
31803    # Output is in $new_path
31804
31805  windows_path="$new_path"
31806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31807    unix_path=`$CYGPATH -u "$windows_path"`
31808    new_path="$unix_path"
31809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31811    new_path="$unix_path"
31812  fi
31813
31814    # remove trailing .exe if any
31815    new_path="${new_path/%.exe/}"
31816
31817    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31818    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31819  fi
31820
31821  else
31822    # We're on a unix platform. Hooray! :)
31823    # First separate the path from the arguments. This will split at the first
31824    # space.
31825    complete="$LD"
31826    path="${complete%% *}"
31827    tmp="$complete EOL"
31828    arguments="${tmp#* }"
31829
31830    # Cannot rely on the command "which" here since it doesn't always work.
31831    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31832    if test -z "$is_absolute_path"; then
31833      # Path to executable is not absolute. Find it.
31834      IFS_save="$IFS"
31835      IFS=:
31836      for p in $PATH; do
31837        if test -f "$p/$path" && test -x "$p/$path"; then
31838          new_path="$p/$path"
31839          break
31840        fi
31841      done
31842      IFS="$IFS_save"
31843    else
31844      # This is an absolute path, we can use it without further modifications.
31845      new_path="$path"
31846    fi
31847
31848    if test "x$new_path" = x; then
31849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31850$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31851      has_space=`$ECHO "$complete" | $GREP " "`
31852      if test "x$has_space" != x; then
31853        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31854$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31855      fi
31856      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31857    fi
31858  fi
31859
31860  # Now join together the path and the arguments once again
31861  if test "x$arguments" != xEOL; then
31862    new_complete="$new_path ${arguments% *}"
31863  else
31864    new_complete="$new_path"
31865  fi
31866
31867  if test "x$complete" != "x$new_complete"; then
31868    LD="$new_complete"
31869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31870$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31871  fi
31872
31873    # Verify that we indeed succeeded with this trick.
31874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31875$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31876    "$LD" --version > /dev/null
31877    if test $? -eq 0 ; then
31878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31879$as_echo "no" >&6; }
31880      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31881    else
31882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31883$as_echo "yes" >&6; }
31884    fi
31885    LDCXX="$LD"
31886  else
31887    # All other toolchains use the compiler to link.
31888    LD="$CC"
31889    LDCXX="$CXX"
31890  fi
31891
31892  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31893
31894
31895  #
31896  # Setup the assembler (AS)
31897  #
31898  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31899    # FIXME: should this really be solaris, or solstudio?
31900
31901
31902  # Publish this variable in the help.
31903
31904
31905  if test "x$AS" = x; then
31906    # The variable is not set by user, try to locate tool using the code snippet
31907    for ac_prog in as
31908do
31909  # Extract the first word of "$ac_prog", so it can be a program name with args.
31910set dummy $ac_prog; ac_word=$2
31911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31912$as_echo_n "checking for $ac_word... " >&6; }
31913if ${ac_cv_path_AS+:} false; then :
31914  $as_echo_n "(cached) " >&6
31915else
31916  case $AS in
31917  [\\/]* | ?:[\\/]*)
31918  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31919  ;;
31920  *)
31921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31922for as_dir in $PATH
31923do
31924  IFS=$as_save_IFS
31925  test -z "$as_dir" && as_dir=.
31926    for ac_exec_ext in '' $ac_executable_extensions; do
31927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31928    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31930    break 2
31931  fi
31932done
31933  done
31934IFS=$as_save_IFS
31935
31936  ;;
31937esac
31938fi
31939AS=$ac_cv_path_AS
31940if test -n "$AS"; then
31941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31942$as_echo "$AS" >&6; }
31943else
31944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31945$as_echo "no" >&6; }
31946fi
31947
31948
31949  test -n "$AS" && break
31950done
31951
31952  else
31953    # The variable is set, but is it from the command line or the environment?
31954
31955    # Try to remove the string !AS! from our list.
31956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31958      # If it failed, the variable was not from the command line. Ignore it,
31959      # but warn the user (except for BASH, which is always set by the calling BASH).
31960      if test "xAS" != xBASH; then
31961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31962$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31963      fi
31964      # Try to locate tool using the code snippet
31965      for ac_prog in as
31966do
31967  # Extract the first word of "$ac_prog", so it can be a program name with args.
31968set dummy $ac_prog; ac_word=$2
31969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31970$as_echo_n "checking for $ac_word... " >&6; }
31971if ${ac_cv_path_AS+:} false; then :
31972  $as_echo_n "(cached) " >&6
31973else
31974  case $AS in
31975  [\\/]* | ?:[\\/]*)
31976  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31977  ;;
31978  *)
31979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31980for as_dir in $PATH
31981do
31982  IFS=$as_save_IFS
31983  test -z "$as_dir" && as_dir=.
31984    for ac_exec_ext in '' $ac_executable_extensions; do
31985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31986    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31988    break 2
31989  fi
31990done
31991  done
31992IFS=$as_save_IFS
31993
31994  ;;
31995esac
31996fi
31997AS=$ac_cv_path_AS
31998if test -n "$AS"; then
31999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32000$as_echo "$AS" >&6; }
32001else
32002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32003$as_echo "no" >&6; }
32004fi
32005
32006
32007  test -n "$AS" && break
32008done
32009
32010    else
32011      # If it succeeded, then it was overridden by the user. We will use it
32012      # for the tool.
32013
32014      # First remove it from the list of overridden variables, so we can test
32015      # for unknown variables in the end.
32016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32017
32018      # Check if the provided tool contains a complete path.
32019      tool_specified="$AS"
32020      tool_basename="${tool_specified##*/}"
32021      if test "x$tool_basename" = "x$tool_specified"; then
32022        # A command without a complete path is provided, search $PATH.
32023        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32024$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32025        # Extract the first word of "$tool_basename", so it can be a program name with args.
32026set dummy $tool_basename; ac_word=$2
32027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32028$as_echo_n "checking for $ac_word... " >&6; }
32029if ${ac_cv_path_AS+:} false; then :
32030  $as_echo_n "(cached) " >&6
32031else
32032  case $AS in
32033  [\\/]* | ?:[\\/]*)
32034  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32035  ;;
32036  *)
32037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32038for as_dir in $PATH
32039do
32040  IFS=$as_save_IFS
32041  test -z "$as_dir" && as_dir=.
32042    for ac_exec_ext in '' $ac_executable_extensions; do
32043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32044    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32046    break 2
32047  fi
32048done
32049  done
32050IFS=$as_save_IFS
32051
32052  ;;
32053esac
32054fi
32055AS=$ac_cv_path_AS
32056if test -n "$AS"; then
32057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32058$as_echo "$AS" >&6; }
32059else
32060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32061$as_echo "no" >&6; }
32062fi
32063
32064
32065        if test "x$AS" = x; then
32066          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32067        fi
32068      else
32069        # Otherwise we believe it is a complete path. Use it as it is.
32070        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32071$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32072        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32073$as_echo_n "checking for AS... " >&6; }
32074        if test ! -x "$tool_specified"; then
32075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32076$as_echo "not found" >&6; }
32077          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32078        fi
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32080$as_echo "$tool_specified" >&6; }
32081      fi
32082    fi
32083  fi
32084
32085
32086
32087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32088
32089  # First separate the path from the arguments. This will split at the first
32090  # space.
32091  complete="$AS"
32092  path="${complete%% *}"
32093  tmp="$complete EOL"
32094  arguments="${tmp#* }"
32095
32096  # Input might be given as Windows format, start by converting to
32097  # unix format.
32098  new_path=`$CYGPATH -u "$path"`
32099
32100  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
32111    # The splitting of arguments from the executable at a space might have been incorrect,
32112    # since paths with space are more likely in Windows. Give it another try with the whole
32113    # argument.
32114    path="$complete"
32115    arguments="EOL"
32116    new_path=`$CYGPATH -u "$path"`
32117    new_path=`$WHICH "$new_path" 2> /dev/null`
32118    # bat and cmd files are not always considered executable in cygwin causing which
32119    # to not find them
32120    if test "x$new_path" = x \
32121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32123      new_path=`$CYGPATH -u "$path"`
32124    fi
32125    if test "x$new_path" = x; then
32126      # It's still not found. Now this is an unrecoverable error.
32127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32128$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32129      has_space=`$ECHO "$complete" | $GREP " "`
32130      if test "x$has_space" != x; then
32131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32133      fi
32134      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32135    fi
32136  fi
32137
32138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32141  # "foo.exe" is OK but "foo" is an error.
32142  #
32143  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32144  # It is also a way to make sure we got the proper file name for the real test later on.
32145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32146  if test "x$test_shortpath" = x; then
32147    # Short path failed, file does not exist as specified.
32148    # Try adding .exe or .cmd
32149    if test -f "${new_path}.exe"; then
32150      input_to_shortpath="${new_path}.exe"
32151    elif test -f "${new_path}.cmd"; then
32152      input_to_shortpath="${new_path}.cmd"
32153    else
32154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32155$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32156      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32157$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32158      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32159    fi
32160  else
32161    input_to_shortpath="$new_path"
32162  fi
32163
32164  # Call helper function which possibly converts this using DOS-style short mode.
32165  # If so, the updated path is stored in $new_path.
32166  new_path="$input_to_shortpath"
32167
32168  input_path="$input_to_shortpath"
32169  # Check if we need to convert this using DOS-style short mode. If the path
32170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32171  # take no chances and rewrite it.
32172  # Note: m4 eats our [], so we need to use [ and ] instead.
32173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32174  if test "x$has_forbidden_chars" != x; then
32175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32179      # Going to short mode and back again did indeed matter. Since short mode is
32180      # case insensitive, let's make it lowercase to improve readability.
32181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32182      # Now convert it back to Unix-stile (cygpath)
32183      input_path=`$CYGPATH -u "$shortmode_path"`
32184      new_path="$input_path"
32185    fi
32186  fi
32187
32188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32189  if test "x$test_cygdrive_prefix" = x; then
32190    # As a simple fix, exclude /usr/bin since it's not a real path.
32191    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32193      # a path prefixed by /cygdrive for fixpath to work.
32194      new_path="$CYGWIN_ROOT_PATH$input_path"
32195    fi
32196  fi
32197
32198  # remove trailing .exe if any
32199  new_path="${new_path/%.exe/}"
32200
32201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32202
32203  # First separate the path from the arguments. This will split at the first
32204  # space.
32205  complete="$AS"
32206  path="${complete%% *}"
32207  tmp="$complete EOL"
32208  arguments="${tmp#* }"
32209
32210  # Input might be given as Windows format, start by converting to
32211  # unix format.
32212  new_path="$path"
32213
32214  windows_path="$new_path"
32215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32216    unix_path=`$CYGPATH -u "$windows_path"`
32217    new_path="$unix_path"
32218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32220    new_path="$unix_path"
32221  fi
32222
32223
32224  # Now try to locate executable using which
32225  new_path=`$WHICH "$new_path" 2> /dev/null`
32226
32227  if test "x$new_path" = x; then
32228    # Oops. Which didn't find the executable.
32229    # The splitting of arguments from the executable at a space might have been incorrect,
32230    # since paths with space are more likely in Windows. Give it another try with the whole
32231    # argument.
32232    path="$complete"
32233    arguments="EOL"
32234    new_path="$path"
32235
32236  windows_path="$new_path"
32237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32238    unix_path=`$CYGPATH -u "$windows_path"`
32239    new_path="$unix_path"
32240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32242    new_path="$unix_path"
32243  fi
32244
32245
32246    new_path=`$WHICH "$new_path" 2> /dev/null`
32247    # bat and cmd files are not always considered executable in MSYS causing which
32248    # to not find them
32249    if test "x$new_path" = x \
32250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32252      new_path="$path"
32253
32254  windows_path="$new_path"
32255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32256    unix_path=`$CYGPATH -u "$windows_path"`
32257    new_path="$unix_path"
32258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32260    new_path="$unix_path"
32261  fi
32262
32263    fi
32264
32265    if test "x$new_path" = x; then
32266      # It's still not found. Now this is an unrecoverable error.
32267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32268$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32269      has_space=`$ECHO "$complete" | $GREP " "`
32270      if test "x$has_space" != x; then
32271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32273      fi
32274      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32275    fi
32276  fi
32277
32278  # Now new_path has a complete unix path to the binary
32279  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32280    # Keep paths in /bin as-is, but remove trailing .exe if any
32281    new_path="${new_path/%.exe/}"
32282    # Do not save /bin paths to all_fixpath_prefixes!
32283  else
32284    # Not in mixed or Windows style, start by that.
32285    new_path=`cmd //c echo $new_path`
32286
32287  input_path="$new_path"
32288  # Check if we need to convert this using DOS-style short mode. If the path
32289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32290  # take no chances and rewrite it.
32291  # Note: m4 eats our [], so we need to use [ and ] instead.
32292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32293  if test "x$has_forbidden_chars" != x; then
32294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32296  fi
32297
32298    # Output is in $new_path
32299
32300  windows_path="$new_path"
32301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32302    unix_path=`$CYGPATH -u "$windows_path"`
32303    new_path="$unix_path"
32304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32306    new_path="$unix_path"
32307  fi
32308
32309    # remove trailing .exe if any
32310    new_path="${new_path/%.exe/}"
32311
32312    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32313    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32314  fi
32315
32316  else
32317    # We're on a unix platform. Hooray! :)
32318    # First separate the path from the arguments. This will split at the first
32319    # space.
32320    complete="$AS"
32321    path="${complete%% *}"
32322    tmp="$complete EOL"
32323    arguments="${tmp#* }"
32324
32325    # Cannot rely on the command "which" here since it doesn't always work.
32326    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32327    if test -z "$is_absolute_path"; then
32328      # Path to executable is not absolute. Find it.
32329      IFS_save="$IFS"
32330      IFS=:
32331      for p in $PATH; do
32332        if test -f "$p/$path" && test -x "$p/$path"; then
32333          new_path="$p/$path"
32334          break
32335        fi
32336      done
32337      IFS="$IFS_save"
32338    else
32339      # This is an absolute path, we can use it without further modifications.
32340      new_path="$path"
32341    fi
32342
32343    if test "x$new_path" = x; then
32344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32345$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32346      has_space=`$ECHO "$complete" | $GREP " "`
32347      if test "x$has_space" != x; then
32348        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32349$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32350      fi
32351      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32352    fi
32353  fi
32354
32355  # Now join together the path and the arguments once again
32356  if test "x$arguments" != xEOL; then
32357    new_complete="$new_path ${arguments% *}"
32358  else
32359    new_complete="$new_path"
32360  fi
32361
32362  if test "x$complete" != "x$new_complete"; then
32363    AS="$new_complete"
32364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32365$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32366  fi
32367
32368  else
32369    # FIXME: is this correct for microsoft?
32370    AS="$CC -c"
32371  fi
32372
32373
32374  #
32375  # Setup the archiver (AR)
32376  #
32377  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32378    # The corresponding ar tool is lib.exe (used to create static libraries)
32379    # Extract the first word of "lib", so it can be a program name with args.
32380set dummy lib; ac_word=$2
32381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32382$as_echo_n "checking for $ac_word... " >&6; }
32383if ${ac_cv_prog_AR+:} false; then :
32384  $as_echo_n "(cached) " >&6
32385else
32386  if test -n "$AR"; then
32387  ac_cv_prog_AR="$AR" # Let the user override the test.
32388else
32389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32390for as_dir in $PATH
32391do
32392  IFS=$as_save_IFS
32393  test -z "$as_dir" && as_dir=.
32394    for ac_exec_ext in '' $ac_executable_extensions; do
32395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32396    ac_cv_prog_AR="lib"
32397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32398    break 2
32399  fi
32400done
32401  done
32402IFS=$as_save_IFS
32403
32404fi
32405fi
32406AR=$ac_cv_prog_AR
32407if test -n "$AR"; then
32408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32409$as_echo "$AR" >&6; }
32410else
32411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32412$as_echo "no" >&6; }
32413fi
32414
32415
32416  else
32417
32418
32419  # Publish this variable in the help.
32420
32421
32422  if test "x$AR" = x; then
32423    # The variable is not set by user, try to locate tool using the code snippet
32424    if test -n "$ac_tool_prefix"; then
32425  for ac_prog in ar
32426  do
32427    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32428set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32430$as_echo_n "checking for $ac_word... " >&6; }
32431if ${ac_cv_prog_AR+:} false; then :
32432  $as_echo_n "(cached) " >&6
32433else
32434  if test -n "$AR"; then
32435  ac_cv_prog_AR="$AR" # Let the user override the test.
32436else
32437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32438for as_dir in $PATH
32439do
32440  IFS=$as_save_IFS
32441  test -z "$as_dir" && as_dir=.
32442    for ac_exec_ext in '' $ac_executable_extensions; do
32443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32444    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32446    break 2
32447  fi
32448done
32449  done
32450IFS=$as_save_IFS
32451
32452fi
32453fi
32454AR=$ac_cv_prog_AR
32455if test -n "$AR"; then
32456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32457$as_echo "$AR" >&6; }
32458else
32459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32460$as_echo "no" >&6; }
32461fi
32462
32463
32464    test -n "$AR" && break
32465  done
32466fi
32467if test -z "$AR"; then
32468  ac_ct_AR=$AR
32469  for ac_prog in ar
32470do
32471  # Extract the first word of "$ac_prog", so it can be a program name with args.
32472set dummy $ac_prog; ac_word=$2
32473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32474$as_echo_n "checking for $ac_word... " >&6; }
32475if ${ac_cv_prog_ac_ct_AR+:} false; then :
32476  $as_echo_n "(cached) " >&6
32477else
32478  if test -n "$ac_ct_AR"; then
32479  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32480else
32481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32482for as_dir in $PATH
32483do
32484  IFS=$as_save_IFS
32485  test -z "$as_dir" && as_dir=.
32486    for ac_exec_ext in '' $ac_executable_extensions; do
32487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32488    ac_cv_prog_ac_ct_AR="$ac_prog"
32489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32490    break 2
32491  fi
32492done
32493  done
32494IFS=$as_save_IFS
32495
32496fi
32497fi
32498ac_ct_AR=$ac_cv_prog_ac_ct_AR
32499if test -n "$ac_ct_AR"; then
32500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32501$as_echo "$ac_ct_AR" >&6; }
32502else
32503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32504$as_echo "no" >&6; }
32505fi
32506
32507
32508  test -n "$ac_ct_AR" && break
32509done
32510
32511  if test "x$ac_ct_AR" = x; then
32512    AR=""
32513  else
32514    case $cross_compiling:$ac_tool_warned in
32515yes:)
32516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32518ac_tool_warned=yes ;;
32519esac
32520    AR=$ac_ct_AR
32521  fi
32522fi
32523
32524  else
32525    # The variable is set, but is it from the command line or the environment?
32526
32527    # Try to remove the string !AR! from our list.
32528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32530      # If it failed, the variable was not from the command line. Ignore it,
32531      # but warn the user (except for BASH, which is always set by the calling BASH).
32532      if test "xAR" != xBASH; then
32533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32534$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32535      fi
32536      # Try to locate tool using the code snippet
32537      if test -n "$ac_tool_prefix"; then
32538  for ac_prog in ar
32539  do
32540    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32541set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32543$as_echo_n "checking for $ac_word... " >&6; }
32544if ${ac_cv_prog_AR+:} false; then :
32545  $as_echo_n "(cached) " >&6
32546else
32547  if test -n "$AR"; then
32548  ac_cv_prog_AR="$AR" # Let the user override the test.
32549else
32550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32551for as_dir in $PATH
32552do
32553  IFS=$as_save_IFS
32554  test -z "$as_dir" && as_dir=.
32555    for ac_exec_ext in '' $ac_executable_extensions; do
32556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32557    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32559    break 2
32560  fi
32561done
32562  done
32563IFS=$as_save_IFS
32564
32565fi
32566fi
32567AR=$ac_cv_prog_AR
32568if test -n "$AR"; then
32569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32570$as_echo "$AR" >&6; }
32571else
32572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32573$as_echo "no" >&6; }
32574fi
32575
32576
32577    test -n "$AR" && break
32578  done
32579fi
32580if test -z "$AR"; then
32581  ac_ct_AR=$AR
32582  for ac_prog in ar
32583do
32584  # Extract the first word of "$ac_prog", so it can be a program name with args.
32585set dummy $ac_prog; ac_word=$2
32586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32587$as_echo_n "checking for $ac_word... " >&6; }
32588if ${ac_cv_prog_ac_ct_AR+:} false; then :
32589  $as_echo_n "(cached) " >&6
32590else
32591  if test -n "$ac_ct_AR"; then
32592  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32593else
32594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32595for as_dir in $PATH
32596do
32597  IFS=$as_save_IFS
32598  test -z "$as_dir" && as_dir=.
32599    for ac_exec_ext in '' $ac_executable_extensions; do
32600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32601    ac_cv_prog_ac_ct_AR="$ac_prog"
32602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32603    break 2
32604  fi
32605done
32606  done
32607IFS=$as_save_IFS
32608
32609fi
32610fi
32611ac_ct_AR=$ac_cv_prog_ac_ct_AR
32612if test -n "$ac_ct_AR"; then
32613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32614$as_echo "$ac_ct_AR" >&6; }
32615else
32616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32617$as_echo "no" >&6; }
32618fi
32619
32620
32621  test -n "$ac_ct_AR" && break
32622done
32623
32624  if test "x$ac_ct_AR" = x; then
32625    AR=""
32626  else
32627    case $cross_compiling:$ac_tool_warned in
32628yes:)
32629{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32630$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32631ac_tool_warned=yes ;;
32632esac
32633    AR=$ac_ct_AR
32634  fi
32635fi
32636
32637    else
32638      # If it succeeded, then it was overridden by the user. We will use it
32639      # for the tool.
32640
32641      # First remove it from the list of overridden variables, so we can test
32642      # for unknown variables in the end.
32643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32644
32645      # Check if the provided tool contains a complete path.
32646      tool_specified="$AR"
32647      tool_basename="${tool_specified##*/}"
32648      if test "x$tool_basename" = "x$tool_specified"; then
32649        # A command without a complete path is provided, search $PATH.
32650        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32651$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32652        # Extract the first word of "$tool_basename", so it can be a program name with args.
32653set dummy $tool_basename; ac_word=$2
32654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32655$as_echo_n "checking for $ac_word... " >&6; }
32656if ${ac_cv_path_AR+:} false; then :
32657  $as_echo_n "(cached) " >&6
32658else
32659  case $AR in
32660  [\\/]* | ?:[\\/]*)
32661  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32662  ;;
32663  *)
32664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32665for as_dir in $PATH
32666do
32667  IFS=$as_save_IFS
32668  test -z "$as_dir" && as_dir=.
32669    for ac_exec_ext in '' $ac_executable_extensions; do
32670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32671    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32673    break 2
32674  fi
32675done
32676  done
32677IFS=$as_save_IFS
32678
32679  ;;
32680esac
32681fi
32682AR=$ac_cv_path_AR
32683if test -n "$AR"; then
32684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32685$as_echo "$AR" >&6; }
32686else
32687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32688$as_echo "no" >&6; }
32689fi
32690
32691
32692        if test "x$AR" = x; then
32693          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32694        fi
32695      else
32696        # Otherwise we believe it is a complete path. Use it as it is.
32697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32698$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32700$as_echo_n "checking for AR... " >&6; }
32701        if test ! -x "$tool_specified"; then
32702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32703$as_echo "not found" >&6; }
32704          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32705        fi
32706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32707$as_echo "$tool_specified" >&6; }
32708      fi
32709    fi
32710  fi
32711
32712
32713  fi
32714
32715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32716
32717  # First separate the path from the arguments. This will split at the first
32718  # space.
32719  complete="$AR"
32720  path="${complete%% *}"
32721  tmp="$complete EOL"
32722  arguments="${tmp#* }"
32723
32724  # Input might be given as Windows format, start by converting to
32725  # unix format.
32726  new_path=`$CYGPATH -u "$path"`
32727
32728  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
32739    # The splitting of arguments from the executable at a space might have been incorrect,
32740    # since paths with space are more likely in Windows. Give it another try with the whole
32741    # argument.
32742    path="$complete"
32743    arguments="EOL"
32744    new_path=`$CYGPATH -u "$path"`
32745    new_path=`$WHICH "$new_path" 2> /dev/null`
32746    # bat and cmd files are not always considered executable in cygwin causing which
32747    # to not find them
32748    if test "x$new_path" = x \
32749        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32750        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32751      new_path=`$CYGPATH -u "$path"`
32752    fi
32753    if test "x$new_path" = x; then
32754      # It's still not found. Now this is an unrecoverable error.
32755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32756$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32757      has_space=`$ECHO "$complete" | $GREP " "`
32758      if test "x$has_space" != x; then
32759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32761      fi
32762      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32763    fi
32764  fi
32765
32766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32769  # "foo.exe" is OK but "foo" is an error.
32770  #
32771  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32772  # It is also a way to make sure we got the proper file name for the real test later on.
32773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32774  if test "x$test_shortpath" = x; then
32775    # Short path failed, file does not exist as specified.
32776    # Try adding .exe or .cmd
32777    if test -f "${new_path}.exe"; then
32778      input_to_shortpath="${new_path}.exe"
32779    elif test -f "${new_path}.cmd"; then
32780      input_to_shortpath="${new_path}.cmd"
32781    else
32782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32783$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32784      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32785$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32786      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32787    fi
32788  else
32789    input_to_shortpath="$new_path"
32790  fi
32791
32792  # Call helper function which possibly converts this using DOS-style short mode.
32793  # If so, the updated path is stored in $new_path.
32794  new_path="$input_to_shortpath"
32795
32796  input_path="$input_to_shortpath"
32797  # Check if we need to convert this using DOS-style short mode. If the path
32798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32799  # take no chances and rewrite it.
32800  # Note: m4 eats our [], so we need to use [ and ] instead.
32801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32802  if test "x$has_forbidden_chars" != x; then
32803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32807      # Going to short mode and back again did indeed matter. Since short mode is
32808      # case insensitive, let's make it lowercase to improve readability.
32809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32810      # Now convert it back to Unix-stile (cygpath)
32811      input_path=`$CYGPATH -u "$shortmode_path"`
32812      new_path="$input_path"
32813    fi
32814  fi
32815
32816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32817  if test "x$test_cygdrive_prefix" = x; then
32818    # As a simple fix, exclude /usr/bin since it's not a real path.
32819    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32821      # a path prefixed by /cygdrive for fixpath to work.
32822      new_path="$CYGWIN_ROOT_PATH$input_path"
32823    fi
32824  fi
32825
32826  # remove trailing .exe if any
32827  new_path="${new_path/%.exe/}"
32828
32829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32830
32831  # First separate the path from the arguments. This will split at the first
32832  # space.
32833  complete="$AR"
32834  path="${complete%% *}"
32835  tmp="$complete EOL"
32836  arguments="${tmp#* }"
32837
32838  # Input might be given as Windows format, start by converting to
32839  # unix format.
32840  new_path="$path"
32841
32842  windows_path="$new_path"
32843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32844    unix_path=`$CYGPATH -u "$windows_path"`
32845    new_path="$unix_path"
32846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32848    new_path="$unix_path"
32849  fi
32850
32851
32852  # Now try to locate executable using which
32853  new_path=`$WHICH "$new_path" 2> /dev/null`
32854
32855  if test "x$new_path" = x; then
32856    # Oops. Which didn't find the executable.
32857    # The splitting of arguments from the executable at a space might have been incorrect,
32858    # since paths with space are more likely in Windows. Give it another try with the whole
32859    # argument.
32860    path="$complete"
32861    arguments="EOL"
32862    new_path="$path"
32863
32864  windows_path="$new_path"
32865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32866    unix_path=`$CYGPATH -u "$windows_path"`
32867    new_path="$unix_path"
32868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32870    new_path="$unix_path"
32871  fi
32872
32873
32874    new_path=`$WHICH "$new_path" 2> /dev/null`
32875    # bat and cmd files are not always considered executable in MSYS causing which
32876    # to not find them
32877    if test "x$new_path" = x \
32878        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32879        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32880      new_path="$path"
32881
32882  windows_path="$new_path"
32883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32884    unix_path=`$CYGPATH -u "$windows_path"`
32885    new_path="$unix_path"
32886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32888    new_path="$unix_path"
32889  fi
32890
32891    fi
32892
32893    if test "x$new_path" = x; then
32894      # It's still not found. Now this is an unrecoverable error.
32895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32896$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32897      has_space=`$ECHO "$complete" | $GREP " "`
32898      if test "x$has_space" != x; then
32899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32901      fi
32902      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32903    fi
32904  fi
32905
32906  # Now new_path has a complete unix path to the binary
32907  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32908    # Keep paths in /bin as-is, but remove trailing .exe if any
32909    new_path="${new_path/%.exe/}"
32910    # Do not save /bin paths to all_fixpath_prefixes!
32911  else
32912    # Not in mixed or Windows style, start by that.
32913    new_path=`cmd //c echo $new_path`
32914
32915  input_path="$new_path"
32916  # Check if we need to convert this using DOS-style short mode. If the path
32917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32918  # take no chances and rewrite it.
32919  # Note: m4 eats our [], so we need to use [ and ] instead.
32920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32921  if test "x$has_forbidden_chars" != x; then
32922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32924  fi
32925
32926    # Output is in $new_path
32927
32928  windows_path="$new_path"
32929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32930    unix_path=`$CYGPATH -u "$windows_path"`
32931    new_path="$unix_path"
32932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32934    new_path="$unix_path"
32935  fi
32936
32937    # remove trailing .exe if any
32938    new_path="${new_path/%.exe/}"
32939
32940    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32941    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32942  fi
32943
32944  else
32945    # We're on a unix platform. Hooray! :)
32946    # First separate the path from the arguments. This will split at the first
32947    # space.
32948    complete="$AR"
32949    path="${complete%% *}"
32950    tmp="$complete EOL"
32951    arguments="${tmp#* }"
32952
32953    # Cannot rely on the command "which" here since it doesn't always work.
32954    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32955    if test -z "$is_absolute_path"; then
32956      # Path to executable is not absolute. Find it.
32957      IFS_save="$IFS"
32958      IFS=:
32959      for p in $PATH; do
32960        if test -f "$p/$path" && test -x "$p/$path"; then
32961          new_path="$p/$path"
32962          break
32963        fi
32964      done
32965      IFS="$IFS_save"
32966    else
32967      # This is an absolute path, we can use it without further modifications.
32968      new_path="$path"
32969    fi
32970
32971    if test "x$new_path" = x; then
32972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32973$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32974      has_space=`$ECHO "$complete" | $GREP " "`
32975      if test "x$has_space" != x; then
32976        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32977$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32978      fi
32979      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32980    fi
32981  fi
32982
32983  # Now join together the path and the arguments once again
32984  if test "x$arguments" != xEOL; then
32985    new_complete="$new_path ${arguments% *}"
32986  else
32987    new_complete="$new_path"
32988  fi
32989
32990  if test "x$complete" != "x$new_complete"; then
32991    AR="$new_complete"
32992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32993$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32994  fi
32995
32996
32997
32998  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32999    ac_ext=m
33000ac_cpp='$OBJCPP $CPPFLAGS'
33001ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33002ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33003ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33004if test -n "$ac_tool_prefix"; then
33005  for ac_prog in gcc objcc objc cc CC
33006  do
33007    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33008set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33010$as_echo_n "checking for $ac_word... " >&6; }
33011if ${ac_cv_prog_OBJC+:} false; then :
33012  $as_echo_n "(cached) " >&6
33013else
33014  if test -n "$OBJC"; then
33015  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33016else
33017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33018for as_dir in $PATH
33019do
33020  IFS=$as_save_IFS
33021  test -z "$as_dir" && as_dir=.
33022    for ac_exec_ext in '' $ac_executable_extensions; do
33023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33024    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33026    break 2
33027  fi
33028done
33029  done
33030IFS=$as_save_IFS
33031
33032fi
33033fi
33034OBJC=$ac_cv_prog_OBJC
33035if test -n "$OBJC"; then
33036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33037$as_echo "$OBJC" >&6; }
33038else
33039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33040$as_echo "no" >&6; }
33041fi
33042
33043
33044    test -n "$OBJC" && break
33045  done
33046fi
33047if test -z "$OBJC"; then
33048  ac_ct_OBJC=$OBJC
33049  for ac_prog in gcc objcc objc cc CC
33050do
33051  # Extract the first word of "$ac_prog", so it can be a program name with args.
33052set dummy $ac_prog; ac_word=$2
33053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33054$as_echo_n "checking for $ac_word... " >&6; }
33055if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33056  $as_echo_n "(cached) " >&6
33057else
33058  if test -n "$ac_ct_OBJC"; then
33059  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33060else
33061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33062for as_dir in $PATH
33063do
33064  IFS=$as_save_IFS
33065  test -z "$as_dir" && as_dir=.
33066    for ac_exec_ext in '' $ac_executable_extensions; do
33067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33068    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33070    break 2
33071  fi
33072done
33073  done
33074IFS=$as_save_IFS
33075
33076fi
33077fi
33078ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33079if test -n "$ac_ct_OBJC"; then
33080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33081$as_echo "$ac_ct_OBJC" >&6; }
33082else
33083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33084$as_echo "no" >&6; }
33085fi
33086
33087
33088  test -n "$ac_ct_OBJC" && break
33089done
33090
33091  if test "x$ac_ct_OBJC" = x; then
33092    OBJC="gcc"
33093  else
33094    case $cross_compiling:$ac_tool_warned in
33095yes:)
33096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33098ac_tool_warned=yes ;;
33099esac
33100    OBJC=$ac_ct_OBJC
33101  fi
33102fi
33103
33104# Provide some information about the compiler.
33105$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33106set X $ac_compile
33107ac_compiler=$2
33108for ac_option in --version -v -V -qversion; do
33109  { { ac_try="$ac_compiler $ac_option >&5"
33110case "(($ac_try" in
33111  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33112  *) ac_try_echo=$ac_try;;
33113esac
33114eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33115$as_echo "$ac_try_echo"; } >&5
33116  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33117  ac_status=$?
33118  if test -s conftest.err; then
33119    sed '10a\
33120... rest of stderr output deleted ...
33121         10q' conftest.err >conftest.er1
33122    cat conftest.er1 >&5
33123  fi
33124  rm -f conftest.er1 conftest.err
33125  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33126  test $ac_status = 0; }
33127done
33128
33129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33130$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33131if ${ac_cv_objc_compiler_gnu+:} false; then :
33132  $as_echo_n "(cached) " >&6
33133else
33134  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33135/* end confdefs.h.  */
33136
33137int
33138main ()
33139{
33140#ifndef __GNUC__
33141       choke me
33142#endif
33143
33144  ;
33145  return 0;
33146}
33147_ACEOF
33148if ac_fn_objc_try_compile "$LINENO"; then :
33149  ac_compiler_gnu=yes
33150else
33151  ac_compiler_gnu=no
33152fi
33153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33154ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33155
33156fi
33157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33158$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33159if test $ac_compiler_gnu = yes; then
33160  GOBJC=yes
33161else
33162  GOBJC=
33163fi
33164ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33165ac_save_OBJCFLAGS=$OBJCFLAGS
33166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33167$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33168if ${ac_cv_prog_objc_g+:} false; then :
33169  $as_echo_n "(cached) " >&6
33170else
33171  ac_save_objc_werror_flag=$ac_objc_werror_flag
33172   ac_objc_werror_flag=yes
33173   ac_cv_prog_objc_g=no
33174   OBJCFLAGS="-g"
33175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33176/* end confdefs.h.  */
33177
33178int
33179main ()
33180{
33181
33182  ;
33183  return 0;
33184}
33185_ACEOF
33186if ac_fn_objc_try_compile "$LINENO"; then :
33187  ac_cv_prog_objc_g=yes
33188else
33189  OBJCFLAGS=""
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
33203else
33204  ac_objc_werror_flag=$ac_save_objc_werror_flag
33205	 OBJCFLAGS="-g"
33206	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33207/* end confdefs.h.  */
33208
33209int
33210main ()
33211{
33212
33213  ;
33214  return 0;
33215}
33216_ACEOF
33217if ac_fn_objc_try_compile "$LINENO"; then :
33218  ac_cv_prog_objc_g=yes
33219fi
33220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33221fi
33222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33223fi
33224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33225   ac_objc_werror_flag=$ac_save_objc_werror_flag
33226fi
33227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33228$as_echo "$ac_cv_prog_objc_g" >&6; }
33229if test "$ac_test_OBJCFLAGS" = set; then
33230  OBJCFLAGS=$ac_save_OBJCFLAGS
33231elif test $ac_cv_prog_objc_g = yes; then
33232  if test "$GOBJC" = yes; then
33233    OBJCFLAGS="-g -O2"
33234  else
33235    OBJCFLAGS="-g"
33236  fi
33237else
33238  if test "$GOBJC" = yes; then
33239    OBJCFLAGS="-O2"
33240  else
33241    OBJCFLAGS=
33242  fi
33243fi
33244ac_ext=cpp
33245ac_cpp='$CXXCPP $CPPFLAGS'
33246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33249
33250
33251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33252
33253  # First separate the path from the arguments. This will split at the first
33254  # space.
33255  complete="$OBJC"
33256  path="${complete%% *}"
33257  tmp="$complete EOL"
33258  arguments="${tmp#* }"
33259
33260  # Input might be given as Windows format, start by converting to
33261  # unix format.
33262  new_path=`$CYGPATH -u "$path"`
33263
33264  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
33275    # The splitting of arguments from the executable at a space might have been incorrect,
33276    # since paths with space are more likely in Windows. Give it another try with the whole
33277    # argument.
33278    path="$complete"
33279    arguments="EOL"
33280    new_path=`$CYGPATH -u "$path"`
33281    new_path=`$WHICH "$new_path" 2> /dev/null`
33282    # bat and cmd files are not always considered executable in cygwin causing which
33283    # to not find them
33284    if test "x$new_path" = x \
33285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33287      new_path=`$CYGPATH -u "$path"`
33288    fi
33289    if test "x$new_path" = x; then
33290      # It's still not found. Now this is an unrecoverable error.
33291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33292$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33293      has_space=`$ECHO "$complete" | $GREP " "`
33294      if test "x$has_space" != x; then
33295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33297      fi
33298      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33299    fi
33300  fi
33301
33302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33305  # "foo.exe" is OK but "foo" is an error.
33306  #
33307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33308  # It is also a way to make sure we got the proper file name for the real test later on.
33309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33310  if test "x$test_shortpath" = x; then
33311    # Short path failed, file does not exist as specified.
33312    # Try adding .exe or .cmd
33313    if test -f "${new_path}.exe"; then
33314      input_to_shortpath="${new_path}.exe"
33315    elif test -f "${new_path}.cmd"; then
33316      input_to_shortpath="${new_path}.cmd"
33317    else
33318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33319$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33322      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33323    fi
33324  else
33325    input_to_shortpath="$new_path"
33326  fi
33327
33328  # Call helper function which possibly converts this using DOS-style short mode.
33329  # If so, the updated path is stored in $new_path.
33330  new_path="$input_to_shortpath"
33331
33332  input_path="$input_to_shortpath"
33333  # Check if we need to convert this using DOS-style short mode. If the path
33334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33335  # take no chances and rewrite it.
33336  # Note: m4 eats our [], so we need to use [ and ] instead.
33337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33338  if test "x$has_forbidden_chars" != x; then
33339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33343      # Going to short mode and back again did indeed matter. Since short mode is
33344      # case insensitive, let's make it lowercase to improve readability.
33345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33346      # Now convert it back to Unix-stile (cygpath)
33347      input_path=`$CYGPATH -u "$shortmode_path"`
33348      new_path="$input_path"
33349    fi
33350  fi
33351
33352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33353  if test "x$test_cygdrive_prefix" = x; then
33354    # As a simple fix, exclude /usr/bin since it's not a real path.
33355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33357      # a path prefixed by /cygdrive for fixpath to work.
33358      new_path="$CYGWIN_ROOT_PATH$input_path"
33359    fi
33360  fi
33361
33362  # remove trailing .exe if any
33363  new_path="${new_path/%.exe/}"
33364
33365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33366
33367  # First separate the path from the arguments. This will split at the first
33368  # space.
33369  complete="$OBJC"
33370  path="${complete%% *}"
33371  tmp="$complete EOL"
33372  arguments="${tmp#* }"
33373
33374  # Input might be given as Windows format, start by converting to
33375  # unix format.
33376  new_path="$path"
33377
33378  windows_path="$new_path"
33379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33380    unix_path=`$CYGPATH -u "$windows_path"`
33381    new_path="$unix_path"
33382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33384    new_path="$unix_path"
33385  fi
33386
33387
33388  # Now try to locate executable using which
33389  new_path=`$WHICH "$new_path" 2> /dev/null`
33390
33391  if test "x$new_path" = x; then
33392    # Oops. Which didn't find the executable.
33393    # The splitting of arguments from the executable at a space might have been incorrect,
33394    # since paths with space are more likely in Windows. Give it another try with the whole
33395    # argument.
33396    path="$complete"
33397    arguments="EOL"
33398    new_path="$path"
33399
33400  windows_path="$new_path"
33401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33402    unix_path=`$CYGPATH -u "$windows_path"`
33403    new_path="$unix_path"
33404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33406    new_path="$unix_path"
33407  fi
33408
33409
33410    new_path=`$WHICH "$new_path" 2> /dev/null`
33411    # bat and cmd files are not always considered executable in MSYS causing which
33412    # to not find them
33413    if test "x$new_path" = x \
33414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33416      new_path="$path"
33417
33418  windows_path="$new_path"
33419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33420    unix_path=`$CYGPATH -u "$windows_path"`
33421    new_path="$unix_path"
33422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33424    new_path="$unix_path"
33425  fi
33426
33427    fi
33428
33429    if test "x$new_path" = x; then
33430      # It's still not found. Now this is an unrecoverable error.
33431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33432$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33433      has_space=`$ECHO "$complete" | $GREP " "`
33434      if test "x$has_space" != x; then
33435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33437      fi
33438      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33439    fi
33440  fi
33441
33442  # Now new_path has a complete unix path to the binary
33443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33444    # Keep paths in /bin as-is, but remove trailing .exe if any
33445    new_path="${new_path/%.exe/}"
33446    # Do not save /bin paths to all_fixpath_prefixes!
33447  else
33448    # Not in mixed or Windows style, start by that.
33449    new_path=`cmd //c echo $new_path`
33450
33451  input_path="$new_path"
33452  # Check if we need to convert this using DOS-style short mode. If the path
33453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33454  # take no chances and rewrite it.
33455  # Note: m4 eats our [], so we need to use [ and ] instead.
33456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33457  if test "x$has_forbidden_chars" != x; then
33458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33460  fi
33461
33462    # Output is in $new_path
33463
33464  windows_path="$new_path"
33465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33466    unix_path=`$CYGPATH -u "$windows_path"`
33467    new_path="$unix_path"
33468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33470    new_path="$unix_path"
33471  fi
33472
33473    # remove trailing .exe if any
33474    new_path="${new_path/%.exe/}"
33475
33476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33478  fi
33479
33480  else
33481    # We're on a unix platform. Hooray! :)
33482    # First separate the path from the arguments. This will split at the first
33483    # space.
33484    complete="$OBJC"
33485    path="${complete%% *}"
33486    tmp="$complete EOL"
33487    arguments="${tmp#* }"
33488
33489    # Cannot rely on the command "which" here since it doesn't always work.
33490    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33491    if test -z "$is_absolute_path"; then
33492      # Path to executable is not absolute. Find it.
33493      IFS_save="$IFS"
33494      IFS=:
33495      for p in $PATH; do
33496        if test -f "$p/$path" && test -x "$p/$path"; then
33497          new_path="$p/$path"
33498          break
33499        fi
33500      done
33501      IFS="$IFS_save"
33502    else
33503      # This is an absolute path, we can use it without further modifications.
33504      new_path="$path"
33505    fi
33506
33507    if test "x$new_path" = x; then
33508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33509$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33510      has_space=`$ECHO "$complete" | $GREP " "`
33511      if test "x$has_space" != x; then
33512        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33514      fi
33515      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33516    fi
33517  fi
33518
33519  # Now join together the path and the arguments once again
33520  if test "x$arguments" != xEOL; then
33521    new_complete="$new_path ${arguments% *}"
33522  else
33523    new_complete="$new_path"
33524  fi
33525
33526  if test "x$complete" != "x$new_complete"; then
33527    OBJC="$new_complete"
33528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33529$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33530  fi
33531
33532
33533
33534  # Publish this variable in the help.
33535
33536
33537  if test "x$LIPO" = x; then
33538    # The variable is not set by user, try to locate tool using the code snippet
33539    for ac_prog in lipo
33540do
33541  # Extract the first word of "$ac_prog", so it can be a program name with args.
33542set dummy $ac_prog; ac_word=$2
33543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33544$as_echo_n "checking for $ac_word... " >&6; }
33545if ${ac_cv_path_LIPO+:} false; then :
33546  $as_echo_n "(cached) " >&6
33547else
33548  case $LIPO in
33549  [\\/]* | ?:[\\/]*)
33550  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33551  ;;
33552  *)
33553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33554for as_dir in $PATH
33555do
33556  IFS=$as_save_IFS
33557  test -z "$as_dir" && as_dir=.
33558    for ac_exec_ext in '' $ac_executable_extensions; do
33559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33560    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33562    break 2
33563  fi
33564done
33565  done
33566IFS=$as_save_IFS
33567
33568  ;;
33569esac
33570fi
33571LIPO=$ac_cv_path_LIPO
33572if test -n "$LIPO"; then
33573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33574$as_echo "$LIPO" >&6; }
33575else
33576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33577$as_echo "no" >&6; }
33578fi
33579
33580
33581  test -n "$LIPO" && break
33582done
33583
33584  else
33585    # The variable is set, but is it from the command line or the environment?
33586
33587    # Try to remove the string !LIPO! from our list.
33588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33590      # If it failed, the variable was not from the command line. Ignore it,
33591      # but warn the user (except for BASH, which is always set by the calling BASH).
33592      if test "xLIPO" != xBASH; then
33593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33594$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33595      fi
33596      # Try to locate tool using the code snippet
33597      for ac_prog in lipo
33598do
33599  # Extract the first word of "$ac_prog", so it can be a program name with args.
33600set dummy $ac_prog; ac_word=$2
33601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33602$as_echo_n "checking for $ac_word... " >&6; }
33603if ${ac_cv_path_LIPO+:} false; then :
33604  $as_echo_n "(cached) " >&6
33605else
33606  case $LIPO in
33607  [\\/]* | ?:[\\/]*)
33608  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33609  ;;
33610  *)
33611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33612for as_dir in $PATH
33613do
33614  IFS=$as_save_IFS
33615  test -z "$as_dir" && as_dir=.
33616    for ac_exec_ext in '' $ac_executable_extensions; do
33617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33618    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33620    break 2
33621  fi
33622done
33623  done
33624IFS=$as_save_IFS
33625
33626  ;;
33627esac
33628fi
33629LIPO=$ac_cv_path_LIPO
33630if test -n "$LIPO"; then
33631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33632$as_echo "$LIPO" >&6; }
33633else
33634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33635$as_echo "no" >&6; }
33636fi
33637
33638
33639  test -n "$LIPO" && break
33640done
33641
33642    else
33643      # If it succeeded, then it was overridden by the user. We will use it
33644      # for the tool.
33645
33646      # First remove it from the list of overridden variables, so we can test
33647      # for unknown variables in the end.
33648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33649
33650      # Check if the provided tool contains a complete path.
33651      tool_specified="$LIPO"
33652      tool_basename="${tool_specified##*/}"
33653      if test "x$tool_basename" = "x$tool_specified"; then
33654        # A command without a complete path is provided, search $PATH.
33655        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33656$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33657        # Extract the first word of "$tool_basename", so it can be a program name with args.
33658set dummy $tool_basename; ac_word=$2
33659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33660$as_echo_n "checking for $ac_word... " >&6; }
33661if ${ac_cv_path_LIPO+:} false; then :
33662  $as_echo_n "(cached) " >&6
33663else
33664  case $LIPO in
33665  [\\/]* | ?:[\\/]*)
33666  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33667  ;;
33668  *)
33669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33670for as_dir in $PATH
33671do
33672  IFS=$as_save_IFS
33673  test -z "$as_dir" && as_dir=.
33674    for ac_exec_ext in '' $ac_executable_extensions; do
33675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33676    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33678    break 2
33679  fi
33680done
33681  done
33682IFS=$as_save_IFS
33683
33684  ;;
33685esac
33686fi
33687LIPO=$ac_cv_path_LIPO
33688if test -n "$LIPO"; then
33689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33690$as_echo "$LIPO" >&6; }
33691else
33692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33693$as_echo "no" >&6; }
33694fi
33695
33696
33697        if test "x$LIPO" = x; then
33698          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33699        fi
33700      else
33701        # Otherwise we believe it is a complete path. Use it as it is.
33702        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33703$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33705$as_echo_n "checking for LIPO... " >&6; }
33706        if test ! -x "$tool_specified"; then
33707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33708$as_echo "not found" >&6; }
33709          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33710        fi
33711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33712$as_echo "$tool_specified" >&6; }
33713      fi
33714    fi
33715  fi
33716
33717
33718
33719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33720
33721  # First separate the path from the arguments. This will split at the first
33722  # space.
33723  complete="$LIPO"
33724  path="${complete%% *}"
33725  tmp="$complete EOL"
33726  arguments="${tmp#* }"
33727
33728  # Input might be given as Windows format, start by converting to
33729  # unix format.
33730  new_path=`$CYGPATH -u "$path"`
33731
33732  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
33743    # The splitting of arguments from the executable at a space might have been incorrect,
33744    # since paths with space are more likely in Windows. Give it another try with the whole
33745    # argument.
33746    path="$complete"
33747    arguments="EOL"
33748    new_path=`$CYGPATH -u "$path"`
33749    new_path=`$WHICH "$new_path" 2> /dev/null`
33750    # bat and cmd files are not always considered executable in cygwin causing which
33751    # to not find them
33752    if test "x$new_path" = x \
33753        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33754        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33755      new_path=`$CYGPATH -u "$path"`
33756    fi
33757    if test "x$new_path" = x; then
33758      # It's still not found. Now this is an unrecoverable error.
33759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33760$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33761      has_space=`$ECHO "$complete" | $GREP " "`
33762      if test "x$has_space" != x; then
33763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33765      fi
33766      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33767    fi
33768  fi
33769
33770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33773  # "foo.exe" is OK but "foo" is an error.
33774  #
33775  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33776  # It is also a way to make sure we got the proper file name for the real test later on.
33777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33778  if test "x$test_shortpath" = x; then
33779    # Short path failed, file does not exist as specified.
33780    # Try adding .exe or .cmd
33781    if test -f "${new_path}.exe"; then
33782      input_to_shortpath="${new_path}.exe"
33783    elif test -f "${new_path}.cmd"; then
33784      input_to_shortpath="${new_path}.cmd"
33785    else
33786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33787$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33788      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33789$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33790      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33791    fi
33792  else
33793    input_to_shortpath="$new_path"
33794  fi
33795
33796  # Call helper function which possibly converts this using DOS-style short mode.
33797  # If so, the updated path is stored in $new_path.
33798  new_path="$input_to_shortpath"
33799
33800  input_path="$input_to_shortpath"
33801  # Check if we need to convert this using DOS-style short mode. If the path
33802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33803  # take no chances and rewrite it.
33804  # Note: m4 eats our [], so we need to use [ and ] instead.
33805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33806  if test "x$has_forbidden_chars" != x; then
33807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33811      # Going to short mode and back again did indeed matter. Since short mode is
33812      # case insensitive, let's make it lowercase to improve readability.
33813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33814      # Now convert it back to Unix-stile (cygpath)
33815      input_path=`$CYGPATH -u "$shortmode_path"`
33816      new_path="$input_path"
33817    fi
33818  fi
33819
33820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33821  if test "x$test_cygdrive_prefix" = x; then
33822    # As a simple fix, exclude /usr/bin since it's not a real path.
33823    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33825      # a path prefixed by /cygdrive for fixpath to work.
33826      new_path="$CYGWIN_ROOT_PATH$input_path"
33827    fi
33828  fi
33829
33830  # remove trailing .exe if any
33831  new_path="${new_path/%.exe/}"
33832
33833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33834
33835  # First separate the path from the arguments. This will split at the first
33836  # space.
33837  complete="$LIPO"
33838  path="${complete%% *}"
33839  tmp="$complete EOL"
33840  arguments="${tmp#* }"
33841
33842  # Input might be given as Windows format, start by converting to
33843  # unix format.
33844  new_path="$path"
33845
33846  windows_path="$new_path"
33847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33848    unix_path=`$CYGPATH -u "$windows_path"`
33849    new_path="$unix_path"
33850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33852    new_path="$unix_path"
33853  fi
33854
33855
33856  # Now try to locate executable using which
33857  new_path=`$WHICH "$new_path" 2> /dev/null`
33858
33859  if test "x$new_path" = x; then
33860    # Oops. Which didn't find the executable.
33861    # The splitting of arguments from the executable at a space might have been incorrect,
33862    # since paths with space are more likely in Windows. Give it another try with the whole
33863    # argument.
33864    path="$complete"
33865    arguments="EOL"
33866    new_path="$path"
33867
33868  windows_path="$new_path"
33869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33870    unix_path=`$CYGPATH -u "$windows_path"`
33871    new_path="$unix_path"
33872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33874    new_path="$unix_path"
33875  fi
33876
33877
33878    new_path=`$WHICH "$new_path" 2> /dev/null`
33879    # bat and cmd files are not always considered executable in MSYS causing which
33880    # to not find them
33881    if test "x$new_path" = x \
33882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33884      new_path="$path"
33885
33886  windows_path="$new_path"
33887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33888    unix_path=`$CYGPATH -u "$windows_path"`
33889    new_path="$unix_path"
33890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33892    new_path="$unix_path"
33893  fi
33894
33895    fi
33896
33897    if test "x$new_path" = x; then
33898      # It's still not found. Now this is an unrecoverable error.
33899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33900$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33901      has_space=`$ECHO "$complete" | $GREP " "`
33902      if test "x$has_space" != x; then
33903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33905      fi
33906      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33907    fi
33908  fi
33909
33910  # Now new_path has a complete unix path to the binary
33911  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33912    # Keep paths in /bin as-is, but remove trailing .exe if any
33913    new_path="${new_path/%.exe/}"
33914    # Do not save /bin paths to all_fixpath_prefixes!
33915  else
33916    # Not in mixed or Windows style, start by that.
33917    new_path=`cmd //c echo $new_path`
33918
33919  input_path="$new_path"
33920  # Check if we need to convert this using DOS-style short mode. If the path
33921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33922  # take no chances and rewrite it.
33923  # Note: m4 eats our [], so we need to use [ and ] instead.
33924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33925  if test "x$has_forbidden_chars" != x; then
33926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33928  fi
33929
33930    # Output is in $new_path
33931
33932  windows_path="$new_path"
33933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33934    unix_path=`$CYGPATH -u "$windows_path"`
33935    new_path="$unix_path"
33936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33938    new_path="$unix_path"
33939  fi
33940
33941    # remove trailing .exe if any
33942    new_path="${new_path/%.exe/}"
33943
33944    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33945    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33946  fi
33947
33948  else
33949    # We're on a unix platform. Hooray! :)
33950    # First separate the path from the arguments. This will split at the first
33951    # space.
33952    complete="$LIPO"
33953    path="${complete%% *}"
33954    tmp="$complete EOL"
33955    arguments="${tmp#* }"
33956
33957    # Cannot rely on the command "which" here since it doesn't always work.
33958    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33959    if test -z "$is_absolute_path"; then
33960      # Path to executable is not absolute. Find it.
33961      IFS_save="$IFS"
33962      IFS=:
33963      for p in $PATH; do
33964        if test -f "$p/$path" && test -x "$p/$path"; then
33965          new_path="$p/$path"
33966          break
33967        fi
33968      done
33969      IFS="$IFS_save"
33970    else
33971      # This is an absolute path, we can use it without further modifications.
33972      new_path="$path"
33973    fi
33974
33975    if test "x$new_path" = x; then
33976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33977$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33978      has_space=`$ECHO "$complete" | $GREP " "`
33979      if test "x$has_space" != x; then
33980        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33981$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33982      fi
33983      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33984    fi
33985  fi
33986
33987  # Now join together the path and the arguments once again
33988  if test "x$arguments" != xEOL; then
33989    new_complete="$new_path ${arguments% *}"
33990  else
33991    new_complete="$new_path"
33992  fi
33993
33994  if test "x$complete" != "x$new_complete"; then
33995    LIPO="$new_complete"
33996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33997$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33998  fi
33999
34000  else
34001    OBJC=
34002  fi
34003
34004  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34005    # Extract the first word of "mt", so it can be a program name with args.
34006set dummy mt; ac_word=$2
34007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34008$as_echo_n "checking for $ac_word... " >&6; }
34009if ${ac_cv_prog_MT+:} false; then :
34010  $as_echo_n "(cached) " >&6
34011else
34012  if test -n "$MT"; then
34013  ac_cv_prog_MT="$MT" # Let the user override the test.
34014else
34015  ac_prog_rejected=no
34016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34017for as_dir in $PATH
34018do
34019  IFS=$as_save_IFS
34020  test -z "$as_dir" && as_dir=.
34021    for ac_exec_ext in '' $ac_executable_extensions; do
34022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34023    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34024       ac_prog_rejected=yes
34025       continue
34026     fi
34027    ac_cv_prog_MT="mt"
34028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34029    break 2
34030  fi
34031done
34032  done
34033IFS=$as_save_IFS
34034
34035if test $ac_prog_rejected = yes; then
34036  # We found a bogon in the path, so make sure we never use it.
34037  set dummy $ac_cv_prog_MT
34038  shift
34039  if test $# != 0; then
34040    # We chose a different compiler from the bogus one.
34041    # However, it has the same basename, so the bogon will be chosen
34042    # first if we set MT to just the basename; use the full file name.
34043    shift
34044    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34045  fi
34046fi
34047fi
34048fi
34049MT=$ac_cv_prog_MT
34050if test -n "$MT"; then
34051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34052$as_echo "$MT" >&6; }
34053else
34054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34055$as_echo "no" >&6; }
34056fi
34057
34058
34059
34060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34061
34062  # First separate the path from the arguments. This will split at the first
34063  # space.
34064  complete="$MT"
34065  path="${complete%% *}"
34066  tmp="$complete EOL"
34067  arguments="${tmp#* }"
34068
34069  # Input might be given as Windows format, start by converting to
34070  # unix format.
34071  new_path=`$CYGPATH -u "$path"`
34072
34073  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
34084    # The splitting of arguments from the executable at a space might have been incorrect,
34085    # since paths with space are more likely in Windows. Give it another try with the whole
34086    # argument.
34087    path="$complete"
34088    arguments="EOL"
34089    new_path=`$CYGPATH -u "$path"`
34090    new_path=`$WHICH "$new_path" 2> /dev/null`
34091    # bat and cmd files are not always considered executable in cygwin causing which
34092    # to not find them
34093    if test "x$new_path" = x \
34094        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34095        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34096      new_path=`$CYGPATH -u "$path"`
34097    fi
34098    if test "x$new_path" = x; then
34099      # It's still not found. Now this is an unrecoverable error.
34100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34101$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34102      has_space=`$ECHO "$complete" | $GREP " "`
34103      if test "x$has_space" != x; then
34104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34106      fi
34107      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34108    fi
34109  fi
34110
34111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34114  # "foo.exe" is OK but "foo" is an error.
34115  #
34116  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34117  # It is also a way to make sure we got the proper file name for the real test later on.
34118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34119  if test "x$test_shortpath" = x; then
34120    # Short path failed, file does not exist as specified.
34121    # Try adding .exe or .cmd
34122    if test -f "${new_path}.exe"; then
34123      input_to_shortpath="${new_path}.exe"
34124    elif test -f "${new_path}.cmd"; then
34125      input_to_shortpath="${new_path}.cmd"
34126    else
34127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34128$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34129      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34130$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34131      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34132    fi
34133  else
34134    input_to_shortpath="$new_path"
34135  fi
34136
34137  # Call helper function which possibly converts this using DOS-style short mode.
34138  # If so, the updated path is stored in $new_path.
34139  new_path="$input_to_shortpath"
34140
34141  input_path="$input_to_shortpath"
34142  # Check if we need to convert this using DOS-style short mode. If the path
34143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34144  # take no chances and rewrite it.
34145  # Note: m4 eats our [], so we need to use [ and ] instead.
34146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34147  if test "x$has_forbidden_chars" != x; then
34148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34152      # Going to short mode and back again did indeed matter. Since short mode is
34153      # case insensitive, let's make it lowercase to improve readability.
34154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34155      # Now convert it back to Unix-stile (cygpath)
34156      input_path=`$CYGPATH -u "$shortmode_path"`
34157      new_path="$input_path"
34158    fi
34159  fi
34160
34161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34162  if test "x$test_cygdrive_prefix" = x; then
34163    # As a simple fix, exclude /usr/bin since it's not a real path.
34164    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34166      # a path prefixed by /cygdrive for fixpath to work.
34167      new_path="$CYGWIN_ROOT_PATH$input_path"
34168    fi
34169  fi
34170
34171  # remove trailing .exe if any
34172  new_path="${new_path/%.exe/}"
34173
34174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34175
34176  # First separate the path from the arguments. This will split at the first
34177  # space.
34178  complete="$MT"
34179  path="${complete%% *}"
34180  tmp="$complete EOL"
34181  arguments="${tmp#* }"
34182
34183  # Input might be given as Windows format, start by converting to
34184  # unix format.
34185  new_path="$path"
34186
34187  windows_path="$new_path"
34188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34189    unix_path=`$CYGPATH -u "$windows_path"`
34190    new_path="$unix_path"
34191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34193    new_path="$unix_path"
34194  fi
34195
34196
34197  # Now try to locate executable using which
34198  new_path=`$WHICH "$new_path" 2> /dev/null`
34199
34200  if test "x$new_path" = x; then
34201    # Oops. Which didn't find the executable.
34202    # The splitting of arguments from the executable at a space might have been incorrect,
34203    # since paths with space are more likely in Windows. Give it another try with the whole
34204    # argument.
34205    path="$complete"
34206    arguments="EOL"
34207    new_path="$path"
34208
34209  windows_path="$new_path"
34210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34211    unix_path=`$CYGPATH -u "$windows_path"`
34212    new_path="$unix_path"
34213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34215    new_path="$unix_path"
34216  fi
34217
34218
34219    new_path=`$WHICH "$new_path" 2> /dev/null`
34220    # bat and cmd files are not always considered executable in MSYS causing which
34221    # to not find them
34222    if test "x$new_path" = x \
34223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34225      new_path="$path"
34226
34227  windows_path="$new_path"
34228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34229    unix_path=`$CYGPATH -u "$windows_path"`
34230    new_path="$unix_path"
34231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34233    new_path="$unix_path"
34234  fi
34235
34236    fi
34237
34238    if test "x$new_path" = x; then
34239      # It's still not found. Now this is an unrecoverable error.
34240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34241$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34242      has_space=`$ECHO "$complete" | $GREP " "`
34243      if test "x$has_space" != x; then
34244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34246      fi
34247      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34248    fi
34249  fi
34250
34251  # Now new_path has a complete unix path to the binary
34252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34253    # Keep paths in /bin as-is, but remove trailing .exe if any
34254    new_path="${new_path/%.exe/}"
34255    # Do not save /bin paths to all_fixpath_prefixes!
34256  else
34257    # Not in mixed or Windows style, start by that.
34258    new_path=`cmd //c echo $new_path`
34259
34260  input_path="$new_path"
34261  # Check if we need to convert this using DOS-style short mode. If the path
34262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34263  # take no chances and rewrite it.
34264  # Note: m4 eats our [], so we need to use [ and ] instead.
34265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34266  if test "x$has_forbidden_chars" != x; then
34267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34269  fi
34270
34271    # Output is in $new_path
34272
34273  windows_path="$new_path"
34274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34275    unix_path=`$CYGPATH -u "$windows_path"`
34276    new_path="$unix_path"
34277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34279    new_path="$unix_path"
34280  fi
34281
34282    # remove trailing .exe if any
34283    new_path="${new_path/%.exe/}"
34284
34285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34287  fi
34288
34289  else
34290    # We're on a unix platform. Hooray! :)
34291    # First separate the path from the arguments. This will split at the first
34292    # space.
34293    complete="$MT"
34294    path="${complete%% *}"
34295    tmp="$complete EOL"
34296    arguments="${tmp#* }"
34297
34298    # Cannot rely on the command "which" here since it doesn't always work.
34299    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34300    if test -z "$is_absolute_path"; then
34301      # Path to executable is not absolute. Find it.
34302      IFS_save="$IFS"
34303      IFS=:
34304      for p in $PATH; do
34305        if test -f "$p/$path" && test -x "$p/$path"; then
34306          new_path="$p/$path"
34307          break
34308        fi
34309      done
34310      IFS="$IFS_save"
34311    else
34312      # This is an absolute path, we can use it without further modifications.
34313      new_path="$path"
34314    fi
34315
34316    if test "x$new_path" = x; then
34317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34318$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34319      has_space=`$ECHO "$complete" | $GREP " "`
34320      if test "x$has_space" != x; then
34321        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34322$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34323      fi
34324      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34325    fi
34326  fi
34327
34328  # Now join together the path and the arguments once again
34329  if test "x$arguments" != xEOL; then
34330    new_complete="$new_path ${arguments% *}"
34331  else
34332    new_complete="$new_path"
34333  fi
34334
34335  if test "x$complete" != "x$new_complete"; then
34336    MT="$new_complete"
34337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34338$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34339  fi
34340
34341    # Setup the resource compiler (RC)
34342    # Extract the first word of "rc", so it can be a program name with args.
34343set dummy rc; ac_word=$2
34344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34345$as_echo_n "checking for $ac_word... " >&6; }
34346if ${ac_cv_prog_RC+:} false; then :
34347  $as_echo_n "(cached) " >&6
34348else
34349  if test -n "$RC"; then
34350  ac_cv_prog_RC="$RC" # Let the user override the test.
34351else
34352  ac_prog_rejected=no
34353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34354for as_dir in $PATH
34355do
34356  IFS=$as_save_IFS
34357  test -z "$as_dir" && as_dir=.
34358    for ac_exec_ext in '' $ac_executable_extensions; do
34359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34360    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34361       ac_prog_rejected=yes
34362       continue
34363     fi
34364    ac_cv_prog_RC="rc"
34365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34366    break 2
34367  fi
34368done
34369  done
34370IFS=$as_save_IFS
34371
34372if test $ac_prog_rejected = yes; then
34373  # We found a bogon in the path, so make sure we never use it.
34374  set dummy $ac_cv_prog_RC
34375  shift
34376  if test $# != 0; then
34377    # We chose a different compiler from the bogus one.
34378    # However, it has the same basename, so the bogon will be chosen
34379    # first if we set RC to just the basename; use the full file name.
34380    shift
34381    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34382  fi
34383fi
34384fi
34385fi
34386RC=$ac_cv_prog_RC
34387if test -n "$RC"; then
34388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34389$as_echo "$RC" >&6; }
34390else
34391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34392$as_echo "no" >&6; }
34393fi
34394
34395
34396
34397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34398
34399  # First separate the path from the arguments. This will split at the first
34400  # space.
34401  complete="$RC"
34402  path="${complete%% *}"
34403  tmp="$complete EOL"
34404  arguments="${tmp#* }"
34405
34406  # Input might be given as Windows format, start by converting to
34407  # unix format.
34408  new_path=`$CYGPATH -u "$path"`
34409
34410  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
34421    # The splitting of arguments from the executable at a space might have been incorrect,
34422    # since paths with space are more likely in Windows. Give it another try with the whole
34423    # argument.
34424    path="$complete"
34425    arguments="EOL"
34426    new_path=`$CYGPATH -u "$path"`
34427    new_path=`$WHICH "$new_path" 2> /dev/null`
34428    # bat and cmd files are not always considered executable in cygwin causing which
34429    # to not find them
34430    if test "x$new_path" = x \
34431        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34432        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34433      new_path=`$CYGPATH -u "$path"`
34434    fi
34435    if test "x$new_path" = x; then
34436      # It's still not found. Now this is an unrecoverable error.
34437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34438$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34439      has_space=`$ECHO "$complete" | $GREP " "`
34440      if test "x$has_space" != x; then
34441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34443      fi
34444      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34445    fi
34446  fi
34447
34448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34451  # "foo.exe" is OK but "foo" is an error.
34452  #
34453  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34454  # It is also a way to make sure we got the proper file name for the real test later on.
34455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34456  if test "x$test_shortpath" = x; then
34457    # Short path failed, file does not exist as specified.
34458    # Try adding .exe or .cmd
34459    if test -f "${new_path}.exe"; then
34460      input_to_shortpath="${new_path}.exe"
34461    elif test -f "${new_path}.cmd"; then
34462      input_to_shortpath="${new_path}.cmd"
34463    else
34464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34465$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34466      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34467$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34468      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34469    fi
34470  else
34471    input_to_shortpath="$new_path"
34472  fi
34473
34474  # Call helper function which possibly converts this using DOS-style short mode.
34475  # If so, the updated path is stored in $new_path.
34476  new_path="$input_to_shortpath"
34477
34478  input_path="$input_to_shortpath"
34479  # Check if we need to convert this using DOS-style short mode. If the path
34480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34481  # take no chances and rewrite it.
34482  # Note: m4 eats our [], so we need to use [ and ] instead.
34483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34484  if test "x$has_forbidden_chars" != x; then
34485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34489      # Going to short mode and back again did indeed matter. Since short mode is
34490      # case insensitive, let's make it lowercase to improve readability.
34491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34492      # Now convert it back to Unix-stile (cygpath)
34493      input_path=`$CYGPATH -u "$shortmode_path"`
34494      new_path="$input_path"
34495    fi
34496  fi
34497
34498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34499  if test "x$test_cygdrive_prefix" = x; then
34500    # As a simple fix, exclude /usr/bin since it's not a real path.
34501    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34503      # a path prefixed by /cygdrive for fixpath to work.
34504      new_path="$CYGWIN_ROOT_PATH$input_path"
34505    fi
34506  fi
34507
34508  # remove trailing .exe if any
34509  new_path="${new_path/%.exe/}"
34510
34511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34512
34513  # First separate the path from the arguments. This will split at the first
34514  # space.
34515  complete="$RC"
34516  path="${complete%% *}"
34517  tmp="$complete EOL"
34518  arguments="${tmp#* }"
34519
34520  # Input might be given as Windows format, start by converting to
34521  # unix format.
34522  new_path="$path"
34523
34524  windows_path="$new_path"
34525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34526    unix_path=`$CYGPATH -u "$windows_path"`
34527    new_path="$unix_path"
34528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34530    new_path="$unix_path"
34531  fi
34532
34533
34534  # Now try to locate executable using which
34535  new_path=`$WHICH "$new_path" 2> /dev/null`
34536
34537  if test "x$new_path" = x; then
34538    # Oops. Which didn't find the executable.
34539    # The splitting of arguments from the executable at a space might have been incorrect,
34540    # since paths with space are more likely in Windows. Give it another try with the whole
34541    # argument.
34542    path="$complete"
34543    arguments="EOL"
34544    new_path="$path"
34545
34546  windows_path="$new_path"
34547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34548    unix_path=`$CYGPATH -u "$windows_path"`
34549    new_path="$unix_path"
34550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34552    new_path="$unix_path"
34553  fi
34554
34555
34556    new_path=`$WHICH "$new_path" 2> /dev/null`
34557    # bat and cmd files are not always considered executable in MSYS causing which
34558    # to not find them
34559    if test "x$new_path" = x \
34560        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34561        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34562      new_path="$path"
34563
34564  windows_path="$new_path"
34565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34566    unix_path=`$CYGPATH -u "$windows_path"`
34567    new_path="$unix_path"
34568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34570    new_path="$unix_path"
34571  fi
34572
34573    fi
34574
34575    if test "x$new_path" = x; then
34576      # It's still not found. Now this is an unrecoverable error.
34577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34578$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34579      has_space=`$ECHO "$complete" | $GREP " "`
34580      if test "x$has_space" != x; then
34581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34583      fi
34584      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34585    fi
34586  fi
34587
34588  # Now new_path has a complete unix path to the binary
34589  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34590    # Keep paths in /bin as-is, but remove trailing .exe if any
34591    new_path="${new_path/%.exe/}"
34592    # Do not save /bin paths to all_fixpath_prefixes!
34593  else
34594    # Not in mixed or Windows style, start by that.
34595    new_path=`cmd //c echo $new_path`
34596
34597  input_path="$new_path"
34598  # Check if we need to convert this using DOS-style short mode. If the path
34599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34600  # take no chances and rewrite it.
34601  # Note: m4 eats our [], so we need to use [ and ] instead.
34602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34603  if test "x$has_forbidden_chars" != x; then
34604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34606  fi
34607
34608    # Output is in $new_path
34609
34610  windows_path="$new_path"
34611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34612    unix_path=`$CYGPATH -u "$windows_path"`
34613    new_path="$unix_path"
34614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34616    new_path="$unix_path"
34617  fi
34618
34619    # remove trailing .exe if any
34620    new_path="${new_path/%.exe/}"
34621
34622    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34623    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34624  fi
34625
34626  else
34627    # We're on a unix platform. Hooray! :)
34628    # First separate the path from the arguments. This will split at the first
34629    # space.
34630    complete="$RC"
34631    path="${complete%% *}"
34632    tmp="$complete EOL"
34633    arguments="${tmp#* }"
34634
34635    # Cannot rely on the command "which" here since it doesn't always work.
34636    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34637    if test -z "$is_absolute_path"; then
34638      # Path to executable is not absolute. Find it.
34639      IFS_save="$IFS"
34640      IFS=:
34641      for p in $PATH; do
34642        if test -f "$p/$path" && test -x "$p/$path"; then
34643          new_path="$p/$path"
34644          break
34645        fi
34646      done
34647      IFS="$IFS_save"
34648    else
34649      # This is an absolute path, we can use it without further modifications.
34650      new_path="$path"
34651    fi
34652
34653    if test "x$new_path" = x; then
34654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34655$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34656      has_space=`$ECHO "$complete" | $GREP " "`
34657      if test "x$has_space" != x; then
34658        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34659$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34660      fi
34661      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34662    fi
34663  fi
34664
34665  # Now join together the path and the arguments once again
34666  if test "x$arguments" != xEOL; then
34667    new_complete="$new_path ${arguments% *}"
34668  else
34669    new_complete="$new_path"
34670  fi
34671
34672  if test "x$complete" != "x$new_complete"; then
34673    RC="$new_complete"
34674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34675$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34676  fi
34677
34678    # Extract the first word of "dumpbin", so it can be a program name with args.
34679set dummy dumpbin; ac_word=$2
34680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34681$as_echo_n "checking for $ac_word... " >&6; }
34682if ${ac_cv_prog_DUMPBIN+:} false; then :
34683  $as_echo_n "(cached) " >&6
34684else
34685  if test -n "$DUMPBIN"; then
34686  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34687else
34688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34689for as_dir in $PATH
34690do
34691  IFS=$as_save_IFS
34692  test -z "$as_dir" && as_dir=.
34693    for ac_exec_ext in '' $ac_executable_extensions; do
34694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34695    ac_cv_prog_DUMPBIN="dumpbin"
34696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34697    break 2
34698  fi
34699done
34700  done
34701IFS=$as_save_IFS
34702
34703fi
34704fi
34705DUMPBIN=$ac_cv_prog_DUMPBIN
34706if test -n "$DUMPBIN"; then
34707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34708$as_echo "$DUMPBIN" >&6; }
34709else
34710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34711$as_echo "no" >&6; }
34712fi
34713
34714
34715
34716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34717
34718  # First separate the path from the arguments. This will split at the first
34719  # space.
34720  complete="$DUMPBIN"
34721  path="${complete%% *}"
34722  tmp="$complete EOL"
34723  arguments="${tmp#* }"
34724
34725  # Input might be given as Windows format, start by converting to
34726  # unix format.
34727  new_path=`$CYGPATH -u "$path"`
34728
34729  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
34740    # The splitting of arguments from the executable at a space might have been incorrect,
34741    # since paths with space are more likely in Windows. Give it another try with the whole
34742    # argument.
34743    path="$complete"
34744    arguments="EOL"
34745    new_path=`$CYGPATH -u "$path"`
34746    new_path=`$WHICH "$new_path" 2> /dev/null`
34747    # bat and cmd files are not always considered executable in cygwin causing which
34748    # to not find them
34749    if test "x$new_path" = x \
34750        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34751        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34752      new_path=`$CYGPATH -u "$path"`
34753    fi
34754    if test "x$new_path" = x; then
34755      # It's still not found. Now this is an unrecoverable error.
34756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34757$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34758      has_space=`$ECHO "$complete" | $GREP " "`
34759      if test "x$has_space" != x; then
34760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34762      fi
34763      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34764    fi
34765  fi
34766
34767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34770  # "foo.exe" is OK but "foo" is an error.
34771  #
34772  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34773  # It is also a way to make sure we got the proper file name for the real test later on.
34774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34775  if test "x$test_shortpath" = x; then
34776    # Short path failed, file does not exist as specified.
34777    # Try adding .exe or .cmd
34778    if test -f "${new_path}.exe"; then
34779      input_to_shortpath="${new_path}.exe"
34780    elif test -f "${new_path}.cmd"; then
34781      input_to_shortpath="${new_path}.cmd"
34782    else
34783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34784$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34785      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34786$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34787      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34788    fi
34789  else
34790    input_to_shortpath="$new_path"
34791  fi
34792
34793  # Call helper function which possibly converts this using DOS-style short mode.
34794  # If so, the updated path is stored in $new_path.
34795  new_path="$input_to_shortpath"
34796
34797  input_path="$input_to_shortpath"
34798  # Check if we need to convert this using DOS-style short mode. If the path
34799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34800  # take no chances and rewrite it.
34801  # Note: m4 eats our [], so we need to use [ and ] instead.
34802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34803  if test "x$has_forbidden_chars" != x; then
34804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34808      # Going to short mode and back again did indeed matter. Since short mode is
34809      # case insensitive, let's make it lowercase to improve readability.
34810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34811      # Now convert it back to Unix-stile (cygpath)
34812      input_path=`$CYGPATH -u "$shortmode_path"`
34813      new_path="$input_path"
34814    fi
34815  fi
34816
34817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34818  if test "x$test_cygdrive_prefix" = x; then
34819    # As a simple fix, exclude /usr/bin since it's not a real path.
34820    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34822      # a path prefixed by /cygdrive for fixpath to work.
34823      new_path="$CYGWIN_ROOT_PATH$input_path"
34824    fi
34825  fi
34826
34827  # remove trailing .exe if any
34828  new_path="${new_path/%.exe/}"
34829
34830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34831
34832  # First separate the path from the arguments. This will split at the first
34833  # space.
34834  complete="$DUMPBIN"
34835  path="${complete%% *}"
34836  tmp="$complete EOL"
34837  arguments="${tmp#* }"
34838
34839  # Input might be given as Windows format, start by converting to
34840  # unix format.
34841  new_path="$path"
34842
34843  windows_path="$new_path"
34844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34845    unix_path=`$CYGPATH -u "$windows_path"`
34846    new_path="$unix_path"
34847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34849    new_path="$unix_path"
34850  fi
34851
34852
34853  # Now try to locate executable using which
34854  new_path=`$WHICH "$new_path" 2> /dev/null`
34855
34856  if test "x$new_path" = x; then
34857    # Oops. Which didn't find the executable.
34858    # The splitting of arguments from the executable at a space might have been incorrect,
34859    # since paths with space are more likely in Windows. Give it another try with the whole
34860    # argument.
34861    path="$complete"
34862    arguments="EOL"
34863    new_path="$path"
34864
34865  windows_path="$new_path"
34866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34867    unix_path=`$CYGPATH -u "$windows_path"`
34868    new_path="$unix_path"
34869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34871    new_path="$unix_path"
34872  fi
34873
34874
34875    new_path=`$WHICH "$new_path" 2> /dev/null`
34876    # bat and cmd files are not always considered executable in MSYS causing which
34877    # to not find them
34878    if test "x$new_path" = x \
34879        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34880        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34881      new_path="$path"
34882
34883  windows_path="$new_path"
34884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34885    unix_path=`$CYGPATH -u "$windows_path"`
34886    new_path="$unix_path"
34887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34889    new_path="$unix_path"
34890  fi
34891
34892    fi
34893
34894    if test "x$new_path" = x; then
34895      # It's still not found. Now this is an unrecoverable error.
34896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34897$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34898      has_space=`$ECHO "$complete" | $GREP " "`
34899      if test "x$has_space" != x; then
34900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34902      fi
34903      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34904    fi
34905  fi
34906
34907  # Now new_path has a complete unix path to the binary
34908  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34909    # Keep paths in /bin as-is, but remove trailing .exe if any
34910    new_path="${new_path/%.exe/}"
34911    # Do not save /bin paths to all_fixpath_prefixes!
34912  else
34913    # Not in mixed or Windows style, start by that.
34914    new_path=`cmd //c echo $new_path`
34915
34916  input_path="$new_path"
34917  # Check if we need to convert this using DOS-style short mode. If the path
34918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34919  # take no chances and rewrite it.
34920  # Note: m4 eats our [], so we need to use [ and ] instead.
34921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34922  if test "x$has_forbidden_chars" != x; then
34923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34925  fi
34926
34927    # Output is in $new_path
34928
34929  windows_path="$new_path"
34930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34931    unix_path=`$CYGPATH -u "$windows_path"`
34932    new_path="$unix_path"
34933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34935    new_path="$unix_path"
34936  fi
34937
34938    # remove trailing .exe if any
34939    new_path="${new_path/%.exe/}"
34940
34941    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34942    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34943  fi
34944
34945  else
34946    # We're on a unix platform. Hooray! :)
34947    # First separate the path from the arguments. This will split at the first
34948    # space.
34949    complete="$DUMPBIN"
34950    path="${complete%% *}"
34951    tmp="$complete EOL"
34952    arguments="${tmp#* }"
34953
34954    # Cannot rely on the command "which" here since it doesn't always work.
34955    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34956    if test -z "$is_absolute_path"; then
34957      # Path to executable is not absolute. Find it.
34958      IFS_save="$IFS"
34959      IFS=:
34960      for p in $PATH; do
34961        if test -f "$p/$path" && test -x "$p/$path"; then
34962          new_path="$p/$path"
34963          break
34964        fi
34965      done
34966      IFS="$IFS_save"
34967    else
34968      # This is an absolute path, we can use it without further modifications.
34969      new_path="$path"
34970    fi
34971
34972    if test "x$new_path" = x; then
34973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34974$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34975      has_space=`$ECHO "$complete" | $GREP " "`
34976      if test "x$has_space" != x; then
34977        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34978$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34979      fi
34980      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34981    fi
34982  fi
34983
34984  # Now join together the path and the arguments once again
34985  if test "x$arguments" != xEOL; then
34986    new_complete="$new_path ${arguments% *}"
34987  else
34988    new_complete="$new_path"
34989  fi
34990
34991  if test "x$complete" != "x$new_complete"; then
34992    DUMPBIN="$new_complete"
34993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34994$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34995  fi
34996
34997    # We need to check for 'msbuild.exe' because at the place where we expect to
34998    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34999    # won't find the 'msbuild.exe' executable in that case (and the
35000    # 'ac_executable_extensions' is unusable due to performance reasons).
35001    # Notice that we intentionally don't fix up the path to MSBUILD because we
35002    # will call it in a DOS shell during freetype detection on Windows (see
35003    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35004    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35005set dummy msbuild.exe; ac_word=$2
35006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35007$as_echo_n "checking for $ac_word... " >&6; }
35008if ${ac_cv_prog_MSBUILD+:} false; then :
35009  $as_echo_n "(cached) " >&6
35010else
35011  if test -n "$MSBUILD"; then
35012  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35013else
35014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35015for as_dir in $PATH
35016do
35017  IFS=$as_save_IFS
35018  test -z "$as_dir" && as_dir=.
35019    for ac_exec_ext in '' $ac_executable_extensions; do
35020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35021    ac_cv_prog_MSBUILD="msbuild.exe"
35022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35023    break 2
35024  fi
35025done
35026  done
35027IFS=$as_save_IFS
35028
35029fi
35030fi
35031MSBUILD=$ac_cv_prog_MSBUILD
35032if test -n "$MSBUILD"; then
35033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35034$as_echo "$MSBUILD" >&6; }
35035else
35036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35037$as_echo "no" >&6; }
35038fi
35039
35040
35041  fi
35042
35043  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35044
35045
35046  # Publish this variable in the help.
35047
35048
35049  if test "x$STRIP" = x; then
35050    # The variable is not set by user, try to locate tool using the code snippet
35051    for ac_prog in strip
35052do
35053  # Extract the first word of "$ac_prog", so it can be a program name with args.
35054set dummy $ac_prog; ac_word=$2
35055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35056$as_echo_n "checking for $ac_word... " >&6; }
35057if ${ac_cv_path_STRIP+:} false; then :
35058  $as_echo_n "(cached) " >&6
35059else
35060  case $STRIP in
35061  [\\/]* | ?:[\\/]*)
35062  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35063  ;;
35064  *)
35065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35066for as_dir in $PATH
35067do
35068  IFS=$as_save_IFS
35069  test -z "$as_dir" && as_dir=.
35070    for ac_exec_ext in '' $ac_executable_extensions; do
35071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35072    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35074    break 2
35075  fi
35076done
35077  done
35078IFS=$as_save_IFS
35079
35080  ;;
35081esac
35082fi
35083STRIP=$ac_cv_path_STRIP
35084if test -n "$STRIP"; then
35085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35086$as_echo "$STRIP" >&6; }
35087else
35088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35089$as_echo "no" >&6; }
35090fi
35091
35092
35093  test -n "$STRIP" && break
35094done
35095
35096  else
35097    # The variable is set, but is it from the command line or the environment?
35098
35099    # Try to remove the string !STRIP! from our list.
35100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35102      # If it failed, the variable was not from the command line. Ignore it,
35103      # but warn the user (except for BASH, which is always set by the calling BASH).
35104      if test "xSTRIP" != xBASH; then
35105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35106$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35107      fi
35108      # Try to locate tool using the code snippet
35109      for ac_prog in strip
35110do
35111  # Extract the first word of "$ac_prog", so it can be a program name with args.
35112set dummy $ac_prog; ac_word=$2
35113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35114$as_echo_n "checking for $ac_word... " >&6; }
35115if ${ac_cv_path_STRIP+:} false; then :
35116  $as_echo_n "(cached) " >&6
35117else
35118  case $STRIP in
35119  [\\/]* | ?:[\\/]*)
35120  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35121  ;;
35122  *)
35123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35124for as_dir in $PATH
35125do
35126  IFS=$as_save_IFS
35127  test -z "$as_dir" && as_dir=.
35128    for ac_exec_ext in '' $ac_executable_extensions; do
35129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35130    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35132    break 2
35133  fi
35134done
35135  done
35136IFS=$as_save_IFS
35137
35138  ;;
35139esac
35140fi
35141STRIP=$ac_cv_path_STRIP
35142if test -n "$STRIP"; then
35143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35144$as_echo "$STRIP" >&6; }
35145else
35146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35147$as_echo "no" >&6; }
35148fi
35149
35150
35151  test -n "$STRIP" && break
35152done
35153
35154    else
35155      # If it succeeded, then it was overridden by the user. We will use it
35156      # for the tool.
35157
35158      # First remove it from the list of overridden variables, so we can test
35159      # for unknown variables in the end.
35160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35161
35162      # Check if the provided tool contains a complete path.
35163      tool_specified="$STRIP"
35164      tool_basename="${tool_specified##*/}"
35165      if test "x$tool_basename" = "x$tool_specified"; then
35166        # A command without a complete path is provided, search $PATH.
35167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35168$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35169        # Extract the first word of "$tool_basename", so it can be a program name with args.
35170set dummy $tool_basename; ac_word=$2
35171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35172$as_echo_n "checking for $ac_word... " >&6; }
35173if ${ac_cv_path_STRIP+:} false; then :
35174  $as_echo_n "(cached) " >&6
35175else
35176  case $STRIP in
35177  [\\/]* | ?:[\\/]*)
35178  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35179  ;;
35180  *)
35181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35182for as_dir in $PATH
35183do
35184  IFS=$as_save_IFS
35185  test -z "$as_dir" && as_dir=.
35186    for ac_exec_ext in '' $ac_executable_extensions; do
35187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35188    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35190    break 2
35191  fi
35192done
35193  done
35194IFS=$as_save_IFS
35195
35196  ;;
35197esac
35198fi
35199STRIP=$ac_cv_path_STRIP
35200if test -n "$STRIP"; then
35201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35202$as_echo "$STRIP" >&6; }
35203else
35204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35205$as_echo "no" >&6; }
35206fi
35207
35208
35209        if test "x$STRIP" = x; then
35210          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35211        fi
35212      else
35213        # Otherwise we believe it is a complete path. Use it as it is.
35214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35215$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35217$as_echo_n "checking for STRIP... " >&6; }
35218        if test ! -x "$tool_specified"; then
35219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35220$as_echo "not found" >&6; }
35221          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35222        fi
35223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35224$as_echo "$tool_specified" >&6; }
35225      fi
35226    fi
35227  fi
35228
35229
35230
35231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35232
35233  # First separate the path from the arguments. This will split at the first
35234  # space.
35235  complete="$STRIP"
35236  path="${complete%% *}"
35237  tmp="$complete EOL"
35238  arguments="${tmp#* }"
35239
35240  # Input might be given as Windows format, start by converting to
35241  # unix format.
35242  new_path=`$CYGPATH -u "$path"`
35243
35244  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
35255    # The splitting of arguments from the executable at a space might have been incorrect,
35256    # since paths with space are more likely in Windows. Give it another try with the whole
35257    # argument.
35258    path="$complete"
35259    arguments="EOL"
35260    new_path=`$CYGPATH -u "$path"`
35261    new_path=`$WHICH "$new_path" 2> /dev/null`
35262    # bat and cmd files are not always considered executable in cygwin causing which
35263    # to not find them
35264    if test "x$new_path" = x \
35265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35267      new_path=`$CYGPATH -u "$path"`
35268    fi
35269    if test "x$new_path" = x; then
35270      # It's still not found. Now this is an unrecoverable error.
35271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35272$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35273      has_space=`$ECHO "$complete" | $GREP " "`
35274      if test "x$has_space" != x; then
35275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35277      fi
35278      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35279    fi
35280  fi
35281
35282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35285  # "foo.exe" is OK but "foo" is an error.
35286  #
35287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35288  # It is also a way to make sure we got the proper file name for the real test later on.
35289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35290  if test "x$test_shortpath" = x; then
35291    # Short path failed, file does not exist as specified.
35292    # Try adding .exe or .cmd
35293    if test -f "${new_path}.exe"; then
35294      input_to_shortpath="${new_path}.exe"
35295    elif test -f "${new_path}.cmd"; then
35296      input_to_shortpath="${new_path}.cmd"
35297    else
35298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35299$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35302      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35303    fi
35304  else
35305    input_to_shortpath="$new_path"
35306  fi
35307
35308  # Call helper function which possibly converts this using DOS-style short mode.
35309  # If so, the updated path is stored in $new_path.
35310  new_path="$input_to_shortpath"
35311
35312  input_path="$input_to_shortpath"
35313  # Check if we need to convert this using DOS-style short mode. If the path
35314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35315  # take no chances and rewrite it.
35316  # Note: m4 eats our [], so we need to use [ and ] instead.
35317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35318  if test "x$has_forbidden_chars" != x; then
35319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35323      # Going to short mode and back again did indeed matter. Since short mode is
35324      # case insensitive, let's make it lowercase to improve readability.
35325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35326      # Now convert it back to Unix-stile (cygpath)
35327      input_path=`$CYGPATH -u "$shortmode_path"`
35328      new_path="$input_path"
35329    fi
35330  fi
35331
35332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35333  if test "x$test_cygdrive_prefix" = x; then
35334    # As a simple fix, exclude /usr/bin since it's not a real path.
35335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35337      # a path prefixed by /cygdrive for fixpath to work.
35338      new_path="$CYGWIN_ROOT_PATH$input_path"
35339    fi
35340  fi
35341
35342  # remove trailing .exe if any
35343  new_path="${new_path/%.exe/}"
35344
35345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35346
35347  # First separate the path from the arguments. This will split at the first
35348  # space.
35349  complete="$STRIP"
35350  path="${complete%% *}"
35351  tmp="$complete EOL"
35352  arguments="${tmp#* }"
35353
35354  # Input might be given as Windows format, start by converting to
35355  # unix format.
35356  new_path="$path"
35357
35358  windows_path="$new_path"
35359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35360    unix_path=`$CYGPATH -u "$windows_path"`
35361    new_path="$unix_path"
35362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35364    new_path="$unix_path"
35365  fi
35366
35367
35368  # Now try to locate executable using which
35369  new_path=`$WHICH "$new_path" 2> /dev/null`
35370
35371  if test "x$new_path" = x; then
35372    # Oops. Which didn't find the executable.
35373    # The splitting of arguments from the executable at a space might have been incorrect,
35374    # since paths with space are more likely in Windows. Give it another try with the whole
35375    # argument.
35376    path="$complete"
35377    arguments="EOL"
35378    new_path="$path"
35379
35380  windows_path="$new_path"
35381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35382    unix_path=`$CYGPATH -u "$windows_path"`
35383    new_path="$unix_path"
35384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35386    new_path="$unix_path"
35387  fi
35388
35389
35390    new_path=`$WHICH "$new_path" 2> /dev/null`
35391    # bat and cmd files are not always considered executable in MSYS causing which
35392    # to not find them
35393    if test "x$new_path" = x \
35394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35396      new_path="$path"
35397
35398  windows_path="$new_path"
35399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35400    unix_path=`$CYGPATH -u "$windows_path"`
35401    new_path="$unix_path"
35402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35404    new_path="$unix_path"
35405  fi
35406
35407    fi
35408
35409    if test "x$new_path" = x; then
35410      # It's still not found. Now this is an unrecoverable error.
35411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35412$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35413      has_space=`$ECHO "$complete" | $GREP " "`
35414      if test "x$has_space" != x; then
35415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35417      fi
35418      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35419    fi
35420  fi
35421
35422  # Now new_path has a complete unix path to the binary
35423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35424    # Keep paths in /bin as-is, but remove trailing .exe if any
35425    new_path="${new_path/%.exe/}"
35426    # Do not save /bin paths to all_fixpath_prefixes!
35427  else
35428    # Not in mixed or Windows style, start by that.
35429    new_path=`cmd //c echo $new_path`
35430
35431  input_path="$new_path"
35432  # Check if we need to convert this using DOS-style short mode. If the path
35433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35434  # take no chances and rewrite it.
35435  # Note: m4 eats our [], so we need to use [ and ] instead.
35436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35437  if test "x$has_forbidden_chars" != x; then
35438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35440  fi
35441
35442    # Output is in $new_path
35443
35444  windows_path="$new_path"
35445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35446    unix_path=`$CYGPATH -u "$windows_path"`
35447    new_path="$unix_path"
35448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35450    new_path="$unix_path"
35451  fi
35452
35453    # remove trailing .exe if any
35454    new_path="${new_path/%.exe/}"
35455
35456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35458  fi
35459
35460  else
35461    # We're on a unix platform. Hooray! :)
35462    # First separate the path from the arguments. This will split at the first
35463    # space.
35464    complete="$STRIP"
35465    path="${complete%% *}"
35466    tmp="$complete EOL"
35467    arguments="${tmp#* }"
35468
35469    # Cannot rely on the command "which" here since it doesn't always work.
35470    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35471    if test -z "$is_absolute_path"; then
35472      # Path to executable is not absolute. Find it.
35473      IFS_save="$IFS"
35474      IFS=:
35475      for p in $PATH; do
35476        if test -f "$p/$path" && test -x "$p/$path"; then
35477          new_path="$p/$path"
35478          break
35479        fi
35480      done
35481      IFS="$IFS_save"
35482    else
35483      # This is an absolute path, we can use it without further modifications.
35484      new_path="$path"
35485    fi
35486
35487    if test "x$new_path" = x; then
35488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35489$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35490      has_space=`$ECHO "$complete" | $GREP " "`
35491      if test "x$has_space" != x; then
35492        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35494      fi
35495      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35496    fi
35497  fi
35498
35499  # Now join together the path and the arguments once again
35500  if test "x$arguments" != xEOL; then
35501    new_complete="$new_path ${arguments% *}"
35502  else
35503    new_complete="$new_path"
35504  fi
35505
35506  if test "x$complete" != "x$new_complete"; then
35507    STRIP="$new_complete"
35508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35509$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35510  fi
35511
35512
35513
35514  # Publish this variable in the help.
35515
35516
35517  if test "x$NM" = x; then
35518    # The variable is not set by user, try to locate tool using the code snippet
35519    for ac_prog in nm
35520do
35521  # Extract the first word of "$ac_prog", so it can be a program name with args.
35522set dummy $ac_prog; ac_word=$2
35523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35524$as_echo_n "checking for $ac_word... " >&6; }
35525if ${ac_cv_path_NM+:} false; then :
35526  $as_echo_n "(cached) " >&6
35527else
35528  case $NM in
35529  [\\/]* | ?:[\\/]*)
35530  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35531  ;;
35532  *)
35533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35534for as_dir in $PATH
35535do
35536  IFS=$as_save_IFS
35537  test -z "$as_dir" && as_dir=.
35538    for ac_exec_ext in '' $ac_executable_extensions; do
35539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35540    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35542    break 2
35543  fi
35544done
35545  done
35546IFS=$as_save_IFS
35547
35548  ;;
35549esac
35550fi
35551NM=$ac_cv_path_NM
35552if test -n "$NM"; then
35553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35554$as_echo "$NM" >&6; }
35555else
35556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35557$as_echo "no" >&6; }
35558fi
35559
35560
35561  test -n "$NM" && break
35562done
35563
35564  else
35565    # The variable is set, but is it from the command line or the environment?
35566
35567    # Try to remove the string !NM! from our list.
35568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35570      # If it failed, the variable was not from the command line. Ignore it,
35571      # but warn the user (except for BASH, which is always set by the calling BASH).
35572      if test "xNM" != xBASH; then
35573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35574$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35575      fi
35576      # Try to locate tool using the code snippet
35577      for ac_prog in nm
35578do
35579  # Extract the first word of "$ac_prog", so it can be a program name with args.
35580set dummy $ac_prog; ac_word=$2
35581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35582$as_echo_n "checking for $ac_word... " >&6; }
35583if ${ac_cv_path_NM+:} false; then :
35584  $as_echo_n "(cached) " >&6
35585else
35586  case $NM in
35587  [\\/]* | ?:[\\/]*)
35588  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35589  ;;
35590  *)
35591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35592for as_dir in $PATH
35593do
35594  IFS=$as_save_IFS
35595  test -z "$as_dir" && as_dir=.
35596    for ac_exec_ext in '' $ac_executable_extensions; do
35597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35598    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35600    break 2
35601  fi
35602done
35603  done
35604IFS=$as_save_IFS
35605
35606  ;;
35607esac
35608fi
35609NM=$ac_cv_path_NM
35610if test -n "$NM"; then
35611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35612$as_echo "$NM" >&6; }
35613else
35614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35615$as_echo "no" >&6; }
35616fi
35617
35618
35619  test -n "$NM" && break
35620done
35621
35622    else
35623      # If it succeeded, then it was overridden by the user. We will use it
35624      # for the tool.
35625
35626      # First remove it from the list of overridden variables, so we can test
35627      # for unknown variables in the end.
35628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35629
35630      # Check if the provided tool contains a complete path.
35631      tool_specified="$NM"
35632      tool_basename="${tool_specified##*/}"
35633      if test "x$tool_basename" = "x$tool_specified"; then
35634        # A command without a complete path is provided, search $PATH.
35635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35636$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35637        # Extract the first word of "$tool_basename", so it can be a program name with args.
35638set dummy $tool_basename; ac_word=$2
35639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35640$as_echo_n "checking for $ac_word... " >&6; }
35641if ${ac_cv_path_NM+:} false; then :
35642  $as_echo_n "(cached) " >&6
35643else
35644  case $NM in
35645  [\\/]* | ?:[\\/]*)
35646  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35647  ;;
35648  *)
35649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35650for as_dir in $PATH
35651do
35652  IFS=$as_save_IFS
35653  test -z "$as_dir" && as_dir=.
35654    for ac_exec_ext in '' $ac_executable_extensions; do
35655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35656    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35658    break 2
35659  fi
35660done
35661  done
35662IFS=$as_save_IFS
35663
35664  ;;
35665esac
35666fi
35667NM=$ac_cv_path_NM
35668if test -n "$NM"; then
35669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35670$as_echo "$NM" >&6; }
35671else
35672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35673$as_echo "no" >&6; }
35674fi
35675
35676
35677        if test "x$NM" = x; then
35678          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35679        fi
35680      else
35681        # Otherwise we believe it is a complete path. Use it as it is.
35682        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35683$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35685$as_echo_n "checking for NM... " >&6; }
35686        if test ! -x "$tool_specified"; then
35687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35688$as_echo "not found" >&6; }
35689          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35690        fi
35691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35692$as_echo "$tool_specified" >&6; }
35693      fi
35694    fi
35695  fi
35696
35697
35698
35699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35700
35701  # First separate the path from the arguments. This will split at the first
35702  # space.
35703  complete="$NM"
35704  path="${complete%% *}"
35705  tmp="$complete EOL"
35706  arguments="${tmp#* }"
35707
35708  # Input might be given as Windows format, start by converting to
35709  # unix format.
35710  new_path=`$CYGPATH -u "$path"`
35711
35712  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
35723    # The splitting of arguments from the executable at a space might have been incorrect,
35724    # since paths with space are more likely in Windows. Give it another try with the whole
35725    # argument.
35726    path="$complete"
35727    arguments="EOL"
35728    new_path=`$CYGPATH -u "$path"`
35729    new_path=`$WHICH "$new_path" 2> /dev/null`
35730    # bat and cmd files are not always considered executable in cygwin causing which
35731    # to not find them
35732    if test "x$new_path" = x \
35733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35735      new_path=`$CYGPATH -u "$path"`
35736    fi
35737    if test "x$new_path" = x; then
35738      # It's still not found. Now this is an unrecoverable error.
35739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35740$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35741      has_space=`$ECHO "$complete" | $GREP " "`
35742      if test "x$has_space" != x; then
35743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35745      fi
35746      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35747    fi
35748  fi
35749
35750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35753  # "foo.exe" is OK but "foo" is an error.
35754  #
35755  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35756  # It is also a way to make sure we got the proper file name for the real test later on.
35757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35758  if test "x$test_shortpath" = x; then
35759    # Short path failed, file does not exist as specified.
35760    # Try adding .exe or .cmd
35761    if test -f "${new_path}.exe"; then
35762      input_to_shortpath="${new_path}.exe"
35763    elif test -f "${new_path}.cmd"; then
35764      input_to_shortpath="${new_path}.cmd"
35765    else
35766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35767$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35770      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35771    fi
35772  else
35773    input_to_shortpath="$new_path"
35774  fi
35775
35776  # Call helper function which possibly converts this using DOS-style short mode.
35777  # If so, the updated path is stored in $new_path.
35778  new_path="$input_to_shortpath"
35779
35780  input_path="$input_to_shortpath"
35781  # Check if we need to convert this using DOS-style short mode. If the path
35782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35783  # take no chances and rewrite it.
35784  # Note: m4 eats our [], so we need to use [ and ] instead.
35785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35786  if test "x$has_forbidden_chars" != x; then
35787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35791      # Going to short mode and back again did indeed matter. Since short mode is
35792      # case insensitive, let's make it lowercase to improve readability.
35793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35794      # Now convert it back to Unix-stile (cygpath)
35795      input_path=`$CYGPATH -u "$shortmode_path"`
35796      new_path="$input_path"
35797    fi
35798  fi
35799
35800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35801  if test "x$test_cygdrive_prefix" = x; then
35802    # As a simple fix, exclude /usr/bin since it's not a real path.
35803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35805      # a path prefixed by /cygdrive for fixpath to work.
35806      new_path="$CYGWIN_ROOT_PATH$input_path"
35807    fi
35808  fi
35809
35810  # remove trailing .exe if any
35811  new_path="${new_path/%.exe/}"
35812
35813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35814
35815  # First separate the path from the arguments. This will split at the first
35816  # space.
35817  complete="$NM"
35818  path="${complete%% *}"
35819  tmp="$complete EOL"
35820  arguments="${tmp#* }"
35821
35822  # Input might be given as Windows format, start by converting to
35823  # unix format.
35824  new_path="$path"
35825
35826  windows_path="$new_path"
35827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35828    unix_path=`$CYGPATH -u "$windows_path"`
35829    new_path="$unix_path"
35830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35832    new_path="$unix_path"
35833  fi
35834
35835
35836  # Now try to locate executable using which
35837  new_path=`$WHICH "$new_path" 2> /dev/null`
35838
35839  if test "x$new_path" = x; then
35840    # Oops. Which didn't find the executable.
35841    # The splitting of arguments from the executable at a space might have been incorrect,
35842    # since paths with space are more likely in Windows. Give it another try with the whole
35843    # argument.
35844    path="$complete"
35845    arguments="EOL"
35846    new_path="$path"
35847
35848  windows_path="$new_path"
35849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35850    unix_path=`$CYGPATH -u "$windows_path"`
35851    new_path="$unix_path"
35852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35854    new_path="$unix_path"
35855  fi
35856
35857
35858    new_path=`$WHICH "$new_path" 2> /dev/null`
35859    # bat and cmd files are not always considered executable in MSYS causing which
35860    # to not find them
35861    if test "x$new_path" = x \
35862        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35863        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35864      new_path="$path"
35865
35866  windows_path="$new_path"
35867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35868    unix_path=`$CYGPATH -u "$windows_path"`
35869    new_path="$unix_path"
35870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35872    new_path="$unix_path"
35873  fi
35874
35875    fi
35876
35877    if test "x$new_path" = x; then
35878      # It's still not found. Now this is an unrecoverable error.
35879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35880$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35881      has_space=`$ECHO "$complete" | $GREP " "`
35882      if test "x$has_space" != x; then
35883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35885      fi
35886      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35887    fi
35888  fi
35889
35890  # Now new_path has a complete unix path to the binary
35891  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35892    # Keep paths in /bin as-is, but remove trailing .exe if any
35893    new_path="${new_path/%.exe/}"
35894    # Do not save /bin paths to all_fixpath_prefixes!
35895  else
35896    # Not in mixed or Windows style, start by that.
35897    new_path=`cmd //c echo $new_path`
35898
35899  input_path="$new_path"
35900  # Check if we need to convert this using DOS-style short mode. If the path
35901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35902  # take no chances and rewrite it.
35903  # Note: m4 eats our [], so we need to use [ and ] instead.
35904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35905  if test "x$has_forbidden_chars" != x; then
35906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35908  fi
35909
35910    # Output is in $new_path
35911
35912  windows_path="$new_path"
35913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35914    unix_path=`$CYGPATH -u "$windows_path"`
35915    new_path="$unix_path"
35916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35918    new_path="$unix_path"
35919  fi
35920
35921    # remove trailing .exe if any
35922    new_path="${new_path/%.exe/}"
35923
35924    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35925    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35926  fi
35927
35928  else
35929    # We're on a unix platform. Hooray! :)
35930    # First separate the path from the arguments. This will split at the first
35931    # space.
35932    complete="$NM"
35933    path="${complete%% *}"
35934    tmp="$complete EOL"
35935    arguments="${tmp#* }"
35936
35937    # Cannot rely on the command "which" here since it doesn't always work.
35938    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35939    if test -z "$is_absolute_path"; then
35940      # Path to executable is not absolute. Find it.
35941      IFS_save="$IFS"
35942      IFS=:
35943      for p in $PATH; do
35944        if test -f "$p/$path" && test -x "$p/$path"; then
35945          new_path="$p/$path"
35946          break
35947        fi
35948      done
35949      IFS="$IFS_save"
35950    else
35951      # This is an absolute path, we can use it without further modifications.
35952      new_path="$path"
35953    fi
35954
35955    if test "x$new_path" = x; then
35956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35957$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35958      has_space=`$ECHO "$complete" | $GREP " "`
35959      if test "x$has_space" != x; then
35960        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35962      fi
35963      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35964    fi
35965  fi
35966
35967  # Now join together the path and the arguments once again
35968  if test "x$arguments" != xEOL; then
35969    new_complete="$new_path ${arguments% *}"
35970  else
35971    new_complete="$new_path"
35972  fi
35973
35974  if test "x$complete" != "x$new_complete"; then
35975    NM="$new_complete"
35976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35977$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35978  fi
35979
35980
35981
35982  # Publish this variable in the help.
35983
35984
35985  if test "x$GNM" = x; then
35986    # The variable is not set by user, try to locate tool using the code snippet
35987    for ac_prog in gnm
35988do
35989  # Extract the first word of "$ac_prog", so it can be a program name with args.
35990set dummy $ac_prog; ac_word=$2
35991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35992$as_echo_n "checking for $ac_word... " >&6; }
35993if ${ac_cv_path_GNM+:} false; then :
35994  $as_echo_n "(cached) " >&6
35995else
35996  case $GNM in
35997  [\\/]* | ?:[\\/]*)
35998  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35999  ;;
36000  *)
36001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36002for as_dir in $PATH
36003do
36004  IFS=$as_save_IFS
36005  test -z "$as_dir" && as_dir=.
36006    for ac_exec_ext in '' $ac_executable_extensions; do
36007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36008    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36010    break 2
36011  fi
36012done
36013  done
36014IFS=$as_save_IFS
36015
36016  ;;
36017esac
36018fi
36019GNM=$ac_cv_path_GNM
36020if test -n "$GNM"; then
36021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36022$as_echo "$GNM" >&6; }
36023else
36024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36025$as_echo "no" >&6; }
36026fi
36027
36028
36029  test -n "$GNM" && break
36030done
36031
36032  else
36033    # The variable is set, but is it from the command line or the environment?
36034
36035    # Try to remove the string !GNM! from our list.
36036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36038      # If it failed, the variable was not from the command line. Ignore it,
36039      # but warn the user (except for BASH, which is always set by the calling BASH).
36040      if test "xGNM" != xBASH; then
36041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36042$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36043      fi
36044      # Try to locate tool using the code snippet
36045      for ac_prog in gnm
36046do
36047  # Extract the first word of "$ac_prog", so it can be a program name with args.
36048set dummy $ac_prog; ac_word=$2
36049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36050$as_echo_n "checking for $ac_word... " >&6; }
36051if ${ac_cv_path_GNM+:} false; then :
36052  $as_echo_n "(cached) " >&6
36053else
36054  case $GNM in
36055  [\\/]* | ?:[\\/]*)
36056  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36057  ;;
36058  *)
36059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36060for as_dir in $PATH
36061do
36062  IFS=$as_save_IFS
36063  test -z "$as_dir" && as_dir=.
36064    for ac_exec_ext in '' $ac_executable_extensions; do
36065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36066    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36068    break 2
36069  fi
36070done
36071  done
36072IFS=$as_save_IFS
36073
36074  ;;
36075esac
36076fi
36077GNM=$ac_cv_path_GNM
36078if test -n "$GNM"; then
36079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36080$as_echo "$GNM" >&6; }
36081else
36082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36083$as_echo "no" >&6; }
36084fi
36085
36086
36087  test -n "$GNM" && break
36088done
36089
36090    else
36091      # If it succeeded, then it was overridden by the user. We will use it
36092      # for the tool.
36093
36094      # First remove it from the list of overridden variables, so we can test
36095      # for unknown variables in the end.
36096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36097
36098      # Check if the provided tool contains a complete path.
36099      tool_specified="$GNM"
36100      tool_basename="${tool_specified##*/}"
36101      if test "x$tool_basename" = "x$tool_specified"; then
36102        # A command without a complete path is provided, search $PATH.
36103        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36104$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36105        # Extract the first word of "$tool_basename", so it can be a program name with args.
36106set dummy $tool_basename; ac_word=$2
36107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36108$as_echo_n "checking for $ac_word... " >&6; }
36109if ${ac_cv_path_GNM+:} false; then :
36110  $as_echo_n "(cached) " >&6
36111else
36112  case $GNM in
36113  [\\/]* | ?:[\\/]*)
36114  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36115  ;;
36116  *)
36117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36118for as_dir in $PATH
36119do
36120  IFS=$as_save_IFS
36121  test -z "$as_dir" && as_dir=.
36122    for ac_exec_ext in '' $ac_executable_extensions; do
36123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36124    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36126    break 2
36127  fi
36128done
36129  done
36130IFS=$as_save_IFS
36131
36132  ;;
36133esac
36134fi
36135GNM=$ac_cv_path_GNM
36136if test -n "$GNM"; then
36137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36138$as_echo "$GNM" >&6; }
36139else
36140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36141$as_echo "no" >&6; }
36142fi
36143
36144
36145        if test "x$GNM" = x; then
36146          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36147        fi
36148      else
36149        # Otherwise we believe it is a complete path. Use it as it is.
36150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36151$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36153$as_echo_n "checking for GNM... " >&6; }
36154        if test ! -x "$tool_specified"; then
36155          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36156$as_echo "not found" >&6; }
36157          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36158        fi
36159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36160$as_echo "$tool_specified" >&6; }
36161      fi
36162    fi
36163  fi
36164
36165
36166
36167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36168
36169  # First separate the path from the arguments. This will split at the first
36170  # space.
36171  complete="$GNM"
36172  path="${complete%% *}"
36173  tmp="$complete EOL"
36174  arguments="${tmp#* }"
36175
36176  # Input might be given as Windows format, start by converting to
36177  # unix format.
36178  new_path=`$CYGPATH -u "$path"`
36179
36180  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
36191    # The splitting of arguments from the executable at a space might have been incorrect,
36192    # since paths with space are more likely in Windows. Give it another try with the whole
36193    # argument.
36194    path="$complete"
36195    arguments="EOL"
36196    new_path=`$CYGPATH -u "$path"`
36197    new_path=`$WHICH "$new_path" 2> /dev/null`
36198    # bat and cmd files are not always considered executable in cygwin causing which
36199    # to not find them
36200    if test "x$new_path" = x \
36201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36203      new_path=`$CYGPATH -u "$path"`
36204    fi
36205    if test "x$new_path" = x; then
36206      # It's still not found. Now this is an unrecoverable error.
36207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36208$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36209      has_space=`$ECHO "$complete" | $GREP " "`
36210      if test "x$has_space" != x; then
36211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36213      fi
36214      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36215    fi
36216  fi
36217
36218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36221  # "foo.exe" is OK but "foo" is an error.
36222  #
36223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36224  # It is also a way to make sure we got the proper file name for the real test later on.
36225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36226  if test "x$test_shortpath" = x; then
36227    # Short path failed, file does not exist as specified.
36228    # Try adding .exe or .cmd
36229    if test -f "${new_path}.exe"; then
36230      input_to_shortpath="${new_path}.exe"
36231    elif test -f "${new_path}.cmd"; then
36232      input_to_shortpath="${new_path}.cmd"
36233    else
36234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36235$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36238      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36239    fi
36240  else
36241    input_to_shortpath="$new_path"
36242  fi
36243
36244  # Call helper function which possibly converts this using DOS-style short mode.
36245  # If so, the updated path is stored in $new_path.
36246  new_path="$input_to_shortpath"
36247
36248  input_path="$input_to_shortpath"
36249  # Check if we need to convert this using DOS-style short mode. If the path
36250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36251  # take no chances and rewrite it.
36252  # Note: m4 eats our [], so we need to use [ and ] instead.
36253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36254  if test "x$has_forbidden_chars" != x; then
36255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36259      # Going to short mode and back again did indeed matter. Since short mode is
36260      # case insensitive, let's make it lowercase to improve readability.
36261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36262      # Now convert it back to Unix-stile (cygpath)
36263      input_path=`$CYGPATH -u "$shortmode_path"`
36264      new_path="$input_path"
36265    fi
36266  fi
36267
36268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36269  if test "x$test_cygdrive_prefix" = x; then
36270    # As a simple fix, exclude /usr/bin since it's not a real path.
36271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36273      # a path prefixed by /cygdrive for fixpath to work.
36274      new_path="$CYGWIN_ROOT_PATH$input_path"
36275    fi
36276  fi
36277
36278  # remove trailing .exe if any
36279  new_path="${new_path/%.exe/}"
36280
36281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36282
36283  # First separate the path from the arguments. This will split at the first
36284  # space.
36285  complete="$GNM"
36286  path="${complete%% *}"
36287  tmp="$complete EOL"
36288  arguments="${tmp#* }"
36289
36290  # Input might be given as Windows format, start by converting to
36291  # unix format.
36292  new_path="$path"
36293
36294  windows_path="$new_path"
36295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36296    unix_path=`$CYGPATH -u "$windows_path"`
36297    new_path="$unix_path"
36298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36300    new_path="$unix_path"
36301  fi
36302
36303
36304  # Now try to locate executable using which
36305  new_path=`$WHICH "$new_path" 2> /dev/null`
36306
36307  if test "x$new_path" = x; then
36308    # Oops. Which didn't find the executable.
36309    # The splitting of arguments from the executable at a space might have been incorrect,
36310    # since paths with space are more likely in Windows. Give it another try with the whole
36311    # argument.
36312    path="$complete"
36313    arguments="EOL"
36314    new_path="$path"
36315
36316  windows_path="$new_path"
36317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36318    unix_path=`$CYGPATH -u "$windows_path"`
36319    new_path="$unix_path"
36320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36322    new_path="$unix_path"
36323  fi
36324
36325
36326    new_path=`$WHICH "$new_path" 2> /dev/null`
36327    # bat and cmd files are not always considered executable in MSYS causing which
36328    # to not find them
36329    if test "x$new_path" = x \
36330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36332      new_path="$path"
36333
36334  windows_path="$new_path"
36335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36336    unix_path=`$CYGPATH -u "$windows_path"`
36337    new_path="$unix_path"
36338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36340    new_path="$unix_path"
36341  fi
36342
36343    fi
36344
36345    if test "x$new_path" = x; then
36346      # It's still not found. Now this is an unrecoverable error.
36347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36348$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36349      has_space=`$ECHO "$complete" | $GREP " "`
36350      if test "x$has_space" != x; then
36351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36353      fi
36354      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36355    fi
36356  fi
36357
36358  # Now new_path has a complete unix path to the binary
36359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36360    # Keep paths in /bin as-is, but remove trailing .exe if any
36361    new_path="${new_path/%.exe/}"
36362    # Do not save /bin paths to all_fixpath_prefixes!
36363  else
36364    # Not in mixed or Windows style, start by that.
36365    new_path=`cmd //c echo $new_path`
36366
36367  input_path="$new_path"
36368  # Check if we need to convert this using DOS-style short mode. If the path
36369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36370  # take no chances and rewrite it.
36371  # Note: m4 eats our [], so we need to use [ and ] instead.
36372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36373  if test "x$has_forbidden_chars" != x; then
36374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36376  fi
36377
36378    # Output is in $new_path
36379
36380  windows_path="$new_path"
36381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36382    unix_path=`$CYGPATH -u "$windows_path"`
36383    new_path="$unix_path"
36384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36386    new_path="$unix_path"
36387  fi
36388
36389    # remove trailing .exe if any
36390    new_path="${new_path/%.exe/}"
36391
36392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36394  fi
36395
36396  else
36397    # We're on a unix platform. Hooray! :)
36398    # First separate the path from the arguments. This will split at the first
36399    # space.
36400    complete="$GNM"
36401    path="${complete%% *}"
36402    tmp="$complete EOL"
36403    arguments="${tmp#* }"
36404
36405    # Cannot rely on the command "which" here since it doesn't always work.
36406    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36407    if test -z "$is_absolute_path"; then
36408      # Path to executable is not absolute. Find it.
36409      IFS_save="$IFS"
36410      IFS=:
36411      for p in $PATH; do
36412        if test -f "$p/$path" && test -x "$p/$path"; then
36413          new_path="$p/$path"
36414          break
36415        fi
36416      done
36417      IFS="$IFS_save"
36418    else
36419      # This is an absolute path, we can use it without further modifications.
36420      new_path="$path"
36421    fi
36422
36423    if test "x$new_path" = x; then
36424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36425$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36426      has_space=`$ECHO "$complete" | $GREP " "`
36427      if test "x$has_space" != x; then
36428        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36430      fi
36431      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36432    fi
36433  fi
36434
36435  # Now join together the path and the arguments once again
36436  if test "x$arguments" != xEOL; then
36437    new_complete="$new_path ${arguments% *}"
36438  else
36439    new_complete="$new_path"
36440  fi
36441
36442  if test "x$complete" != "x$new_complete"; then
36443    GNM="$new_complete"
36444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36445$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36446  fi
36447
36448
36449
36450
36451  # Publish this variable in the help.
36452
36453
36454  if test "x$MCS" = x; then
36455    # The variable is not set by user, try to locate tool using the code snippet
36456    for ac_prog in mcs
36457do
36458  # Extract the first word of "$ac_prog", so it can be a program name with args.
36459set dummy $ac_prog; ac_word=$2
36460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36461$as_echo_n "checking for $ac_word... " >&6; }
36462if ${ac_cv_path_MCS+:} false; then :
36463  $as_echo_n "(cached) " >&6
36464else
36465  case $MCS in
36466  [\\/]* | ?:[\\/]*)
36467  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36468  ;;
36469  *)
36470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36471for as_dir in $PATH
36472do
36473  IFS=$as_save_IFS
36474  test -z "$as_dir" && as_dir=.
36475    for ac_exec_ext in '' $ac_executable_extensions; do
36476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36477    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36479    break 2
36480  fi
36481done
36482  done
36483IFS=$as_save_IFS
36484
36485  ;;
36486esac
36487fi
36488MCS=$ac_cv_path_MCS
36489if test -n "$MCS"; then
36490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36491$as_echo "$MCS" >&6; }
36492else
36493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36494$as_echo "no" >&6; }
36495fi
36496
36497
36498  test -n "$MCS" && break
36499done
36500
36501  else
36502    # The variable is set, but is it from the command line or the environment?
36503
36504    # Try to remove the string !MCS! from our list.
36505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36507      # If it failed, the variable was not from the command line. Ignore it,
36508      # but warn the user (except for BASH, which is always set by the calling BASH).
36509      if test "xMCS" != xBASH; then
36510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36511$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36512      fi
36513      # Try to locate tool using the code snippet
36514      for ac_prog in mcs
36515do
36516  # Extract the first word of "$ac_prog", so it can be a program name with args.
36517set dummy $ac_prog; ac_word=$2
36518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36519$as_echo_n "checking for $ac_word... " >&6; }
36520if ${ac_cv_path_MCS+:} false; then :
36521  $as_echo_n "(cached) " >&6
36522else
36523  case $MCS in
36524  [\\/]* | ?:[\\/]*)
36525  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36526  ;;
36527  *)
36528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36529for as_dir in $PATH
36530do
36531  IFS=$as_save_IFS
36532  test -z "$as_dir" && as_dir=.
36533    for ac_exec_ext in '' $ac_executable_extensions; do
36534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36535    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36537    break 2
36538  fi
36539done
36540  done
36541IFS=$as_save_IFS
36542
36543  ;;
36544esac
36545fi
36546MCS=$ac_cv_path_MCS
36547if test -n "$MCS"; then
36548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36549$as_echo "$MCS" >&6; }
36550else
36551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36552$as_echo "no" >&6; }
36553fi
36554
36555
36556  test -n "$MCS" && break
36557done
36558
36559    else
36560      # If it succeeded, then it was overridden by the user. We will use it
36561      # for the tool.
36562
36563      # First remove it from the list of overridden variables, so we can test
36564      # for unknown variables in the end.
36565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36566
36567      # Check if the provided tool contains a complete path.
36568      tool_specified="$MCS"
36569      tool_basename="${tool_specified##*/}"
36570      if test "x$tool_basename" = "x$tool_specified"; then
36571        # A command without a complete path is provided, search $PATH.
36572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36573$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36574        # Extract the first word of "$tool_basename", so it can be a program name with args.
36575set dummy $tool_basename; ac_word=$2
36576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36577$as_echo_n "checking for $ac_word... " >&6; }
36578if ${ac_cv_path_MCS+:} false; then :
36579  $as_echo_n "(cached) " >&6
36580else
36581  case $MCS in
36582  [\\/]* | ?:[\\/]*)
36583  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36584  ;;
36585  *)
36586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36587for as_dir in $PATH
36588do
36589  IFS=$as_save_IFS
36590  test -z "$as_dir" && as_dir=.
36591    for ac_exec_ext in '' $ac_executable_extensions; do
36592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36593    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36595    break 2
36596  fi
36597done
36598  done
36599IFS=$as_save_IFS
36600
36601  ;;
36602esac
36603fi
36604MCS=$ac_cv_path_MCS
36605if test -n "$MCS"; then
36606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36607$as_echo "$MCS" >&6; }
36608else
36609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36610$as_echo "no" >&6; }
36611fi
36612
36613
36614        if test "x$MCS" = x; then
36615          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36616        fi
36617      else
36618        # Otherwise we believe it is a complete path. Use it as it is.
36619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36620$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36622$as_echo_n "checking for MCS... " >&6; }
36623        if test ! -x "$tool_specified"; then
36624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36625$as_echo "not found" >&6; }
36626          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36627        fi
36628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36629$as_echo "$tool_specified" >&6; }
36630      fi
36631    fi
36632  fi
36633
36634
36635
36636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36637
36638  # First separate the path from the arguments. This will split at the first
36639  # space.
36640  complete="$MCS"
36641  path="${complete%% *}"
36642  tmp="$complete EOL"
36643  arguments="${tmp#* }"
36644
36645  # Input might be given as Windows format, start by converting to
36646  # unix format.
36647  new_path=`$CYGPATH -u "$path"`
36648
36649  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
36660    # The splitting of arguments from the executable at a space might have been incorrect,
36661    # since paths with space are more likely in Windows. Give it another try with the whole
36662    # argument.
36663    path="$complete"
36664    arguments="EOL"
36665    new_path=`$CYGPATH -u "$path"`
36666    new_path=`$WHICH "$new_path" 2> /dev/null`
36667    # bat and cmd files are not always considered executable in cygwin causing which
36668    # to not find them
36669    if test "x$new_path" = x \
36670        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36671        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36672      new_path=`$CYGPATH -u "$path"`
36673    fi
36674    if test "x$new_path" = x; then
36675      # It's still not found. Now this is an unrecoverable error.
36676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36677$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36678      has_space=`$ECHO "$complete" | $GREP " "`
36679      if test "x$has_space" != x; then
36680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36682      fi
36683      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36684    fi
36685  fi
36686
36687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36690  # "foo.exe" is OK but "foo" is an error.
36691  #
36692  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36693  # It is also a way to make sure we got the proper file name for the real test later on.
36694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36695  if test "x$test_shortpath" = x; then
36696    # Short path failed, file does not exist as specified.
36697    # Try adding .exe or .cmd
36698    if test -f "${new_path}.exe"; then
36699      input_to_shortpath="${new_path}.exe"
36700    elif test -f "${new_path}.cmd"; then
36701      input_to_shortpath="${new_path}.cmd"
36702    else
36703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36704$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36705      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36706$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36707      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36708    fi
36709  else
36710    input_to_shortpath="$new_path"
36711  fi
36712
36713  # Call helper function which possibly converts this using DOS-style short mode.
36714  # If so, the updated path is stored in $new_path.
36715  new_path="$input_to_shortpath"
36716
36717  input_path="$input_to_shortpath"
36718  # Check if we need to convert this using DOS-style short mode. If the path
36719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36720  # take no chances and rewrite it.
36721  # Note: m4 eats our [], so we need to use [ and ] instead.
36722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36723  if test "x$has_forbidden_chars" != x; then
36724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36728      # Going to short mode and back again did indeed matter. Since short mode is
36729      # case insensitive, let's make it lowercase to improve readability.
36730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36731      # Now convert it back to Unix-stile (cygpath)
36732      input_path=`$CYGPATH -u "$shortmode_path"`
36733      new_path="$input_path"
36734    fi
36735  fi
36736
36737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36738  if test "x$test_cygdrive_prefix" = x; then
36739    # As a simple fix, exclude /usr/bin since it's not a real path.
36740    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36742      # a path prefixed by /cygdrive for fixpath to work.
36743      new_path="$CYGWIN_ROOT_PATH$input_path"
36744    fi
36745  fi
36746
36747  # remove trailing .exe if any
36748  new_path="${new_path/%.exe/}"
36749
36750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36751
36752  # First separate the path from the arguments. This will split at the first
36753  # space.
36754  complete="$MCS"
36755  path="${complete%% *}"
36756  tmp="$complete EOL"
36757  arguments="${tmp#* }"
36758
36759  # Input might be given as Windows format, start by converting to
36760  # unix format.
36761  new_path="$path"
36762
36763  windows_path="$new_path"
36764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36765    unix_path=`$CYGPATH -u "$windows_path"`
36766    new_path="$unix_path"
36767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36769    new_path="$unix_path"
36770  fi
36771
36772
36773  # Now try to locate executable using which
36774  new_path=`$WHICH "$new_path" 2> /dev/null`
36775
36776  if test "x$new_path" = x; then
36777    # Oops. Which didn't find the executable.
36778    # The splitting of arguments from the executable at a space might have been incorrect,
36779    # since paths with space are more likely in Windows. Give it another try with the whole
36780    # argument.
36781    path="$complete"
36782    arguments="EOL"
36783    new_path="$path"
36784
36785  windows_path="$new_path"
36786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36787    unix_path=`$CYGPATH -u "$windows_path"`
36788    new_path="$unix_path"
36789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36791    new_path="$unix_path"
36792  fi
36793
36794
36795    new_path=`$WHICH "$new_path" 2> /dev/null`
36796    # bat and cmd files are not always considered executable in MSYS causing which
36797    # to not find them
36798    if test "x$new_path" = x \
36799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36801      new_path="$path"
36802
36803  windows_path="$new_path"
36804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36805    unix_path=`$CYGPATH -u "$windows_path"`
36806    new_path="$unix_path"
36807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36809    new_path="$unix_path"
36810  fi
36811
36812    fi
36813
36814    if test "x$new_path" = x; then
36815      # It's still not found. Now this is an unrecoverable error.
36816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36817$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36818      has_space=`$ECHO "$complete" | $GREP " "`
36819      if test "x$has_space" != x; then
36820        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36821$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36822      fi
36823      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36824    fi
36825  fi
36826
36827  # Now new_path has a complete unix path to the binary
36828  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36829    # Keep paths in /bin as-is, but remove trailing .exe if any
36830    new_path="${new_path/%.exe/}"
36831    # Do not save /bin paths to all_fixpath_prefixes!
36832  else
36833    # Not in mixed or Windows style, start by that.
36834    new_path=`cmd //c echo $new_path`
36835
36836  input_path="$new_path"
36837  # Check if we need to convert this using DOS-style short mode. If the path
36838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36839  # take no chances and rewrite it.
36840  # Note: m4 eats our [], so we need to use [ and ] instead.
36841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36842  if test "x$has_forbidden_chars" != x; then
36843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36845  fi
36846
36847    # Output is in $new_path
36848
36849  windows_path="$new_path"
36850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36851    unix_path=`$CYGPATH -u "$windows_path"`
36852    new_path="$unix_path"
36853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36855    new_path="$unix_path"
36856  fi
36857
36858    # remove trailing .exe if any
36859    new_path="${new_path/%.exe/}"
36860
36861    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36862    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36863  fi
36864
36865  else
36866    # We're on a unix platform. Hooray! :)
36867    # First separate the path from the arguments. This will split at the first
36868    # space.
36869    complete="$MCS"
36870    path="${complete%% *}"
36871    tmp="$complete EOL"
36872    arguments="${tmp#* }"
36873
36874    # Cannot rely on the command "which" here since it doesn't always work.
36875    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36876    if test -z "$is_absolute_path"; then
36877      # Path to executable is not absolute. Find it.
36878      IFS_save="$IFS"
36879      IFS=:
36880      for p in $PATH; do
36881        if test -f "$p/$path" && test -x "$p/$path"; then
36882          new_path="$p/$path"
36883          break
36884        fi
36885      done
36886      IFS="$IFS_save"
36887    else
36888      # This is an absolute path, we can use it without further modifications.
36889      new_path="$path"
36890    fi
36891
36892    if test "x$new_path" = x; then
36893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36894$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36895      has_space=`$ECHO "$complete" | $GREP " "`
36896      if test "x$has_space" != x; then
36897        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36898$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36899      fi
36900      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36901    fi
36902  fi
36903
36904  # Now join together the path and the arguments once again
36905  if test "x$arguments" != xEOL; then
36906    new_complete="$new_path ${arguments% *}"
36907  else
36908    new_complete="$new_path"
36909  fi
36910
36911  if test "x$complete" != "x$new_complete"; then
36912    MCS="$new_complete"
36913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36914$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36915  fi
36916
36917  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36918    # FIXME: we should unify this with the solaris case above.
36919
36920
36921  # Publish this variable in the help.
36922
36923
36924  if test "x$STRIP" = x; then
36925    # The variable is not set by user, try to locate tool using the code snippet
36926    if test -n "$ac_tool_prefix"; then
36927  for ac_prog in strip
36928  do
36929    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36932$as_echo_n "checking for $ac_word... " >&6; }
36933if ${ac_cv_prog_STRIP+:} false; then :
36934  $as_echo_n "(cached) " >&6
36935else
36936  if test -n "$STRIP"; then
36937  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36938else
36939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36940for as_dir in $PATH
36941do
36942  IFS=$as_save_IFS
36943  test -z "$as_dir" && as_dir=.
36944    for ac_exec_ext in '' $ac_executable_extensions; do
36945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36946    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36948    break 2
36949  fi
36950done
36951  done
36952IFS=$as_save_IFS
36953
36954fi
36955fi
36956STRIP=$ac_cv_prog_STRIP
36957if test -n "$STRIP"; then
36958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36959$as_echo "$STRIP" >&6; }
36960else
36961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36962$as_echo "no" >&6; }
36963fi
36964
36965
36966    test -n "$STRIP" && break
36967  done
36968fi
36969if test -z "$STRIP"; then
36970  ac_ct_STRIP=$STRIP
36971  for ac_prog in strip
36972do
36973  # Extract the first word of "$ac_prog", so it can be a program name with args.
36974set dummy $ac_prog; ac_word=$2
36975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36976$as_echo_n "checking for $ac_word... " >&6; }
36977if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36978  $as_echo_n "(cached) " >&6
36979else
36980  if test -n "$ac_ct_STRIP"; then
36981  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36982else
36983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36984for as_dir in $PATH
36985do
36986  IFS=$as_save_IFS
36987  test -z "$as_dir" && as_dir=.
36988    for ac_exec_ext in '' $ac_executable_extensions; do
36989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36990    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36992    break 2
36993  fi
36994done
36995  done
36996IFS=$as_save_IFS
36997
36998fi
36999fi
37000ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37001if test -n "$ac_ct_STRIP"; then
37002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37003$as_echo "$ac_ct_STRIP" >&6; }
37004else
37005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37006$as_echo "no" >&6; }
37007fi
37008
37009
37010  test -n "$ac_ct_STRIP" && break
37011done
37012
37013  if test "x$ac_ct_STRIP" = x; then
37014    STRIP=""
37015  else
37016    case $cross_compiling:$ac_tool_warned in
37017yes:)
37018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37020ac_tool_warned=yes ;;
37021esac
37022    STRIP=$ac_ct_STRIP
37023  fi
37024fi
37025
37026  else
37027    # The variable is set, but is it from the command line or the environment?
37028
37029    # Try to remove the string !STRIP! from our list.
37030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37032      # If it failed, the variable was not from the command line. Ignore it,
37033      # but warn the user (except for BASH, which is always set by the calling BASH).
37034      if test "xSTRIP" != xBASH; then
37035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37036$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37037      fi
37038      # Try to locate tool using the code snippet
37039      if test -n "$ac_tool_prefix"; then
37040  for ac_prog in strip
37041  do
37042    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37043set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37045$as_echo_n "checking for $ac_word... " >&6; }
37046if ${ac_cv_prog_STRIP+:} false; then :
37047  $as_echo_n "(cached) " >&6
37048else
37049  if test -n "$STRIP"; then
37050  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37051else
37052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37053for as_dir in $PATH
37054do
37055  IFS=$as_save_IFS
37056  test -z "$as_dir" && as_dir=.
37057    for ac_exec_ext in '' $ac_executable_extensions; do
37058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37059    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37061    break 2
37062  fi
37063done
37064  done
37065IFS=$as_save_IFS
37066
37067fi
37068fi
37069STRIP=$ac_cv_prog_STRIP
37070if test -n "$STRIP"; then
37071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37072$as_echo "$STRIP" >&6; }
37073else
37074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37075$as_echo "no" >&6; }
37076fi
37077
37078
37079    test -n "$STRIP" && break
37080  done
37081fi
37082if test -z "$STRIP"; then
37083  ac_ct_STRIP=$STRIP
37084  for ac_prog in strip
37085do
37086  # Extract the first word of "$ac_prog", so it can be a program name with args.
37087set dummy $ac_prog; ac_word=$2
37088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37089$as_echo_n "checking for $ac_word... " >&6; }
37090if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37091  $as_echo_n "(cached) " >&6
37092else
37093  if test -n "$ac_ct_STRIP"; then
37094  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37095else
37096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37097for as_dir in $PATH
37098do
37099  IFS=$as_save_IFS
37100  test -z "$as_dir" && as_dir=.
37101    for ac_exec_ext in '' $ac_executable_extensions; do
37102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37103    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37105    break 2
37106  fi
37107done
37108  done
37109IFS=$as_save_IFS
37110
37111fi
37112fi
37113ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37114if test -n "$ac_ct_STRIP"; then
37115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37116$as_echo "$ac_ct_STRIP" >&6; }
37117else
37118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37119$as_echo "no" >&6; }
37120fi
37121
37122
37123  test -n "$ac_ct_STRIP" && break
37124done
37125
37126  if test "x$ac_ct_STRIP" = x; then
37127    STRIP=""
37128  else
37129    case $cross_compiling:$ac_tool_warned in
37130yes:)
37131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37133ac_tool_warned=yes ;;
37134esac
37135    STRIP=$ac_ct_STRIP
37136  fi
37137fi
37138
37139    else
37140      # If it succeeded, then it was overridden by the user. We will use it
37141      # for the tool.
37142
37143      # First remove it from the list of overridden variables, so we can test
37144      # for unknown variables in the end.
37145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37146
37147      # Check if the provided tool contains a complete path.
37148      tool_specified="$STRIP"
37149      tool_basename="${tool_specified##*/}"
37150      if test "x$tool_basename" = "x$tool_specified"; then
37151        # A command without a complete path is provided, search $PATH.
37152        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37153$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37154        # Extract the first word of "$tool_basename", so it can be a program name with args.
37155set dummy $tool_basename; ac_word=$2
37156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37157$as_echo_n "checking for $ac_word... " >&6; }
37158if ${ac_cv_path_STRIP+:} false; then :
37159  $as_echo_n "(cached) " >&6
37160else
37161  case $STRIP in
37162  [\\/]* | ?:[\\/]*)
37163  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37164  ;;
37165  *)
37166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37167for as_dir in $PATH
37168do
37169  IFS=$as_save_IFS
37170  test -z "$as_dir" && as_dir=.
37171    for ac_exec_ext in '' $ac_executable_extensions; do
37172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37173    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37175    break 2
37176  fi
37177done
37178  done
37179IFS=$as_save_IFS
37180
37181  ;;
37182esac
37183fi
37184STRIP=$ac_cv_path_STRIP
37185if test -n "$STRIP"; then
37186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37187$as_echo "$STRIP" >&6; }
37188else
37189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37190$as_echo "no" >&6; }
37191fi
37192
37193
37194        if test "x$STRIP" = x; then
37195          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37196        fi
37197      else
37198        # Otherwise we believe it is a complete path. Use it as it is.
37199        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37200$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37202$as_echo_n "checking for STRIP... " >&6; }
37203        if test ! -x "$tool_specified"; then
37204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37205$as_echo "not found" >&6; }
37206          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37207        fi
37208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37209$as_echo "$tool_specified" >&6; }
37210      fi
37211    fi
37212  fi
37213
37214
37215
37216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37217
37218  # First separate the path from the arguments. This will split at the first
37219  # space.
37220  complete="$STRIP"
37221  path="${complete%% *}"
37222  tmp="$complete EOL"
37223  arguments="${tmp#* }"
37224
37225  # Input might be given as Windows format, start by converting to
37226  # unix format.
37227  new_path=`$CYGPATH -u "$path"`
37228
37229  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
37240    # The splitting of arguments from the executable at a space might have been incorrect,
37241    # since paths with space are more likely in Windows. Give it another try with the whole
37242    # argument.
37243    path="$complete"
37244    arguments="EOL"
37245    new_path=`$CYGPATH -u "$path"`
37246    new_path=`$WHICH "$new_path" 2> /dev/null`
37247    # bat and cmd files are not always considered executable in cygwin causing which
37248    # to not find them
37249    if test "x$new_path" = x \
37250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37252      new_path=`$CYGPATH -u "$path"`
37253    fi
37254    if test "x$new_path" = x; then
37255      # It's still not found. Now this is an unrecoverable error.
37256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37257$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37258      has_space=`$ECHO "$complete" | $GREP " "`
37259      if test "x$has_space" != x; then
37260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37262      fi
37263      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37264    fi
37265  fi
37266
37267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37270  # "foo.exe" is OK but "foo" is an error.
37271  #
37272  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37273  # It is also a way to make sure we got the proper file name for the real test later on.
37274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37275  if test "x$test_shortpath" = x; then
37276    # Short path failed, file does not exist as specified.
37277    # Try adding .exe or .cmd
37278    if test -f "${new_path}.exe"; then
37279      input_to_shortpath="${new_path}.exe"
37280    elif test -f "${new_path}.cmd"; then
37281      input_to_shortpath="${new_path}.cmd"
37282    else
37283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37284$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37287      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37288    fi
37289  else
37290    input_to_shortpath="$new_path"
37291  fi
37292
37293  # Call helper function which possibly converts this using DOS-style short mode.
37294  # If so, the updated path is stored in $new_path.
37295  new_path="$input_to_shortpath"
37296
37297  input_path="$input_to_shortpath"
37298  # Check if we need to convert this using DOS-style short mode. If the path
37299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37300  # take no chances and rewrite it.
37301  # Note: m4 eats our [], so we need to use [ and ] instead.
37302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37303  if test "x$has_forbidden_chars" != x; then
37304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37308      # Going to short mode and back again did indeed matter. Since short mode is
37309      # case insensitive, let's make it lowercase to improve readability.
37310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37311      # Now convert it back to Unix-stile (cygpath)
37312      input_path=`$CYGPATH -u "$shortmode_path"`
37313      new_path="$input_path"
37314    fi
37315  fi
37316
37317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37318  if test "x$test_cygdrive_prefix" = x; then
37319    # As a simple fix, exclude /usr/bin since it's not a real path.
37320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37322      # a path prefixed by /cygdrive for fixpath to work.
37323      new_path="$CYGWIN_ROOT_PATH$input_path"
37324    fi
37325  fi
37326
37327  # remove trailing .exe if any
37328  new_path="${new_path/%.exe/}"
37329
37330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37331
37332  # First separate the path from the arguments. This will split at the first
37333  # space.
37334  complete="$STRIP"
37335  path="${complete%% *}"
37336  tmp="$complete EOL"
37337  arguments="${tmp#* }"
37338
37339  # Input might be given as Windows format, start by converting to
37340  # unix format.
37341  new_path="$path"
37342
37343  windows_path="$new_path"
37344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37345    unix_path=`$CYGPATH -u "$windows_path"`
37346    new_path="$unix_path"
37347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37349    new_path="$unix_path"
37350  fi
37351
37352
37353  # Now try to locate executable using which
37354  new_path=`$WHICH "$new_path" 2> /dev/null`
37355
37356  if test "x$new_path" = x; then
37357    # Oops. Which didn't find the executable.
37358    # The splitting of arguments from the executable at a space might have been incorrect,
37359    # since paths with space are more likely in Windows. Give it another try with the whole
37360    # argument.
37361    path="$complete"
37362    arguments="EOL"
37363    new_path="$path"
37364
37365  windows_path="$new_path"
37366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37367    unix_path=`$CYGPATH -u "$windows_path"`
37368    new_path="$unix_path"
37369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37371    new_path="$unix_path"
37372  fi
37373
37374
37375    new_path=`$WHICH "$new_path" 2> /dev/null`
37376    # bat and cmd files are not always considered executable in MSYS causing which
37377    # to not find them
37378    if test "x$new_path" = x \
37379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37381      new_path="$path"
37382
37383  windows_path="$new_path"
37384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37385    unix_path=`$CYGPATH -u "$windows_path"`
37386    new_path="$unix_path"
37387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37389    new_path="$unix_path"
37390  fi
37391
37392    fi
37393
37394    if test "x$new_path" = x; then
37395      # It's still not found. Now this is an unrecoverable error.
37396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37397$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37398      has_space=`$ECHO "$complete" | $GREP " "`
37399      if test "x$has_space" != x; then
37400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37402      fi
37403      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37404    fi
37405  fi
37406
37407  # Now new_path has a complete unix path to the binary
37408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37409    # Keep paths in /bin as-is, but remove trailing .exe if any
37410    new_path="${new_path/%.exe/}"
37411    # Do not save /bin paths to all_fixpath_prefixes!
37412  else
37413    # Not in mixed or Windows style, start by that.
37414    new_path=`cmd //c echo $new_path`
37415
37416  input_path="$new_path"
37417  # Check if we need to convert this using DOS-style short mode. If the path
37418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37419  # take no chances and rewrite it.
37420  # Note: m4 eats our [], so we need to use [ and ] instead.
37421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37422  if test "x$has_forbidden_chars" != x; then
37423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37425  fi
37426
37427    # Output is in $new_path
37428
37429  windows_path="$new_path"
37430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37431    unix_path=`$CYGPATH -u "$windows_path"`
37432    new_path="$unix_path"
37433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37435    new_path="$unix_path"
37436  fi
37437
37438    # remove trailing .exe if any
37439    new_path="${new_path/%.exe/}"
37440
37441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37443  fi
37444
37445  else
37446    # We're on a unix platform. Hooray! :)
37447    # First separate the path from the arguments. This will split at the first
37448    # space.
37449    complete="$STRIP"
37450    path="${complete%% *}"
37451    tmp="$complete EOL"
37452    arguments="${tmp#* }"
37453
37454    # Cannot rely on the command "which" here since it doesn't always work.
37455    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37456    if test -z "$is_absolute_path"; then
37457      # Path to executable is not absolute. Find it.
37458      IFS_save="$IFS"
37459      IFS=:
37460      for p in $PATH; do
37461        if test -f "$p/$path" && test -x "$p/$path"; then
37462          new_path="$p/$path"
37463          break
37464        fi
37465      done
37466      IFS="$IFS_save"
37467    else
37468      # This is an absolute path, we can use it without further modifications.
37469      new_path="$path"
37470    fi
37471
37472    if test "x$new_path" = x; then
37473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37474$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37475      has_space=`$ECHO "$complete" | $GREP " "`
37476      if test "x$has_space" != x; then
37477        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37479      fi
37480      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37481    fi
37482  fi
37483
37484  # Now join together the path and the arguments once again
37485  if test "x$arguments" != xEOL; then
37486    new_complete="$new_path ${arguments% *}"
37487  else
37488    new_complete="$new_path"
37489  fi
37490
37491  if test "x$complete" != "x$new_complete"; then
37492    STRIP="$new_complete"
37493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37494$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37495  fi
37496
37497
37498
37499  # Publish this variable in the help.
37500
37501
37502  if test "x$NM" = x; then
37503    # The variable is not set by user, try to locate tool using the code snippet
37504    if test -n "$ac_tool_prefix"; then
37505  for ac_prog in nm
37506  do
37507    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37508set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37510$as_echo_n "checking for $ac_word... " >&6; }
37511if ${ac_cv_prog_NM+:} false; then :
37512  $as_echo_n "(cached) " >&6
37513else
37514  if test -n "$NM"; then
37515  ac_cv_prog_NM="$NM" # Let the user override the test.
37516else
37517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37518for as_dir in $PATH
37519do
37520  IFS=$as_save_IFS
37521  test -z "$as_dir" && as_dir=.
37522    for ac_exec_ext in '' $ac_executable_extensions; do
37523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37524    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37526    break 2
37527  fi
37528done
37529  done
37530IFS=$as_save_IFS
37531
37532fi
37533fi
37534NM=$ac_cv_prog_NM
37535if test -n "$NM"; then
37536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37537$as_echo "$NM" >&6; }
37538else
37539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37540$as_echo "no" >&6; }
37541fi
37542
37543
37544    test -n "$NM" && break
37545  done
37546fi
37547if test -z "$NM"; then
37548  ac_ct_NM=$NM
37549  for ac_prog in nm
37550do
37551  # Extract the first word of "$ac_prog", so it can be a program name with args.
37552set dummy $ac_prog; ac_word=$2
37553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37554$as_echo_n "checking for $ac_word... " >&6; }
37555if ${ac_cv_prog_ac_ct_NM+:} false; then :
37556  $as_echo_n "(cached) " >&6
37557else
37558  if test -n "$ac_ct_NM"; then
37559  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37560else
37561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37562for as_dir in $PATH
37563do
37564  IFS=$as_save_IFS
37565  test -z "$as_dir" && as_dir=.
37566    for ac_exec_ext in '' $ac_executable_extensions; do
37567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37568    ac_cv_prog_ac_ct_NM="$ac_prog"
37569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37570    break 2
37571  fi
37572done
37573  done
37574IFS=$as_save_IFS
37575
37576fi
37577fi
37578ac_ct_NM=$ac_cv_prog_ac_ct_NM
37579if test -n "$ac_ct_NM"; then
37580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37581$as_echo "$ac_ct_NM" >&6; }
37582else
37583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37584$as_echo "no" >&6; }
37585fi
37586
37587
37588  test -n "$ac_ct_NM" && break
37589done
37590
37591  if test "x$ac_ct_NM" = x; then
37592    NM=""
37593  else
37594    case $cross_compiling:$ac_tool_warned in
37595yes:)
37596{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37597$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37598ac_tool_warned=yes ;;
37599esac
37600    NM=$ac_ct_NM
37601  fi
37602fi
37603
37604  else
37605    # The variable is set, but is it from the command line or the environment?
37606
37607    # Try to remove the string !NM! from our list.
37608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37610      # If it failed, the variable was not from the command line. Ignore it,
37611      # but warn the user (except for BASH, which is always set by the calling BASH).
37612      if test "xNM" != xBASH; then
37613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37614$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37615      fi
37616      # Try to locate tool using the code snippet
37617      if test -n "$ac_tool_prefix"; then
37618  for ac_prog in nm
37619  do
37620    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37621set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37623$as_echo_n "checking for $ac_word... " >&6; }
37624if ${ac_cv_prog_NM+:} false; then :
37625  $as_echo_n "(cached) " >&6
37626else
37627  if test -n "$NM"; then
37628  ac_cv_prog_NM="$NM" # Let the user override the test.
37629else
37630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37631for as_dir in $PATH
37632do
37633  IFS=$as_save_IFS
37634  test -z "$as_dir" && as_dir=.
37635    for ac_exec_ext in '' $ac_executable_extensions; do
37636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37637    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37639    break 2
37640  fi
37641done
37642  done
37643IFS=$as_save_IFS
37644
37645fi
37646fi
37647NM=$ac_cv_prog_NM
37648if test -n "$NM"; then
37649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37650$as_echo "$NM" >&6; }
37651else
37652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37653$as_echo "no" >&6; }
37654fi
37655
37656
37657    test -n "$NM" && break
37658  done
37659fi
37660if test -z "$NM"; then
37661  ac_ct_NM=$NM
37662  for ac_prog in nm
37663do
37664  # Extract the first word of "$ac_prog", so it can be a program name with args.
37665set dummy $ac_prog; ac_word=$2
37666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37667$as_echo_n "checking for $ac_word... " >&6; }
37668if ${ac_cv_prog_ac_ct_NM+:} false; then :
37669  $as_echo_n "(cached) " >&6
37670else
37671  if test -n "$ac_ct_NM"; then
37672  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37673else
37674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37675for as_dir in $PATH
37676do
37677  IFS=$as_save_IFS
37678  test -z "$as_dir" && as_dir=.
37679    for ac_exec_ext in '' $ac_executable_extensions; do
37680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37681    ac_cv_prog_ac_ct_NM="$ac_prog"
37682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37683    break 2
37684  fi
37685done
37686  done
37687IFS=$as_save_IFS
37688
37689fi
37690fi
37691ac_ct_NM=$ac_cv_prog_ac_ct_NM
37692if test -n "$ac_ct_NM"; then
37693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37694$as_echo "$ac_ct_NM" >&6; }
37695else
37696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37697$as_echo "no" >&6; }
37698fi
37699
37700
37701  test -n "$ac_ct_NM" && break
37702done
37703
37704  if test "x$ac_ct_NM" = x; then
37705    NM=""
37706  else
37707    case $cross_compiling:$ac_tool_warned in
37708yes:)
37709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37711ac_tool_warned=yes ;;
37712esac
37713    NM=$ac_ct_NM
37714  fi
37715fi
37716
37717    else
37718      # If it succeeded, then it was overridden by the user. We will use it
37719      # for the tool.
37720
37721      # First remove it from the list of overridden variables, so we can test
37722      # for unknown variables in the end.
37723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37724
37725      # Check if the provided tool contains a complete path.
37726      tool_specified="$NM"
37727      tool_basename="${tool_specified##*/}"
37728      if test "x$tool_basename" = "x$tool_specified"; then
37729        # A command without a complete path is provided, search $PATH.
37730        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37731$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37732        # Extract the first word of "$tool_basename", so it can be a program name with args.
37733set dummy $tool_basename; ac_word=$2
37734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37735$as_echo_n "checking for $ac_word... " >&6; }
37736if ${ac_cv_path_NM+:} false; then :
37737  $as_echo_n "(cached) " >&6
37738else
37739  case $NM in
37740  [\\/]* | ?:[\\/]*)
37741  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37742  ;;
37743  *)
37744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37745for as_dir in $PATH
37746do
37747  IFS=$as_save_IFS
37748  test -z "$as_dir" && as_dir=.
37749    for ac_exec_ext in '' $ac_executable_extensions; do
37750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37751    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37753    break 2
37754  fi
37755done
37756  done
37757IFS=$as_save_IFS
37758
37759  ;;
37760esac
37761fi
37762NM=$ac_cv_path_NM
37763if test -n "$NM"; then
37764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37765$as_echo "$NM" >&6; }
37766else
37767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37768$as_echo "no" >&6; }
37769fi
37770
37771
37772        if test "x$NM" = x; then
37773          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37774        fi
37775      else
37776        # Otherwise we believe it is a complete path. Use it as it is.
37777        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37778$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37780$as_echo_n "checking for NM... " >&6; }
37781        if test ! -x "$tool_specified"; then
37782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37783$as_echo "not found" >&6; }
37784          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37785        fi
37786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37787$as_echo "$tool_specified" >&6; }
37788      fi
37789    fi
37790  fi
37791
37792
37793
37794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37795
37796  # First separate the path from the arguments. This will split at the first
37797  # space.
37798  complete="$NM"
37799  path="${complete%% *}"
37800  tmp="$complete EOL"
37801  arguments="${tmp#* }"
37802
37803  # Input might be given as Windows format, start by converting to
37804  # unix format.
37805  new_path=`$CYGPATH -u "$path"`
37806
37807  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
37818    # The splitting of arguments from the executable at a space might have been incorrect,
37819    # since paths with space are more likely in Windows. Give it another try with the whole
37820    # argument.
37821    path="$complete"
37822    arguments="EOL"
37823    new_path=`$CYGPATH -u "$path"`
37824    new_path=`$WHICH "$new_path" 2> /dev/null`
37825    # bat and cmd files are not always considered executable in cygwin causing which
37826    # to not find them
37827    if test "x$new_path" = x \
37828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37830      new_path=`$CYGPATH -u "$path"`
37831    fi
37832    if test "x$new_path" = x; then
37833      # It's still not found. Now this is an unrecoverable error.
37834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37835$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37836      has_space=`$ECHO "$complete" | $GREP " "`
37837      if test "x$has_space" != x; then
37838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37840      fi
37841      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37842    fi
37843  fi
37844
37845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37848  # "foo.exe" is OK but "foo" is an error.
37849  #
37850  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37851  # It is also a way to make sure we got the proper file name for the real test later on.
37852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37853  if test "x$test_shortpath" = x; then
37854    # Short path failed, file does not exist as specified.
37855    # Try adding .exe or .cmd
37856    if test -f "${new_path}.exe"; then
37857      input_to_shortpath="${new_path}.exe"
37858    elif test -f "${new_path}.cmd"; then
37859      input_to_shortpath="${new_path}.cmd"
37860    else
37861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37862$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37863      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37864$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37865      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37866    fi
37867  else
37868    input_to_shortpath="$new_path"
37869  fi
37870
37871  # Call helper function which possibly converts this using DOS-style short mode.
37872  # If so, the updated path is stored in $new_path.
37873  new_path="$input_to_shortpath"
37874
37875  input_path="$input_to_shortpath"
37876  # Check if we need to convert this using DOS-style short mode. If the path
37877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37878  # take no chances and rewrite it.
37879  # Note: m4 eats our [], so we need to use [ and ] instead.
37880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37881  if test "x$has_forbidden_chars" != x; then
37882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37886      # Going to short mode and back again did indeed matter. Since short mode is
37887      # case insensitive, let's make it lowercase to improve readability.
37888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37889      # Now convert it back to Unix-stile (cygpath)
37890      input_path=`$CYGPATH -u "$shortmode_path"`
37891      new_path="$input_path"
37892    fi
37893  fi
37894
37895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37896  if test "x$test_cygdrive_prefix" = x; then
37897    # As a simple fix, exclude /usr/bin since it's not a real path.
37898    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37900      # a path prefixed by /cygdrive for fixpath to work.
37901      new_path="$CYGWIN_ROOT_PATH$input_path"
37902    fi
37903  fi
37904
37905  # remove trailing .exe if any
37906  new_path="${new_path/%.exe/}"
37907
37908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37909
37910  # First separate the path from the arguments. This will split at the first
37911  # space.
37912  complete="$NM"
37913  path="${complete%% *}"
37914  tmp="$complete EOL"
37915  arguments="${tmp#* }"
37916
37917  # Input might be given as Windows format, start by converting to
37918  # unix format.
37919  new_path="$path"
37920
37921  windows_path="$new_path"
37922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37923    unix_path=`$CYGPATH -u "$windows_path"`
37924    new_path="$unix_path"
37925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37927    new_path="$unix_path"
37928  fi
37929
37930
37931  # Now try to locate executable using which
37932  new_path=`$WHICH "$new_path" 2> /dev/null`
37933
37934  if test "x$new_path" = x; then
37935    # Oops. Which didn't find the executable.
37936    # The splitting of arguments from the executable at a space might have been incorrect,
37937    # since paths with space are more likely in Windows. Give it another try with the whole
37938    # argument.
37939    path="$complete"
37940    arguments="EOL"
37941    new_path="$path"
37942
37943  windows_path="$new_path"
37944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37945    unix_path=`$CYGPATH -u "$windows_path"`
37946    new_path="$unix_path"
37947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37949    new_path="$unix_path"
37950  fi
37951
37952
37953    new_path=`$WHICH "$new_path" 2> /dev/null`
37954    # bat and cmd files are not always considered executable in MSYS causing which
37955    # to not find them
37956    if test "x$new_path" = x \
37957        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37958        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37959      new_path="$path"
37960
37961  windows_path="$new_path"
37962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37963    unix_path=`$CYGPATH -u "$windows_path"`
37964    new_path="$unix_path"
37965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37967    new_path="$unix_path"
37968  fi
37969
37970    fi
37971
37972    if test "x$new_path" = x; then
37973      # It's still not found. Now this is an unrecoverable error.
37974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37975$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37976      has_space=`$ECHO "$complete" | $GREP " "`
37977      if test "x$has_space" != x; then
37978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37980      fi
37981      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37982    fi
37983  fi
37984
37985  # Now new_path has a complete unix path to the binary
37986  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37987    # Keep paths in /bin as-is, but remove trailing .exe if any
37988    new_path="${new_path/%.exe/}"
37989    # Do not save /bin paths to all_fixpath_prefixes!
37990  else
37991    # Not in mixed or Windows style, start by that.
37992    new_path=`cmd //c echo $new_path`
37993
37994  input_path="$new_path"
37995  # Check if we need to convert this using DOS-style short mode. If the path
37996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37997  # take no chances and rewrite it.
37998  # Note: m4 eats our [], so we need to use [ and ] instead.
37999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38000  if test "x$has_forbidden_chars" != x; then
38001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38003  fi
38004
38005    # Output is in $new_path
38006
38007  windows_path="$new_path"
38008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38009    unix_path=`$CYGPATH -u "$windows_path"`
38010    new_path="$unix_path"
38011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38013    new_path="$unix_path"
38014  fi
38015
38016    # remove trailing .exe if any
38017    new_path="${new_path/%.exe/}"
38018
38019    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38020    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38021  fi
38022
38023  else
38024    # We're on a unix platform. Hooray! :)
38025    # First separate the path from the arguments. This will split at the first
38026    # space.
38027    complete="$NM"
38028    path="${complete%% *}"
38029    tmp="$complete EOL"
38030    arguments="${tmp#* }"
38031
38032    # Cannot rely on the command "which" here since it doesn't always work.
38033    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38034    if test -z "$is_absolute_path"; then
38035      # Path to executable is not absolute. Find it.
38036      IFS_save="$IFS"
38037      IFS=:
38038      for p in $PATH; do
38039        if test -f "$p/$path" && test -x "$p/$path"; then
38040          new_path="$p/$path"
38041          break
38042        fi
38043      done
38044      IFS="$IFS_save"
38045    else
38046      # This is an absolute path, we can use it without further modifications.
38047      new_path="$path"
38048    fi
38049
38050    if test "x$new_path" = x; then
38051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38052$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38053      has_space=`$ECHO "$complete" | $GREP " "`
38054      if test "x$has_space" != x; then
38055        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38057      fi
38058      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38059    fi
38060  fi
38061
38062  # Now join together the path and the arguments once again
38063  if test "x$arguments" != xEOL; then
38064    new_complete="$new_path ${arguments% *}"
38065  else
38066    new_complete="$new_path"
38067  fi
38068
38069  if test "x$complete" != "x$new_complete"; then
38070    NM="$new_complete"
38071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38072$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38073  fi
38074
38075    GNM="$NM"
38076
38077  fi
38078
38079  # objcopy is used for moving debug symbols to separate files when
38080  # full debug symbols are enabled.
38081  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38082
38083
38084  # Publish this variable in the help.
38085
38086
38087  if test "x$OBJCOPY" = x; then
38088    # The variable is not set by user, try to locate tool using the code snippet
38089    if test -n "$ac_tool_prefix"; then
38090  for ac_prog in gobjcopy objcopy
38091  do
38092    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38093set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38095$as_echo_n "checking for $ac_word... " >&6; }
38096if ${ac_cv_prog_OBJCOPY+:} false; then :
38097  $as_echo_n "(cached) " >&6
38098else
38099  if test -n "$OBJCOPY"; then
38100  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38101else
38102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38103for as_dir in $PATH
38104do
38105  IFS=$as_save_IFS
38106  test -z "$as_dir" && as_dir=.
38107    for ac_exec_ext in '' $ac_executable_extensions; do
38108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38109    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38111    break 2
38112  fi
38113done
38114  done
38115IFS=$as_save_IFS
38116
38117fi
38118fi
38119OBJCOPY=$ac_cv_prog_OBJCOPY
38120if test -n "$OBJCOPY"; then
38121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38122$as_echo "$OBJCOPY" >&6; }
38123else
38124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38125$as_echo "no" >&6; }
38126fi
38127
38128
38129    test -n "$OBJCOPY" && break
38130  done
38131fi
38132if test -z "$OBJCOPY"; then
38133  ac_ct_OBJCOPY=$OBJCOPY
38134  for ac_prog in gobjcopy objcopy
38135do
38136  # Extract the first word of "$ac_prog", so it can be a program name with args.
38137set dummy $ac_prog; ac_word=$2
38138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38139$as_echo_n "checking for $ac_word... " >&6; }
38140if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38141  $as_echo_n "(cached) " >&6
38142else
38143  if test -n "$ac_ct_OBJCOPY"; then
38144  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38145else
38146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38147for as_dir in $PATH
38148do
38149  IFS=$as_save_IFS
38150  test -z "$as_dir" && as_dir=.
38151    for ac_exec_ext in '' $ac_executable_extensions; do
38152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38153    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38155    break 2
38156  fi
38157done
38158  done
38159IFS=$as_save_IFS
38160
38161fi
38162fi
38163ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38164if test -n "$ac_ct_OBJCOPY"; then
38165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38166$as_echo "$ac_ct_OBJCOPY" >&6; }
38167else
38168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38169$as_echo "no" >&6; }
38170fi
38171
38172
38173  test -n "$ac_ct_OBJCOPY" && break
38174done
38175
38176  if test "x$ac_ct_OBJCOPY" = x; then
38177    OBJCOPY=""
38178  else
38179    case $cross_compiling:$ac_tool_warned in
38180yes:)
38181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38183ac_tool_warned=yes ;;
38184esac
38185    OBJCOPY=$ac_ct_OBJCOPY
38186  fi
38187fi
38188
38189  else
38190    # The variable is set, but is it from the command line or the environment?
38191
38192    # Try to remove the string !OBJCOPY! from our list.
38193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38195      # If it failed, the variable was not from the command line. Ignore it,
38196      # but warn the user (except for BASH, which is always set by the calling BASH).
38197      if test "xOBJCOPY" != xBASH; then
38198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38199$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38200      fi
38201      # Try to locate tool using the code snippet
38202      if test -n "$ac_tool_prefix"; then
38203  for ac_prog in gobjcopy objcopy
38204  do
38205    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38206set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38208$as_echo_n "checking for $ac_word... " >&6; }
38209if ${ac_cv_prog_OBJCOPY+:} false; then :
38210  $as_echo_n "(cached) " >&6
38211else
38212  if test -n "$OBJCOPY"; then
38213  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38214else
38215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38216for as_dir in $PATH
38217do
38218  IFS=$as_save_IFS
38219  test -z "$as_dir" && as_dir=.
38220    for ac_exec_ext in '' $ac_executable_extensions; do
38221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38222    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38224    break 2
38225  fi
38226done
38227  done
38228IFS=$as_save_IFS
38229
38230fi
38231fi
38232OBJCOPY=$ac_cv_prog_OBJCOPY
38233if test -n "$OBJCOPY"; then
38234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38235$as_echo "$OBJCOPY" >&6; }
38236else
38237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38238$as_echo "no" >&6; }
38239fi
38240
38241
38242    test -n "$OBJCOPY" && break
38243  done
38244fi
38245if test -z "$OBJCOPY"; then
38246  ac_ct_OBJCOPY=$OBJCOPY
38247  for ac_prog in gobjcopy objcopy
38248do
38249  # Extract the first word of "$ac_prog", so it can be a program name with args.
38250set dummy $ac_prog; ac_word=$2
38251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38252$as_echo_n "checking for $ac_word... " >&6; }
38253if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38254  $as_echo_n "(cached) " >&6
38255else
38256  if test -n "$ac_ct_OBJCOPY"; then
38257  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38258else
38259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38260for as_dir in $PATH
38261do
38262  IFS=$as_save_IFS
38263  test -z "$as_dir" && as_dir=.
38264    for ac_exec_ext in '' $ac_executable_extensions; do
38265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38266    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38268    break 2
38269  fi
38270done
38271  done
38272IFS=$as_save_IFS
38273
38274fi
38275fi
38276ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38277if test -n "$ac_ct_OBJCOPY"; then
38278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38279$as_echo "$ac_ct_OBJCOPY" >&6; }
38280else
38281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38282$as_echo "no" >&6; }
38283fi
38284
38285
38286  test -n "$ac_ct_OBJCOPY" && break
38287done
38288
38289  if test "x$ac_ct_OBJCOPY" = x; then
38290    OBJCOPY=""
38291  else
38292    case $cross_compiling:$ac_tool_warned in
38293yes:)
38294{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38295$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38296ac_tool_warned=yes ;;
38297esac
38298    OBJCOPY=$ac_ct_OBJCOPY
38299  fi
38300fi
38301
38302    else
38303      # If it succeeded, then it was overridden by the user. We will use it
38304      # for the tool.
38305
38306      # First remove it from the list of overridden variables, so we can test
38307      # for unknown variables in the end.
38308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38309
38310      # Check if the provided tool contains a complete path.
38311      tool_specified="$OBJCOPY"
38312      tool_basename="${tool_specified##*/}"
38313      if test "x$tool_basename" = "x$tool_specified"; then
38314        # A command without a complete path is provided, search $PATH.
38315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38316$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38317        # Extract the first word of "$tool_basename", so it can be a program name with args.
38318set dummy $tool_basename; ac_word=$2
38319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38320$as_echo_n "checking for $ac_word... " >&6; }
38321if ${ac_cv_path_OBJCOPY+:} false; then :
38322  $as_echo_n "(cached) " >&6
38323else
38324  case $OBJCOPY in
38325  [\\/]* | ?:[\\/]*)
38326  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38327  ;;
38328  *)
38329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38330for as_dir in $PATH
38331do
38332  IFS=$as_save_IFS
38333  test -z "$as_dir" && as_dir=.
38334    for ac_exec_ext in '' $ac_executable_extensions; do
38335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38336    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38338    break 2
38339  fi
38340done
38341  done
38342IFS=$as_save_IFS
38343
38344  ;;
38345esac
38346fi
38347OBJCOPY=$ac_cv_path_OBJCOPY
38348if test -n "$OBJCOPY"; then
38349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38350$as_echo "$OBJCOPY" >&6; }
38351else
38352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38353$as_echo "no" >&6; }
38354fi
38355
38356
38357        if test "x$OBJCOPY" = x; then
38358          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38359        fi
38360      else
38361        # Otherwise we believe it is a complete path. Use it as it is.
38362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38363$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38365$as_echo_n "checking for OBJCOPY... " >&6; }
38366        if test ! -x "$tool_specified"; then
38367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38368$as_echo "not found" >&6; }
38369          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38370        fi
38371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38372$as_echo "$tool_specified" >&6; }
38373      fi
38374    fi
38375  fi
38376
38377
38378    # Only call fixup if objcopy was found.
38379    if test -n "$OBJCOPY"; then
38380
38381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38382
38383  # First separate the path from the arguments. This will split at the first
38384  # space.
38385  complete="$OBJCOPY"
38386  path="${complete%% *}"
38387  tmp="$complete EOL"
38388  arguments="${tmp#* }"
38389
38390  # Input might be given as Windows format, start by converting to
38391  # unix format.
38392  new_path=`$CYGPATH -u "$path"`
38393
38394  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
38405    # The splitting of arguments from the executable at a space might have been incorrect,
38406    # since paths with space are more likely in Windows. Give it another try with the whole
38407    # argument.
38408    path="$complete"
38409    arguments="EOL"
38410    new_path=`$CYGPATH -u "$path"`
38411    new_path=`$WHICH "$new_path" 2> /dev/null`
38412    # bat and cmd files are not always considered executable in cygwin causing which
38413    # to not find them
38414    if test "x$new_path" = x \
38415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38417      new_path=`$CYGPATH -u "$path"`
38418    fi
38419    if test "x$new_path" = x; then
38420      # It's still not found. Now this is an unrecoverable error.
38421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38422$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38423      has_space=`$ECHO "$complete" | $GREP " "`
38424      if test "x$has_space" != x; then
38425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38427      fi
38428      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38429    fi
38430  fi
38431
38432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38435  # "foo.exe" is OK but "foo" is an error.
38436  #
38437  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38438  # It is also a way to make sure we got the proper file name for the real test later on.
38439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38440  if test "x$test_shortpath" = x; then
38441    # Short path failed, file does not exist as specified.
38442    # Try adding .exe or .cmd
38443    if test -f "${new_path}.exe"; then
38444      input_to_shortpath="${new_path}.exe"
38445    elif test -f "${new_path}.cmd"; then
38446      input_to_shortpath="${new_path}.cmd"
38447    else
38448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38449$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38450      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38451$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38452      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38453    fi
38454  else
38455    input_to_shortpath="$new_path"
38456  fi
38457
38458  # Call helper function which possibly converts this using DOS-style short mode.
38459  # If so, the updated path is stored in $new_path.
38460  new_path="$input_to_shortpath"
38461
38462  input_path="$input_to_shortpath"
38463  # Check if we need to convert this using DOS-style short mode. If the path
38464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38465  # take no chances and rewrite it.
38466  # Note: m4 eats our [], so we need to use [ and ] instead.
38467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38468  if test "x$has_forbidden_chars" != x; then
38469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38473      # Going to short mode and back again did indeed matter. Since short mode is
38474      # case insensitive, let's make it lowercase to improve readability.
38475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38476      # Now convert it back to Unix-stile (cygpath)
38477      input_path=`$CYGPATH -u "$shortmode_path"`
38478      new_path="$input_path"
38479    fi
38480  fi
38481
38482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38483  if test "x$test_cygdrive_prefix" = x; then
38484    # As a simple fix, exclude /usr/bin since it's not a real path.
38485    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38487      # a path prefixed by /cygdrive for fixpath to work.
38488      new_path="$CYGWIN_ROOT_PATH$input_path"
38489    fi
38490  fi
38491
38492  # remove trailing .exe if any
38493  new_path="${new_path/%.exe/}"
38494
38495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38496
38497  # First separate the path from the arguments. This will split at the first
38498  # space.
38499  complete="$OBJCOPY"
38500  path="${complete%% *}"
38501  tmp="$complete EOL"
38502  arguments="${tmp#* }"
38503
38504  # Input might be given as Windows format, start by converting to
38505  # unix format.
38506  new_path="$path"
38507
38508  windows_path="$new_path"
38509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38510    unix_path=`$CYGPATH -u "$windows_path"`
38511    new_path="$unix_path"
38512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38514    new_path="$unix_path"
38515  fi
38516
38517
38518  # Now try to locate executable using which
38519  new_path=`$WHICH "$new_path" 2> /dev/null`
38520
38521  if test "x$new_path" = x; then
38522    # Oops. Which didn't find the executable.
38523    # The splitting of arguments from the executable at a space might have been incorrect,
38524    # since paths with space are more likely in Windows. Give it another try with the whole
38525    # argument.
38526    path="$complete"
38527    arguments="EOL"
38528    new_path="$path"
38529
38530  windows_path="$new_path"
38531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38532    unix_path=`$CYGPATH -u "$windows_path"`
38533    new_path="$unix_path"
38534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38536    new_path="$unix_path"
38537  fi
38538
38539
38540    new_path=`$WHICH "$new_path" 2> /dev/null`
38541    # bat and cmd files are not always considered executable in MSYS causing which
38542    # to not find them
38543    if test "x$new_path" = x \
38544        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38545        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38546      new_path="$path"
38547
38548  windows_path="$new_path"
38549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38550    unix_path=`$CYGPATH -u "$windows_path"`
38551    new_path="$unix_path"
38552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38554    new_path="$unix_path"
38555  fi
38556
38557    fi
38558
38559    if test "x$new_path" = x; then
38560      # It's still not found. Now this is an unrecoverable error.
38561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38562$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38563      has_space=`$ECHO "$complete" | $GREP " "`
38564      if test "x$has_space" != x; then
38565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38567      fi
38568      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38569    fi
38570  fi
38571
38572  # Now new_path has a complete unix path to the binary
38573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38574    # Keep paths in /bin as-is, but remove trailing .exe if any
38575    new_path="${new_path/%.exe/}"
38576    # Do not save /bin paths to all_fixpath_prefixes!
38577  else
38578    # Not in mixed or Windows style, start by that.
38579    new_path=`cmd //c echo $new_path`
38580
38581  input_path="$new_path"
38582  # Check if we need to convert this using DOS-style short mode. If the path
38583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38584  # take no chances and rewrite it.
38585  # Note: m4 eats our [], so we need to use [ and ] instead.
38586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38587  if test "x$has_forbidden_chars" != x; then
38588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38590  fi
38591
38592    # Output is in $new_path
38593
38594  windows_path="$new_path"
38595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38596    unix_path=`$CYGPATH -u "$windows_path"`
38597    new_path="$unix_path"
38598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38600    new_path="$unix_path"
38601  fi
38602
38603    # remove trailing .exe if any
38604    new_path="${new_path/%.exe/}"
38605
38606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38608  fi
38609
38610  else
38611    # We're on a unix platform. Hooray! :)
38612    # First separate the path from the arguments. This will split at the first
38613    # space.
38614    complete="$OBJCOPY"
38615    path="${complete%% *}"
38616    tmp="$complete EOL"
38617    arguments="${tmp#* }"
38618
38619    # Cannot rely on the command "which" here since it doesn't always work.
38620    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38621    if test -z "$is_absolute_path"; then
38622      # Path to executable is not absolute. Find it.
38623      IFS_save="$IFS"
38624      IFS=:
38625      for p in $PATH; do
38626        if test -f "$p/$path" && test -x "$p/$path"; then
38627          new_path="$p/$path"
38628          break
38629        fi
38630      done
38631      IFS="$IFS_save"
38632    else
38633      # This is an absolute path, we can use it without further modifications.
38634      new_path="$path"
38635    fi
38636
38637    if test "x$new_path" = x; then
38638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38639$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38640      has_space=`$ECHO "$complete" | $GREP " "`
38641      if test "x$has_space" != x; then
38642        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38643$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38644      fi
38645      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38646    fi
38647  fi
38648
38649  # Now join together the path and the arguments once again
38650  if test "x$arguments" != xEOL; then
38651    new_complete="$new_path ${arguments% *}"
38652  else
38653    new_complete="$new_path"
38654  fi
38655
38656  if test "x$complete" != "x$new_complete"; then
38657    OBJCOPY="$new_complete"
38658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38659$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38660  fi
38661
38662    fi
38663  fi
38664
38665
38666
38667  # Publish this variable in the help.
38668
38669
38670  if test "x$OBJDUMP" = x; then
38671    # The variable is not set by user, try to locate tool using the code snippet
38672    if test -n "$ac_tool_prefix"; then
38673  for ac_prog in gobjdump objdump
38674  do
38675    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38676set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38678$as_echo_n "checking for $ac_word... " >&6; }
38679if ${ac_cv_prog_OBJDUMP+:} false; then :
38680  $as_echo_n "(cached) " >&6
38681else
38682  if test -n "$OBJDUMP"; then
38683  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38684else
38685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38686for as_dir in $PATH
38687do
38688  IFS=$as_save_IFS
38689  test -z "$as_dir" && as_dir=.
38690    for ac_exec_ext in '' $ac_executable_extensions; do
38691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38692    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38694    break 2
38695  fi
38696done
38697  done
38698IFS=$as_save_IFS
38699
38700fi
38701fi
38702OBJDUMP=$ac_cv_prog_OBJDUMP
38703if test -n "$OBJDUMP"; then
38704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38705$as_echo "$OBJDUMP" >&6; }
38706else
38707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38708$as_echo "no" >&6; }
38709fi
38710
38711
38712    test -n "$OBJDUMP" && break
38713  done
38714fi
38715if test -z "$OBJDUMP"; then
38716  ac_ct_OBJDUMP=$OBJDUMP
38717  for ac_prog in gobjdump objdump
38718do
38719  # Extract the first word of "$ac_prog", so it can be a program name with args.
38720set dummy $ac_prog; ac_word=$2
38721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38722$as_echo_n "checking for $ac_word... " >&6; }
38723if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38724  $as_echo_n "(cached) " >&6
38725else
38726  if test -n "$ac_ct_OBJDUMP"; then
38727  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38728else
38729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38730for as_dir in $PATH
38731do
38732  IFS=$as_save_IFS
38733  test -z "$as_dir" && as_dir=.
38734    for ac_exec_ext in '' $ac_executable_extensions; do
38735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38736    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38738    break 2
38739  fi
38740done
38741  done
38742IFS=$as_save_IFS
38743
38744fi
38745fi
38746ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38747if test -n "$ac_ct_OBJDUMP"; then
38748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38749$as_echo "$ac_ct_OBJDUMP" >&6; }
38750else
38751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38752$as_echo "no" >&6; }
38753fi
38754
38755
38756  test -n "$ac_ct_OBJDUMP" && break
38757done
38758
38759  if test "x$ac_ct_OBJDUMP" = x; then
38760    OBJDUMP=""
38761  else
38762    case $cross_compiling:$ac_tool_warned in
38763yes:)
38764{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38765$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38766ac_tool_warned=yes ;;
38767esac
38768    OBJDUMP=$ac_ct_OBJDUMP
38769  fi
38770fi
38771
38772  else
38773    # The variable is set, but is it from the command line or the environment?
38774
38775    # Try to remove the string !OBJDUMP! from our list.
38776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38778      # If it failed, the variable was not from the command line. Ignore it,
38779      # but warn the user (except for BASH, which is always set by the calling BASH).
38780      if test "xOBJDUMP" != xBASH; then
38781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38782$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38783      fi
38784      # Try to locate tool using the code snippet
38785      if test -n "$ac_tool_prefix"; then
38786  for ac_prog in gobjdump objdump
38787  do
38788    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38791$as_echo_n "checking for $ac_word... " >&6; }
38792if ${ac_cv_prog_OBJDUMP+:} false; then :
38793  $as_echo_n "(cached) " >&6
38794else
38795  if test -n "$OBJDUMP"; then
38796  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38797else
38798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38799for as_dir in $PATH
38800do
38801  IFS=$as_save_IFS
38802  test -z "$as_dir" && as_dir=.
38803    for ac_exec_ext in '' $ac_executable_extensions; do
38804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38805    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38807    break 2
38808  fi
38809done
38810  done
38811IFS=$as_save_IFS
38812
38813fi
38814fi
38815OBJDUMP=$ac_cv_prog_OBJDUMP
38816if test -n "$OBJDUMP"; then
38817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38818$as_echo "$OBJDUMP" >&6; }
38819else
38820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38821$as_echo "no" >&6; }
38822fi
38823
38824
38825    test -n "$OBJDUMP" && break
38826  done
38827fi
38828if test -z "$OBJDUMP"; then
38829  ac_ct_OBJDUMP=$OBJDUMP
38830  for ac_prog in gobjdump objdump
38831do
38832  # Extract the first word of "$ac_prog", so it can be a program name with args.
38833set dummy $ac_prog; ac_word=$2
38834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38835$as_echo_n "checking for $ac_word... " >&6; }
38836if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38837  $as_echo_n "(cached) " >&6
38838else
38839  if test -n "$ac_ct_OBJDUMP"; then
38840  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38841else
38842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38843for as_dir in $PATH
38844do
38845  IFS=$as_save_IFS
38846  test -z "$as_dir" && as_dir=.
38847    for ac_exec_ext in '' $ac_executable_extensions; do
38848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38849    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38851    break 2
38852  fi
38853done
38854  done
38855IFS=$as_save_IFS
38856
38857fi
38858fi
38859ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38860if test -n "$ac_ct_OBJDUMP"; then
38861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38862$as_echo "$ac_ct_OBJDUMP" >&6; }
38863else
38864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38865$as_echo "no" >&6; }
38866fi
38867
38868
38869  test -n "$ac_ct_OBJDUMP" && break
38870done
38871
38872  if test "x$ac_ct_OBJDUMP" = x; then
38873    OBJDUMP=""
38874  else
38875    case $cross_compiling:$ac_tool_warned in
38876yes:)
38877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38879ac_tool_warned=yes ;;
38880esac
38881    OBJDUMP=$ac_ct_OBJDUMP
38882  fi
38883fi
38884
38885    else
38886      # If it succeeded, then it was overridden by the user. We will use it
38887      # for the tool.
38888
38889      # First remove it from the list of overridden variables, so we can test
38890      # for unknown variables in the end.
38891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38892
38893      # Check if the provided tool contains a complete path.
38894      tool_specified="$OBJDUMP"
38895      tool_basename="${tool_specified##*/}"
38896      if test "x$tool_basename" = "x$tool_specified"; then
38897        # A command without a complete path is provided, search $PATH.
38898        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38899$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38900        # Extract the first word of "$tool_basename", so it can be a program name with args.
38901set dummy $tool_basename; ac_word=$2
38902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38903$as_echo_n "checking for $ac_word... " >&6; }
38904if ${ac_cv_path_OBJDUMP+:} false; then :
38905  $as_echo_n "(cached) " >&6
38906else
38907  case $OBJDUMP in
38908  [\\/]* | ?:[\\/]*)
38909  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38910  ;;
38911  *)
38912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38913for as_dir in $PATH
38914do
38915  IFS=$as_save_IFS
38916  test -z "$as_dir" && as_dir=.
38917    for ac_exec_ext in '' $ac_executable_extensions; do
38918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38919    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38921    break 2
38922  fi
38923done
38924  done
38925IFS=$as_save_IFS
38926
38927  ;;
38928esac
38929fi
38930OBJDUMP=$ac_cv_path_OBJDUMP
38931if test -n "$OBJDUMP"; then
38932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38933$as_echo "$OBJDUMP" >&6; }
38934else
38935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38936$as_echo "no" >&6; }
38937fi
38938
38939
38940        if test "x$OBJDUMP" = x; then
38941          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38942        fi
38943      else
38944        # Otherwise we believe it is a complete path. Use it as it is.
38945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38946$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38948$as_echo_n "checking for OBJDUMP... " >&6; }
38949        if test ! -x "$tool_specified"; then
38950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38951$as_echo "not found" >&6; }
38952          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38953        fi
38954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38955$as_echo "$tool_specified" >&6; }
38956      fi
38957    fi
38958  fi
38959
38960
38961  if test "x$OBJDUMP" != x; then
38962    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38963    # bails if argument is missing.
38964
38965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38966
38967  # First separate the path from the arguments. This will split at the first
38968  # space.
38969  complete="$OBJDUMP"
38970  path="${complete%% *}"
38971  tmp="$complete EOL"
38972  arguments="${tmp#* }"
38973
38974  # Input might be given as Windows format, start by converting to
38975  # unix format.
38976  new_path=`$CYGPATH -u "$path"`
38977
38978  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
38989    # The splitting of arguments from the executable at a space might have been incorrect,
38990    # since paths with space are more likely in Windows. Give it another try with the whole
38991    # argument.
38992    path="$complete"
38993    arguments="EOL"
38994    new_path=`$CYGPATH -u "$path"`
38995    new_path=`$WHICH "$new_path" 2> /dev/null`
38996    # bat and cmd files are not always considered executable in cygwin causing which
38997    # to not find them
38998    if test "x$new_path" = x \
38999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39001      new_path=`$CYGPATH -u "$path"`
39002    fi
39003    if test "x$new_path" = x; then
39004      # It's still not found. Now this is an unrecoverable error.
39005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39006$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39007      has_space=`$ECHO "$complete" | $GREP " "`
39008      if test "x$has_space" != x; then
39009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39011      fi
39012      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39013    fi
39014  fi
39015
39016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39019  # "foo.exe" is OK but "foo" is an error.
39020  #
39021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39022  # It is also a way to make sure we got the proper file name for the real test later on.
39023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39024  if test "x$test_shortpath" = x; then
39025    # Short path failed, file does not exist as specified.
39026    # Try adding .exe or .cmd
39027    if test -f "${new_path}.exe"; then
39028      input_to_shortpath="${new_path}.exe"
39029    elif test -f "${new_path}.cmd"; then
39030      input_to_shortpath="${new_path}.cmd"
39031    else
39032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39033$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39036      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39037    fi
39038  else
39039    input_to_shortpath="$new_path"
39040  fi
39041
39042  # Call helper function which possibly converts this using DOS-style short mode.
39043  # If so, the updated path is stored in $new_path.
39044  new_path="$input_to_shortpath"
39045
39046  input_path="$input_to_shortpath"
39047  # Check if we need to convert this using DOS-style short mode. If the path
39048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39049  # take no chances and rewrite it.
39050  # Note: m4 eats our [], so we need to use [ and ] instead.
39051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39052  if test "x$has_forbidden_chars" != x; then
39053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39057      # Going to short mode and back again did indeed matter. Since short mode is
39058      # case insensitive, let's make it lowercase to improve readability.
39059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39060      # Now convert it back to Unix-stile (cygpath)
39061      input_path=`$CYGPATH -u "$shortmode_path"`
39062      new_path="$input_path"
39063    fi
39064  fi
39065
39066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39067  if test "x$test_cygdrive_prefix" = x; then
39068    # As a simple fix, exclude /usr/bin since it's not a real path.
39069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39071      # a path prefixed by /cygdrive for fixpath to work.
39072      new_path="$CYGWIN_ROOT_PATH$input_path"
39073    fi
39074  fi
39075
39076  # remove trailing .exe if any
39077  new_path="${new_path/%.exe/}"
39078
39079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39080
39081  # First separate the path from the arguments. This will split at the first
39082  # space.
39083  complete="$OBJDUMP"
39084  path="${complete%% *}"
39085  tmp="$complete EOL"
39086  arguments="${tmp#* }"
39087
39088  # Input might be given as Windows format, start by converting to
39089  # unix format.
39090  new_path="$path"
39091
39092  windows_path="$new_path"
39093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39094    unix_path=`$CYGPATH -u "$windows_path"`
39095    new_path="$unix_path"
39096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39098    new_path="$unix_path"
39099  fi
39100
39101
39102  # Now try to locate executable using which
39103  new_path=`$WHICH "$new_path" 2> /dev/null`
39104
39105  if test "x$new_path" = x; then
39106    # Oops. Which didn't find the executable.
39107    # The splitting of arguments from the executable at a space might have been incorrect,
39108    # since paths with space are more likely in Windows. Give it another try with the whole
39109    # argument.
39110    path="$complete"
39111    arguments="EOL"
39112    new_path="$path"
39113
39114  windows_path="$new_path"
39115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39116    unix_path=`$CYGPATH -u "$windows_path"`
39117    new_path="$unix_path"
39118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39120    new_path="$unix_path"
39121  fi
39122
39123
39124    new_path=`$WHICH "$new_path" 2> /dev/null`
39125    # bat and cmd files are not always considered executable in MSYS causing which
39126    # to not find them
39127    if test "x$new_path" = x \
39128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39130      new_path="$path"
39131
39132  windows_path="$new_path"
39133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39134    unix_path=`$CYGPATH -u "$windows_path"`
39135    new_path="$unix_path"
39136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39138    new_path="$unix_path"
39139  fi
39140
39141    fi
39142
39143    if test "x$new_path" = x; then
39144      # It's still not found. Now this is an unrecoverable error.
39145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39146$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39147      has_space=`$ECHO "$complete" | $GREP " "`
39148      if test "x$has_space" != x; then
39149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39151      fi
39152      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39153    fi
39154  fi
39155
39156  # Now new_path has a complete unix path to the binary
39157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39158    # Keep paths in /bin as-is, but remove trailing .exe if any
39159    new_path="${new_path/%.exe/}"
39160    # Do not save /bin paths to all_fixpath_prefixes!
39161  else
39162    # Not in mixed or Windows style, start by that.
39163    new_path=`cmd //c echo $new_path`
39164
39165  input_path="$new_path"
39166  # Check if we need to convert this using DOS-style short mode. If the path
39167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39168  # take no chances and rewrite it.
39169  # Note: m4 eats our [], so we need to use [ and ] instead.
39170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39171  if test "x$has_forbidden_chars" != x; then
39172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39174  fi
39175
39176    # Output is in $new_path
39177
39178  windows_path="$new_path"
39179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39180    unix_path=`$CYGPATH -u "$windows_path"`
39181    new_path="$unix_path"
39182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39184    new_path="$unix_path"
39185  fi
39186
39187    # remove trailing .exe if any
39188    new_path="${new_path/%.exe/}"
39189
39190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39192  fi
39193
39194  else
39195    # We're on a unix platform. Hooray! :)
39196    # First separate the path from the arguments. This will split at the first
39197    # space.
39198    complete="$OBJDUMP"
39199    path="${complete%% *}"
39200    tmp="$complete EOL"
39201    arguments="${tmp#* }"
39202
39203    # Cannot rely on the command "which" here since it doesn't always work.
39204    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39205    if test -z "$is_absolute_path"; then
39206      # Path to executable is not absolute. Find it.
39207      IFS_save="$IFS"
39208      IFS=:
39209      for p in $PATH; do
39210        if test -f "$p/$path" && test -x "$p/$path"; then
39211          new_path="$p/$path"
39212          break
39213        fi
39214      done
39215      IFS="$IFS_save"
39216    else
39217      # This is an absolute path, we can use it without further modifications.
39218      new_path="$path"
39219    fi
39220
39221    if test "x$new_path" = x; then
39222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39223$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39224      has_space=`$ECHO "$complete" | $GREP " "`
39225      if test "x$has_space" != x; then
39226        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39228      fi
39229      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39230    fi
39231  fi
39232
39233  # Now join together the path and the arguments once again
39234  if test "x$arguments" != xEOL; then
39235    new_complete="$new_path ${arguments% *}"
39236  else
39237    new_complete="$new_path"
39238  fi
39239
39240  if test "x$complete" != "x$new_complete"; then
39241    OBJDUMP="$new_complete"
39242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39243$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39244  fi
39245
39246  fi
39247
39248
39249  # Restore old path.
39250  PATH="$OLD_PATH"
39251
39252  # Restore the flags to the user specified values.
39253  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39254  CFLAGS="$ORG_CFLAGS"
39255  CXXFLAGS="$ORG_CXXFLAGS"
39256  OBJCFLAGS="$ORG_OBJCFLAGS"
39257
39258
39259# Finally do some processing after the detection phase
39260
39261  if test "x$COMPILE_TYPE" = "xcross"; then
39262    # Now we need to find a C/C++ compiler that can build executables for the
39263    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39264    # used once. Also, we need to do this without adding a tools dir to the
39265    # path, otherwise we might pick up cross-compilers which don't use standard
39266    # naming.
39267
39268    # FIXME: we should list the discovered compilers as an exclude pattern!
39269    # If we do that, we can do this detection before POST_DETECTION, and still
39270    # find the build compilers in the tools dir, if needed.
39271
39272
39273  # Publish this variable in the help.
39274
39275
39276  if test "x$BUILD_CC" = x; then
39277    # The variable is not set by user, try to locate tool using the code snippet
39278    for ac_prog in cl cc gcc
39279do
39280  # Extract the first word of "$ac_prog", so it can be a program name with args.
39281set dummy $ac_prog; ac_word=$2
39282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39283$as_echo_n "checking for $ac_word... " >&6; }
39284if ${ac_cv_path_BUILD_CC+:} false; then :
39285  $as_echo_n "(cached) " >&6
39286else
39287  case $BUILD_CC in
39288  [\\/]* | ?:[\\/]*)
39289  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39290  ;;
39291  *)
39292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39293for as_dir in $PATH
39294do
39295  IFS=$as_save_IFS
39296  test -z "$as_dir" && as_dir=.
39297    for ac_exec_ext in '' $ac_executable_extensions; do
39298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39299    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39301    break 2
39302  fi
39303done
39304  done
39305IFS=$as_save_IFS
39306
39307  ;;
39308esac
39309fi
39310BUILD_CC=$ac_cv_path_BUILD_CC
39311if test -n "$BUILD_CC"; then
39312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39313$as_echo "$BUILD_CC" >&6; }
39314else
39315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39316$as_echo "no" >&6; }
39317fi
39318
39319
39320  test -n "$BUILD_CC" && break
39321done
39322
39323  else
39324    # The variable is set, but is it from the command line or the environment?
39325
39326    # Try to remove the string !BUILD_CC! from our list.
39327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39329      # If it failed, the variable was not from the command line. Ignore it,
39330      # but warn the user (except for BASH, which is always set by the calling BASH).
39331      if test "xBUILD_CC" != xBASH; then
39332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39333$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39334      fi
39335      # Try to locate tool using the code snippet
39336      for ac_prog in cl cc gcc
39337do
39338  # Extract the first word of "$ac_prog", so it can be a program name with args.
39339set dummy $ac_prog; ac_word=$2
39340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39341$as_echo_n "checking for $ac_word... " >&6; }
39342if ${ac_cv_path_BUILD_CC+:} false; then :
39343  $as_echo_n "(cached) " >&6
39344else
39345  case $BUILD_CC in
39346  [\\/]* | ?:[\\/]*)
39347  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39348  ;;
39349  *)
39350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39351for as_dir in $PATH
39352do
39353  IFS=$as_save_IFS
39354  test -z "$as_dir" && as_dir=.
39355    for ac_exec_ext in '' $ac_executable_extensions; do
39356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39357    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39359    break 2
39360  fi
39361done
39362  done
39363IFS=$as_save_IFS
39364
39365  ;;
39366esac
39367fi
39368BUILD_CC=$ac_cv_path_BUILD_CC
39369if test -n "$BUILD_CC"; then
39370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39371$as_echo "$BUILD_CC" >&6; }
39372else
39373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39374$as_echo "no" >&6; }
39375fi
39376
39377
39378  test -n "$BUILD_CC" && break
39379done
39380
39381    else
39382      # If it succeeded, then it was overridden by the user. We will use it
39383      # for the tool.
39384
39385      # First remove it from the list of overridden variables, so we can test
39386      # for unknown variables in the end.
39387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39388
39389      # Check if the provided tool contains a complete path.
39390      tool_specified="$BUILD_CC"
39391      tool_basename="${tool_specified##*/}"
39392      if test "x$tool_basename" = "x$tool_specified"; then
39393        # A command without a complete path is provided, search $PATH.
39394        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39395$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39396        # Extract the first word of "$tool_basename", so it can be a program name with args.
39397set dummy $tool_basename; ac_word=$2
39398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39399$as_echo_n "checking for $ac_word... " >&6; }
39400if ${ac_cv_path_BUILD_CC+:} false; then :
39401  $as_echo_n "(cached) " >&6
39402else
39403  case $BUILD_CC in
39404  [\\/]* | ?:[\\/]*)
39405  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39406  ;;
39407  *)
39408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39409for as_dir in $PATH
39410do
39411  IFS=$as_save_IFS
39412  test -z "$as_dir" && as_dir=.
39413    for ac_exec_ext in '' $ac_executable_extensions; do
39414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39415    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39417    break 2
39418  fi
39419done
39420  done
39421IFS=$as_save_IFS
39422
39423  ;;
39424esac
39425fi
39426BUILD_CC=$ac_cv_path_BUILD_CC
39427if test -n "$BUILD_CC"; then
39428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39429$as_echo "$BUILD_CC" >&6; }
39430else
39431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39432$as_echo "no" >&6; }
39433fi
39434
39435
39436        if test "x$BUILD_CC" = x; then
39437          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39438        fi
39439      else
39440        # Otherwise we believe it is a complete path. Use it as it is.
39441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39442$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39444$as_echo_n "checking for BUILD_CC... " >&6; }
39445        if test ! -x "$tool_specified"; then
39446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39447$as_echo "not found" >&6; }
39448          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39449        fi
39450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39451$as_echo "$tool_specified" >&6; }
39452      fi
39453    fi
39454  fi
39455
39456
39457
39458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39459
39460  # First separate the path from the arguments. This will split at the first
39461  # space.
39462  complete="$BUILD_CC"
39463  path="${complete%% *}"
39464  tmp="$complete EOL"
39465  arguments="${tmp#* }"
39466
39467  # Input might be given as Windows format, start by converting to
39468  # unix format.
39469  new_path=`$CYGPATH -u "$path"`
39470
39471  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
39482    # The splitting of arguments from the executable at a space might have been incorrect,
39483    # since paths with space are more likely in Windows. Give it another try with the whole
39484    # argument.
39485    path="$complete"
39486    arguments="EOL"
39487    new_path=`$CYGPATH -u "$path"`
39488    new_path=`$WHICH "$new_path" 2> /dev/null`
39489    # bat and cmd files are not always considered executable in cygwin causing which
39490    # to not find them
39491    if test "x$new_path" = x \
39492        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39493        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39494      new_path=`$CYGPATH -u "$path"`
39495    fi
39496    if test "x$new_path" = x; then
39497      # It's still not found. Now this is an unrecoverable error.
39498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39499$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39500      has_space=`$ECHO "$complete" | $GREP " "`
39501      if test "x$has_space" != x; then
39502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39504      fi
39505      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39506    fi
39507  fi
39508
39509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39512  # "foo.exe" is OK but "foo" is an error.
39513  #
39514  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39515  # It is also a way to make sure we got the proper file name for the real test later on.
39516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39517  if test "x$test_shortpath" = x; then
39518    # Short path failed, file does not exist as specified.
39519    # Try adding .exe or .cmd
39520    if test -f "${new_path}.exe"; then
39521      input_to_shortpath="${new_path}.exe"
39522    elif test -f "${new_path}.cmd"; then
39523      input_to_shortpath="${new_path}.cmd"
39524    else
39525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39526$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39527      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39528$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39529      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39530    fi
39531  else
39532    input_to_shortpath="$new_path"
39533  fi
39534
39535  # Call helper function which possibly converts this using DOS-style short mode.
39536  # If so, the updated path is stored in $new_path.
39537  new_path="$input_to_shortpath"
39538
39539  input_path="$input_to_shortpath"
39540  # Check if we need to convert this using DOS-style short mode. If the path
39541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39542  # take no chances and rewrite it.
39543  # Note: m4 eats our [], so we need to use [ and ] instead.
39544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39545  if test "x$has_forbidden_chars" != x; then
39546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39550      # Going to short mode and back again did indeed matter. Since short mode is
39551      # case insensitive, let's make it lowercase to improve readability.
39552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39553      # Now convert it back to Unix-stile (cygpath)
39554      input_path=`$CYGPATH -u "$shortmode_path"`
39555      new_path="$input_path"
39556    fi
39557  fi
39558
39559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39560  if test "x$test_cygdrive_prefix" = x; then
39561    # As a simple fix, exclude /usr/bin since it's not a real path.
39562    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39564      # a path prefixed by /cygdrive for fixpath to work.
39565      new_path="$CYGWIN_ROOT_PATH$input_path"
39566    fi
39567  fi
39568
39569  # remove trailing .exe if any
39570  new_path="${new_path/%.exe/}"
39571
39572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39573
39574  # First separate the path from the arguments. This will split at the first
39575  # space.
39576  complete="$BUILD_CC"
39577  path="${complete%% *}"
39578  tmp="$complete EOL"
39579  arguments="${tmp#* }"
39580
39581  # Input might be given as Windows format, start by converting to
39582  # unix format.
39583  new_path="$path"
39584
39585  windows_path="$new_path"
39586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39587    unix_path=`$CYGPATH -u "$windows_path"`
39588    new_path="$unix_path"
39589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39591    new_path="$unix_path"
39592  fi
39593
39594
39595  # Now try to locate executable using which
39596  new_path=`$WHICH "$new_path" 2> /dev/null`
39597
39598  if test "x$new_path" = x; then
39599    # Oops. Which didn't find the executable.
39600    # The splitting of arguments from the executable at a space might have been incorrect,
39601    # since paths with space are more likely in Windows. Give it another try with the whole
39602    # argument.
39603    path="$complete"
39604    arguments="EOL"
39605    new_path="$path"
39606
39607  windows_path="$new_path"
39608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39609    unix_path=`$CYGPATH -u "$windows_path"`
39610    new_path="$unix_path"
39611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39613    new_path="$unix_path"
39614  fi
39615
39616
39617    new_path=`$WHICH "$new_path" 2> /dev/null`
39618    # bat and cmd files are not always considered executable in MSYS causing which
39619    # to not find them
39620    if test "x$new_path" = x \
39621        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39622        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39623      new_path="$path"
39624
39625  windows_path="$new_path"
39626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39627    unix_path=`$CYGPATH -u "$windows_path"`
39628    new_path="$unix_path"
39629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39631    new_path="$unix_path"
39632  fi
39633
39634    fi
39635
39636    if test "x$new_path" = x; then
39637      # It's still not found. Now this is an unrecoverable error.
39638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39639$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39640      has_space=`$ECHO "$complete" | $GREP " "`
39641      if test "x$has_space" != x; then
39642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39644      fi
39645      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39646    fi
39647  fi
39648
39649  # Now new_path has a complete unix path to the binary
39650  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39651    # Keep paths in /bin as-is, but remove trailing .exe if any
39652    new_path="${new_path/%.exe/}"
39653    # Do not save /bin paths to all_fixpath_prefixes!
39654  else
39655    # Not in mixed or Windows style, start by that.
39656    new_path=`cmd //c echo $new_path`
39657
39658  input_path="$new_path"
39659  # Check if we need to convert this using DOS-style short mode. If the path
39660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39661  # take no chances and rewrite it.
39662  # Note: m4 eats our [], so we need to use [ and ] instead.
39663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39664  if test "x$has_forbidden_chars" != x; then
39665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39667  fi
39668
39669    # Output is in $new_path
39670
39671  windows_path="$new_path"
39672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39673    unix_path=`$CYGPATH -u "$windows_path"`
39674    new_path="$unix_path"
39675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39677    new_path="$unix_path"
39678  fi
39679
39680    # remove trailing .exe if any
39681    new_path="${new_path/%.exe/}"
39682
39683    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39684    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39685  fi
39686
39687  else
39688    # We're on a unix platform. Hooray! :)
39689    # First separate the path from the arguments. This will split at the first
39690    # space.
39691    complete="$BUILD_CC"
39692    path="${complete%% *}"
39693    tmp="$complete EOL"
39694    arguments="${tmp#* }"
39695
39696    # Cannot rely on the command "which" here since it doesn't always work.
39697    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39698    if test -z "$is_absolute_path"; then
39699      # Path to executable is not absolute. Find it.
39700      IFS_save="$IFS"
39701      IFS=:
39702      for p in $PATH; do
39703        if test -f "$p/$path" && test -x "$p/$path"; then
39704          new_path="$p/$path"
39705          break
39706        fi
39707      done
39708      IFS="$IFS_save"
39709    else
39710      # This is an absolute path, we can use it without further modifications.
39711      new_path="$path"
39712    fi
39713
39714    if test "x$new_path" = x; then
39715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39716$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39717      has_space=`$ECHO "$complete" | $GREP " "`
39718      if test "x$has_space" != x; then
39719        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39720$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39721      fi
39722      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39723    fi
39724  fi
39725
39726  # Now join together the path and the arguments once again
39727  if test "x$arguments" != xEOL; then
39728    new_complete="$new_path ${arguments% *}"
39729  else
39730    new_complete="$new_path"
39731  fi
39732
39733  if test "x$complete" != "x$new_complete"; then
39734    BUILD_CC="$new_complete"
39735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39736$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39737  fi
39738
39739
39740
39741  # Publish this variable in the help.
39742
39743
39744  if test "x$BUILD_CXX" = x; then
39745    # The variable is not set by user, try to locate tool using the code snippet
39746    for ac_prog in cl CC g++
39747do
39748  # Extract the first word of "$ac_prog", so it can be a program name with args.
39749set dummy $ac_prog; ac_word=$2
39750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39751$as_echo_n "checking for $ac_word... " >&6; }
39752if ${ac_cv_path_BUILD_CXX+:} false; then :
39753  $as_echo_n "(cached) " >&6
39754else
39755  case $BUILD_CXX in
39756  [\\/]* | ?:[\\/]*)
39757  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39758  ;;
39759  *)
39760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39761for as_dir in $PATH
39762do
39763  IFS=$as_save_IFS
39764  test -z "$as_dir" && as_dir=.
39765    for ac_exec_ext in '' $ac_executable_extensions; do
39766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39767    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39769    break 2
39770  fi
39771done
39772  done
39773IFS=$as_save_IFS
39774
39775  ;;
39776esac
39777fi
39778BUILD_CXX=$ac_cv_path_BUILD_CXX
39779if test -n "$BUILD_CXX"; then
39780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39781$as_echo "$BUILD_CXX" >&6; }
39782else
39783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39784$as_echo "no" >&6; }
39785fi
39786
39787
39788  test -n "$BUILD_CXX" && break
39789done
39790
39791  else
39792    # The variable is set, but is it from the command line or the environment?
39793
39794    # Try to remove the string !BUILD_CXX! from our list.
39795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39797      # If it failed, the variable was not from the command line. Ignore it,
39798      # but warn the user (except for BASH, which is always set by the calling BASH).
39799      if test "xBUILD_CXX" != xBASH; then
39800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39801$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39802      fi
39803      # Try to locate tool using the code snippet
39804      for ac_prog in cl CC g++
39805do
39806  # Extract the first word of "$ac_prog", so it can be a program name with args.
39807set dummy $ac_prog; ac_word=$2
39808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39809$as_echo_n "checking for $ac_word... " >&6; }
39810if ${ac_cv_path_BUILD_CXX+:} false; then :
39811  $as_echo_n "(cached) " >&6
39812else
39813  case $BUILD_CXX in
39814  [\\/]* | ?:[\\/]*)
39815  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39816  ;;
39817  *)
39818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39819for as_dir in $PATH
39820do
39821  IFS=$as_save_IFS
39822  test -z "$as_dir" && as_dir=.
39823    for ac_exec_ext in '' $ac_executable_extensions; do
39824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39825    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39827    break 2
39828  fi
39829done
39830  done
39831IFS=$as_save_IFS
39832
39833  ;;
39834esac
39835fi
39836BUILD_CXX=$ac_cv_path_BUILD_CXX
39837if test -n "$BUILD_CXX"; then
39838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39839$as_echo "$BUILD_CXX" >&6; }
39840else
39841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39842$as_echo "no" >&6; }
39843fi
39844
39845
39846  test -n "$BUILD_CXX" && break
39847done
39848
39849    else
39850      # If it succeeded, then it was overridden by the user. We will use it
39851      # for the tool.
39852
39853      # First remove it from the list of overridden variables, so we can test
39854      # for unknown variables in the end.
39855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39856
39857      # Check if the provided tool contains a complete path.
39858      tool_specified="$BUILD_CXX"
39859      tool_basename="${tool_specified##*/}"
39860      if test "x$tool_basename" = "x$tool_specified"; then
39861        # A command without a complete path is provided, search $PATH.
39862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39863$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39864        # Extract the first word of "$tool_basename", so it can be a program name with args.
39865set dummy $tool_basename; ac_word=$2
39866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39867$as_echo_n "checking for $ac_word... " >&6; }
39868if ${ac_cv_path_BUILD_CXX+:} false; then :
39869  $as_echo_n "(cached) " >&6
39870else
39871  case $BUILD_CXX in
39872  [\\/]* | ?:[\\/]*)
39873  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39874  ;;
39875  *)
39876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39877for as_dir in $PATH
39878do
39879  IFS=$as_save_IFS
39880  test -z "$as_dir" && as_dir=.
39881    for ac_exec_ext in '' $ac_executable_extensions; do
39882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39883    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39885    break 2
39886  fi
39887done
39888  done
39889IFS=$as_save_IFS
39890
39891  ;;
39892esac
39893fi
39894BUILD_CXX=$ac_cv_path_BUILD_CXX
39895if test -n "$BUILD_CXX"; then
39896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39897$as_echo "$BUILD_CXX" >&6; }
39898else
39899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39900$as_echo "no" >&6; }
39901fi
39902
39903
39904        if test "x$BUILD_CXX" = x; then
39905          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39906        fi
39907      else
39908        # Otherwise we believe it is a complete path. Use it as it is.
39909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39910$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39912$as_echo_n "checking for BUILD_CXX... " >&6; }
39913        if test ! -x "$tool_specified"; then
39914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39915$as_echo "not found" >&6; }
39916          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39917        fi
39918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39919$as_echo "$tool_specified" >&6; }
39920      fi
39921    fi
39922  fi
39923
39924
39925
39926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39927
39928  # First separate the path from the arguments. This will split at the first
39929  # space.
39930  complete="$BUILD_CXX"
39931  path="${complete%% *}"
39932  tmp="$complete EOL"
39933  arguments="${tmp#* }"
39934
39935  # Input might be given as Windows format, start by converting to
39936  # unix format.
39937  new_path=`$CYGPATH -u "$path"`
39938
39939  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
39950    # The splitting of arguments from the executable at a space might have been incorrect,
39951    # since paths with space are more likely in Windows. Give it another try with the whole
39952    # argument.
39953    path="$complete"
39954    arguments="EOL"
39955    new_path=`$CYGPATH -u "$path"`
39956    new_path=`$WHICH "$new_path" 2> /dev/null`
39957    # bat and cmd files are not always considered executable in cygwin causing which
39958    # to not find them
39959    if test "x$new_path" = x \
39960        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39961        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39962      new_path=`$CYGPATH -u "$path"`
39963    fi
39964    if test "x$new_path" = x; then
39965      # It's still not found. Now this is an unrecoverable error.
39966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39967$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39968      has_space=`$ECHO "$complete" | $GREP " "`
39969      if test "x$has_space" != x; then
39970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39972      fi
39973      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39974    fi
39975  fi
39976
39977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39980  # "foo.exe" is OK but "foo" is an error.
39981  #
39982  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39983  # It is also a way to make sure we got the proper file name for the real test later on.
39984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39985  if test "x$test_shortpath" = x; then
39986    # Short path failed, file does not exist as specified.
39987    # Try adding .exe or .cmd
39988    if test -f "${new_path}.exe"; then
39989      input_to_shortpath="${new_path}.exe"
39990    elif test -f "${new_path}.cmd"; then
39991      input_to_shortpath="${new_path}.cmd"
39992    else
39993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39994$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39995      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39996$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39997      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39998    fi
39999  else
40000    input_to_shortpath="$new_path"
40001  fi
40002
40003  # Call helper function which possibly converts this using DOS-style short mode.
40004  # If so, the updated path is stored in $new_path.
40005  new_path="$input_to_shortpath"
40006
40007  input_path="$input_to_shortpath"
40008  # Check if we need to convert this using DOS-style short mode. If the path
40009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40010  # take no chances and rewrite it.
40011  # Note: m4 eats our [], so we need to use [ and ] instead.
40012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40013  if test "x$has_forbidden_chars" != x; then
40014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40018      # Going to short mode and back again did indeed matter. Since short mode is
40019      # case insensitive, let's make it lowercase to improve readability.
40020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40021      # Now convert it back to Unix-stile (cygpath)
40022      input_path=`$CYGPATH -u "$shortmode_path"`
40023      new_path="$input_path"
40024    fi
40025  fi
40026
40027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40028  if test "x$test_cygdrive_prefix" = x; then
40029    # As a simple fix, exclude /usr/bin since it's not a real path.
40030    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40032      # a path prefixed by /cygdrive for fixpath to work.
40033      new_path="$CYGWIN_ROOT_PATH$input_path"
40034    fi
40035  fi
40036
40037  # remove trailing .exe if any
40038  new_path="${new_path/%.exe/}"
40039
40040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40041
40042  # First separate the path from the arguments. This will split at the first
40043  # space.
40044  complete="$BUILD_CXX"
40045  path="${complete%% *}"
40046  tmp="$complete EOL"
40047  arguments="${tmp#* }"
40048
40049  # Input might be given as Windows format, start by converting to
40050  # unix format.
40051  new_path="$path"
40052
40053  windows_path="$new_path"
40054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40055    unix_path=`$CYGPATH -u "$windows_path"`
40056    new_path="$unix_path"
40057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40059    new_path="$unix_path"
40060  fi
40061
40062
40063  # Now try to locate executable using which
40064  new_path=`$WHICH "$new_path" 2> /dev/null`
40065
40066  if test "x$new_path" = x; then
40067    # Oops. Which didn't find the executable.
40068    # The splitting of arguments from the executable at a space might have been incorrect,
40069    # since paths with space are more likely in Windows. Give it another try with the whole
40070    # argument.
40071    path="$complete"
40072    arguments="EOL"
40073    new_path="$path"
40074
40075  windows_path="$new_path"
40076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40077    unix_path=`$CYGPATH -u "$windows_path"`
40078    new_path="$unix_path"
40079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40081    new_path="$unix_path"
40082  fi
40083
40084
40085    new_path=`$WHICH "$new_path" 2> /dev/null`
40086    # bat and cmd files are not always considered executable in MSYS causing which
40087    # to not find them
40088    if test "x$new_path" = x \
40089        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40090        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40091      new_path="$path"
40092
40093  windows_path="$new_path"
40094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40095    unix_path=`$CYGPATH -u "$windows_path"`
40096    new_path="$unix_path"
40097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40099    new_path="$unix_path"
40100  fi
40101
40102    fi
40103
40104    if test "x$new_path" = x; then
40105      # It's still not found. Now this is an unrecoverable error.
40106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40107$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40108      has_space=`$ECHO "$complete" | $GREP " "`
40109      if test "x$has_space" != x; then
40110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40112      fi
40113      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40114    fi
40115  fi
40116
40117  # Now new_path has a complete unix path to the binary
40118  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40119    # Keep paths in /bin as-is, but remove trailing .exe if any
40120    new_path="${new_path/%.exe/}"
40121    # Do not save /bin paths to all_fixpath_prefixes!
40122  else
40123    # Not in mixed or Windows style, start by that.
40124    new_path=`cmd //c echo $new_path`
40125
40126  input_path="$new_path"
40127  # Check if we need to convert this using DOS-style short mode. If the path
40128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40129  # take no chances and rewrite it.
40130  # Note: m4 eats our [], so we need to use [ and ] instead.
40131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40132  if test "x$has_forbidden_chars" != x; then
40133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40135  fi
40136
40137    # Output is in $new_path
40138
40139  windows_path="$new_path"
40140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40141    unix_path=`$CYGPATH -u "$windows_path"`
40142    new_path="$unix_path"
40143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40145    new_path="$unix_path"
40146  fi
40147
40148    # remove trailing .exe if any
40149    new_path="${new_path/%.exe/}"
40150
40151    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40152    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40153  fi
40154
40155  else
40156    # We're on a unix platform. Hooray! :)
40157    # First separate the path from the arguments. This will split at the first
40158    # space.
40159    complete="$BUILD_CXX"
40160    path="${complete%% *}"
40161    tmp="$complete EOL"
40162    arguments="${tmp#* }"
40163
40164    # Cannot rely on the command "which" here since it doesn't always work.
40165    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40166    if test -z "$is_absolute_path"; then
40167      # Path to executable is not absolute. Find it.
40168      IFS_save="$IFS"
40169      IFS=:
40170      for p in $PATH; do
40171        if test -f "$p/$path" && test -x "$p/$path"; then
40172          new_path="$p/$path"
40173          break
40174        fi
40175      done
40176      IFS="$IFS_save"
40177    else
40178      # This is an absolute path, we can use it without further modifications.
40179      new_path="$path"
40180    fi
40181
40182    if test "x$new_path" = x; then
40183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40184$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40185      has_space=`$ECHO "$complete" | $GREP " "`
40186      if test "x$has_space" != x; then
40187        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40188$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40189      fi
40190      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40191    fi
40192  fi
40193
40194  # Now join together the path and the arguments once again
40195  if test "x$arguments" != xEOL; then
40196    new_complete="$new_path ${arguments% *}"
40197  else
40198    new_complete="$new_path"
40199  fi
40200
40201  if test "x$complete" != "x$new_complete"; then
40202    BUILD_CXX="$new_complete"
40203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40204$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40205  fi
40206
40207
40208
40209  # Publish this variable in the help.
40210
40211
40212  if test "x$BUILD_LD" = x; then
40213    # The variable is not set by user, try to locate tool using the code snippet
40214    for ac_prog in ld
40215do
40216  # Extract the first word of "$ac_prog", so it can be a program name with args.
40217set dummy $ac_prog; ac_word=$2
40218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40219$as_echo_n "checking for $ac_word... " >&6; }
40220if ${ac_cv_path_BUILD_LD+:} false; then :
40221  $as_echo_n "(cached) " >&6
40222else
40223  case $BUILD_LD in
40224  [\\/]* | ?:[\\/]*)
40225  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40226  ;;
40227  *)
40228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40229for as_dir in $PATH
40230do
40231  IFS=$as_save_IFS
40232  test -z "$as_dir" && as_dir=.
40233    for ac_exec_ext in '' $ac_executable_extensions; do
40234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40235    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40237    break 2
40238  fi
40239done
40240  done
40241IFS=$as_save_IFS
40242
40243  ;;
40244esac
40245fi
40246BUILD_LD=$ac_cv_path_BUILD_LD
40247if test -n "$BUILD_LD"; then
40248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40249$as_echo "$BUILD_LD" >&6; }
40250else
40251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40252$as_echo "no" >&6; }
40253fi
40254
40255
40256  test -n "$BUILD_LD" && break
40257done
40258
40259  else
40260    # The variable is set, but is it from the command line or the environment?
40261
40262    # Try to remove the string !BUILD_LD! from our list.
40263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40265      # If it failed, the variable was not from the command line. Ignore it,
40266      # but warn the user (except for BASH, which is always set by the calling BASH).
40267      if test "xBUILD_LD" != xBASH; then
40268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40269$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40270      fi
40271      # Try to locate tool using the code snippet
40272      for ac_prog in ld
40273do
40274  # Extract the first word of "$ac_prog", so it can be a program name with args.
40275set dummy $ac_prog; ac_word=$2
40276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40277$as_echo_n "checking for $ac_word... " >&6; }
40278if ${ac_cv_path_BUILD_LD+:} false; then :
40279  $as_echo_n "(cached) " >&6
40280else
40281  case $BUILD_LD in
40282  [\\/]* | ?:[\\/]*)
40283  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40284  ;;
40285  *)
40286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40287for as_dir in $PATH
40288do
40289  IFS=$as_save_IFS
40290  test -z "$as_dir" && as_dir=.
40291    for ac_exec_ext in '' $ac_executable_extensions; do
40292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40293    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40295    break 2
40296  fi
40297done
40298  done
40299IFS=$as_save_IFS
40300
40301  ;;
40302esac
40303fi
40304BUILD_LD=$ac_cv_path_BUILD_LD
40305if test -n "$BUILD_LD"; then
40306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40307$as_echo "$BUILD_LD" >&6; }
40308else
40309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40310$as_echo "no" >&6; }
40311fi
40312
40313
40314  test -n "$BUILD_LD" && break
40315done
40316
40317    else
40318      # If it succeeded, then it was overridden by the user. We will use it
40319      # for the tool.
40320
40321      # First remove it from the list of overridden variables, so we can test
40322      # for unknown variables in the end.
40323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40324
40325      # Check if the provided tool contains a complete path.
40326      tool_specified="$BUILD_LD"
40327      tool_basename="${tool_specified##*/}"
40328      if test "x$tool_basename" = "x$tool_specified"; then
40329        # A command without a complete path is provided, search $PATH.
40330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40331$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40332        # Extract the first word of "$tool_basename", so it can be a program name with args.
40333set dummy $tool_basename; ac_word=$2
40334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40335$as_echo_n "checking for $ac_word... " >&6; }
40336if ${ac_cv_path_BUILD_LD+:} false; then :
40337  $as_echo_n "(cached) " >&6
40338else
40339  case $BUILD_LD in
40340  [\\/]* | ?:[\\/]*)
40341  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40342  ;;
40343  *)
40344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40345for as_dir in $PATH
40346do
40347  IFS=$as_save_IFS
40348  test -z "$as_dir" && as_dir=.
40349    for ac_exec_ext in '' $ac_executable_extensions; do
40350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40351    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40353    break 2
40354  fi
40355done
40356  done
40357IFS=$as_save_IFS
40358
40359  ;;
40360esac
40361fi
40362BUILD_LD=$ac_cv_path_BUILD_LD
40363if test -n "$BUILD_LD"; then
40364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40365$as_echo "$BUILD_LD" >&6; }
40366else
40367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40368$as_echo "no" >&6; }
40369fi
40370
40371
40372        if test "x$BUILD_LD" = x; then
40373          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40374        fi
40375      else
40376        # Otherwise we believe it is a complete path. Use it as it is.
40377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40378$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40380$as_echo_n "checking for BUILD_LD... " >&6; }
40381        if test ! -x "$tool_specified"; then
40382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40383$as_echo "not found" >&6; }
40384          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40385        fi
40386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40387$as_echo "$tool_specified" >&6; }
40388      fi
40389    fi
40390  fi
40391
40392
40393
40394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40395
40396  # First separate the path from the arguments. This will split at the first
40397  # space.
40398  complete="$BUILD_LD"
40399  path="${complete%% *}"
40400  tmp="$complete EOL"
40401  arguments="${tmp#* }"
40402
40403  # Input might be given as Windows format, start by converting to
40404  # unix format.
40405  new_path=`$CYGPATH -u "$path"`
40406
40407  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
40418    # The splitting of arguments from the executable at a space might have been incorrect,
40419    # since paths with space are more likely in Windows. Give it another try with the whole
40420    # argument.
40421    path="$complete"
40422    arguments="EOL"
40423    new_path=`$CYGPATH -u "$path"`
40424    new_path=`$WHICH "$new_path" 2> /dev/null`
40425    # bat and cmd files are not always considered executable in cygwin causing which
40426    # to not find them
40427    if test "x$new_path" = x \
40428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40430      new_path=`$CYGPATH -u "$path"`
40431    fi
40432    if test "x$new_path" = x; then
40433      # It's still not found. Now this is an unrecoverable error.
40434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40435$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40436      has_space=`$ECHO "$complete" | $GREP " "`
40437      if test "x$has_space" != x; then
40438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40440      fi
40441      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40442    fi
40443  fi
40444
40445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40448  # "foo.exe" is OK but "foo" is an error.
40449  #
40450  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40451  # It is also a way to make sure we got the proper file name for the real test later on.
40452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40453  if test "x$test_shortpath" = x; then
40454    # Short path failed, file does not exist as specified.
40455    # Try adding .exe or .cmd
40456    if test -f "${new_path}.exe"; then
40457      input_to_shortpath="${new_path}.exe"
40458    elif test -f "${new_path}.cmd"; then
40459      input_to_shortpath="${new_path}.cmd"
40460    else
40461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40462$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40465      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40466    fi
40467  else
40468    input_to_shortpath="$new_path"
40469  fi
40470
40471  # Call helper function which possibly converts this using DOS-style short mode.
40472  # If so, the updated path is stored in $new_path.
40473  new_path="$input_to_shortpath"
40474
40475  input_path="$input_to_shortpath"
40476  # Check if we need to convert this using DOS-style short mode. If the path
40477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40478  # take no chances and rewrite it.
40479  # Note: m4 eats our [], so we need to use [ and ] instead.
40480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40481  if test "x$has_forbidden_chars" != x; then
40482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40486      # Going to short mode and back again did indeed matter. Since short mode is
40487      # case insensitive, let's make it lowercase to improve readability.
40488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40489      # Now convert it back to Unix-stile (cygpath)
40490      input_path=`$CYGPATH -u "$shortmode_path"`
40491      new_path="$input_path"
40492    fi
40493  fi
40494
40495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40496  if test "x$test_cygdrive_prefix" = x; then
40497    # As a simple fix, exclude /usr/bin since it's not a real path.
40498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40500      # a path prefixed by /cygdrive for fixpath to work.
40501      new_path="$CYGWIN_ROOT_PATH$input_path"
40502    fi
40503  fi
40504
40505  # remove trailing .exe if any
40506  new_path="${new_path/%.exe/}"
40507
40508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40509
40510  # First separate the path from the arguments. This will split at the first
40511  # space.
40512  complete="$BUILD_LD"
40513  path="${complete%% *}"
40514  tmp="$complete EOL"
40515  arguments="${tmp#* }"
40516
40517  # Input might be given as Windows format, start by converting to
40518  # unix format.
40519  new_path="$path"
40520
40521  windows_path="$new_path"
40522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40523    unix_path=`$CYGPATH -u "$windows_path"`
40524    new_path="$unix_path"
40525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40527    new_path="$unix_path"
40528  fi
40529
40530
40531  # Now try to locate executable using which
40532  new_path=`$WHICH "$new_path" 2> /dev/null`
40533
40534  if test "x$new_path" = x; then
40535    # Oops. Which didn't find the executable.
40536    # The splitting of arguments from the executable at a space might have been incorrect,
40537    # since paths with space are more likely in Windows. Give it another try with the whole
40538    # argument.
40539    path="$complete"
40540    arguments="EOL"
40541    new_path="$path"
40542
40543  windows_path="$new_path"
40544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40545    unix_path=`$CYGPATH -u "$windows_path"`
40546    new_path="$unix_path"
40547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40549    new_path="$unix_path"
40550  fi
40551
40552
40553    new_path=`$WHICH "$new_path" 2> /dev/null`
40554    # bat and cmd files are not always considered executable in MSYS causing which
40555    # to not find them
40556    if test "x$new_path" = x \
40557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40559      new_path="$path"
40560
40561  windows_path="$new_path"
40562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40563    unix_path=`$CYGPATH -u "$windows_path"`
40564    new_path="$unix_path"
40565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40567    new_path="$unix_path"
40568  fi
40569
40570    fi
40571
40572    if test "x$new_path" = x; then
40573      # It's still not found. Now this is an unrecoverable error.
40574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40575$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40576      has_space=`$ECHO "$complete" | $GREP " "`
40577      if test "x$has_space" != x; then
40578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40580      fi
40581      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40582    fi
40583  fi
40584
40585  # Now new_path has a complete unix path to the binary
40586  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40587    # Keep paths in /bin as-is, but remove trailing .exe if any
40588    new_path="${new_path/%.exe/}"
40589    # Do not save /bin paths to all_fixpath_prefixes!
40590  else
40591    # Not in mixed or Windows style, start by that.
40592    new_path=`cmd //c echo $new_path`
40593
40594  input_path="$new_path"
40595  # Check if we need to convert this using DOS-style short mode. If the path
40596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40597  # take no chances and rewrite it.
40598  # Note: m4 eats our [], so we need to use [ and ] instead.
40599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40600  if test "x$has_forbidden_chars" != x; then
40601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40603  fi
40604
40605    # Output is in $new_path
40606
40607  windows_path="$new_path"
40608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40609    unix_path=`$CYGPATH -u "$windows_path"`
40610    new_path="$unix_path"
40611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40613    new_path="$unix_path"
40614  fi
40615
40616    # remove trailing .exe if any
40617    new_path="${new_path/%.exe/}"
40618
40619    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40620    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40621  fi
40622
40623  else
40624    # We're on a unix platform. Hooray! :)
40625    # First separate the path from the arguments. This will split at the first
40626    # space.
40627    complete="$BUILD_LD"
40628    path="${complete%% *}"
40629    tmp="$complete EOL"
40630    arguments="${tmp#* }"
40631
40632    # Cannot rely on the command "which" here since it doesn't always work.
40633    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40634    if test -z "$is_absolute_path"; then
40635      # Path to executable is not absolute. Find it.
40636      IFS_save="$IFS"
40637      IFS=:
40638      for p in $PATH; do
40639        if test -f "$p/$path" && test -x "$p/$path"; then
40640          new_path="$p/$path"
40641          break
40642        fi
40643      done
40644      IFS="$IFS_save"
40645    else
40646      # This is an absolute path, we can use it without further modifications.
40647      new_path="$path"
40648    fi
40649
40650    if test "x$new_path" = x; then
40651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40652$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40653      has_space=`$ECHO "$complete" | $GREP " "`
40654      if test "x$has_space" != x; then
40655        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40656$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40657      fi
40658      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40659    fi
40660  fi
40661
40662  # Now join together the path and the arguments once again
40663  if test "x$arguments" != xEOL; then
40664    new_complete="$new_path ${arguments% *}"
40665  else
40666    new_complete="$new_path"
40667  fi
40668
40669  if test "x$complete" != "x$new_complete"; then
40670    BUILD_LD="$new_complete"
40671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40672$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40673  fi
40674
40675  else
40676    # If we are not cross compiling, use the normal target compilers for
40677    # building the build platform executables.
40678    BUILD_CC="$CC"
40679    BUILD_CXX="$CXX"
40680    BUILD_LD="$LD"
40681  fi
40682
40683
40684
40685
40686
40687
40688  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40689    # For hotspot, we need these in Windows mixed path,
40690    # so rewrite them all. Need added .exe suffix.
40691    HOTSPOT_CXX="$CXX.exe"
40692    HOTSPOT_LD="$LD.exe"
40693    HOTSPOT_MT="$MT.exe"
40694    HOTSPOT_RC="$RC.exe"
40695
40696  unix_path="$HOTSPOT_CXX"
40697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40698    windows_path=`$CYGPATH -m "$unix_path"`
40699    HOTSPOT_CXX="$windows_path"
40700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40701    windows_path=`cmd //c echo $unix_path`
40702    HOTSPOT_CXX="$windows_path"
40703  fi
40704
40705
40706  unix_path="$HOTSPOT_LD"
40707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40708    windows_path=`$CYGPATH -m "$unix_path"`
40709    HOTSPOT_LD="$windows_path"
40710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40711    windows_path=`cmd //c echo $unix_path`
40712    HOTSPOT_LD="$windows_path"
40713  fi
40714
40715
40716  unix_path="$HOTSPOT_MT"
40717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40718    windows_path=`$CYGPATH -m "$unix_path"`
40719    HOTSPOT_MT="$windows_path"
40720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40721    windows_path=`cmd //c echo $unix_path`
40722    HOTSPOT_MT="$windows_path"
40723  fi
40724
40725
40726  unix_path="$HOTSPOT_RC"
40727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40728    windows_path=`$CYGPATH -m "$unix_path"`
40729    HOTSPOT_RC="$windows_path"
40730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40731    windows_path=`cmd //c echo $unix_path`
40732    HOTSPOT_RC="$windows_path"
40733  fi
40734
40735
40736
40737  else
40738    HOTSPOT_CXX="$CXX"
40739    HOTSPOT_LD="$LD"
40740  fi
40741
40742
40743
40744  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40745    USE_CLANG=true
40746  fi
40747
40748
40749  # LDEXE is the linker to use, when creating executables. Not really used.
40750  # FIXME: These should just be removed!
40751  LDEXE="$LD"
40752  LDEXECXX="$LDCXX"
40753
40754
40755
40756
40757
40758
40759  # The package path is used only on macosx?
40760  # FIXME: clean this up, and/or move it elsewhere.
40761  PACKAGE_PATH=/opt/local
40762
40763
40764  # Check for extra potential brokenness.
40765  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40766    # On Windows, double-check that we got the right compiler.
40767    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40768    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40769    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40770      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40771        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40772      fi
40773    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40774      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40775        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40776      fi
40777    fi
40778  fi
40779
40780  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40781    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40782    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40783    # This is later checked when setting flags.
40784
40785    # "-Og" suppported for GCC 4.8 and later
40786    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40787
40788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40789$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40790  supports=yes
40791
40792  saved_cflags="$CFLAGS"
40793  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40794  ac_ext=c
40795ac_cpp='$CPP $CPPFLAGS'
40796ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40797ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40798ac_compiler_gnu=$ac_cv_c_compiler_gnu
40799
40800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40801/* end confdefs.h.  */
40802int i;
40803_ACEOF
40804if ac_fn_c_try_compile "$LINENO"; then :
40805
40806else
40807  supports=no
40808fi
40809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40810  ac_ext=cpp
40811ac_cpp='$CXXCPP $CPPFLAGS'
40812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40815
40816  CFLAGS="$saved_cflags"
40817
40818  saved_cxxflags="$CXXFLAGS"
40819  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40827/* end confdefs.h.  */
40828int i;
40829_ACEOF
40830if ac_fn_cxx_try_compile "$LINENO"; then :
40831
40832else
40833  supports=no
40834fi
40835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40836  ac_ext=cpp
40837ac_cpp='$CXXCPP $CPPFLAGS'
40838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40841
40842  CXXFLAGS="$saved_cxxflags"
40843
40844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40845$as_echo "$supports" >&6; }
40846  if test "x$supports" = "xyes" ; then
40847    HAS_CFLAG_OPTIMIZE_DEBUG=true
40848  else
40849    HAS_CFLAG_OPTIMIZE_DEBUG=false
40850  fi
40851
40852
40853    # "-z relro" supported in GNU binutils 2.17 and later
40854    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40855
40856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40857$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40858  supports=yes
40859
40860  saved_ldflags="$LDFLAGS"
40861  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40862  ac_ext=c
40863ac_cpp='$CPP $CPPFLAGS'
40864ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40865ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40866ac_compiler_gnu=$ac_cv_c_compiler_gnu
40867
40868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40869/* end confdefs.h.  */
40870
40871int
40872main ()
40873{
40874
40875  ;
40876  return 0;
40877}
40878_ACEOF
40879if ac_fn_c_try_link "$LINENO"; then :
40880
40881else
40882  supports=no
40883fi
40884rm -f core conftest.err conftest.$ac_objext \
40885    conftest$ac_exeext conftest.$ac_ext
40886  ac_ext=cpp
40887ac_cpp='$CXXCPP $CPPFLAGS'
40888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40891
40892  LDFLAGS="$saved_ldflags"
40893
40894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40895$as_echo "$supports" >&6; }
40896  if test "x$supports" = "xyes" ; then
40897    HAS_LINKER_RELRO=true
40898  else
40899    HAS_LINKER_RELRO=false
40900  fi
40901
40902
40903    # "-z now" supported in GNU binutils 2.11 and later
40904    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40905
40906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40907$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40908  supports=yes
40909
40910  saved_ldflags="$LDFLAGS"
40911  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40912  ac_ext=c
40913ac_cpp='$CPP $CPPFLAGS'
40914ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40915ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40916ac_compiler_gnu=$ac_cv_c_compiler_gnu
40917
40918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40919/* end confdefs.h.  */
40920
40921int
40922main ()
40923{
40924
40925  ;
40926  return 0;
40927}
40928_ACEOF
40929if ac_fn_c_try_link "$LINENO"; then :
40930
40931else
40932  supports=no
40933fi
40934rm -f core conftest.err conftest.$ac_objext \
40935    conftest$ac_exeext conftest.$ac_ext
40936  ac_ext=cpp
40937ac_cpp='$CXXCPP $CPPFLAGS'
40938ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40939ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40940ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40941
40942  LDFLAGS="$saved_ldflags"
40943
40944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40945$as_echo "$supports" >&6; }
40946  if test "x$supports" = "xyes" ; then
40947    HAS_LINKER_NOW=true
40948  else
40949    HAS_LINKER_NOW=false
40950  fi
40951
40952  fi
40953
40954  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40955  # in executable.'
40956  USING_BROKEN_SUSE_LD=no
40957  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40959$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40960    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40961    $ECHO "int main() { }" > main.c
40962    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40964$as_echo "no" >&6; }
40965      USING_BROKEN_SUSE_LD=no
40966    else
40967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40968$as_echo "yes" >&6; }
40969      USING_BROKEN_SUSE_LD=yes
40970    fi
40971    rm -rf version-script.map main.c a.out
40972  fi
40973
40974
40975
40976# Setup the JTReg Regression Test Harness.
40977
40978
40979# Check whether --with-jtreg was given.
40980if test "${with_jtreg+set}" = set; then :
40981  withval=$with_jtreg;
40982else
40983  with_jtreg=no
40984fi
40985
40986
40987  if test "x$with_jtreg" = xno; then
40988    # jtreg disabled
40989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40990$as_echo_n "checking for jtreg... " >&6; }
40991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40992$as_echo "no" >&6; }
40993  else
40994    if test "x$with_jtreg" != xyes; then
40995      # with path specified.
40996      JT_HOME="$with_jtreg"
40997    fi
40998
40999    if test "x$JT_HOME" != x; then
41000      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41001$as_echo_n "checking for jtreg... " >&6; }
41002
41003      # use JT_HOME enviroment var.
41004
41005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41006
41007  # Input might be given as Windows format, start by converting to
41008  # unix format.
41009  path="$JT_HOME"
41010  new_path=`$CYGPATH -u "$path"`
41011
41012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41015  # "foo.exe" is OK but "foo" is an error.
41016  #
41017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41018  # It is also a way to make sure we got the proper file name for the real test later on.
41019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41020  if test "x$test_shortpath" = x; then
41021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41022$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41023    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41024  fi
41025
41026  # Call helper function which possibly converts this using DOS-style short mode.
41027  # If so, the updated path is stored in $new_path.
41028
41029  input_path="$new_path"
41030  # Check if we need to convert this using DOS-style short mode. If the path
41031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41032  # take no chances and rewrite it.
41033  # Note: m4 eats our [], so we need to use [ and ] instead.
41034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41035  if test "x$has_forbidden_chars" != x; then
41036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41040      # Going to short mode and back again did indeed matter. Since short mode is
41041      # case insensitive, let's make it lowercase to improve readability.
41042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41043      # Now convert it back to Unix-stile (cygpath)
41044      input_path=`$CYGPATH -u "$shortmode_path"`
41045      new_path="$input_path"
41046    fi
41047  fi
41048
41049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41050  if test "x$test_cygdrive_prefix" = x; then
41051    # As a simple fix, exclude /usr/bin since it's not a real path.
41052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41054      # a path prefixed by /cygdrive for fixpath to work.
41055      new_path="$CYGWIN_ROOT_PATH$input_path"
41056    fi
41057  fi
41058
41059
41060  if test "x$path" != "x$new_path"; then
41061    JT_HOME="$new_path"
41062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41063$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41064  fi
41065
41066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41067
41068  path="$JT_HOME"
41069  has_colon=`$ECHO $path | $GREP ^.:`
41070  new_path="$path"
41071  if test "x$has_colon" = x; then
41072    # Not in mixed or Windows style, start by that.
41073    new_path=`cmd //c echo $path`
41074  fi
41075
41076
41077  input_path="$new_path"
41078  # Check if we need to convert this using DOS-style short mode. If the path
41079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41080  # take no chances and rewrite it.
41081  # Note: m4 eats our [], so we need to use [ and ] instead.
41082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41083  if test "x$has_forbidden_chars" != x; then
41084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41086  fi
41087
41088
41089  windows_path="$new_path"
41090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41091    unix_path=`$CYGPATH -u "$windows_path"`
41092    new_path="$unix_path"
41093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41095    new_path="$unix_path"
41096  fi
41097
41098  if test "x$path" != "x$new_path"; then
41099    JT_HOME="$new_path"
41100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41101$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41102  fi
41103
41104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41106
41107  else
41108    # We're on a unix platform. Hooray! :)
41109    path="$JT_HOME"
41110    has_space=`$ECHO "$path" | $GREP " "`
41111    if test "x$has_space" != x; then
41112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41113$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41114      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41115    fi
41116
41117    # Use eval to expand a potential ~
41118    eval path="$path"
41119    if test ! -f "$path" && test ! -d "$path"; then
41120      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41121    fi
41122
41123    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41124  fi
41125
41126
41127      # jtreg win32 script works for everybody
41128      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41129
41130      if test ! -f "$JTREGEXE"; then
41131        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41132      fi
41133
41134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41135$as_echo "$JTREGEXE" >&6; }
41136    else
41137      # try to find jtreg on path
41138
41139
41140
41141  # Publish this variable in the help.
41142
41143
41144  if test "x$JTREGEXE" = x; then
41145    # The variable is not set by user, try to locate tool using the code snippet
41146    for ac_prog in jtreg
41147do
41148  # Extract the first word of "$ac_prog", so it can be a program name with args.
41149set dummy $ac_prog; ac_word=$2
41150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41151$as_echo_n "checking for $ac_word... " >&6; }
41152if ${ac_cv_path_JTREGEXE+:} false; then :
41153  $as_echo_n "(cached) " >&6
41154else
41155  case $JTREGEXE in
41156  [\\/]* | ?:[\\/]*)
41157  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41158  ;;
41159  *)
41160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41161for as_dir in $PATH
41162do
41163  IFS=$as_save_IFS
41164  test -z "$as_dir" && as_dir=.
41165    for ac_exec_ext in '' $ac_executable_extensions; do
41166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41167    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41169    break 2
41170  fi
41171done
41172  done
41173IFS=$as_save_IFS
41174
41175  ;;
41176esac
41177fi
41178JTREGEXE=$ac_cv_path_JTREGEXE
41179if test -n "$JTREGEXE"; then
41180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41181$as_echo "$JTREGEXE" >&6; }
41182else
41183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41184$as_echo "no" >&6; }
41185fi
41186
41187
41188  test -n "$JTREGEXE" && break
41189done
41190
41191  else
41192    # The variable is set, but is it from the command line or the environment?
41193
41194    # Try to remove the string !JTREGEXE! from our list.
41195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41197      # If it failed, the variable was not from the command line. Ignore it,
41198      # but warn the user (except for BASH, which is always set by the calling BASH).
41199      if test "xJTREGEXE" != xBASH; then
41200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41201$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41202      fi
41203      # Try to locate tool using the code snippet
41204      for ac_prog in jtreg
41205do
41206  # Extract the first word of "$ac_prog", so it can be a program name with args.
41207set dummy $ac_prog; ac_word=$2
41208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41209$as_echo_n "checking for $ac_word... " >&6; }
41210if ${ac_cv_path_JTREGEXE+:} false; then :
41211  $as_echo_n "(cached) " >&6
41212else
41213  case $JTREGEXE in
41214  [\\/]* | ?:[\\/]*)
41215  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41216  ;;
41217  *)
41218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41219for as_dir in $PATH
41220do
41221  IFS=$as_save_IFS
41222  test -z "$as_dir" && as_dir=.
41223    for ac_exec_ext in '' $ac_executable_extensions; do
41224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41225    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41227    break 2
41228  fi
41229done
41230  done
41231IFS=$as_save_IFS
41232
41233  ;;
41234esac
41235fi
41236JTREGEXE=$ac_cv_path_JTREGEXE
41237if test -n "$JTREGEXE"; then
41238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41239$as_echo "$JTREGEXE" >&6; }
41240else
41241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41242$as_echo "no" >&6; }
41243fi
41244
41245
41246  test -n "$JTREGEXE" && break
41247done
41248
41249    else
41250      # If it succeeded, then it was overridden by the user. We will use it
41251      # for the tool.
41252
41253      # First remove it from the list of overridden variables, so we can test
41254      # for unknown variables in the end.
41255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41256
41257      # Check if the provided tool contains a complete path.
41258      tool_specified="$JTREGEXE"
41259      tool_basename="${tool_specified##*/}"
41260      if test "x$tool_basename" = "x$tool_specified"; then
41261        # A command without a complete path is provided, search $PATH.
41262        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41263$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41264        # Extract the first word of "$tool_basename", so it can be a program name with args.
41265set dummy $tool_basename; ac_word=$2
41266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41267$as_echo_n "checking for $ac_word... " >&6; }
41268if ${ac_cv_path_JTREGEXE+:} false; then :
41269  $as_echo_n "(cached) " >&6
41270else
41271  case $JTREGEXE in
41272  [\\/]* | ?:[\\/]*)
41273  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41274  ;;
41275  *)
41276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41277for as_dir in $PATH
41278do
41279  IFS=$as_save_IFS
41280  test -z "$as_dir" && as_dir=.
41281    for ac_exec_ext in '' $ac_executable_extensions; do
41282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41283    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41285    break 2
41286  fi
41287done
41288  done
41289IFS=$as_save_IFS
41290
41291  ;;
41292esac
41293fi
41294JTREGEXE=$ac_cv_path_JTREGEXE
41295if test -n "$JTREGEXE"; then
41296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41297$as_echo "$JTREGEXE" >&6; }
41298else
41299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41300$as_echo "no" >&6; }
41301fi
41302
41303
41304        if test "x$JTREGEXE" = x; then
41305          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41306        fi
41307      else
41308        # Otherwise we believe it is a complete path. Use it as it is.
41309        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41310$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41311        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41312$as_echo_n "checking for JTREGEXE... " >&6; }
41313        if test ! -x "$tool_specified"; then
41314          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41315$as_echo "not found" >&6; }
41316          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41317        fi
41318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41319$as_echo "$tool_specified" >&6; }
41320      fi
41321    fi
41322  fi
41323
41324
41325
41326  if test "x$JTREGEXE" = x; then
41327    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41328  fi
41329
41330
41331      JT_HOME="`$DIRNAME $JTREGEXE`"
41332    fi
41333  fi
41334
41335
41336
41337
41338
41339
41340  # Option used to tell the compiler whether to create 32- or 64-bit executables
41341  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41342    COMPILER_TARGET_BITS_FLAG="-q"
41343  else
41344    COMPILER_TARGET_BITS_FLAG="-m"
41345  fi
41346
41347
41348  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41349  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41350    ARFLAGS="-r"
41351  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41352    ARFLAGS="-X64"
41353  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41354    # lib.exe is used as AR to create static libraries.
41355    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41356  else
41357    ARFLAGS=""
41358  fi
41359
41360
41361  ## Setup strip.
41362  # FIXME: should this really be per platform, or should it be per toolchain type?
41363  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41364  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41365  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41366    STRIPFLAGS="-g"
41367  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41368    STRIPFLAGS="-x"
41369  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41370    STRIPFLAGS="-S"
41371  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41372    STRIPFLAGS="-X32_64"
41373  fi
41374
41375  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41376    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41377  fi
41378
41379
41380  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41381    # FIXME: break out into MCSFLAGS
41382    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41383  fi
41384
41385
41386  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41387    CC_OUT_OPTION=-Fo
41388    EXE_OUT_OPTION=-out:
41389    LD_OUT_OPTION=-out:
41390    AR_OUT_OPTION=-out:
41391  else
41392    # The option used to specify the target .o,.a or .so file.
41393    # When compiling, how to specify the to be created object file.
41394    CC_OUT_OPTION='-o$(SPACE)'
41395    # When linking, how to specify the to be created executable.
41396    EXE_OUT_OPTION='-o$(SPACE)'
41397    # When linking, how to specify the to be created dynamically linkable library.
41398    LD_OUT_OPTION='-o$(SPACE)'
41399    # When archiving, how to specify the to be create static archive for object files.
41400    AR_OUT_OPTION='rcs$(SPACE)'
41401  fi
41402
41403
41404
41405
41406
41407  # On Windows, we need to set RC flags.
41408  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41409    RC_FLAGS="-nologo -l0x409"
41410    if test "x$VARIANT" = xOPT; then
41411      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41412    fi
41413
41414    # The version variables used to create RC_FLAGS may be overridden
41415    # in a custom configure script, or possibly the command line.
41416    # Let those variables be expanded at make time in spec.gmk.
41417    # The \$ are escaped to the shell, and the $(...) variables
41418    # are evaluated by make.
41419    RC_FLAGS="$RC_FLAGS \
41420        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41421        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41422        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41423        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41424        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41425        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41426        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41427  fi
41428
41429
41430  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41431    # silence copyright notice and other headers.
41432    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41433  fi
41434
41435  if test "x$SYSROOT" != "x"; then
41436    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41437      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41438        # Solaris Studio does not have a concept of sysroot. Instead we must
41439        # make sure the default include and lib dirs are appended to each
41440        # compile and link command line.
41441        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41442        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41443            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41444            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41445      fi
41446    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41447      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41448      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41449      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41450    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41451      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41452      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41453    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41454      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41455      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41456    fi
41457    # Propagate the sysroot args to hotspot
41458    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41459    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41460    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41461  fi
41462
41463  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41464  # set this here so it doesn't have to be peppered throughout the forest
41465  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41466    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41467    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41468  fi
41469
41470
41471
41472
41473
41474# FIXME: Currently we must test this after toolchain but before flags. Fix!
41475
41476# Now we can test some aspects on the target using configure macros.
41477
41478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41479$as_echo_n "checking for ANSI C header files... " >&6; }
41480if ${ac_cv_header_stdc+:} false; then :
41481  $as_echo_n "(cached) " >&6
41482else
41483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41484/* end confdefs.h.  */
41485#include <stdlib.h>
41486#include <stdarg.h>
41487#include <string.h>
41488#include <float.h>
41489
41490int
41491main ()
41492{
41493
41494  ;
41495  return 0;
41496}
41497_ACEOF
41498if ac_fn_cxx_try_compile "$LINENO"; then :
41499  ac_cv_header_stdc=yes
41500else
41501  ac_cv_header_stdc=no
41502fi
41503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41504
41505if test $ac_cv_header_stdc = yes; then
41506  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41508/* end confdefs.h.  */
41509#include <string.h>
41510
41511_ACEOF
41512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41513  $EGREP "memchr" >/dev/null 2>&1; then :
41514
41515else
41516  ac_cv_header_stdc=no
41517fi
41518rm -f conftest*
41519
41520fi
41521
41522if test $ac_cv_header_stdc = yes; then
41523  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41525/* end confdefs.h.  */
41526#include <stdlib.h>
41527
41528_ACEOF
41529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41530  $EGREP "free" >/dev/null 2>&1; then :
41531
41532else
41533  ac_cv_header_stdc=no
41534fi
41535rm -f conftest*
41536
41537fi
41538
41539if test $ac_cv_header_stdc = yes; then
41540  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41541  if test "$cross_compiling" = yes; then :
41542  :
41543else
41544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41545/* end confdefs.h.  */
41546#include <ctype.h>
41547#include <stdlib.h>
41548#if ((' ' & 0x0FF) == 0x020)
41549# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41550# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41551#else
41552# define ISLOWER(c) \
41553		   (('a' <= (c) && (c) <= 'i') \
41554		     || ('j' <= (c) && (c) <= 'r') \
41555		     || ('s' <= (c) && (c) <= 'z'))
41556# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41557#endif
41558
41559#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41560int
41561main ()
41562{
41563  int i;
41564  for (i = 0; i < 256; i++)
41565    if (XOR (islower (i), ISLOWER (i))
41566	|| toupper (i) != TOUPPER (i))
41567      return 2;
41568  return 0;
41569}
41570_ACEOF
41571if ac_fn_cxx_try_run "$LINENO"; then :
41572
41573else
41574  ac_cv_header_stdc=no
41575fi
41576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41577  conftest.$ac_objext conftest.beam conftest.$ac_ext
41578fi
41579
41580fi
41581fi
41582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41583$as_echo "$ac_cv_header_stdc" >&6; }
41584if test $ac_cv_header_stdc = yes; then
41585
41586$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41587
41588fi
41589
41590# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41591for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41592		  inttypes.h stdint.h unistd.h
41593do :
41594  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41595ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41596"
41597if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41598  cat >>confdefs.h <<_ACEOF
41599#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41600_ACEOF
41601
41602fi
41603
41604done
41605
41606
41607
41608  ###############################################################################
41609  #
41610  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41611  # (The JVM can use 32 or 64 bit Java pointers but that decision
41612  # is made at runtime.)
41613  #
41614
41615  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41616    # Always specify -m flag on Solaris
41617    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41618
41619  # When we add flags to the "official" CFLAGS etc, we need to
41620  # keep track of these additions in ADDED_CFLAGS etc. These
41621  # will later be checked to make sure only controlled additions
41622  # have been made to CFLAGS etc.
41623  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41624  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41625  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41626
41627  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41628  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41629  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41630
41631  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41632  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41633  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41634
41635  elif test "x$COMPILE_TYPE" = xreduced; then
41636    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41637      # Specify -m if running reduced on unix platforms
41638
41639  # When we add flags to the "official" CFLAGS etc, we need to
41640  # keep track of these additions in ADDED_CFLAGS etc. These
41641  # will later be checked to make sure only controlled additions
41642  # have been made to CFLAGS etc.
41643  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41644  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41645  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41646
41647  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41648  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41649  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41650
41651  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41652  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41653  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41654
41655    fi
41656  fi
41657
41658  # Make compilation sanity check
41659  for ac_header in stdio.h
41660do :
41661  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41662if test "x$ac_cv_header_stdio_h" = xyes; then :
41663  cat >>confdefs.h <<_ACEOF
41664#define HAVE_STDIO_H 1
41665_ACEOF
41666
41667else
41668
41669    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41670$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41671    if test "x$COMPILE_TYPE" = xreduced; then
41672      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41673$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41674    elif test "x$COMPILE_TYPE" = xcross; then
41675      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41676$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41677    fi
41678    as_fn_error $? "Cannot continue." "$LINENO" 5
41679
41680fi
41681
41682done
41683
41684
41685  # The cast to long int works around a bug in the HP C Compiler
41686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41688# This bug is HP SR number 8606223364.
41689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41690$as_echo_n "checking size of int *... " >&6; }
41691if ${ac_cv_sizeof_int_p+:} false; then :
41692  $as_echo_n "(cached) " >&6
41693else
41694  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41695
41696else
41697  if test "$ac_cv_type_int_p" = yes; then
41698     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41700as_fn_error 77 "cannot compute sizeof (int *)
41701See \`config.log' for more details" "$LINENO" 5; }
41702   else
41703     ac_cv_sizeof_int_p=0
41704   fi
41705fi
41706
41707fi
41708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41709$as_echo "$ac_cv_sizeof_int_p" >&6; }
41710
41711
41712
41713cat >>confdefs.h <<_ACEOF
41714#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41715_ACEOF
41716
41717
41718
41719  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41720  if test "x$ac_cv_sizeof_int_p" = x; then
41721    # The test failed, lets stick to the assumed value.
41722    { $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
41723$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41724  else
41725    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41726
41727    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41728      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41729      # Let's try to implicitely set the compilers target architecture and retry the test
41730      { $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
41731$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;}
41732      { $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
41733$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;}
41734
41735  # When we add flags to the "official" CFLAGS etc, we need to
41736  # keep track of these additions in ADDED_CFLAGS etc. These
41737  # will later be checked to make sure only controlled additions
41738  # have been made to CFLAGS etc.
41739  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41740  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41741  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41742
41743  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41744  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41745  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41746
41747  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41748  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41749  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41750
41751
41752      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41753      unset ac_cv_sizeof_int_p
41754      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41755      cat >>confdefs.h <<_ACEOF
41756#undef SIZEOF_INT_P
41757_ACEOF
41758
41759      # The cast to long int works around a bug in the HP C Compiler
41760# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41761# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41762# This bug is HP SR number 8606223364.
41763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41764$as_echo_n "checking size of int *... " >&6; }
41765if ${ac_cv_sizeof_int_p+:} false; then :
41766  $as_echo_n "(cached) " >&6
41767else
41768  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41769
41770else
41771  if test "$ac_cv_type_int_p" = yes; then
41772     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41774as_fn_error 77 "cannot compute sizeof (int *)
41775See \`config.log' for more details" "$LINENO" 5; }
41776   else
41777     ac_cv_sizeof_int_p=0
41778   fi
41779fi
41780
41781fi
41782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41783$as_echo "$ac_cv_sizeof_int_p" >&6; }
41784
41785
41786
41787cat >>confdefs.h <<_ACEOF
41788#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41789_ACEOF
41790
41791
41792
41793      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41794
41795      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41796        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
41797      fi
41798    fi
41799  fi
41800
41801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41802$as_echo_n "checking for target address size... " >&6; }
41803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41804$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41805
41806
41807  ###############################################################################
41808  #
41809  # Is the target little of big endian?
41810  #
41811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41812$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41813if ${ac_cv_c_bigendian+:} false; then :
41814  $as_echo_n "(cached) " >&6
41815else
41816  ac_cv_c_bigendian=unknown
41817    # See if we're dealing with a universal compiler.
41818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41819/* end confdefs.h.  */
41820#ifndef __APPLE_CC__
41821	       not a universal capable compiler
41822	     #endif
41823	     typedef int dummy;
41824
41825_ACEOF
41826if ac_fn_cxx_try_compile "$LINENO"; then :
41827
41828	# Check for potential -arch flags.  It is not universal unless
41829	# there are at least two -arch flags with different values.
41830	ac_arch=
41831	ac_prev=
41832	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41833	 if test -n "$ac_prev"; then
41834	   case $ac_word in
41835	     i?86 | x86_64 | ppc | ppc64)
41836	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41837		 ac_arch=$ac_word
41838	       else
41839		 ac_cv_c_bigendian=universal
41840		 break
41841	       fi
41842	       ;;
41843	   esac
41844	   ac_prev=
41845	 elif test "x$ac_word" = "x-arch"; then
41846	   ac_prev=arch
41847	 fi
41848       done
41849fi
41850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41851    if test $ac_cv_c_bigendian = unknown; then
41852      # See if sys/param.h defines the BYTE_ORDER macro.
41853      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41854/* end confdefs.h.  */
41855#include <sys/types.h>
41856	     #include <sys/param.h>
41857
41858int
41859main ()
41860{
41861#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41862		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41863		     && LITTLE_ENDIAN)
41864	      bogus endian macros
41865	     #endif
41866
41867  ;
41868  return 0;
41869}
41870_ACEOF
41871if ac_fn_cxx_try_compile "$LINENO"; then :
41872  # It does; now see whether it defined to BIG_ENDIAN or not.
41873	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41874/* end confdefs.h.  */
41875#include <sys/types.h>
41876		#include <sys/param.h>
41877
41878int
41879main ()
41880{
41881#if BYTE_ORDER != BIG_ENDIAN
41882		 not big endian
41883		#endif
41884
41885  ;
41886  return 0;
41887}
41888_ACEOF
41889if ac_fn_cxx_try_compile "$LINENO"; then :
41890  ac_cv_c_bigendian=yes
41891else
41892  ac_cv_c_bigendian=no
41893fi
41894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41895fi
41896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41897    fi
41898    if test $ac_cv_c_bigendian = unknown; then
41899      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41900      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41901/* end confdefs.h.  */
41902#include <limits.h>
41903
41904int
41905main ()
41906{
41907#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41908	      bogus endian macros
41909	     #endif
41910
41911  ;
41912  return 0;
41913}
41914_ACEOF
41915if ac_fn_cxx_try_compile "$LINENO"; then :
41916  # It does; now see whether it defined to _BIG_ENDIAN or not.
41917	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41918/* end confdefs.h.  */
41919#include <limits.h>
41920
41921int
41922main ()
41923{
41924#ifndef _BIG_ENDIAN
41925		 not big endian
41926		#endif
41927
41928  ;
41929  return 0;
41930}
41931_ACEOF
41932if ac_fn_cxx_try_compile "$LINENO"; then :
41933  ac_cv_c_bigendian=yes
41934else
41935  ac_cv_c_bigendian=no
41936fi
41937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41938fi
41939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41940    fi
41941    if test $ac_cv_c_bigendian = unknown; then
41942      # Compile a test program.
41943      if test "$cross_compiling" = yes; then :
41944  # Try to guess by grepping values from an object file.
41945	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41946/* end confdefs.h.  */
41947short int ascii_mm[] =
41948		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41949		short int ascii_ii[] =
41950		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41951		int use_ascii (int i) {
41952		  return ascii_mm[i] + ascii_ii[i];
41953		}
41954		short int ebcdic_ii[] =
41955		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41956		short int ebcdic_mm[] =
41957		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41958		int use_ebcdic (int i) {
41959		  return ebcdic_mm[i] + ebcdic_ii[i];
41960		}
41961		extern int foo;
41962
41963int
41964main ()
41965{
41966return use_ascii (foo) == use_ebcdic (foo);
41967  ;
41968  return 0;
41969}
41970_ACEOF
41971if ac_fn_cxx_try_compile "$LINENO"; then :
41972  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41973	      ac_cv_c_bigendian=yes
41974	    fi
41975	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41976	      if test "$ac_cv_c_bigendian" = unknown; then
41977		ac_cv_c_bigendian=no
41978	      else
41979		# finding both strings is unlikely to happen, but who knows?
41980		ac_cv_c_bigendian=unknown
41981	      fi
41982	    fi
41983fi
41984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41985else
41986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41987/* end confdefs.h.  */
41988$ac_includes_default
41989int
41990main ()
41991{
41992
41993	     /* Are we little or big endian?  From Harbison&Steele.  */
41994	     union
41995	     {
41996	       long int l;
41997	       char c[sizeof (long int)];
41998	     } u;
41999	     u.l = 1;
42000	     return u.c[sizeof (long int) - 1] == 1;
42001
42002  ;
42003  return 0;
42004}
42005_ACEOF
42006if ac_fn_cxx_try_run "$LINENO"; then :
42007  ac_cv_c_bigendian=no
42008else
42009  ac_cv_c_bigendian=yes
42010fi
42011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42012  conftest.$ac_objext conftest.beam conftest.$ac_ext
42013fi
42014
42015    fi
42016fi
42017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42018$as_echo "$ac_cv_c_bigendian" >&6; }
42019 case $ac_cv_c_bigendian in #(
42020   yes)
42021     ENDIAN="big";; #(
42022   no)
42023     ENDIAN="little" ;; #(
42024   universal)
42025     ENDIAN="universal_endianness"
42026     ;; #(
42027   *)
42028     ENDIAN="unknown" ;;
42029 esac
42030
42031
42032  if test "x$ENDIAN" = xuniversal_endianness; then
42033    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42034  fi
42035  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42036    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
42037  fi
42038
42039
42040# Configure flags for the tools
42041
42042  ###############################################################################
42043  #
42044  # How to compile shared libraries.
42045  #
42046
42047  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42048    PICFLAG="-fPIC"
42049    C_FLAG_REORDER=''
42050    CXX_FLAG_REORDER=''
42051
42052    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42053      # Linking is different on MacOSX
42054      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42055      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42056      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42057      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42058      SET_SHARED_LIBRARY_MAPFILE=''
42059    else
42060      # Default works for linux, might work on other platforms as well.
42061      SHARED_LIBRARY_FLAGS='-shared'
42062      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42063      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42064      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42065      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42066    fi
42067  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42068    PICFLAG=''
42069    C_FLAG_REORDER=''
42070    CXX_FLAG_REORDER=''
42071
42072    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42073      # Linking is different on MacOSX
42074      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42075      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42076      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42077      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42078      SET_SHARED_LIBRARY_MAPFILE=''
42079    else
42080      # Default works for linux, might work on other platforms as well.
42081      SHARED_LIBRARY_FLAGS='-shared'
42082      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42083      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42084      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42085      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42086    fi
42087  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42088    PICFLAG="-KPIC"
42089    C_FLAG_REORDER='-xF'
42090    CXX_FLAG_REORDER='-xF'
42091    SHARED_LIBRARY_FLAGS="-G"
42092    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42093    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42094    SET_SHARED_LIBRARY_NAME=''
42095    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42096  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42097    PICFLAG="-qpic=large"
42098    C_FLAG_REORDER=''
42099    CXX_FLAG_REORDER=''
42100    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42101    SET_EXECUTABLE_ORIGIN=""
42102    SET_SHARED_LIBRARY_ORIGIN=''
42103    SET_SHARED_LIBRARY_NAME=''
42104    SET_SHARED_LIBRARY_MAPFILE=''
42105  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42106    PICFLAG=""
42107    C_FLAG_REORDER=''
42108    CXX_FLAG_REORDER=''
42109    SHARED_LIBRARY_FLAGS="-LD"
42110    SET_EXECUTABLE_ORIGIN=''
42111    SET_SHARED_LIBRARY_ORIGIN=''
42112    SET_SHARED_LIBRARY_NAME=''
42113    SET_SHARED_LIBRARY_MAPFILE=''
42114  fi
42115
42116
42117
42118
42119
42120
42121
42122
42123
42124  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42125    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42126    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42127    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42128  fi
42129  # The (cross) compiler is now configured, we can now test capabilities
42130  # of the target platform.
42131
42132
42133
42134  ###############################################################################
42135  #
42136  # Setup the opt flags for different compilers
42137  # and different operating systems.
42138  #
42139
42140  # FIXME: this was indirectly the old default, but just inherited.
42141  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42142  #   C_FLAG_DEPS="-MMD -MF"
42143  # fi
42144
42145  # Generate make dependency files
42146  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42147    C_FLAG_DEPS="-MMD -MF"
42148  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42149    C_FLAG_DEPS="-MMD -MF"
42150  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42151    C_FLAG_DEPS="-xMMD -xMF"
42152  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42153    C_FLAG_DEPS="-qmakedep=gcc -MF"
42154  fi
42155  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42156
42157
42158
42159  # Debug symbols
42160  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42161    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42162      # reduce from default "-g2" option to save space
42163      CFLAGS_DEBUG_SYMBOLS="-g1"
42164      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42165    else
42166      CFLAGS_DEBUG_SYMBOLS="-g"
42167      CXXFLAGS_DEBUG_SYMBOLS="-g"
42168    fi
42169  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42170    CFLAGS_DEBUG_SYMBOLS="-g"
42171    CXXFLAGS_DEBUG_SYMBOLS="-g"
42172  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42173    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42174    # FIXME: likely a bug, this disables debug symbols rather than enables them
42175    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42176  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42177    CFLAGS_DEBUG_SYMBOLS="-g"
42178    CXXFLAGS_DEBUG_SYMBOLS="-g"
42179  fi
42180
42181
42182
42183  # bounds, memory and behavior checking options
42184  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42185    case $DEBUG_LEVEL in
42186    release )
42187      # no adjustment
42188      ;;
42189    fastdebug )
42190      # no adjustment
42191      ;;
42192    slowdebug )
42193      # Add runtime stack smashing and undefined behavior checks
42194      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42195      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42196      ;;
42197    esac
42198  fi
42199
42200
42201
42202  # Optimization levels
42203  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42204    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42205
42206    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42207      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42208      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42209      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42210      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42211      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42212      C_O_FLAG_NONE="-xregs=no%frameptr"
42213      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42214      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42215      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42216      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42217      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42218      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42219        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42220        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42221      fi
42222    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42223      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42224      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42225      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42226      C_O_FLAG_DEBUG=""
42227      C_O_FLAG_NONE=""
42228      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42229      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42230      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42231      C_O_FLAG_DEBUG=""
42232      CXX_O_FLAG_NONE=""
42233    fi
42234  else
42235    # The remaining toolchains share opt flags between CC and CXX;
42236    # setup for C and duplicate afterwards.
42237    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42238      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42239        # On MacOSX we optimize for size, something
42240        # we should do for all platforms?
42241        C_O_FLAG_HIGHEST="-Os"
42242        C_O_FLAG_HI="-Os"
42243        C_O_FLAG_NORM="-Os"
42244      else
42245        C_O_FLAG_HIGHEST="-O3"
42246        C_O_FLAG_HI="-O3"
42247        C_O_FLAG_NORM="-O2"
42248      fi
42249      C_O_FLAG_DEBUG="-O0"
42250      C_O_FLAG_NONE="-O0"
42251    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42252      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42253        # On MacOSX we optimize for size, something
42254        # we should do for all platforms?
42255        C_O_FLAG_HIGHEST="-Os"
42256        C_O_FLAG_HI="-Os"
42257        C_O_FLAG_NORM="-Os"
42258      else
42259        C_O_FLAG_HIGHEST="-O3"
42260        C_O_FLAG_HI="-O3"
42261        C_O_FLAG_NORM="-O2"
42262      fi
42263      C_O_FLAG_DEBUG="-O0"
42264      C_O_FLAG_NONE="-O0"
42265    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42266      C_O_FLAG_HIGHEST="-O3"
42267      C_O_FLAG_HI="-O3 -qstrict"
42268      C_O_FLAG_NORM="-O2"
42269      C_O_FLAG_DEBUG="-qnoopt"
42270      C_O_FLAG_NONE="-qnoop"
42271    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42272      C_O_FLAG_HIGHEST="-O2"
42273      C_O_FLAG_HI="-O1"
42274      C_O_FLAG_NORM="-O1"
42275      C_O_FLAG_DEBUG="-Od"
42276      C_O_FLAG_NONE="-Od"
42277    fi
42278    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42279    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42280    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42281    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42282    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42283  fi
42284
42285  # Adjust optimization flags according to debug level.
42286  case $DEBUG_LEVEL in
42287    release )
42288      # no adjustment
42289      ;;
42290    fastdebug )
42291      # Not quite so much optimization
42292      C_O_FLAG_HI="$C_O_FLAG_NORM"
42293      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42294      ;;
42295    slowdebug )
42296      # Disable optimization
42297      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42298      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42299      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42300      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42301      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42302      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42303      ;;
42304  esac
42305
42306
42307
42308
42309
42310
42311
42312
42313
42314
42315
42316
42317
42318  # Special extras...
42319  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42320    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42321      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42322      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42323    fi
42324  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42325    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42326    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42327    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42328  fi
42329
42330  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42331    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42332$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42333  fi
42334
42335  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42336    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42337$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42338  fi
42339
42340  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42341    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42342$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42343  fi
42344
42345
42346# Check whether --with-extra-cflags was given.
42347if test "${with_extra_cflags+set}" = set; then :
42348  withval=$with_extra_cflags;
42349fi
42350
42351
42352
42353# Check whether --with-extra-cxxflags was given.
42354if test "${with_extra_cxxflags+set}" = set; then :
42355  withval=$with_extra_cxxflags;
42356fi
42357
42358
42359
42360# Check whether --with-extra-ldflags was given.
42361if test "${with_extra_ldflags+set}" = set; then :
42362  withval=$with_extra_ldflags;
42363fi
42364
42365
42366  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42367  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42368  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42369
42370  # Hotspot needs these set in their legacy form
42371  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42372  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42373  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42374
42375
42376
42377
42378
42379  ###############################################################################
42380  #
42381  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42382  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42383  #
42384
42385  # Setup compiler/platform specific flags into
42386  #    CFLAGS_JDK    - C Compiler flags
42387  #    CXXFLAGS_JDK  - C++ Compiler flags
42388  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42389  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42390    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42391        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42392    case $OPENJDK_TARGET_CPU_ARCH in
42393      arm )
42394        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42395        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42396        ;;
42397      ppc )
42398        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42399        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42400        ;;
42401      * )
42402        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42403        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42404        ;;
42405    esac
42406  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42407    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42408    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42409      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42410      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42411    fi
42412
42413    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42414    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42415  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42416    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42417    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42418  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42419    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42420    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42421    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42422    -DWIN32 -DIAL"
42423    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42424      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42425    else
42426      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42427    fi
42428  fi
42429
42430  ###############################################################################
42431
42432  # Adjust flags according to debug level.
42433  case $DEBUG_LEVEL in
42434    fastdebug | slowdebug )
42435      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42436      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42437      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42438      ;;
42439    release )
42440      ;;
42441    * )
42442      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42443      ;;
42444  esac
42445
42446  # Setup LP64
42447  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42448
42449  # Set some common defines. These works for all compilers, but assume
42450  # -D is universally accepted.
42451
42452  # Setup endianness
42453  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42454    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42455    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42456    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42457    #   Note: -Dmacro         is the same as    #define macro 1
42458    #         -Dmacro=        is the same as    #define macro
42459    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42460      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42461    else
42462      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42463    fi
42464  else
42465    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42466    # are defined in the system?
42467    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42468      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42469    else
42470      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42471    fi
42472  fi
42473
42474  # Setup target OS define. Use OS target name but in upper case.
42475  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42476  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42477
42478  # Setup target CPU
42479  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42480
42481  # Setup debug/release defines
42482  if test "x$DEBUG_LEVEL" = xrelease; then
42483    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42484    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42485      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42486    fi
42487  else
42488    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42489  fi
42490
42491  # Setup release name
42492  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42493
42494
42495  # Set some additional per-OS defines.
42496  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42497    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42498  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42499    # FIXME: PPC64 should not be here.
42500    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42501  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42502    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42503  fi
42504
42505  # Additional macosx handling
42506  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42507    # Setting these parameters makes it an error to link to macosx APIs that are
42508    # newer than the given OS version and makes the linked binaries compatible
42509    # even if built on a newer version of the OS.
42510    # The expected format is X.Y.Z
42511    MACOSX_VERSION_MIN=10.7.0
42512
42513
42514    # The macro takes the version with no dots, ex: 1070
42515    # Let the flags variables get resolved in make for easier override on make
42516    # command line.
42517    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42518    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42519  fi
42520
42521  # Setup some hard coded includes
42522  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42523      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42524      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42525      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42526
42527  # The shared libraries are compiled using the picflag.
42528  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42529  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42530
42531  # Executable flags
42532  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42533  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42534
42535
42536
42537
42538
42539
42540  # Setup LDFLAGS et al.
42541  #
42542
42543  # Now this is odd. The JDK native libraries have to link against libjvm.so
42544  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42545  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42546  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42547  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42548  # libraries will link to whatever is in memory. Yuck.
42549  #
42550  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42551  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42552    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42553    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42554      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42555    fi
42556    # TODO: make -debug optional "--disable-full-debug-symbols"
42557    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42558  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42559    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42560    # We have previously set HAS_GNU_HASH if this is the case
42561    if test -n "$HAS_GNU_HASH"; then
42562      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42563    fi
42564    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42565      # And since we now know that the linker is gnu, then add -z defs, to forbid
42566      # undefined symbols in object files.
42567      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42568      case $DEBUG_LEVEL in
42569        release )
42570          # tell linker to optimize libraries.
42571          # Should this be supplied to the OSS linker as well?
42572          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42573          ;;
42574        slowdebug )
42575          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42576            # do relocations at load
42577            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42578            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42579          fi
42580          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42581            # mark relocations read only
42582            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42583            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42584          fi
42585          ;;
42586        fastdebug )
42587          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42588            # mark relocations read only
42589            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42590            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42591          fi
42592          ;;
42593        * )
42594          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42595          ;;
42596        esac
42597    fi
42598  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42599    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42600    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42601  fi
42602
42603  # Customize LDFLAGS for executables
42604
42605  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42606
42607  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42608    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42609      LDFLAGS_STACK_SIZE=1048576
42610    else
42611      LDFLAGS_STACK_SIZE=327680
42612    fi
42613    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42614  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42615    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42616  fi
42617
42618  # Customize LDFLAGS for libs
42619  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42620
42621  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42622    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42623    LDFLAGS_JDKLIB_SUFFIX=""
42624  else
42625    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42626        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42627
42628    # On some platforms (mac) the linker warns about non existing -L dirs.
42629    # Add server first if available. Linking aginst client does not always produce the same results.
42630    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42631    # Default to server for other variants.
42632    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42633      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42634    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42635      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42636    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42637      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42638    else
42639      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42640    fi
42641
42642    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42643    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42644      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42645    fi
42646  fi
42647
42648
42649
42650
42651
42652
42653
42654
42655  # Some Zero and Shark settings.
42656  # ZERO_ARCHFLAG tells the compiler which mode to build for
42657  case "${OPENJDK_TARGET_CPU}" in
42658    s390)
42659      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42660      ;;
42661    *)
42662      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42663  esac
42664
42665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42666$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42667  supports=yes
42668
42669  saved_cflags="$CFLAGS"
42670  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42671  ac_ext=c
42672ac_cpp='$CPP $CPPFLAGS'
42673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42675ac_compiler_gnu=$ac_cv_c_compiler_gnu
42676
42677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42678/* end confdefs.h.  */
42679int i;
42680_ACEOF
42681if ac_fn_c_try_compile "$LINENO"; then :
42682
42683else
42684  supports=no
42685fi
42686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42687  ac_ext=cpp
42688ac_cpp='$CXXCPP $CPPFLAGS'
42689ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42690ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42691ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42692
42693  CFLAGS="$saved_cflags"
42694
42695  saved_cxxflags="$CXXFLAGS"
42696  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42704/* end confdefs.h.  */
42705int i;
42706_ACEOF
42707if ac_fn_cxx_try_compile "$LINENO"; then :
42708
42709else
42710  supports=no
42711fi
42712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42713  ac_ext=cpp
42714ac_cpp='$CXXCPP $CPPFLAGS'
42715ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42716ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42717ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42718
42719  CXXFLAGS="$saved_cxxflags"
42720
42721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42722$as_echo "$supports" >&6; }
42723  if test "x$supports" = "xyes" ; then
42724    :
42725  else
42726    ZERO_ARCHFLAG=""
42727  fi
42728
42729
42730
42731  # Check that the compiler supports -mX (or -qX on AIX) flags
42732  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42733
42734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42735$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42736  supports=yes
42737
42738  saved_cflags="$CFLAGS"
42739  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42740  ac_ext=c
42741ac_cpp='$CPP $CPPFLAGS'
42742ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42743ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42744ac_compiler_gnu=$ac_cv_c_compiler_gnu
42745
42746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42747/* end confdefs.h.  */
42748int i;
42749_ACEOF
42750if ac_fn_c_try_compile "$LINENO"; then :
42751
42752else
42753  supports=no
42754fi
42755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42756  ac_ext=cpp
42757ac_cpp='$CXXCPP $CPPFLAGS'
42758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42761
42762  CFLAGS="$saved_cflags"
42763
42764  saved_cxxflags="$CXXFLAGS"
42765  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42773/* end confdefs.h.  */
42774int i;
42775_ACEOF
42776if ac_fn_cxx_try_compile "$LINENO"; then :
42777
42778else
42779  supports=no
42780fi
42781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42782  ac_ext=cpp
42783ac_cpp='$CXXCPP $CPPFLAGS'
42784ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42785ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42786ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42787
42788  CXXFLAGS="$saved_cxxflags"
42789
42790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42791$as_echo "$supports" >&6; }
42792  if test "x$supports" = "xyes" ; then
42793    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42794  else
42795    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42796  fi
42797
42798
42799
42800  case "${TOOLCHAIN_TYPE}" in
42801    microsoft)
42802      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42803      ;;
42804    solstudio)
42805      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42806      ;;
42807    gcc)
42808      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42809      ;;
42810    clang)
42811      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42812      ;;
42813  esac
42814
42815
42816
42817# Setup debug symbols (need objcopy from the toolchain for that)
42818
42819  #
42820  # ENABLE_DEBUG_SYMBOLS
42821  # This must be done after the toolchain is setup, since we're looking at objcopy.
42822  #
42823  # Check whether --enable-debug-symbols was given.
42824if test "${enable_debug_symbols+set}" = set; then :
42825  enableval=$enable_debug_symbols;
42826fi
42827
42828
42829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42830$as_echo_n "checking if we should generate debug symbols... " >&6; }
42831
42832  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42833    # explicit enabling of enable-debug-symbols and can't find objcopy
42834    #   this is an error
42835    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42836  fi
42837
42838  if test "x$enable_debug_symbols" = "xyes"; then
42839    ENABLE_DEBUG_SYMBOLS=true
42840  elif test "x$enable_debug_symbols" = "xno"; then
42841    ENABLE_DEBUG_SYMBOLS=false
42842  else
42843    # Default is on if objcopy is found
42844    if test "x$OBJCOPY" != x; then
42845      ENABLE_DEBUG_SYMBOLS=true
42846    # MacOS X and Windows don't use objcopy but default is on for those OSes
42847    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42848      ENABLE_DEBUG_SYMBOLS=true
42849    else
42850      ENABLE_DEBUG_SYMBOLS=false
42851    fi
42852  fi
42853
42854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42855$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42856
42857  #
42858  # ZIP_DEBUGINFO_FILES
42859  #
42860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42861$as_echo_n "checking if we should zip debug-info files... " >&6; }
42862  # Check whether --enable-zip-debug-info was given.
42863if test "${enable_zip_debug_info+set}" = set; then :
42864  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42865else
42866  enable_zip_debug_info="yes"
42867fi
42868
42869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42870$as_echo "${enable_zip_debug_info}" >&6; }
42871
42872  if test "x${enable_zip_debug_info}" = "xno"; then
42873    ZIP_DEBUGINFO_FILES=false
42874  else
42875    ZIP_DEBUGINFO_FILES=true
42876  fi
42877
42878
42879
42880
42881
42882###############################################################################
42883#
42884# Check dependencies for external and internal libraries.
42885#
42886###############################################################################
42887
42888# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42889
42890  # When using cygwin or msys, we need a wrapper binary that renames
42891  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42892  # @files and rewrites these too! This wrapper binary is
42893  # called fixpath.
42894  FIXPATH=
42895  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42897$as_echo_n "checking if fixpath can be created... " >&6; }
42898    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42899    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42900    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42901      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42902      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42903      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42904      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42905    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42906      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42907      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42908
42909      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42910      # @ was chosen as separator to minimize risk of other tools messing around with it
42911      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42912      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42913
42914      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42915    fi
42916    rm -f $OUTPUT_ROOT/fixpath*
42917    cd $OUTPUT_ROOT
42918    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42919    cd $CURDIR
42920
42921    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42923$as_echo "no" >&6; }
42924      cat $OUTPUT_ROOT/fixpath1.log
42925      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42926    fi
42927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42928$as_echo "yes" >&6; }
42929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42930$as_echo_n "checking if fixpath.exe works... " >&6; }
42931    cd $OUTPUT_ROOT
42932    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42933    cd $CURDIR
42934    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42936$as_echo "no" >&6; }
42937      cat $OUTPUT_ROOT/fixpath2.log
42938      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42939    fi
42940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42941$as_echo "yes" >&6; }
42942    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42943  fi
42944
42945
42946
42947
42948
42949
42950  ###############################################################################
42951  #
42952  # OS specific settings that we never will need to probe.
42953  #
42954  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42956$as_echo_n "checking what is not needed on Linux?... " >&6; }
42957    PULSE_NOT_NEEDED=yes
42958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42959$as_echo "pulse" >&6; }
42960  fi
42961
42962  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42963    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42964$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42965    ALSA_NOT_NEEDED=yes
42966    PULSE_NOT_NEEDED=yes
42967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42968$as_echo "alsa pulse" >&6; }
42969  fi
42970
42971  if test "x$OPENJDK_TARGET_OS" = xaix; then
42972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42973$as_echo_n "checking what is not needed on AIX?... " >&6; }
42974    ALSA_NOT_NEEDED=yes
42975    PULSE_NOT_NEEDED=yes
42976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42977$as_echo "alsa pulse" >&6; }
42978  fi
42979
42980
42981  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42983$as_echo_n "checking what is not needed on Windows?... " >&6; }
42984    CUPS_NOT_NEEDED=yes
42985    ALSA_NOT_NEEDED=yes
42986    PULSE_NOT_NEEDED=yes
42987    X11_NOT_NEEDED=yes
42988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42989$as_echo "alsa cups pulse x11" >&6; }
42990  fi
42991
42992  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42994$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42995    ALSA_NOT_NEEDED=yes
42996    PULSE_NOT_NEEDED=yes
42997    X11_NOT_NEEDED=yes
42998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42999$as_echo "alsa pulse x11" >&6; }
43000  fi
43001
43002  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43004$as_echo_n "checking what is not needed on bsd?... " >&6; }
43005    ALSA_NOT_NEEDED=yes
43006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43007$as_echo "alsa" >&6; }
43008  fi
43009
43010  if test "x$OPENJDK" = "xfalse"; then
43011    FREETYPE_NOT_NEEDED=yes
43012  fi
43013
43014  if test "x$SUPPORT_HEADFUL" = xno; then
43015    X11_NOT_NEEDED=yes
43016  fi
43017
43018
43019
43020  ###############################################################################
43021  #
43022  # Check for X Windows
43023  #
43024
43025  if test "x$X11_NOT_NEEDED" = xyes; then
43026    if test "x${with_x}" != x; then
43027      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43028$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43029    fi
43030    X_CFLAGS=
43031    X_LIBS=
43032  else
43033    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43034    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43035    # --x-libraries for the sysroot, if that seems to be correct.
43036    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43037      if test "x$SYSROOT" != "x"; then
43038        if test "x$x_includes" = xNONE; then
43039          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43040            x_includes="$SYSROOT/usr/X11R6/include"
43041          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43042            x_includes="$SYSROOT/usr/include"
43043          fi
43044        fi
43045        if test "x$x_libraries" = xNONE; then
43046          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43047            x_libraries="$SYSROOT/usr/X11R6/lib"
43048          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43049            x_libraries="$SYSROOT/usr/lib64"
43050          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43051            x_libraries="$SYSROOT/usr/lib"
43052          fi
43053        fi
43054      fi
43055    fi
43056
43057    # Now let autoconf do it's magic
43058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43059$as_echo_n "checking for X... " >&6; }
43060
43061
43062# Check whether --with-x was given.
43063if test "${with_x+set}" = set; then :
43064  withval=$with_x;
43065fi
43066
43067# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43068if test "x$with_x" = xno; then
43069  # The user explicitly disabled X.
43070  have_x=disabled
43071else
43072  case $x_includes,$x_libraries in #(
43073    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43074    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43075  $as_echo_n "(cached) " >&6
43076else
43077  # One or both of the vars are not set, and there is no cached value.
43078ac_x_includes=no ac_x_libraries=no
43079rm -f -r conftest.dir
43080if mkdir conftest.dir; then
43081  cd conftest.dir
43082  cat >Imakefile <<'_ACEOF'
43083incroot:
43084	@echo incroot='${INCROOT}'
43085usrlibdir:
43086	@echo usrlibdir='${USRLIBDIR}'
43087libdir:
43088	@echo libdir='${LIBDIR}'
43089_ACEOF
43090  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43091    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43092    for ac_var in incroot usrlibdir libdir; do
43093      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43094    done
43095    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43096    for ac_extension in a so sl dylib la dll; do
43097      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43098	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43099	ac_im_usrlibdir=$ac_im_libdir; break
43100      fi
43101    done
43102    # Screen out bogus values from the imake configuration.  They are
43103    # bogus both because they are the default anyway, and because
43104    # using them would break gcc on systems where it needs fixed includes.
43105    case $ac_im_incroot in
43106	/usr/include) ac_x_includes= ;;
43107	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43108    esac
43109    case $ac_im_usrlibdir in
43110	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43111	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43112    esac
43113  fi
43114  cd ..
43115  rm -f -r conftest.dir
43116fi
43117
43118# Standard set of common directories for X headers.
43119# Check X11 before X11Rn because it is often a symlink to the current release.
43120ac_x_header_dirs='
43121/usr/X11/include
43122/usr/X11R7/include
43123/usr/X11R6/include
43124/usr/X11R5/include
43125/usr/X11R4/include
43126
43127/usr/include/X11
43128/usr/include/X11R7
43129/usr/include/X11R6
43130/usr/include/X11R5
43131/usr/include/X11R4
43132
43133/usr/local/X11/include
43134/usr/local/X11R7/include
43135/usr/local/X11R6/include
43136/usr/local/X11R5/include
43137/usr/local/X11R4/include
43138
43139/usr/local/include/X11
43140/usr/local/include/X11R7
43141/usr/local/include/X11R6
43142/usr/local/include/X11R5
43143/usr/local/include/X11R4
43144
43145/usr/X386/include
43146/usr/x386/include
43147/usr/XFree86/include/X11
43148
43149/usr/include
43150/usr/local/include
43151/usr/unsupported/include
43152/usr/athena/include
43153/usr/local/x11r5/include
43154/usr/lpp/Xamples/include
43155
43156/usr/openwin/include
43157/usr/openwin/share/include'
43158
43159if test "$ac_x_includes" = no; then
43160  # Guess where to find include files, by looking for Xlib.h.
43161  # First, try using that file with no special directory specified.
43162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43163/* end confdefs.h.  */
43164#include <X11/Xlib.h>
43165_ACEOF
43166if ac_fn_cxx_try_cpp "$LINENO"; then :
43167  # We can compile using X headers with no special include directory.
43168ac_x_includes=
43169else
43170  for ac_dir in $ac_x_header_dirs; do
43171  if test -r "$ac_dir/X11/Xlib.h"; then
43172    ac_x_includes=$ac_dir
43173    break
43174  fi
43175done
43176fi
43177rm -f conftest.err conftest.i conftest.$ac_ext
43178fi # $ac_x_includes = no
43179
43180if test "$ac_x_libraries" = no; then
43181  # Check for the libraries.
43182  # See if we find them without any special options.
43183  # Don't add to $LIBS permanently.
43184  ac_save_LIBS=$LIBS
43185  LIBS="-lX11 $LIBS"
43186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43187/* end confdefs.h.  */
43188#include <X11/Xlib.h>
43189int
43190main ()
43191{
43192XrmInitialize ()
43193  ;
43194  return 0;
43195}
43196_ACEOF
43197if ac_fn_cxx_try_link "$LINENO"; then :
43198  LIBS=$ac_save_LIBS
43199# We can link X programs with no special library path.
43200ac_x_libraries=
43201else
43202  LIBS=$ac_save_LIBS
43203for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43204do
43205  # Don't even attempt the hair of trying to link an X program!
43206  for ac_extension in a so sl dylib la dll; do
43207    if test -r "$ac_dir/libX11.$ac_extension"; then
43208      ac_x_libraries=$ac_dir
43209      break 2
43210    fi
43211  done
43212done
43213fi
43214rm -f core conftest.err conftest.$ac_objext \
43215    conftest$ac_exeext conftest.$ac_ext
43216fi # $ac_x_libraries = no
43217
43218case $ac_x_includes,$ac_x_libraries in #(
43219  no,* | *,no | *\'*)
43220    # Didn't find X, or a directory has "'" in its name.
43221    ac_cv_have_x="have_x=no";; #(
43222  *)
43223    # Record where we found X for the cache.
43224    ac_cv_have_x="have_x=yes\
43225	ac_x_includes='$ac_x_includes'\
43226	ac_x_libraries='$ac_x_libraries'"
43227esac
43228fi
43229;; #(
43230    *) have_x=yes;;
43231  esac
43232  eval "$ac_cv_have_x"
43233fi # $with_x != no
43234
43235if test "$have_x" != yes; then
43236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43237$as_echo "$have_x" >&6; }
43238  no_x=yes
43239else
43240  # If each of the values was on the command line, it overrides each guess.
43241  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43242  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43243  # Update the cache value to reflect the command line values.
43244  ac_cv_have_x="have_x=yes\
43245	ac_x_includes='$x_includes'\
43246	ac_x_libraries='$x_libraries'"
43247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43248$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43249fi
43250
43251    if test "$no_x" = yes; then
43252  # Not all programs may use this symbol, but it does not hurt to define it.
43253
43254$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43255
43256  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43257else
43258  if test -n "$x_includes"; then
43259    X_CFLAGS="$X_CFLAGS -I$x_includes"
43260  fi
43261
43262  # It would also be nice to do this for all -L options, not just this one.
43263  if test -n "$x_libraries"; then
43264    X_LIBS="$X_LIBS -L$x_libraries"
43265    # For Solaris; some versions of Sun CC require a space after -R and
43266    # others require no space.  Words are not sufficient . . . .
43267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43268$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43269    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43270    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43271    ac_cxx_werror_flag=yes
43272    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43273/* end confdefs.h.  */
43274
43275int
43276main ()
43277{
43278
43279  ;
43280  return 0;
43281}
43282_ACEOF
43283if ac_fn_cxx_try_link "$LINENO"; then :
43284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43285$as_echo "no" >&6; }
43286       X_LIBS="$X_LIBS -R$x_libraries"
43287else
43288  LIBS="$ac_xsave_LIBS -R $x_libraries"
43289       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43290/* end confdefs.h.  */
43291
43292int
43293main ()
43294{
43295
43296  ;
43297  return 0;
43298}
43299_ACEOF
43300if ac_fn_cxx_try_link "$LINENO"; then :
43301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43302$as_echo "yes" >&6; }
43303	  X_LIBS="$X_LIBS -R $x_libraries"
43304else
43305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43306$as_echo "neither works" >&6; }
43307fi
43308rm -f core conftest.err conftest.$ac_objext \
43309    conftest$ac_exeext conftest.$ac_ext
43310fi
43311rm -f core conftest.err conftest.$ac_objext \
43312    conftest$ac_exeext conftest.$ac_ext
43313    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43314    LIBS=$ac_xsave_LIBS
43315  fi
43316
43317  # Check for system-dependent libraries X programs must link with.
43318  # Do this before checking for the system-independent R6 libraries
43319  # (-lICE), since we may need -lsocket or whatever for X linking.
43320
43321  if test "$ISC" = yes; then
43322    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43323  else
43324    # Martyn Johnson says this is needed for Ultrix, if the X
43325    # libraries were built with DECnet support.  And Karl Berry says
43326    # the Alpha needs dnet_stub (dnet does not exist).
43327    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43328    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43329/* end confdefs.h.  */
43330
43331/* Override any GCC internal prototype to avoid an error.
43332   Use char because int might match the return type of a GCC
43333   builtin and then its argument prototype would still apply.  */
43334#ifdef __cplusplus
43335extern "C"
43336#endif
43337char XOpenDisplay ();
43338int
43339main ()
43340{
43341return XOpenDisplay ();
43342  ;
43343  return 0;
43344}
43345_ACEOF
43346if ac_fn_cxx_try_link "$LINENO"; then :
43347
43348else
43349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43350$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43351if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43352  $as_echo_n "(cached) " >&6
43353else
43354  ac_check_lib_save_LIBS=$LIBS
43355LIBS="-ldnet  $LIBS"
43356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43357/* end confdefs.h.  */
43358
43359/* Override any GCC internal prototype to avoid an error.
43360   Use char because int might match the return type of a GCC
43361   builtin and then its argument prototype would still apply.  */
43362#ifdef __cplusplus
43363extern "C"
43364#endif
43365char dnet_ntoa ();
43366int
43367main ()
43368{
43369return dnet_ntoa ();
43370  ;
43371  return 0;
43372}
43373_ACEOF
43374if ac_fn_cxx_try_link "$LINENO"; then :
43375  ac_cv_lib_dnet_dnet_ntoa=yes
43376else
43377  ac_cv_lib_dnet_dnet_ntoa=no
43378fi
43379rm -f core conftest.err conftest.$ac_objext \
43380    conftest$ac_exeext conftest.$ac_ext
43381LIBS=$ac_check_lib_save_LIBS
43382fi
43383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43384$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43385if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43386  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43387fi
43388
43389    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43391$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43392if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43393  $as_echo_n "(cached) " >&6
43394else
43395  ac_check_lib_save_LIBS=$LIBS
43396LIBS="-ldnet_stub  $LIBS"
43397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43398/* end confdefs.h.  */
43399
43400/* Override any GCC internal prototype to avoid an error.
43401   Use char because int might match the return type of a GCC
43402   builtin and then its argument prototype would still apply.  */
43403#ifdef __cplusplus
43404extern "C"
43405#endif
43406char dnet_ntoa ();
43407int
43408main ()
43409{
43410return dnet_ntoa ();
43411  ;
43412  return 0;
43413}
43414_ACEOF
43415if ac_fn_cxx_try_link "$LINENO"; then :
43416  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43417else
43418  ac_cv_lib_dnet_stub_dnet_ntoa=no
43419fi
43420rm -f core conftest.err conftest.$ac_objext \
43421    conftest$ac_exeext conftest.$ac_ext
43422LIBS=$ac_check_lib_save_LIBS
43423fi
43424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43425$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43426if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43427  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43428fi
43429
43430    fi
43431fi
43432rm -f core conftest.err conftest.$ac_objext \
43433    conftest$ac_exeext conftest.$ac_ext
43434    LIBS="$ac_xsave_LIBS"
43435
43436    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43437    # to get the SysV transport functions.
43438    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43439    # needs -lnsl.
43440    # The nsl library prevents programs from opening the X display
43441    # on Irix 5.2, according to T.E. Dickey.
43442    # The functions gethostbyname, getservbyname, and inet_addr are
43443    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43444    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43445if test "x$ac_cv_func_gethostbyname" = xyes; then :
43446
43447fi
43448
43449    if test $ac_cv_func_gethostbyname = no; then
43450      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43451$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43452if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43453  $as_echo_n "(cached) " >&6
43454else
43455  ac_check_lib_save_LIBS=$LIBS
43456LIBS="-lnsl  $LIBS"
43457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43458/* end confdefs.h.  */
43459
43460/* Override any GCC internal prototype to avoid an error.
43461   Use char because int might match the return type of a GCC
43462   builtin and then its argument prototype would still apply.  */
43463#ifdef __cplusplus
43464extern "C"
43465#endif
43466char gethostbyname ();
43467int
43468main ()
43469{
43470return gethostbyname ();
43471  ;
43472  return 0;
43473}
43474_ACEOF
43475if ac_fn_cxx_try_link "$LINENO"; then :
43476  ac_cv_lib_nsl_gethostbyname=yes
43477else
43478  ac_cv_lib_nsl_gethostbyname=no
43479fi
43480rm -f core conftest.err conftest.$ac_objext \
43481    conftest$ac_exeext conftest.$ac_ext
43482LIBS=$ac_check_lib_save_LIBS
43483fi
43484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43485$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43486if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43487  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43488fi
43489
43490      if test $ac_cv_lib_nsl_gethostbyname = no; then
43491	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43492$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43493if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43494  $as_echo_n "(cached) " >&6
43495else
43496  ac_check_lib_save_LIBS=$LIBS
43497LIBS="-lbsd  $LIBS"
43498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43499/* end confdefs.h.  */
43500
43501/* Override any GCC internal prototype to avoid an error.
43502   Use char because int might match the return type of a GCC
43503   builtin and then its argument prototype would still apply.  */
43504#ifdef __cplusplus
43505extern "C"
43506#endif
43507char gethostbyname ();
43508int
43509main ()
43510{
43511return gethostbyname ();
43512  ;
43513  return 0;
43514}
43515_ACEOF
43516if ac_fn_cxx_try_link "$LINENO"; then :
43517  ac_cv_lib_bsd_gethostbyname=yes
43518else
43519  ac_cv_lib_bsd_gethostbyname=no
43520fi
43521rm -f core conftest.err conftest.$ac_objext \
43522    conftest$ac_exeext conftest.$ac_ext
43523LIBS=$ac_check_lib_save_LIBS
43524fi
43525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43526$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43527if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43528  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43529fi
43530
43531      fi
43532    fi
43533
43534    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43535    # socket/setsockopt and other routines are undefined under SCO ODT
43536    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43537    # on later versions), says Simon Leinen: it contains gethostby*
43538    # variants that don't use the name server (or something).  -lsocket
43539    # must be given before -lnsl if both are needed.  We assume that
43540    # if connect needs -lnsl, so does gethostbyname.
43541    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43542if test "x$ac_cv_func_connect" = xyes; then :
43543
43544fi
43545
43546    if test $ac_cv_func_connect = no; then
43547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43548$as_echo_n "checking for connect in -lsocket... " >&6; }
43549if ${ac_cv_lib_socket_connect+:} false; then :
43550  $as_echo_n "(cached) " >&6
43551else
43552  ac_check_lib_save_LIBS=$LIBS
43553LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43555/* end confdefs.h.  */
43556
43557/* Override any GCC internal prototype to avoid an error.
43558   Use char because int might match the return type of a GCC
43559   builtin and then its argument prototype would still apply.  */
43560#ifdef __cplusplus
43561extern "C"
43562#endif
43563char connect ();
43564int
43565main ()
43566{
43567return connect ();
43568  ;
43569  return 0;
43570}
43571_ACEOF
43572if ac_fn_cxx_try_link "$LINENO"; then :
43573  ac_cv_lib_socket_connect=yes
43574else
43575  ac_cv_lib_socket_connect=no
43576fi
43577rm -f core conftest.err conftest.$ac_objext \
43578    conftest$ac_exeext conftest.$ac_ext
43579LIBS=$ac_check_lib_save_LIBS
43580fi
43581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43582$as_echo "$ac_cv_lib_socket_connect" >&6; }
43583if test "x$ac_cv_lib_socket_connect" = xyes; then :
43584  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43585fi
43586
43587    fi
43588
43589    # Guillermo Gomez says -lposix is necessary on A/UX.
43590    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43591if test "x$ac_cv_func_remove" = xyes; then :
43592
43593fi
43594
43595    if test $ac_cv_func_remove = no; then
43596      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43597$as_echo_n "checking for remove in -lposix... " >&6; }
43598if ${ac_cv_lib_posix_remove+:} false; then :
43599  $as_echo_n "(cached) " >&6
43600else
43601  ac_check_lib_save_LIBS=$LIBS
43602LIBS="-lposix  $LIBS"
43603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43604/* end confdefs.h.  */
43605
43606/* Override any GCC internal prototype to avoid an error.
43607   Use char because int might match the return type of a GCC
43608   builtin and then its argument prototype would still apply.  */
43609#ifdef __cplusplus
43610extern "C"
43611#endif
43612char remove ();
43613int
43614main ()
43615{
43616return remove ();
43617  ;
43618  return 0;
43619}
43620_ACEOF
43621if ac_fn_cxx_try_link "$LINENO"; then :
43622  ac_cv_lib_posix_remove=yes
43623else
43624  ac_cv_lib_posix_remove=no
43625fi
43626rm -f core conftest.err conftest.$ac_objext \
43627    conftest$ac_exeext conftest.$ac_ext
43628LIBS=$ac_check_lib_save_LIBS
43629fi
43630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43631$as_echo "$ac_cv_lib_posix_remove" >&6; }
43632if test "x$ac_cv_lib_posix_remove" = xyes; then :
43633  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43634fi
43635
43636    fi
43637
43638    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43639    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43640if test "x$ac_cv_func_shmat" = xyes; then :
43641
43642fi
43643
43644    if test $ac_cv_func_shmat = no; then
43645      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43646$as_echo_n "checking for shmat in -lipc... " >&6; }
43647if ${ac_cv_lib_ipc_shmat+:} false; then :
43648  $as_echo_n "(cached) " >&6
43649else
43650  ac_check_lib_save_LIBS=$LIBS
43651LIBS="-lipc  $LIBS"
43652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43653/* end confdefs.h.  */
43654
43655/* Override any GCC internal prototype to avoid an error.
43656   Use char because int might match the return type of a GCC
43657   builtin and then its argument prototype would still apply.  */
43658#ifdef __cplusplus
43659extern "C"
43660#endif
43661char shmat ();
43662int
43663main ()
43664{
43665return shmat ();
43666  ;
43667  return 0;
43668}
43669_ACEOF
43670if ac_fn_cxx_try_link "$LINENO"; then :
43671  ac_cv_lib_ipc_shmat=yes
43672else
43673  ac_cv_lib_ipc_shmat=no
43674fi
43675rm -f core conftest.err conftest.$ac_objext \
43676    conftest$ac_exeext conftest.$ac_ext
43677LIBS=$ac_check_lib_save_LIBS
43678fi
43679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43680$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43681if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43682  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43683fi
43684
43685    fi
43686  fi
43687
43688  # Check for libraries that X11R6 Xt/Xaw programs need.
43689  ac_save_LDFLAGS=$LDFLAGS
43690  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43691  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43692  # check for ICE first), but we must link in the order -lSM -lICE or
43693  # we get undefined symbols.  So assume we have SM if we have ICE.
43694  # These have to be linked with before -lX11, unlike the other
43695  # libraries we check for below, so use a different variable.
43696  # John Interrante, Karl Berry
43697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43698$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43699if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43700  $as_echo_n "(cached) " >&6
43701else
43702  ac_check_lib_save_LIBS=$LIBS
43703LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43705/* end confdefs.h.  */
43706
43707/* Override any GCC internal prototype to avoid an error.
43708   Use char because int might match the return type of a GCC
43709   builtin and then its argument prototype would still apply.  */
43710#ifdef __cplusplus
43711extern "C"
43712#endif
43713char IceConnectionNumber ();
43714int
43715main ()
43716{
43717return IceConnectionNumber ();
43718  ;
43719  return 0;
43720}
43721_ACEOF
43722if ac_fn_cxx_try_link "$LINENO"; then :
43723  ac_cv_lib_ICE_IceConnectionNumber=yes
43724else
43725  ac_cv_lib_ICE_IceConnectionNumber=no
43726fi
43727rm -f core conftest.err conftest.$ac_objext \
43728    conftest$ac_exeext conftest.$ac_ext
43729LIBS=$ac_check_lib_save_LIBS
43730fi
43731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43732$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43733if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43734  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43735fi
43736
43737  LDFLAGS=$ac_save_LDFLAGS
43738
43739fi
43740
43741
43742    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43743    # this doesn't make sense so we remove it.
43744    if test "x$COMPILE_TYPE" = xcross; then
43745      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43746    fi
43747
43748    if test "x$no_x" = xyes; then
43749
43750  # Print a helpful message on how to acquire the necessary build dependency.
43751  # x11 is the help tag: freetype, cups, pulse, alsa etc
43752  MISSING_DEPENDENCY=x11
43753
43754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43755    cygwin_help $MISSING_DEPENDENCY
43756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43757    msys_help $MISSING_DEPENDENCY
43758  else
43759    PKGHANDLER_COMMAND=
43760
43761    case $PKGHANDLER in
43762      apt-get)
43763        apt_help     $MISSING_DEPENDENCY ;;
43764      yum)
43765        yum_help     $MISSING_DEPENDENCY ;;
43766      port)
43767        port_help    $MISSING_DEPENDENCY ;;
43768      pkgutil)
43769        pkgutil_help $MISSING_DEPENDENCY ;;
43770      pkgadd)
43771        pkgadd_help  $MISSING_DEPENDENCY ;;
43772    esac
43773
43774    if test "x$PKGHANDLER_COMMAND" != x; then
43775      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43776    fi
43777  fi
43778
43779      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43780    fi
43781
43782    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43783      OPENWIN_HOME="/usr/openwin"
43784      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43785      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43786          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43787          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43788          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43789    fi
43790
43791    ac_ext=c
43792ac_cpp='$CPP $CPPFLAGS'
43793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43795ac_compiler_gnu=$ac_cv_c_compiler_gnu
43796
43797    OLD_CFLAGS="$CFLAGS"
43798    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43799
43800    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43801    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43802do :
43803  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43804ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43805          # include <X11/Xlib.h>
43806          # include <X11/Xutil.h>
43807
43808
43809"
43810if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43811  cat >>confdefs.h <<_ACEOF
43812#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43813_ACEOF
43814 X11_HEADERS_OK=yes
43815else
43816  X11_HEADERS_OK=no; break
43817fi
43818
43819done
43820
43821
43822    if test "x$X11_HEADERS_OK" = xno; then
43823
43824  # Print a helpful message on how to acquire the necessary build dependency.
43825  # x11 is the help tag: freetype, cups, pulse, alsa etc
43826  MISSING_DEPENDENCY=x11
43827
43828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43829    cygwin_help $MISSING_DEPENDENCY
43830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43831    msys_help $MISSING_DEPENDENCY
43832  else
43833    PKGHANDLER_COMMAND=
43834
43835    case $PKGHANDLER in
43836      apt-get)
43837        apt_help     $MISSING_DEPENDENCY ;;
43838      yum)
43839        yum_help     $MISSING_DEPENDENCY ;;
43840      port)
43841        port_help    $MISSING_DEPENDENCY ;;
43842      pkgutil)
43843        pkgutil_help $MISSING_DEPENDENCY ;;
43844      pkgadd)
43845        pkgadd_help  $MISSING_DEPENDENCY ;;
43846    esac
43847
43848    if test "x$PKGHANDLER_COMMAND" != x; then
43849      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43850    fi
43851  fi
43852
43853      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43854    fi
43855
43856    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43857    # defined in libawt_xawt.
43858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43859$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43860    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43861/* end confdefs.h.  */
43862#include <X11/extensions/Xrender.h>
43863int
43864main ()
43865{
43866XLinearGradient x;
43867  ;
43868  return 0;
43869}
43870_ACEOF
43871if ac_fn_c_try_compile "$LINENO"; then :
43872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43873$as_echo "yes" >&6; }
43874else
43875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43876$as_echo "no" >&6; }
43877         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43878fi
43879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43880
43881    CFLAGS="$OLD_CFLAGS"
43882    ac_ext=cpp
43883ac_cpp='$CXXCPP $CPPFLAGS'
43884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43887
43888  fi # X11_NOT_NEEDED
43889
43890
43891
43892
43893
43894
43895  ###############################################################################
43896  #
43897  # The common unix printing system cups is used to print from java.
43898  #
43899
43900# Check whether --with-cups was given.
43901if test "${with_cups+set}" = set; then :
43902  withval=$with_cups;
43903fi
43904
43905
43906# Check whether --with-cups-include was given.
43907if test "${with_cups_include+set}" = set; then :
43908  withval=$with_cups_include;
43909fi
43910
43911
43912  if test "x$CUPS_NOT_NEEDED" = xyes; then
43913    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43914      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43915$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43916    fi
43917    CUPS_CFLAGS=
43918  else
43919    CUPS_FOUND=no
43920
43921    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43922      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43923    fi
43924
43925    if test "x${with_cups}" != x; then
43926      CUPS_CFLAGS="-I${with_cups}/include"
43927      CUPS_FOUND=yes
43928    fi
43929    if test "x${with_cups_include}" != x; then
43930      CUPS_CFLAGS="-I${with_cups_include}"
43931      CUPS_FOUND=yes
43932    fi
43933    if test "x$CUPS_FOUND" = xno; then
43934
43935
43936  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43937    # Source the builddeps file again, to make sure it uses the latest variables!
43938    . $builddepsfile
43939    # Look for a target and build machine specific resource!
43940    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43941    if test "x$resource" = x; then
43942      # Ok, lets instead look for a target specific resource
43943      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43944    fi
43945    if test "x$resource" = x; then
43946      # Ok, lets instead look for a build specific resource
43947      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43948    fi
43949    if test "x$resource" = x; then
43950      # Ok, lets instead look for a generic resource
43951      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43952      resource=${builddep_cups}
43953    fi
43954    if test "x$resource" != x; then
43955      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43956$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43957      # If the resource in the builddeps.conf file is an existing directory,
43958      # for example /java/linux/cups
43959      if test -d ${resource}; then
43960        depdir=${resource}
43961      else
43962
43963  # cups is for example mymodule
43964  # $resource is for example libs/general/libmymod_1_2_3.zip
43965  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43966  # $with_builddeps_dir is for example /localhome/builddeps
43967  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43968  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43969  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43970  filename=`basename $resource`
43971  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43972  filebase=${filename%%.*}
43973  extension=${filename#*.}
43974  installdir=$with_builddeps_dir/$filebase
43975  if test ! -f $installdir/$filename.unpacked; then
43976    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43977$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43978    if test ! -d $installdir; then
43979      mkdir -p $installdir
43980    fi
43981    if test ! -d $installdir; then
43982      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43983    fi
43984    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43985    touch $tmpfile
43986    if test ! -f $tmpfile; then
43987      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43988    fi
43989
43990  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43991  # $tmpfile is the local file name for the downloaded file.
43992  VALID_TOOL=no
43993  if test "x$BDEPS_FTP" = xwget; then
43994    VALID_TOOL=yes
43995    wget -O $tmpfile $with_builddeps_server/$resource
43996  fi
43997  if test "x$BDEPS_FTP" = xlftp; then
43998    VALID_TOOL=yes
43999    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44000  fi
44001  if test "x$BDEPS_FTP" = xftp; then
44002    VALID_TOOL=yes
44003    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44004    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44005    FTPUSERPWD=${FTPSERVER%%@*}
44006    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44007      FTPUSER=${userpwd%%:*}
44008      FTPPWD=${userpwd#*@}
44009      FTPSERVER=${FTPSERVER#*@}
44010    else
44011      FTPUSER=ftp
44012      FTPPWD=ftp
44013    fi
44014    # the "pass" command does not work on some
44015    # ftp clients (read ftp.exe) but if it works,
44016    # passive mode is better!
44017    ( \
44018        echo "user $FTPUSER $FTPPWD"        ; \
44019        echo "pass"                         ; \
44020        echo "bin"                          ; \
44021        echo "get $FTPPATH $tmpfile"              ; \
44022    ) | ftp -in $FTPSERVER
44023  fi
44024  if test "x$VALID_TOOL" != xyes; then
44025    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44026  fi
44027
44028    mv $tmpfile $installdir/$filename
44029    if test ! -s $installdir/$filename; then
44030      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44031    fi
44032    case "$extension" in
44033      zip)  echo "Unzipping $installdir/$filename..."
44034        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44035        ;;
44036      tar.gz) echo "Untaring $installdir/$filename..."
44037        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44038        ;;
44039      tgz) echo "Untaring $installdir/$filename..."
44040        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44041        ;;
44042      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44043        ;;
44044    esac
44045  fi
44046  if test -f $installdir/$filename.unpacked; then
44047    depdir=$installdir
44048  fi
44049
44050      fi
44051      # Source the builddeps file again, because in the previous command, the depdir
44052      # was updated to point at the current build dependency install directory.
44053      . $builddepsfile
44054      # Now extract variables from the builddeps.conf files.
44055      theroot=${builddep_cups_ROOT}
44056      thecflags=${builddep_cups_CFLAGS}
44057      thelibs=${builddep_cups_LIBS}
44058      if test "x$depdir" = x; then
44059        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44060      fi
44061      CUPS=$depdir
44062      if test "x$theroot" != x; then
44063        CUPS="$theroot"
44064      fi
44065      if test "x$thecflags" != x; then
44066        CUPS_CFLAGS="$thecflags"
44067      fi
44068      if test "x$thelibs" != x; then
44069        CUPS_LIBS="$thelibs"
44070      fi
44071      CUPS_FOUND=yes
44072
44073    fi
44074
44075  fi
44076
44077    fi
44078    if test "x$CUPS_FOUND" = xno; then
44079      # Are the cups headers installed in the default /usr/include location?
44080      for ac_header in cups/cups.h cups/ppd.h
44081do :
44082  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44083ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44084if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44085  cat >>confdefs.h <<_ACEOF
44086#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44087_ACEOF
44088
44089            CUPS_FOUND=yes
44090            CUPS_CFLAGS=
44091            DEFAULT_CUPS=yes
44092
44093
44094fi
44095
44096done
44097
44098    fi
44099    if test "x$CUPS_FOUND" = xno; then
44100      # Getting nervous now? Lets poke around for standard Solaris third-party
44101      # package installation locations.
44102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44103$as_echo_n "checking for cups headers... " >&6; }
44104      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44105        # An SFW package seems to be installed!
44106        CUPS_FOUND=yes
44107        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44108      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44109        # A CSW package seems to be installed!
44110        CUPS_FOUND=yes
44111        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44112      fi
44113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44114$as_echo "$CUPS_FOUND" >&6; }
44115    fi
44116    if test "x$CUPS_FOUND" = xno; then
44117
44118  # Print a helpful message on how to acquire the necessary build dependency.
44119  # cups is the help tag: freetype, cups, pulse, alsa etc
44120  MISSING_DEPENDENCY=cups
44121
44122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44123    cygwin_help $MISSING_DEPENDENCY
44124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44125    msys_help $MISSING_DEPENDENCY
44126  else
44127    PKGHANDLER_COMMAND=
44128
44129    case $PKGHANDLER in
44130      apt-get)
44131        apt_help     $MISSING_DEPENDENCY ;;
44132      yum)
44133        yum_help     $MISSING_DEPENDENCY ;;
44134      port)
44135        port_help    $MISSING_DEPENDENCY ;;
44136      pkgutil)
44137        pkgutil_help $MISSING_DEPENDENCY ;;
44138      pkgadd)
44139        pkgadd_help  $MISSING_DEPENDENCY ;;
44140    esac
44141
44142    if test "x$PKGHANDLER_COMMAND" != x; then
44143      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44144    fi
44145  fi
44146
44147      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44148    fi
44149  fi
44150
44151
44152
44153
44154
44155
44156  ###############################################################################
44157  #
44158  # The ubiquitous freetype library is used to render fonts.
44159  #
44160
44161# Check whether --with-freetype was given.
44162if test "${with_freetype+set}" = set; then :
44163  withval=$with_freetype;
44164fi
44165
44166
44167# Check whether --with-freetype-include was given.
44168if test "${with_freetype_include+set}" = set; then :
44169  withval=$with_freetype_include;
44170fi
44171
44172
44173# Check whether --with-freetype-lib was given.
44174if test "${with_freetype_lib+set}" = set; then :
44175  withval=$with_freetype_lib;
44176fi
44177
44178
44179# Check whether --with-freetype-src was given.
44180if test "${with_freetype_src+set}" = set; then :
44181  withval=$with_freetype_src;
44182fi
44183
44184  # Check whether --enable-freetype-bundling was given.
44185if test "${enable_freetype_bundling+set}" = set; then :
44186  enableval=$enable_freetype_bundling;
44187fi
44188
44189
44190  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44191  FREETYPE_BASE_NAME=freetype
44192  FREETYPE_CFLAGS=
44193  FREETYPE_LIBS=
44194  FREETYPE_BUNDLE_LIB_PATH=
44195
44196  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44197    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
44198      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44199$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44200    fi
44201    if test "x$enable_freetype_bundling" != x; then
44202      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44203$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44204    fi
44205  else
44206    # freetype is needed to build; go get it!
44207
44208    BUNDLE_FREETYPE="$enable_freetype_bundling"
44209
44210    if  test "x$with_freetype_src" != x; then
44211      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44212        # Try to build freetype if --with-freetype-src was given on Windows
44213
44214  FREETYPE_SRC_PATH="$with_freetype_src"
44215  BUILD_FREETYPE=yes
44216
44217  # Check if the freetype sources are acessible..
44218  if ! test -d $FREETYPE_SRC_PATH; then
44219    { $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
44220$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44221    BUILD_FREETYPE=no
44222  fi
44223  # ..and contain a vc2010 project file
44224  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44225  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44226    { $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
44227$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44228    BUILD_FREETYPE=no
44229  fi
44230  # Now check if configure found a version of 'msbuild.exe'
44231  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44232    { $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
44233$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;}
44234    BUILD_FREETYPE=no
44235  fi
44236
44237  # Ready to go..
44238  if test "x$BUILD_FREETYPE" = xyes; then
44239
44240    # msbuild requires trailing slashes for output directories
44241    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44242    freetype_lib_path_unix="$freetype_lib_path"
44243    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44244
44245  unix_path="$vcxproj_path"
44246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44247    windows_path=`$CYGPATH -m "$unix_path"`
44248    vcxproj_path="$windows_path"
44249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44250    windows_path=`cmd //c echo $unix_path`
44251    vcxproj_path="$windows_path"
44252  fi
44253
44254
44255  unix_path="$freetype_lib_path"
44256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44257    windows_path=`$CYGPATH -m "$unix_path"`
44258    freetype_lib_path="$windows_path"
44259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44260    windows_path=`cmd //c echo $unix_path`
44261    freetype_lib_path="$windows_path"
44262  fi
44263
44264
44265  unix_path="$freetype_obj_path"
44266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44267    windows_path=`$CYGPATH -m "$unix_path"`
44268    freetype_obj_path="$windows_path"
44269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44270    windows_path=`cmd //c echo $unix_path`
44271    freetype_obj_path="$windows_path"
44272  fi
44273
44274    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44275      freetype_platform=x64
44276    else
44277      freetype_platform=win32
44278    fi
44279
44280    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44281    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44282    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44283    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44284    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44285$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44286
44287    # First we try to build the freetype.dll
44288    $ECHO -e "@echo off\n"\
44289	     "$MSBUILD $vcxproj_path "\
44290		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44291		       "/p:Configuration=\"Release Multithreaded\" "\
44292		       "/p:Platform=$freetype_platform "\
44293		       "/p:ConfigurationType=DynamicLibrary "\
44294		       "/p:TargetName=freetype "\
44295		       "/p:OutDir=\"$freetype_lib_path\" "\
44296		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44297    cmd /c freetype.bat
44298
44299    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44300      # If that succeeds we also build freetype.lib
44301      $ECHO -e "@echo off\n"\
44302	       "$MSBUILD $vcxproj_path "\
44303			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44304			 "/p:Configuration=\"Release Multithreaded\" "\
44305			 "/p:Platform=$freetype_platform "\
44306			 "/p:ConfigurationType=StaticLibrary "\
44307			 "/p:TargetName=freetype "\
44308			 "/p:OutDir=\"$freetype_lib_path\" "\
44309			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44310      cmd /c freetype.bat
44311
44312      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44313	# Once we build both, lib and dll, set freetype lib and include path appropriately
44314	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44315	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44316	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44317$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44318      else
44319	BUILD_FREETYPE=no
44320      fi
44321    else
44322      BUILD_FREETYPE=no
44323    fi
44324  fi
44325
44326        if test "x$BUILD_FREETYPE" = xyes; then
44327          # Okay, we built it. Check that it works.
44328
44329  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44330  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44331  METHOD="--with-freetype-src"
44332
44333  # Let's start with an optimistic view of the world :-)
44334  FOUND_FREETYPE=yes
44335
44336  # First look for the canonical freetype main include file ft2build.h.
44337  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44338    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44339    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44340    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44341      # Fail.
44342      FOUND_FREETYPE=no
44343    fi
44344  fi
44345
44346  if test "x$FOUND_FREETYPE" = xyes; then
44347    # Include file found, let's continue the sanity check.
44348    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44349$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44350
44351    # Reset to default value
44352    FREETYPE_BASE_NAME=freetype
44353    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44354    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44355      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44356          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44357        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44358        # for the .6 version explicitly.
44359        FREETYPE_BASE_NAME=freetype.6
44360        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44361        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44362$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44363      else
44364        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44365$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44366        FOUND_FREETYPE=no
44367      fi
44368    else
44369      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44370        # On Windows, we will need both .lib and .dll file.
44371        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44372          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44373$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44374          FOUND_FREETYPE=no
44375        fi
44376      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44377          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44378        # Found lib in isa dir, use that instead.
44379        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44380        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44381$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44382      fi
44383    fi
44384  fi
44385
44386  if test "x$FOUND_FREETYPE" = xyes; then
44387
44388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44389
44390  # Input might be given as Windows format, start by converting to
44391  # unix format.
44392  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44393  new_path=`$CYGPATH -u "$path"`
44394
44395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44398  # "foo.exe" is OK but "foo" is an error.
44399  #
44400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44401  # It is also a way to make sure we got the proper file name for the real test later on.
44402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44403  if test "x$test_shortpath" = x; then
44404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44405$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44406    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44407  fi
44408
44409  # Call helper function which possibly converts this using DOS-style short mode.
44410  # If so, the updated path is stored in $new_path.
44411
44412  input_path="$new_path"
44413  # Check if we need to convert this using DOS-style short mode. If the path
44414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44415  # take no chances and rewrite it.
44416  # Note: m4 eats our [], so we need to use [ and ] instead.
44417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44418  if test "x$has_forbidden_chars" != x; then
44419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44423      # Going to short mode and back again did indeed matter. Since short mode is
44424      # case insensitive, let's make it lowercase to improve readability.
44425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44426      # Now convert it back to Unix-stile (cygpath)
44427      input_path=`$CYGPATH -u "$shortmode_path"`
44428      new_path="$input_path"
44429    fi
44430  fi
44431
44432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44433  if test "x$test_cygdrive_prefix" = x; then
44434    # As a simple fix, exclude /usr/bin since it's not a real path.
44435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44437      # a path prefixed by /cygdrive for fixpath to work.
44438      new_path="$CYGWIN_ROOT_PATH$input_path"
44439    fi
44440  fi
44441
44442
44443  if test "x$path" != "x$new_path"; then
44444    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44447  fi
44448
44449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44450
44451  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44452  has_colon=`$ECHO $path | $GREP ^.:`
44453  new_path="$path"
44454  if test "x$has_colon" = x; then
44455    # Not in mixed or Windows style, start by that.
44456    new_path=`cmd //c echo $path`
44457  fi
44458
44459
44460  input_path="$new_path"
44461  # Check if we need to convert this using DOS-style short mode. If the path
44462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44463  # take no chances and rewrite it.
44464  # Note: m4 eats our [], so we need to use [ and ] instead.
44465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44466  if test "x$has_forbidden_chars" != x; then
44467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44469  fi
44470
44471
44472  windows_path="$new_path"
44473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44474    unix_path=`$CYGPATH -u "$windows_path"`
44475    new_path="$unix_path"
44476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44478    new_path="$unix_path"
44479  fi
44480
44481  if test "x$path" != "x$new_path"; then
44482    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44485  fi
44486
44487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44489
44490  else
44491    # We're on a unix platform. Hooray! :)
44492    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44493    has_space=`$ECHO "$path" | $GREP " "`
44494    if test "x$has_space" != x; then
44495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44496$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44497      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44498    fi
44499
44500    # Use eval to expand a potential ~
44501    eval path="$path"
44502    if test ! -f "$path" && test ! -d "$path"; then
44503      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44504    fi
44505
44506    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44507  fi
44508
44509
44510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44511
44512  # Input might be given as Windows format, start by converting to
44513  # unix format.
44514  path="$POTENTIAL_FREETYPE_LIB_PATH"
44515  new_path=`$CYGPATH -u "$path"`
44516
44517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44520  # "foo.exe" is OK but "foo" is an error.
44521  #
44522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44523  # It is also a way to make sure we got the proper file name for the real test later on.
44524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44525  if test "x$test_shortpath" = x; then
44526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44527$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44528    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44529  fi
44530
44531  # Call helper function which possibly converts this using DOS-style short mode.
44532  # If so, the updated path is stored in $new_path.
44533
44534  input_path="$new_path"
44535  # Check if we need to convert this using DOS-style short mode. If the path
44536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44537  # take no chances and rewrite it.
44538  # Note: m4 eats our [], so we need to use [ and ] instead.
44539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44540  if test "x$has_forbidden_chars" != x; then
44541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44545      # Going to short mode and back again did indeed matter. Since short mode is
44546      # case insensitive, let's make it lowercase to improve readability.
44547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44548      # Now convert it back to Unix-stile (cygpath)
44549      input_path=`$CYGPATH -u "$shortmode_path"`
44550      new_path="$input_path"
44551    fi
44552  fi
44553
44554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44555  if test "x$test_cygdrive_prefix" = x; then
44556    # As a simple fix, exclude /usr/bin since it's not a real path.
44557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44559      # a path prefixed by /cygdrive for fixpath to work.
44560      new_path="$CYGWIN_ROOT_PATH$input_path"
44561    fi
44562  fi
44563
44564
44565  if test "x$path" != "x$new_path"; then
44566    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44569  fi
44570
44571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44572
44573  path="$POTENTIAL_FREETYPE_LIB_PATH"
44574  has_colon=`$ECHO $path | $GREP ^.:`
44575  new_path="$path"
44576  if test "x$has_colon" = x; then
44577    # Not in mixed or Windows style, start by that.
44578    new_path=`cmd //c echo $path`
44579  fi
44580
44581
44582  input_path="$new_path"
44583  # Check if we need to convert this using DOS-style short mode. If the path
44584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44585  # take no chances and rewrite it.
44586  # Note: m4 eats our [], so we need to use [ and ] instead.
44587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44588  if test "x$has_forbidden_chars" != x; then
44589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44591  fi
44592
44593
44594  windows_path="$new_path"
44595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44596    unix_path=`$CYGPATH -u "$windows_path"`
44597    new_path="$unix_path"
44598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44600    new_path="$unix_path"
44601  fi
44602
44603  if test "x$path" != "x$new_path"; then
44604    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44607  fi
44608
44609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44611
44612  else
44613    # We're on a unix platform. Hooray! :)
44614    path="$POTENTIAL_FREETYPE_LIB_PATH"
44615    has_space=`$ECHO "$path" | $GREP " "`
44616    if test "x$has_space" != x; then
44617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44619      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44620    fi
44621
44622    # Use eval to expand a potential ~
44623    eval path="$path"
44624    if test ! -f "$path" && test ! -d "$path"; then
44625      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44626    fi
44627
44628    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44629  fi
44630
44631
44632    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44634$as_echo_n "checking for freetype includes... " >&6; }
44635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44636$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44637    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44639$as_echo_n "checking for freetype libraries... " >&6; }
44640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44641$as_echo "$FREETYPE_LIB_PATH" >&6; }
44642  fi
44643
44644          if test "x$FOUND_FREETYPE" != xyes; then
44645            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44646          fi
44647        else
44648          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44649$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44650          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44651        fi
44652      else
44653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44654$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44655      fi
44656    fi
44657
44658    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44659      # User has specified settings
44660
44661      if test "x$BUNDLE_FREETYPE" = x; then
44662        # If not specified, default is to bundle freetype
44663        BUNDLE_FREETYPE=yes
44664      fi
44665
44666      if test "x$with_freetype" != x; then
44667        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44668        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44669      fi
44670
44671      # Allow --with-freetype-lib and --with-freetype-include to override
44672      if test "x$with_freetype_include" != x; then
44673        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44674      fi
44675      if test "x$with_freetype_lib" != x; then
44676        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44677      fi
44678
44679      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44680        # Okay, we got it. Check that it works.
44681
44682  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44683  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44684  METHOD="--with-freetype"
44685
44686  # Let's start with an optimistic view of the world :-)
44687  FOUND_FREETYPE=yes
44688
44689  # First look for the canonical freetype main include file ft2build.h.
44690  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44691    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44692    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44693    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44694      # Fail.
44695      FOUND_FREETYPE=no
44696    fi
44697  fi
44698
44699  if test "x$FOUND_FREETYPE" = xyes; then
44700    # Include file found, let's continue the sanity check.
44701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44702$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44703
44704    # Reset to default value
44705    FREETYPE_BASE_NAME=freetype
44706    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44707    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44708      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44709          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44710        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44711        # for the .6 version explicitly.
44712        FREETYPE_BASE_NAME=freetype.6
44713        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44714        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44715$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44716      else
44717        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44718$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44719        FOUND_FREETYPE=no
44720      fi
44721    else
44722      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44723        # On Windows, we will need both .lib and .dll file.
44724        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44725          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44726$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44727          FOUND_FREETYPE=no
44728        fi
44729      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44730          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44731        # Found lib in isa dir, use that instead.
44732        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44733        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44734$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44735      fi
44736    fi
44737  fi
44738
44739  if test "x$FOUND_FREETYPE" = xyes; then
44740
44741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44742
44743  # Input might be given as Windows format, start by converting to
44744  # unix format.
44745  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44746  new_path=`$CYGPATH -u "$path"`
44747
44748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44751  # "foo.exe" is OK but "foo" is an error.
44752  #
44753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44754  # It is also a way to make sure we got the proper file name for the real test later on.
44755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44756  if test "x$test_shortpath" = x; then
44757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44759    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44760  fi
44761
44762  # Call helper function which possibly converts this using DOS-style short mode.
44763  # If so, the updated path is stored in $new_path.
44764
44765  input_path="$new_path"
44766  # Check if we need to convert this using DOS-style short mode. If the path
44767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44768  # take no chances and rewrite it.
44769  # Note: m4 eats our [], so we need to use [ and ] instead.
44770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44771  if test "x$has_forbidden_chars" != x; then
44772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44776      # Going to short mode and back again did indeed matter. Since short mode is
44777      # case insensitive, let's make it lowercase to improve readability.
44778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44779      # Now convert it back to Unix-stile (cygpath)
44780      input_path=`$CYGPATH -u "$shortmode_path"`
44781      new_path="$input_path"
44782    fi
44783  fi
44784
44785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44786  if test "x$test_cygdrive_prefix" = x; then
44787    # As a simple fix, exclude /usr/bin since it's not a real path.
44788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44790      # a path prefixed by /cygdrive for fixpath to work.
44791      new_path="$CYGWIN_ROOT_PATH$input_path"
44792    fi
44793  fi
44794
44795
44796  if test "x$path" != "x$new_path"; then
44797    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44800  fi
44801
44802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44803
44804  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44805  has_colon=`$ECHO $path | $GREP ^.:`
44806  new_path="$path"
44807  if test "x$has_colon" = x; then
44808    # Not in mixed or Windows style, start by that.
44809    new_path=`cmd //c echo $path`
44810  fi
44811
44812
44813  input_path="$new_path"
44814  # Check if we need to convert this using DOS-style short mode. If the path
44815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44816  # take no chances and rewrite it.
44817  # Note: m4 eats our [], so we need to use [ and ] instead.
44818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44819  if test "x$has_forbidden_chars" != x; then
44820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44822  fi
44823
44824
44825  windows_path="$new_path"
44826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44827    unix_path=`$CYGPATH -u "$windows_path"`
44828    new_path="$unix_path"
44829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44831    new_path="$unix_path"
44832  fi
44833
44834  if test "x$path" != "x$new_path"; then
44835    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44838  fi
44839
44840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44842
44843  else
44844    # We're on a unix platform. Hooray! :)
44845    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44846    has_space=`$ECHO "$path" | $GREP " "`
44847    if test "x$has_space" != x; then
44848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44850      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44851    fi
44852
44853    # Use eval to expand a potential ~
44854    eval path="$path"
44855    if test ! -f "$path" && test ! -d "$path"; then
44856      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44857    fi
44858
44859    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44860  fi
44861
44862
44863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44864
44865  # Input might be given as Windows format, start by converting to
44866  # unix format.
44867  path="$POTENTIAL_FREETYPE_LIB_PATH"
44868  new_path=`$CYGPATH -u "$path"`
44869
44870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44873  # "foo.exe" is OK but "foo" is an error.
44874  #
44875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44876  # It is also a way to make sure we got the proper file name for the real test later on.
44877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44878  if test "x$test_shortpath" = x; then
44879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44880$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44881    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44882  fi
44883
44884  # Call helper function which possibly converts this using DOS-style short mode.
44885  # If so, the updated path is stored in $new_path.
44886
44887  input_path="$new_path"
44888  # Check if we need to convert this using DOS-style short mode. If the path
44889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44890  # take no chances and rewrite it.
44891  # Note: m4 eats our [], so we need to use [ and ] instead.
44892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44893  if test "x$has_forbidden_chars" != x; then
44894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44898      # Going to short mode and back again did indeed matter. Since short mode is
44899      # case insensitive, let's make it lowercase to improve readability.
44900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44901      # Now convert it back to Unix-stile (cygpath)
44902      input_path=`$CYGPATH -u "$shortmode_path"`
44903      new_path="$input_path"
44904    fi
44905  fi
44906
44907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44908  if test "x$test_cygdrive_prefix" = x; then
44909    # As a simple fix, exclude /usr/bin since it's not a real path.
44910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44912      # a path prefixed by /cygdrive for fixpath to work.
44913      new_path="$CYGWIN_ROOT_PATH$input_path"
44914    fi
44915  fi
44916
44917
44918  if test "x$path" != "x$new_path"; then
44919    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44921$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44922  fi
44923
44924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44925
44926  path="$POTENTIAL_FREETYPE_LIB_PATH"
44927  has_colon=`$ECHO $path | $GREP ^.:`
44928  new_path="$path"
44929  if test "x$has_colon" = x; then
44930    # Not in mixed or Windows style, start by that.
44931    new_path=`cmd //c echo $path`
44932  fi
44933
44934
44935  input_path="$new_path"
44936  # Check if we need to convert this using DOS-style short mode. If the path
44937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44938  # take no chances and rewrite it.
44939  # Note: m4 eats our [], so we need to use [ and ] instead.
44940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44941  if test "x$has_forbidden_chars" != x; then
44942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44944  fi
44945
44946
44947  windows_path="$new_path"
44948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44949    unix_path=`$CYGPATH -u "$windows_path"`
44950    new_path="$unix_path"
44951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44953    new_path="$unix_path"
44954  fi
44955
44956  if test "x$path" != "x$new_path"; then
44957    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44959$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44960  fi
44961
44962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44964
44965  else
44966    # We're on a unix platform. Hooray! :)
44967    path="$POTENTIAL_FREETYPE_LIB_PATH"
44968    has_space=`$ECHO "$path" | $GREP " "`
44969    if test "x$has_space" != x; then
44970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44972      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44973    fi
44974
44975    # Use eval to expand a potential ~
44976    eval path="$path"
44977    if test ! -f "$path" && test ! -d "$path"; then
44978      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44979    fi
44980
44981    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44982  fi
44983
44984
44985    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44987$as_echo_n "checking for freetype includes... " >&6; }
44988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44989$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44990    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44992$as_echo_n "checking for freetype libraries... " >&6; }
44993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44994$as_echo "$FREETYPE_LIB_PATH" >&6; }
44995  fi
44996
44997        if test "x$FOUND_FREETYPE" != xyes; then
44998          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44999        fi
45000      else
45001        # User specified only one of lib or include. This is an error.
45002        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45003          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45004$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45005          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45006        else
45007          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45008$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45009          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45010        fi
45011      fi
45012    else
45013      # User did not specify settings, but we need freetype. Try to locate it.
45014
45015      if test "x$BUNDLE_FREETYPE" = x; then
45016        # If not specified, default is to bundle freetype only on windows
45017        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45018          BUNDLE_FREETYPE=yes
45019        else
45020          BUNDLE_FREETYPE=no
45021        fi
45022      fi
45023
45024      if test "x$FOUND_FREETYPE" != xyes; then
45025        # Check builddeps
45026
45027
45028  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45029    # Source the builddeps file again, to make sure it uses the latest variables!
45030    . $builddepsfile
45031    # Look for a target and build machine specific resource!
45032    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45033    if test "x$resource" = x; then
45034      # Ok, lets instead look for a target specific resource
45035      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45036    fi
45037    if test "x$resource" = x; then
45038      # Ok, lets instead look for a build specific resource
45039      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45040    fi
45041    if test "x$resource" = x; then
45042      # Ok, lets instead look for a generic resource
45043      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45044      resource=${builddep_freetype2}
45045    fi
45046    if test "x$resource" != x; then
45047      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45048$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45049      # If the resource in the builddeps.conf file is an existing directory,
45050      # for example /java/linux/cups
45051      if test -d ${resource}; then
45052        depdir=${resource}
45053      else
45054
45055  # freetype2 is for example mymodule
45056  # $resource is for example libs/general/libmymod_1_2_3.zip
45057  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45058  # $with_builddeps_dir is for example /localhome/builddeps
45059  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45060  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45061  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45062  filename=`basename $resource`
45063  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45064  filebase=${filename%%.*}
45065  extension=${filename#*.}
45066  installdir=$with_builddeps_dir/$filebase
45067  if test ! -f $installdir/$filename.unpacked; then
45068    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45069$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45070    if test ! -d $installdir; then
45071      mkdir -p $installdir
45072    fi
45073    if test ! -d $installdir; then
45074      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45075    fi
45076    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45077    touch $tmpfile
45078    if test ! -f $tmpfile; then
45079      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45080    fi
45081
45082  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45083  # $tmpfile is the local file name for the downloaded file.
45084  VALID_TOOL=no
45085  if test "x$BDEPS_FTP" = xwget; then
45086    VALID_TOOL=yes
45087    wget -O $tmpfile $with_builddeps_server/$resource
45088  fi
45089  if test "x$BDEPS_FTP" = xlftp; then
45090    VALID_TOOL=yes
45091    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45092  fi
45093  if test "x$BDEPS_FTP" = xftp; then
45094    VALID_TOOL=yes
45095    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45096    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45097    FTPUSERPWD=${FTPSERVER%%@*}
45098    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45099      FTPUSER=${userpwd%%:*}
45100      FTPPWD=${userpwd#*@}
45101      FTPSERVER=${FTPSERVER#*@}
45102    else
45103      FTPUSER=ftp
45104      FTPPWD=ftp
45105    fi
45106    # the "pass" command does not work on some
45107    # ftp clients (read ftp.exe) but if it works,
45108    # passive mode is better!
45109    ( \
45110        echo "user $FTPUSER $FTPPWD"        ; \
45111        echo "pass"                         ; \
45112        echo "bin"                          ; \
45113        echo "get $FTPPATH $tmpfile"              ; \
45114    ) | ftp -in $FTPSERVER
45115  fi
45116  if test "x$VALID_TOOL" != xyes; then
45117    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45118  fi
45119
45120    mv $tmpfile $installdir/$filename
45121    if test ! -s $installdir/$filename; then
45122      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45123    fi
45124    case "$extension" in
45125      zip)  echo "Unzipping $installdir/$filename..."
45126        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45127        ;;
45128      tar.gz) echo "Untaring $installdir/$filename..."
45129        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45130        ;;
45131      tgz) echo "Untaring $installdir/$filename..."
45132        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45133        ;;
45134      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45135        ;;
45136    esac
45137  fi
45138  if test -f $installdir/$filename.unpacked; then
45139    depdir=$installdir
45140  fi
45141
45142      fi
45143      # Source the builddeps file again, because in the previous command, the depdir
45144      # was updated to point at the current build dependency install directory.
45145      . $builddepsfile
45146      # Now extract variables from the builddeps.conf files.
45147      theroot=${builddep_freetype2_ROOT}
45148      thecflags=${builddep_freetype2_CFLAGS}
45149      thelibs=${builddep_freetype2_LIBS}
45150      if test "x$depdir" = x; then
45151        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45152      fi
45153      FREETYPE=$depdir
45154      if test "x$theroot" != x; then
45155        FREETYPE="$theroot"
45156      fi
45157      if test "x$thecflags" != x; then
45158        FREETYPE_CFLAGS="$thecflags"
45159      fi
45160      if test "x$thelibs" != x; then
45161        FREETYPE_LIBS="$thelibs"
45162      fi
45163      FOUND_FREETYPE=yes
45164      else FOUND_FREETYPE=no
45165
45166    fi
45167    else FOUND_FREETYPE=no
45168
45169  fi
45170
45171        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45172        if test "x$FOUND_FREETYPE" = xyes; then
45173          if test "x$BUNDLE_FREETYPE" = xyes; then
45174            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45175$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45176            FOUND_FREETYPE=no
45177          else
45178            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45179$as_echo_n "checking for freetype... " >&6; }
45180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45181$as_echo "yes (using builddeps)" >&6; }
45182          fi
45183        fi
45184      fi
45185
45186      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45187      if test "x$SYSROOT" = x; then
45188        if test "x$FOUND_FREETYPE" != xyes; then
45189          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45190          if test "x$PKG_CONFIG" != x; then
45191
45192pkg_failed=no
45193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45194$as_echo_n "checking for FREETYPE... " >&6; }
45195
45196if test -n "$FREETYPE_CFLAGS"; then
45197    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45206else
45207  pkg_failed=yes
45208fi
45209 else
45210    pkg_failed=untried
45211fi
45212if test -n "$FREETYPE_LIBS"; then
45213    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45214 elif test -n "$PKG_CONFIG"; then
45215    if test -n "$PKG_CONFIG" && \
45216    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45217  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45218  ac_status=$?
45219  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45220  test $ac_status = 0; }; then
45221  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45222else
45223  pkg_failed=yes
45224fi
45225 else
45226    pkg_failed=untried
45227fi
45228
45229
45230
45231if test $pkg_failed = yes; then
45232
45233if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45234        _pkg_short_errors_supported=yes
45235else
45236        _pkg_short_errors_supported=no
45237fi
45238        if test $_pkg_short_errors_supported = yes; then
45239	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45240        else
45241	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45242        fi
45243	# Put the nasty error message in config.log where it belongs
45244	echo "$FREETYPE_PKG_ERRORS" >&5
45245
45246	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45247$as_echo "no" >&6; }
45248                FOUND_FREETYPE=no
45249elif test $pkg_failed = untried; then
45250	FOUND_FREETYPE=no
45251else
45252	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45253	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45255$as_echo "yes" >&6; }
45256	FOUND_FREETYPE=yes
45257fi
45258            if test "x$FOUND_FREETYPE" = xyes; then
45259              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45260              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45261              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45262              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45263                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45264              fi
45265              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45266              if test "x$BUNDLE_FREETYPE" = xyes; then
45267                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45268$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45269                FOUND_FREETYPE=no
45270              else
45271                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45272$as_echo_n "checking for freetype... " >&6; }
45273                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45274$as_echo "yes (using pkg-config)" >&6; }
45275              fi
45276            fi
45277          fi
45278        fi
45279      fi
45280
45281      if test "x$FOUND_FREETYPE" != xyes; then
45282        # Check in well-known locations
45283        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45284          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45285
45286  windows_path="$FREETYPE_BASE_DIR"
45287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45288    unix_path=`$CYGPATH -u "$windows_path"`
45289    FREETYPE_BASE_DIR="$unix_path"
45290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45292    FREETYPE_BASE_DIR="$unix_path"
45293  fi
45294
45295
45296  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45297  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45298  METHOD="well-known location"
45299
45300  # Let's start with an optimistic view of the world :-)
45301  FOUND_FREETYPE=yes
45302
45303  # First look for the canonical freetype main include file ft2build.h.
45304  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45305    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45306    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45307    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45308      # Fail.
45309      FOUND_FREETYPE=no
45310    fi
45311  fi
45312
45313  if test "x$FOUND_FREETYPE" = xyes; then
45314    # Include file found, let's continue the sanity check.
45315    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45316$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45317
45318    # Reset to default value
45319    FREETYPE_BASE_NAME=freetype
45320    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45321    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45322      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45323          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45324        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45325        # for the .6 version explicitly.
45326        FREETYPE_BASE_NAME=freetype.6
45327        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45328        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45329$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45330      else
45331        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45332$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45333        FOUND_FREETYPE=no
45334      fi
45335    else
45336      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45337        # On Windows, we will need both .lib and .dll file.
45338        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45339          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45340$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45341          FOUND_FREETYPE=no
45342        fi
45343      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45344          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45345        # Found lib in isa dir, use that instead.
45346        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45347        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45348$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45349      fi
45350    fi
45351  fi
45352
45353  if test "x$FOUND_FREETYPE" = xyes; then
45354
45355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45356
45357  # Input might be given as Windows format, start by converting to
45358  # unix format.
45359  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45360  new_path=`$CYGPATH -u "$path"`
45361
45362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45365  # "foo.exe" is OK but "foo" is an error.
45366  #
45367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45368  # It is also a way to make sure we got the proper file name for the real test later on.
45369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45370  if test "x$test_shortpath" = x; then
45371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45372$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45373    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45374  fi
45375
45376  # Call helper function which possibly converts this using DOS-style short mode.
45377  # If so, the updated path is stored in $new_path.
45378
45379  input_path="$new_path"
45380  # Check if we need to convert this using DOS-style short mode. If the path
45381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45382  # take no chances and rewrite it.
45383  # Note: m4 eats our [], so we need to use [ and ] instead.
45384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45385  if test "x$has_forbidden_chars" != x; then
45386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45390      # Going to short mode and back again did indeed matter. Since short mode is
45391      # case insensitive, let's make it lowercase to improve readability.
45392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45393      # Now convert it back to Unix-stile (cygpath)
45394      input_path=`$CYGPATH -u "$shortmode_path"`
45395      new_path="$input_path"
45396    fi
45397  fi
45398
45399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45400  if test "x$test_cygdrive_prefix" = x; then
45401    # As a simple fix, exclude /usr/bin since it's not a real path.
45402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45404      # a path prefixed by /cygdrive for fixpath to work.
45405      new_path="$CYGWIN_ROOT_PATH$input_path"
45406    fi
45407  fi
45408
45409
45410  if test "x$path" != "x$new_path"; then
45411    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45413$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45414  fi
45415
45416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45417
45418  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45419  has_colon=`$ECHO $path | $GREP ^.:`
45420  new_path="$path"
45421  if test "x$has_colon" = x; then
45422    # Not in mixed or Windows style, start by that.
45423    new_path=`cmd //c echo $path`
45424  fi
45425
45426
45427  input_path="$new_path"
45428  # Check if we need to convert this using DOS-style short mode. If the path
45429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45430  # take no chances and rewrite it.
45431  # Note: m4 eats our [], so we need to use [ and ] instead.
45432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45433  if test "x$has_forbidden_chars" != x; then
45434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45436  fi
45437
45438
45439  windows_path="$new_path"
45440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45441    unix_path=`$CYGPATH -u "$windows_path"`
45442    new_path="$unix_path"
45443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45445    new_path="$unix_path"
45446  fi
45447
45448  if test "x$path" != "x$new_path"; then
45449    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45451$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45452  fi
45453
45454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45456
45457  else
45458    # We're on a unix platform. Hooray! :)
45459    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45460    has_space=`$ECHO "$path" | $GREP " "`
45461    if test "x$has_space" != x; then
45462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45463$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45464      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45465    fi
45466
45467    # Use eval to expand a potential ~
45468    eval path="$path"
45469    if test ! -f "$path" && test ! -d "$path"; then
45470      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45471    fi
45472
45473    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45474  fi
45475
45476
45477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45478
45479  # Input might be given as Windows format, start by converting to
45480  # unix format.
45481  path="$POTENTIAL_FREETYPE_LIB_PATH"
45482  new_path=`$CYGPATH -u "$path"`
45483
45484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45487  # "foo.exe" is OK but "foo" is an error.
45488  #
45489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45490  # It is also a way to make sure we got the proper file name for the real test later on.
45491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45492  if test "x$test_shortpath" = x; then
45493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45495    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45496  fi
45497
45498  # Call helper function which possibly converts this using DOS-style short mode.
45499  # If so, the updated path is stored in $new_path.
45500
45501  input_path="$new_path"
45502  # Check if we need to convert this using DOS-style short mode. If the path
45503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45504  # take no chances and rewrite it.
45505  # Note: m4 eats our [], so we need to use [ and ] instead.
45506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45507  if test "x$has_forbidden_chars" != x; then
45508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45512      # Going to short mode and back again did indeed matter. Since short mode is
45513      # case insensitive, let's make it lowercase to improve readability.
45514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45515      # Now convert it back to Unix-stile (cygpath)
45516      input_path=`$CYGPATH -u "$shortmode_path"`
45517      new_path="$input_path"
45518    fi
45519  fi
45520
45521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45522  if test "x$test_cygdrive_prefix" = x; then
45523    # As a simple fix, exclude /usr/bin since it's not a real path.
45524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45526      # a path prefixed by /cygdrive for fixpath to work.
45527      new_path="$CYGWIN_ROOT_PATH$input_path"
45528    fi
45529  fi
45530
45531
45532  if test "x$path" != "x$new_path"; then
45533    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45535$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45536  fi
45537
45538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45539
45540  path="$POTENTIAL_FREETYPE_LIB_PATH"
45541  has_colon=`$ECHO $path | $GREP ^.:`
45542  new_path="$path"
45543  if test "x$has_colon" = x; then
45544    # Not in mixed or Windows style, start by that.
45545    new_path=`cmd //c echo $path`
45546  fi
45547
45548
45549  input_path="$new_path"
45550  # Check if we need to convert this using DOS-style short mode. If the path
45551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45552  # take no chances and rewrite it.
45553  # Note: m4 eats our [], so we need to use [ and ] instead.
45554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45555  if test "x$has_forbidden_chars" != x; then
45556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45558  fi
45559
45560
45561  windows_path="$new_path"
45562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45563    unix_path=`$CYGPATH -u "$windows_path"`
45564    new_path="$unix_path"
45565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45567    new_path="$unix_path"
45568  fi
45569
45570  if test "x$path" != "x$new_path"; then
45571    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45574  fi
45575
45576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45578
45579  else
45580    # We're on a unix platform. Hooray! :)
45581    path="$POTENTIAL_FREETYPE_LIB_PATH"
45582    has_space=`$ECHO "$path" | $GREP " "`
45583    if test "x$has_space" != x; then
45584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45586      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45587    fi
45588
45589    # Use eval to expand a potential ~
45590    eval path="$path"
45591    if test ! -f "$path" && test ! -d "$path"; then
45592      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45593    fi
45594
45595    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45596  fi
45597
45598
45599    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45601$as_echo_n "checking for freetype includes... " >&6; }
45602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45603$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45604    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45606$as_echo_n "checking for freetype libraries... " >&6; }
45607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45608$as_echo "$FREETYPE_LIB_PATH" >&6; }
45609  fi
45610
45611          if test "x$FOUND_FREETYPE" != xyes; then
45612            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45613
45614  windows_path="$FREETYPE_BASE_DIR"
45615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45616    unix_path=`$CYGPATH -u "$windows_path"`
45617    FREETYPE_BASE_DIR="$unix_path"
45618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45620    FREETYPE_BASE_DIR="$unix_path"
45621  fi
45622
45623
45624  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45625  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45626  METHOD="well-known location"
45627
45628  # Let's start with an optimistic view of the world :-)
45629  FOUND_FREETYPE=yes
45630
45631  # First look for the canonical freetype main include file ft2build.h.
45632  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45633    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45634    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45635    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45636      # Fail.
45637      FOUND_FREETYPE=no
45638    fi
45639  fi
45640
45641  if test "x$FOUND_FREETYPE" = xyes; then
45642    # Include file found, let's continue the sanity check.
45643    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45644$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45645
45646    # Reset to default value
45647    FREETYPE_BASE_NAME=freetype
45648    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45649    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45650      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45651          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45652        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45653        # for the .6 version explicitly.
45654        FREETYPE_BASE_NAME=freetype.6
45655        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45656        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45657$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45658      else
45659        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45660$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45661        FOUND_FREETYPE=no
45662      fi
45663    else
45664      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45665        # On Windows, we will need both .lib and .dll file.
45666        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45667          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45668$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45669          FOUND_FREETYPE=no
45670        fi
45671      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45672          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45673        # Found lib in isa dir, use that instead.
45674        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45675        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45676$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45677      fi
45678    fi
45679  fi
45680
45681  if test "x$FOUND_FREETYPE" = xyes; then
45682
45683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45684
45685  # Input might be given as Windows format, start by converting to
45686  # unix format.
45687  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45688  new_path=`$CYGPATH -u "$path"`
45689
45690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45693  # "foo.exe" is OK but "foo" is an error.
45694  #
45695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45696  # It is also a way to make sure we got the proper file name for the real test later on.
45697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45698  if test "x$test_shortpath" = x; then
45699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45700$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45701    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45702  fi
45703
45704  # Call helper function which possibly converts this using DOS-style short mode.
45705  # If so, the updated path is stored in $new_path.
45706
45707  input_path="$new_path"
45708  # Check if we need to convert this using DOS-style short mode. If the path
45709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45710  # take no chances and rewrite it.
45711  # Note: m4 eats our [], so we need to use [ and ] instead.
45712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45713  if test "x$has_forbidden_chars" != x; then
45714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45718      # Going to short mode and back again did indeed matter. Since short mode is
45719      # case insensitive, let's make it lowercase to improve readability.
45720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45721      # Now convert it back to Unix-stile (cygpath)
45722      input_path=`$CYGPATH -u "$shortmode_path"`
45723      new_path="$input_path"
45724    fi
45725  fi
45726
45727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45728  if test "x$test_cygdrive_prefix" = x; then
45729    # As a simple fix, exclude /usr/bin since it's not a real path.
45730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45732      # a path prefixed by /cygdrive for fixpath to work.
45733      new_path="$CYGWIN_ROOT_PATH$input_path"
45734    fi
45735  fi
45736
45737
45738  if test "x$path" != "x$new_path"; then
45739    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45741$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45742  fi
45743
45744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45745
45746  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45747  has_colon=`$ECHO $path | $GREP ^.:`
45748  new_path="$path"
45749  if test "x$has_colon" = x; then
45750    # Not in mixed or Windows style, start by that.
45751    new_path=`cmd //c echo $path`
45752  fi
45753
45754
45755  input_path="$new_path"
45756  # Check if we need to convert this using DOS-style short mode. If the path
45757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45758  # take no chances and rewrite it.
45759  # Note: m4 eats our [], so we need to use [ and ] instead.
45760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45761  if test "x$has_forbidden_chars" != x; then
45762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45764  fi
45765
45766
45767  windows_path="$new_path"
45768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45769    unix_path=`$CYGPATH -u "$windows_path"`
45770    new_path="$unix_path"
45771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45773    new_path="$unix_path"
45774  fi
45775
45776  if test "x$path" != "x$new_path"; then
45777    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45780  fi
45781
45782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45784
45785  else
45786    # We're on a unix platform. Hooray! :)
45787    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45788    has_space=`$ECHO "$path" | $GREP " "`
45789    if test "x$has_space" != x; then
45790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45791$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45792      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45793    fi
45794
45795    # Use eval to expand a potential ~
45796    eval path="$path"
45797    if test ! -f "$path" && test ! -d "$path"; then
45798      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45799    fi
45800
45801    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45802  fi
45803
45804
45805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45806
45807  # Input might be given as Windows format, start by converting to
45808  # unix format.
45809  path="$POTENTIAL_FREETYPE_LIB_PATH"
45810  new_path=`$CYGPATH -u "$path"`
45811
45812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45815  # "foo.exe" is OK but "foo" is an error.
45816  #
45817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45818  # It is also a way to make sure we got the proper file name for the real test later on.
45819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45820  if test "x$test_shortpath" = x; then
45821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45822$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45823    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45824  fi
45825
45826  # Call helper function which possibly converts this using DOS-style short mode.
45827  # If so, the updated path is stored in $new_path.
45828
45829  input_path="$new_path"
45830  # Check if we need to convert this using DOS-style short mode. If the path
45831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45832  # take no chances and rewrite it.
45833  # Note: m4 eats our [], so we need to use [ and ] instead.
45834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45835  if test "x$has_forbidden_chars" != x; then
45836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45840      # Going to short mode and back again did indeed matter. Since short mode is
45841      # case insensitive, let's make it lowercase to improve readability.
45842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45843      # Now convert it back to Unix-stile (cygpath)
45844      input_path=`$CYGPATH -u "$shortmode_path"`
45845      new_path="$input_path"
45846    fi
45847  fi
45848
45849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45850  if test "x$test_cygdrive_prefix" = x; then
45851    # As a simple fix, exclude /usr/bin since it's not a real path.
45852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45854      # a path prefixed by /cygdrive for fixpath to work.
45855      new_path="$CYGWIN_ROOT_PATH$input_path"
45856    fi
45857  fi
45858
45859
45860  if test "x$path" != "x$new_path"; then
45861    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45863$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45864  fi
45865
45866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45867
45868  path="$POTENTIAL_FREETYPE_LIB_PATH"
45869  has_colon=`$ECHO $path | $GREP ^.:`
45870  new_path="$path"
45871  if test "x$has_colon" = x; then
45872    # Not in mixed or Windows style, start by that.
45873    new_path=`cmd //c echo $path`
45874  fi
45875
45876
45877  input_path="$new_path"
45878  # Check if we need to convert this using DOS-style short mode. If the path
45879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45880  # take no chances and rewrite it.
45881  # Note: m4 eats our [], so we need to use [ and ] instead.
45882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45883  if test "x$has_forbidden_chars" != x; then
45884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45886  fi
45887
45888
45889  windows_path="$new_path"
45890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45891    unix_path=`$CYGPATH -u "$windows_path"`
45892    new_path="$unix_path"
45893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45895    new_path="$unix_path"
45896  fi
45897
45898  if test "x$path" != "x$new_path"; then
45899    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45901$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45902  fi
45903
45904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45906
45907  else
45908    # We're on a unix platform. Hooray! :)
45909    path="$POTENTIAL_FREETYPE_LIB_PATH"
45910    has_space=`$ECHO "$path" | $GREP " "`
45911    if test "x$has_space" != x; then
45912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45913$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45914      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45915    fi
45916
45917    # Use eval to expand a potential ~
45918    eval path="$path"
45919    if test ! -f "$path" && test ! -d "$path"; then
45920      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45921    fi
45922
45923    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45924  fi
45925
45926
45927    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45929$as_echo_n "checking for freetype includes... " >&6; }
45930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45931$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45932    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45934$as_echo_n "checking for freetype libraries... " >&6; }
45935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45936$as_echo "$FREETYPE_LIB_PATH" >&6; }
45937  fi
45938
45939          fi
45940        else
45941          FREETYPE_BASE_DIR="$SYSROOT/usr"
45942
45943  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45944  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45945  METHOD="well-known location"
45946
45947  # Let's start with an optimistic view of the world :-)
45948  FOUND_FREETYPE=yes
45949
45950  # First look for the canonical freetype main include file ft2build.h.
45951  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45952    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45953    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45954    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45955      # Fail.
45956      FOUND_FREETYPE=no
45957    fi
45958  fi
45959
45960  if test "x$FOUND_FREETYPE" = xyes; then
45961    # Include file found, let's continue the sanity check.
45962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45963$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45964
45965    # Reset to default value
45966    FREETYPE_BASE_NAME=freetype
45967    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45968    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45969      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45970          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45971        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45972        # for the .6 version explicitly.
45973        FREETYPE_BASE_NAME=freetype.6
45974        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45975        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45976$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45977      else
45978        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45979$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45980        FOUND_FREETYPE=no
45981      fi
45982    else
45983      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45984        # On Windows, we will need both .lib and .dll file.
45985        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45986          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45987$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45988          FOUND_FREETYPE=no
45989        fi
45990      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45991          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45992        # Found lib in isa dir, use that instead.
45993        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45994        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45995$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45996      fi
45997    fi
45998  fi
45999
46000  if test "x$FOUND_FREETYPE" = xyes; then
46001
46002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46003
46004  # Input might be given as Windows format, start by converting to
46005  # unix format.
46006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46007  new_path=`$CYGPATH -u "$path"`
46008
46009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46012  # "foo.exe" is OK but "foo" is an error.
46013  #
46014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46015  # It is also a way to make sure we got the proper file name for the real test later on.
46016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46017  if test "x$test_shortpath" = x; then
46018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46019$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46020    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46021  fi
46022
46023  # Call helper function which possibly converts this using DOS-style short mode.
46024  # If so, the updated path is stored in $new_path.
46025
46026  input_path="$new_path"
46027  # Check if we need to convert this using DOS-style short mode. If the path
46028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46029  # take no chances and rewrite it.
46030  # Note: m4 eats our [], so we need to use [ and ] instead.
46031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46032  if test "x$has_forbidden_chars" != x; then
46033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46037      # Going to short mode and back again did indeed matter. Since short mode is
46038      # case insensitive, let's make it lowercase to improve readability.
46039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46040      # Now convert it back to Unix-stile (cygpath)
46041      input_path=`$CYGPATH -u "$shortmode_path"`
46042      new_path="$input_path"
46043    fi
46044  fi
46045
46046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46047  if test "x$test_cygdrive_prefix" = x; then
46048    # As a simple fix, exclude /usr/bin since it's not a real path.
46049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46051      # a path prefixed by /cygdrive for fixpath to work.
46052      new_path="$CYGWIN_ROOT_PATH$input_path"
46053    fi
46054  fi
46055
46056
46057  if test "x$path" != "x$new_path"; then
46058    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46061  fi
46062
46063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46064
46065  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46066  has_colon=`$ECHO $path | $GREP ^.:`
46067  new_path="$path"
46068  if test "x$has_colon" = x; then
46069    # Not in mixed or Windows style, start by that.
46070    new_path=`cmd //c echo $path`
46071  fi
46072
46073
46074  input_path="$new_path"
46075  # Check if we need to convert this using DOS-style short mode. If the path
46076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46077  # take no chances and rewrite it.
46078  # Note: m4 eats our [], so we need to use [ and ] instead.
46079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46080  if test "x$has_forbidden_chars" != x; then
46081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46083  fi
46084
46085
46086  windows_path="$new_path"
46087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46088    unix_path=`$CYGPATH -u "$windows_path"`
46089    new_path="$unix_path"
46090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46092    new_path="$unix_path"
46093  fi
46094
46095  if test "x$path" != "x$new_path"; then
46096    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46098$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46099  fi
46100
46101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46103
46104  else
46105    # We're on a unix platform. Hooray! :)
46106    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46107    has_space=`$ECHO "$path" | $GREP " "`
46108    if test "x$has_space" != x; then
46109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46111      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46112    fi
46113
46114    # Use eval to expand a potential ~
46115    eval path="$path"
46116    if test ! -f "$path" && test ! -d "$path"; then
46117      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46118    fi
46119
46120    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46121  fi
46122
46123
46124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46125
46126  # Input might be given as Windows format, start by converting to
46127  # unix format.
46128  path="$POTENTIAL_FREETYPE_LIB_PATH"
46129  new_path=`$CYGPATH -u "$path"`
46130
46131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46134  # "foo.exe" is OK but "foo" is an error.
46135  #
46136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46137  # It is also a way to make sure we got the proper file name for the real test later on.
46138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46139  if test "x$test_shortpath" = x; then
46140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46141$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46142    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46143  fi
46144
46145  # Call helper function which possibly converts this using DOS-style short mode.
46146  # If so, the updated path is stored in $new_path.
46147
46148  input_path="$new_path"
46149  # Check if we need to convert this using DOS-style short mode. If the path
46150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46151  # take no chances and rewrite it.
46152  # Note: m4 eats our [], so we need to use [ and ] instead.
46153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46154  if test "x$has_forbidden_chars" != x; then
46155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46159      # Going to short mode and back again did indeed matter. Since short mode is
46160      # case insensitive, let's make it lowercase to improve readability.
46161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46162      # Now convert it back to Unix-stile (cygpath)
46163      input_path=`$CYGPATH -u "$shortmode_path"`
46164      new_path="$input_path"
46165    fi
46166  fi
46167
46168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46169  if test "x$test_cygdrive_prefix" = x; then
46170    # As a simple fix, exclude /usr/bin since it's not a real path.
46171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46173      # a path prefixed by /cygdrive for fixpath to work.
46174      new_path="$CYGWIN_ROOT_PATH$input_path"
46175    fi
46176  fi
46177
46178
46179  if test "x$path" != "x$new_path"; then
46180    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46182$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46183  fi
46184
46185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46186
46187  path="$POTENTIAL_FREETYPE_LIB_PATH"
46188  has_colon=`$ECHO $path | $GREP ^.:`
46189  new_path="$path"
46190  if test "x$has_colon" = x; then
46191    # Not in mixed or Windows style, start by that.
46192    new_path=`cmd //c echo $path`
46193  fi
46194
46195
46196  input_path="$new_path"
46197  # Check if we need to convert this using DOS-style short mode. If the path
46198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46199  # take no chances and rewrite it.
46200  # Note: m4 eats our [], so we need to use [ and ] instead.
46201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46202  if test "x$has_forbidden_chars" != x; then
46203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46205  fi
46206
46207
46208  windows_path="$new_path"
46209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46210    unix_path=`$CYGPATH -u "$windows_path"`
46211    new_path="$unix_path"
46212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46214    new_path="$unix_path"
46215  fi
46216
46217  if test "x$path" != "x$new_path"; then
46218    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46220$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46221  fi
46222
46223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46225
46226  else
46227    # We're on a unix platform. Hooray! :)
46228    path="$POTENTIAL_FREETYPE_LIB_PATH"
46229    has_space=`$ECHO "$path" | $GREP " "`
46230    if test "x$has_space" != x; then
46231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46232$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46233      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46234    fi
46235
46236    # Use eval to expand a potential ~
46237    eval path="$path"
46238    if test ! -f "$path" && test ! -d "$path"; then
46239      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46240    fi
46241
46242    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46243  fi
46244
46245
46246    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46248$as_echo_n "checking for freetype includes... " >&6; }
46249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46250$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46251    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46253$as_echo_n "checking for freetype libraries... " >&6; }
46254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46255$as_echo "$FREETYPE_LIB_PATH" >&6; }
46256  fi
46257
46258
46259          if test "x$FOUND_FREETYPE" != xyes; then
46260            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46261
46262  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46263  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46264  METHOD="well-known location"
46265
46266  # Let's start with an optimistic view of the world :-)
46267  FOUND_FREETYPE=yes
46268
46269  # First look for the canonical freetype main include file ft2build.h.
46270  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46271    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46272    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46273    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46274      # Fail.
46275      FOUND_FREETYPE=no
46276    fi
46277  fi
46278
46279  if test "x$FOUND_FREETYPE" = xyes; then
46280    # Include file found, let's continue the sanity check.
46281    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46282$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46283
46284    # Reset to default value
46285    FREETYPE_BASE_NAME=freetype
46286    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46287    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46288      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46289          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46290        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46291        # for the .6 version explicitly.
46292        FREETYPE_BASE_NAME=freetype.6
46293        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46294        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46295$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46296      else
46297        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46298$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46299        FOUND_FREETYPE=no
46300      fi
46301    else
46302      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46303        # On Windows, we will need both .lib and .dll file.
46304        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46305          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46306$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46307          FOUND_FREETYPE=no
46308        fi
46309      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46310          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46311        # Found lib in isa dir, use that instead.
46312        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46313        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46314$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46315      fi
46316    fi
46317  fi
46318
46319  if test "x$FOUND_FREETYPE" = xyes; then
46320
46321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46322
46323  # Input might be given as Windows format, start by converting to
46324  # unix format.
46325  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46326  new_path=`$CYGPATH -u "$path"`
46327
46328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46331  # "foo.exe" is OK but "foo" is an error.
46332  #
46333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46334  # It is also a way to make sure we got the proper file name for the real test later on.
46335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46336  if test "x$test_shortpath" = x; then
46337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46339    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46340  fi
46341
46342  # Call helper function which possibly converts this using DOS-style short mode.
46343  # If so, the updated path is stored in $new_path.
46344
46345  input_path="$new_path"
46346  # Check if we need to convert this using DOS-style short mode. If the path
46347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46348  # take no chances and rewrite it.
46349  # Note: m4 eats our [], so we need to use [ and ] instead.
46350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46351  if test "x$has_forbidden_chars" != x; then
46352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46356      # Going to short mode and back again did indeed matter. Since short mode is
46357      # case insensitive, let's make it lowercase to improve readability.
46358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46359      # Now convert it back to Unix-stile (cygpath)
46360      input_path=`$CYGPATH -u "$shortmode_path"`
46361      new_path="$input_path"
46362    fi
46363  fi
46364
46365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46366  if test "x$test_cygdrive_prefix" = x; then
46367    # As a simple fix, exclude /usr/bin since it's not a real path.
46368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46370      # a path prefixed by /cygdrive for fixpath to work.
46371      new_path="$CYGWIN_ROOT_PATH$input_path"
46372    fi
46373  fi
46374
46375
46376  if test "x$path" != "x$new_path"; then
46377    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46380  fi
46381
46382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46383
46384  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46385  has_colon=`$ECHO $path | $GREP ^.:`
46386  new_path="$path"
46387  if test "x$has_colon" = x; then
46388    # Not in mixed or Windows style, start by that.
46389    new_path=`cmd //c echo $path`
46390  fi
46391
46392
46393  input_path="$new_path"
46394  # Check if we need to convert this using DOS-style short mode. If the path
46395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46396  # take no chances and rewrite it.
46397  # Note: m4 eats our [], so we need to use [ and ] instead.
46398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46399  if test "x$has_forbidden_chars" != x; then
46400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46402  fi
46403
46404
46405  windows_path="$new_path"
46406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46407    unix_path=`$CYGPATH -u "$windows_path"`
46408    new_path="$unix_path"
46409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46411    new_path="$unix_path"
46412  fi
46413
46414  if test "x$path" != "x$new_path"; then
46415    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46418  fi
46419
46420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46422
46423  else
46424    # We're on a unix platform. Hooray! :)
46425    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46426    has_space=`$ECHO "$path" | $GREP " "`
46427    if test "x$has_space" != x; then
46428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46429$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46431    fi
46432
46433    # Use eval to expand a potential ~
46434    eval path="$path"
46435    if test ! -f "$path" && test ! -d "$path"; then
46436      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46437    fi
46438
46439    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46440  fi
46441
46442
46443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46444
46445  # Input might be given as Windows format, start by converting to
46446  # unix format.
46447  path="$POTENTIAL_FREETYPE_LIB_PATH"
46448  new_path=`$CYGPATH -u "$path"`
46449
46450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46453  # "foo.exe" is OK but "foo" is an error.
46454  #
46455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46456  # It is also a way to make sure we got the proper file name for the real test later on.
46457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46458  if test "x$test_shortpath" = x; then
46459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46460$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46461    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46462  fi
46463
46464  # Call helper function which possibly converts this using DOS-style short mode.
46465  # If so, the updated path is stored in $new_path.
46466
46467  input_path="$new_path"
46468  # Check if we need to convert this using DOS-style short mode. If the path
46469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46470  # take no chances and rewrite it.
46471  # Note: m4 eats our [], so we need to use [ and ] instead.
46472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46473  if test "x$has_forbidden_chars" != x; then
46474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46478      # Going to short mode and back again did indeed matter. Since short mode is
46479      # case insensitive, let's make it lowercase to improve readability.
46480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46481      # Now convert it back to Unix-stile (cygpath)
46482      input_path=`$CYGPATH -u "$shortmode_path"`
46483      new_path="$input_path"
46484    fi
46485  fi
46486
46487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46488  if test "x$test_cygdrive_prefix" = x; then
46489    # As a simple fix, exclude /usr/bin since it's not a real path.
46490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46492      # a path prefixed by /cygdrive for fixpath to work.
46493      new_path="$CYGWIN_ROOT_PATH$input_path"
46494    fi
46495  fi
46496
46497
46498  if test "x$path" != "x$new_path"; then
46499    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46502  fi
46503
46504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46505
46506  path="$POTENTIAL_FREETYPE_LIB_PATH"
46507  has_colon=`$ECHO $path | $GREP ^.:`
46508  new_path="$path"
46509  if test "x$has_colon" = x; then
46510    # Not in mixed or Windows style, start by that.
46511    new_path=`cmd //c echo $path`
46512  fi
46513
46514
46515  input_path="$new_path"
46516  # Check if we need to convert this using DOS-style short mode. If the path
46517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46518  # take no chances and rewrite it.
46519  # Note: m4 eats our [], so we need to use [ and ] instead.
46520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46521  if test "x$has_forbidden_chars" != x; then
46522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46524  fi
46525
46526
46527  windows_path="$new_path"
46528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46529    unix_path=`$CYGPATH -u "$windows_path"`
46530    new_path="$unix_path"
46531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46533    new_path="$unix_path"
46534  fi
46535
46536  if test "x$path" != "x$new_path"; then
46537    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46540  fi
46541
46542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46544
46545  else
46546    # We're on a unix platform. Hooray! :)
46547    path="$POTENTIAL_FREETYPE_LIB_PATH"
46548    has_space=`$ECHO "$path" | $GREP " "`
46549    if test "x$has_space" != x; then
46550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46552      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46553    fi
46554
46555    # Use eval to expand a potential ~
46556    eval path="$path"
46557    if test ! -f "$path" && test ! -d "$path"; then
46558      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46559    fi
46560
46561    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46562  fi
46563
46564
46565    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46567$as_echo_n "checking for freetype includes... " >&6; }
46568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46569$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46570    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46572$as_echo_n "checking for freetype libraries... " >&6; }
46573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46574$as_echo "$FREETYPE_LIB_PATH" >&6; }
46575  fi
46576
46577          fi
46578
46579          if test "x$FOUND_FREETYPE" != xyes; then
46580            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46581
46582  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46583  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46584  METHOD="well-known location"
46585
46586  # Let's start with an optimistic view of the world :-)
46587  FOUND_FREETYPE=yes
46588
46589  # First look for the canonical freetype main include file ft2build.h.
46590  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46591    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46592    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46593    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46594      # Fail.
46595      FOUND_FREETYPE=no
46596    fi
46597  fi
46598
46599  if test "x$FOUND_FREETYPE" = xyes; then
46600    # Include file found, let's continue the sanity check.
46601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46602$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46603
46604    # Reset to default value
46605    FREETYPE_BASE_NAME=freetype
46606    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46607    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46608      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46609          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46610        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46611        # for the .6 version explicitly.
46612        FREETYPE_BASE_NAME=freetype.6
46613        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46614        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46615$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46616      else
46617        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46618$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46619        FOUND_FREETYPE=no
46620      fi
46621    else
46622      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46623        # On Windows, we will need both .lib and .dll file.
46624        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46625          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46626$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46627          FOUND_FREETYPE=no
46628        fi
46629      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46631        # Found lib in isa dir, use that instead.
46632        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46633        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46634$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46635      fi
46636    fi
46637  fi
46638
46639  if test "x$FOUND_FREETYPE" = xyes; then
46640
46641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46642
46643  # Input might be given as Windows format, start by converting to
46644  # unix format.
46645  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46646  new_path=`$CYGPATH -u "$path"`
46647
46648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46651  # "foo.exe" is OK but "foo" is an error.
46652  #
46653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46654  # It is also a way to make sure we got the proper file name for the real test later on.
46655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46656  if test "x$test_shortpath" = x; then
46657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46658$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46659    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46660  fi
46661
46662  # Call helper function which possibly converts this using DOS-style short mode.
46663  # If so, the updated path is stored in $new_path.
46664
46665  input_path="$new_path"
46666  # Check if we need to convert this using DOS-style short mode. If the path
46667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46668  # take no chances and rewrite it.
46669  # Note: m4 eats our [], so we need to use [ and ] instead.
46670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46671  if test "x$has_forbidden_chars" != x; then
46672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46676      # Going to short mode and back again did indeed matter. Since short mode is
46677      # case insensitive, let's make it lowercase to improve readability.
46678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46679      # Now convert it back to Unix-stile (cygpath)
46680      input_path=`$CYGPATH -u "$shortmode_path"`
46681      new_path="$input_path"
46682    fi
46683  fi
46684
46685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46686  if test "x$test_cygdrive_prefix" = x; then
46687    # As a simple fix, exclude /usr/bin since it's not a real path.
46688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46690      # a path prefixed by /cygdrive for fixpath to work.
46691      new_path="$CYGWIN_ROOT_PATH$input_path"
46692    fi
46693  fi
46694
46695
46696  if test "x$path" != "x$new_path"; then
46697    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46699$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46700  fi
46701
46702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46703
46704  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46705  has_colon=`$ECHO $path | $GREP ^.:`
46706  new_path="$path"
46707  if test "x$has_colon" = x; then
46708    # Not in mixed or Windows style, start by that.
46709    new_path=`cmd //c echo $path`
46710  fi
46711
46712
46713  input_path="$new_path"
46714  # Check if we need to convert this using DOS-style short mode. If the path
46715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46716  # take no chances and rewrite it.
46717  # Note: m4 eats our [], so we need to use [ and ] instead.
46718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46719  if test "x$has_forbidden_chars" != x; then
46720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46722  fi
46723
46724
46725  windows_path="$new_path"
46726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46727    unix_path=`$CYGPATH -u "$windows_path"`
46728    new_path="$unix_path"
46729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46731    new_path="$unix_path"
46732  fi
46733
46734  if test "x$path" != "x$new_path"; then
46735    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46738  fi
46739
46740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46742
46743  else
46744    # We're on a unix platform. Hooray! :)
46745    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46746    has_space=`$ECHO "$path" | $GREP " "`
46747    if test "x$has_space" != x; then
46748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46749$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46750      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46751    fi
46752
46753    # Use eval to expand a potential ~
46754    eval path="$path"
46755    if test ! -f "$path" && test ! -d "$path"; then
46756      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46757    fi
46758
46759    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46760  fi
46761
46762
46763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46764
46765  # Input might be given as Windows format, start by converting to
46766  # unix format.
46767  path="$POTENTIAL_FREETYPE_LIB_PATH"
46768  new_path=`$CYGPATH -u "$path"`
46769
46770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46773  # "foo.exe" is OK but "foo" is an error.
46774  #
46775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46776  # It is also a way to make sure we got the proper file name for the real test later on.
46777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46778  if test "x$test_shortpath" = x; then
46779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46780$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46781    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46782  fi
46783
46784  # Call helper function which possibly converts this using DOS-style short mode.
46785  # If so, the updated path is stored in $new_path.
46786
46787  input_path="$new_path"
46788  # Check if we need to convert this using DOS-style short mode. If the path
46789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46790  # take no chances and rewrite it.
46791  # Note: m4 eats our [], so we need to use [ and ] instead.
46792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46793  if test "x$has_forbidden_chars" != x; then
46794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46798      # Going to short mode and back again did indeed matter. Since short mode is
46799      # case insensitive, let's make it lowercase to improve readability.
46800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46801      # Now convert it back to Unix-stile (cygpath)
46802      input_path=`$CYGPATH -u "$shortmode_path"`
46803      new_path="$input_path"
46804    fi
46805  fi
46806
46807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46808  if test "x$test_cygdrive_prefix" = x; then
46809    # As a simple fix, exclude /usr/bin since it's not a real path.
46810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46812      # a path prefixed by /cygdrive for fixpath to work.
46813      new_path="$CYGWIN_ROOT_PATH$input_path"
46814    fi
46815  fi
46816
46817
46818  if test "x$path" != "x$new_path"; then
46819    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46821$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46822  fi
46823
46824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46825
46826  path="$POTENTIAL_FREETYPE_LIB_PATH"
46827  has_colon=`$ECHO $path | $GREP ^.:`
46828  new_path="$path"
46829  if test "x$has_colon" = x; then
46830    # Not in mixed or Windows style, start by that.
46831    new_path=`cmd //c echo $path`
46832  fi
46833
46834
46835  input_path="$new_path"
46836  # Check if we need to convert this using DOS-style short mode. If the path
46837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46838  # take no chances and rewrite it.
46839  # Note: m4 eats our [], so we need to use [ and ] instead.
46840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46841  if test "x$has_forbidden_chars" != x; then
46842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46844  fi
46845
46846
46847  windows_path="$new_path"
46848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46849    unix_path=`$CYGPATH -u "$windows_path"`
46850    new_path="$unix_path"
46851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46853    new_path="$unix_path"
46854  fi
46855
46856  if test "x$path" != "x$new_path"; then
46857    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46859$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46860  fi
46861
46862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46864
46865  else
46866    # We're on a unix platform. Hooray! :)
46867    path="$POTENTIAL_FREETYPE_LIB_PATH"
46868    has_space=`$ECHO "$path" | $GREP " "`
46869    if test "x$has_space" != x; then
46870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46871$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46872      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46873    fi
46874
46875    # Use eval to expand a potential ~
46876    eval path="$path"
46877    if test ! -f "$path" && test ! -d "$path"; then
46878      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46879    fi
46880
46881    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46882  fi
46883
46884
46885    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46887$as_echo_n "checking for freetype includes... " >&6; }
46888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46889$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46890    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46892$as_echo_n "checking for freetype libraries... " >&6; }
46893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46894$as_echo "$FREETYPE_LIB_PATH" >&6; }
46895  fi
46896
46897          fi
46898
46899          if test "x$FOUND_FREETYPE" != xyes; then
46900            FREETYPE_BASE_DIR="$SYSROOT/usr"
46901            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46902
46903  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46904  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46905  METHOD="well-known location"
46906
46907  # Let's start with an optimistic view of the world :-)
46908  FOUND_FREETYPE=yes
46909
46910  # First look for the canonical freetype main include file ft2build.h.
46911  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46912    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46913    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46914    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46915      # Fail.
46916      FOUND_FREETYPE=no
46917    fi
46918  fi
46919
46920  if test "x$FOUND_FREETYPE" = xyes; then
46921    # Include file found, let's continue the sanity check.
46922    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46923$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46924
46925    # Reset to default value
46926    FREETYPE_BASE_NAME=freetype
46927    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46928    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46929      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46930          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46931        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46932        # for the .6 version explicitly.
46933        FREETYPE_BASE_NAME=freetype.6
46934        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46935        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46936$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46937      else
46938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46939$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46940        FOUND_FREETYPE=no
46941      fi
46942    else
46943      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46944        # On Windows, we will need both .lib and .dll file.
46945        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46946          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46947$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46948          FOUND_FREETYPE=no
46949        fi
46950      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46951          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46952        # Found lib in isa dir, use that instead.
46953        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46954        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46955$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46956      fi
46957    fi
46958  fi
46959
46960  if test "x$FOUND_FREETYPE" = xyes; then
46961
46962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46963
46964  # Input might be given as Windows format, start by converting to
46965  # unix format.
46966  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46967  new_path=`$CYGPATH -u "$path"`
46968
46969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46972  # "foo.exe" is OK but "foo" is an error.
46973  #
46974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46975  # It is also a way to make sure we got the proper file name for the real test later on.
46976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46977  if test "x$test_shortpath" = x; then
46978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46980    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46981  fi
46982
46983  # Call helper function which possibly converts this using DOS-style short mode.
46984  # If so, the updated path is stored in $new_path.
46985
46986  input_path="$new_path"
46987  # Check if we need to convert this using DOS-style short mode. If the path
46988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46989  # take no chances and rewrite it.
46990  # Note: m4 eats our [], so we need to use [ and ] instead.
46991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46992  if test "x$has_forbidden_chars" != x; then
46993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46997      # Going to short mode and back again did indeed matter. Since short mode is
46998      # case insensitive, let's make it lowercase to improve readability.
46999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47000      # Now convert it back to Unix-stile (cygpath)
47001      input_path=`$CYGPATH -u "$shortmode_path"`
47002      new_path="$input_path"
47003    fi
47004  fi
47005
47006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47007  if test "x$test_cygdrive_prefix" = x; then
47008    # As a simple fix, exclude /usr/bin since it's not a real path.
47009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47011      # a path prefixed by /cygdrive for fixpath to work.
47012      new_path="$CYGWIN_ROOT_PATH$input_path"
47013    fi
47014  fi
47015
47016
47017  if test "x$path" != "x$new_path"; then
47018    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47021  fi
47022
47023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47024
47025  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47026  has_colon=`$ECHO $path | $GREP ^.:`
47027  new_path="$path"
47028  if test "x$has_colon" = x; then
47029    # Not in mixed or Windows style, start by that.
47030    new_path=`cmd //c echo $path`
47031  fi
47032
47033
47034  input_path="$new_path"
47035  # Check if we need to convert this using DOS-style short mode. If the path
47036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47037  # take no chances and rewrite it.
47038  # Note: m4 eats our [], so we need to use [ and ] instead.
47039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47040  if test "x$has_forbidden_chars" != x; then
47041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47043  fi
47044
47045
47046  windows_path="$new_path"
47047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47048    unix_path=`$CYGPATH -u "$windows_path"`
47049    new_path="$unix_path"
47050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47052    new_path="$unix_path"
47053  fi
47054
47055  if test "x$path" != "x$new_path"; then
47056    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47058$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47059  fi
47060
47061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47063
47064  else
47065    # We're on a unix platform. Hooray! :)
47066    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47067    has_space=`$ECHO "$path" | $GREP " "`
47068    if test "x$has_space" != x; then
47069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47071      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47072    fi
47073
47074    # Use eval to expand a potential ~
47075    eval path="$path"
47076    if test ! -f "$path" && test ! -d "$path"; then
47077      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47078    fi
47079
47080    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47081  fi
47082
47083
47084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47085
47086  # Input might be given as Windows format, start by converting to
47087  # unix format.
47088  path="$POTENTIAL_FREETYPE_LIB_PATH"
47089  new_path=`$CYGPATH -u "$path"`
47090
47091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47094  # "foo.exe" is OK but "foo" is an error.
47095  #
47096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47097  # It is also a way to make sure we got the proper file name for the real test later on.
47098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47099  if test "x$test_shortpath" = x; then
47100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47102    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47103  fi
47104
47105  # Call helper function which possibly converts this using DOS-style short mode.
47106  # If so, the updated path is stored in $new_path.
47107
47108  input_path="$new_path"
47109  # Check if we need to convert this using DOS-style short mode. If the path
47110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47111  # take no chances and rewrite it.
47112  # Note: m4 eats our [], so we need to use [ and ] instead.
47113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47114  if test "x$has_forbidden_chars" != x; then
47115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47119      # Going to short mode and back again did indeed matter. Since short mode is
47120      # case insensitive, let's make it lowercase to improve readability.
47121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47122      # Now convert it back to Unix-stile (cygpath)
47123      input_path=`$CYGPATH -u "$shortmode_path"`
47124      new_path="$input_path"
47125    fi
47126  fi
47127
47128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47129  if test "x$test_cygdrive_prefix" = x; then
47130    # As a simple fix, exclude /usr/bin since it's not a real path.
47131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47133      # a path prefixed by /cygdrive for fixpath to work.
47134      new_path="$CYGWIN_ROOT_PATH$input_path"
47135    fi
47136  fi
47137
47138
47139  if test "x$path" != "x$new_path"; then
47140    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47143  fi
47144
47145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47146
47147  path="$POTENTIAL_FREETYPE_LIB_PATH"
47148  has_colon=`$ECHO $path | $GREP ^.:`
47149  new_path="$path"
47150  if test "x$has_colon" = x; then
47151    # Not in mixed or Windows style, start by that.
47152    new_path=`cmd //c echo $path`
47153  fi
47154
47155
47156  input_path="$new_path"
47157  # Check if we need to convert this using DOS-style short mode. If the path
47158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47159  # take no chances and rewrite it.
47160  # Note: m4 eats our [], so we need to use [ and ] instead.
47161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47162  if test "x$has_forbidden_chars" != x; then
47163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47165  fi
47166
47167
47168  windows_path="$new_path"
47169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47170    unix_path=`$CYGPATH -u "$windows_path"`
47171    new_path="$unix_path"
47172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47174    new_path="$unix_path"
47175  fi
47176
47177  if test "x$path" != "x$new_path"; then
47178    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47181  fi
47182
47183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47185
47186  else
47187    # We're on a unix platform. Hooray! :)
47188    path="$POTENTIAL_FREETYPE_LIB_PATH"
47189    has_space=`$ECHO "$path" | $GREP " "`
47190    if test "x$has_space" != x; then
47191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47194    fi
47195
47196    # Use eval to expand a potential ~
47197    eval path="$path"
47198    if test ! -f "$path" && test ! -d "$path"; then
47199      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47200    fi
47201
47202    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47203  fi
47204
47205
47206    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47208$as_echo_n "checking for freetype includes... " >&6; }
47209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47210$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47211    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47212    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47213$as_echo_n "checking for freetype libraries... " >&6; }
47214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47215$as_echo "$FREETYPE_LIB_PATH" >&6; }
47216  fi
47217
47218            else
47219
47220  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47221  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47222  METHOD="well-known location"
47223
47224  # Let's start with an optimistic view of the world :-)
47225  FOUND_FREETYPE=yes
47226
47227  # First look for the canonical freetype main include file ft2build.h.
47228  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47229    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47230    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47231    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47232      # Fail.
47233      FOUND_FREETYPE=no
47234    fi
47235  fi
47236
47237  if test "x$FOUND_FREETYPE" = xyes; then
47238    # Include file found, let's continue the sanity check.
47239    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47240$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47241
47242    # Reset to default value
47243    FREETYPE_BASE_NAME=freetype
47244    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47245    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47246      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47247          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47248        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47249        # for the .6 version explicitly.
47250        FREETYPE_BASE_NAME=freetype.6
47251        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47252        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47253$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47254      else
47255        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47256$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47257        FOUND_FREETYPE=no
47258      fi
47259    else
47260      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47261        # On Windows, we will need both .lib and .dll file.
47262        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47263          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47264$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47265          FOUND_FREETYPE=no
47266        fi
47267      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47268          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47269        # Found lib in isa dir, use that instead.
47270        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47271        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47272$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47273      fi
47274    fi
47275  fi
47276
47277  if test "x$FOUND_FREETYPE" = xyes; then
47278
47279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47280
47281  # Input might be given as Windows format, start by converting to
47282  # unix format.
47283  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47284  new_path=`$CYGPATH -u "$path"`
47285
47286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47289  # "foo.exe" is OK but "foo" is an error.
47290  #
47291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47292  # It is also a way to make sure we got the proper file name for the real test later on.
47293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47294  if test "x$test_shortpath" = x; then
47295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47297    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47298  fi
47299
47300  # Call helper function which possibly converts this using DOS-style short mode.
47301  # If so, the updated path is stored in $new_path.
47302
47303  input_path="$new_path"
47304  # Check if we need to convert this using DOS-style short mode. If the path
47305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47306  # take no chances and rewrite it.
47307  # Note: m4 eats our [], so we need to use [ and ] instead.
47308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47309  if test "x$has_forbidden_chars" != x; then
47310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47314      # Going to short mode and back again did indeed matter. Since short mode is
47315      # case insensitive, let's make it lowercase to improve readability.
47316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47317      # Now convert it back to Unix-stile (cygpath)
47318      input_path=`$CYGPATH -u "$shortmode_path"`
47319      new_path="$input_path"
47320    fi
47321  fi
47322
47323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47324  if test "x$test_cygdrive_prefix" = x; then
47325    # As a simple fix, exclude /usr/bin since it's not a real path.
47326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47328      # a path prefixed by /cygdrive for fixpath to work.
47329      new_path="$CYGWIN_ROOT_PATH$input_path"
47330    fi
47331  fi
47332
47333
47334  if test "x$path" != "x$new_path"; then
47335    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47338  fi
47339
47340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47341
47342  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47343  has_colon=`$ECHO $path | $GREP ^.:`
47344  new_path="$path"
47345  if test "x$has_colon" = x; then
47346    # Not in mixed or Windows style, start by that.
47347    new_path=`cmd //c echo $path`
47348  fi
47349
47350
47351  input_path="$new_path"
47352  # Check if we need to convert this using DOS-style short mode. If the path
47353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47354  # take no chances and rewrite it.
47355  # Note: m4 eats our [], so we need to use [ and ] instead.
47356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47357  if test "x$has_forbidden_chars" != x; then
47358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47360  fi
47361
47362
47363  windows_path="$new_path"
47364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47365    unix_path=`$CYGPATH -u "$windows_path"`
47366    new_path="$unix_path"
47367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47369    new_path="$unix_path"
47370  fi
47371
47372  if test "x$path" != "x$new_path"; then
47373    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47375$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47376  fi
47377
47378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47380
47381  else
47382    # We're on a unix platform. Hooray! :)
47383    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47384    has_space=`$ECHO "$path" | $GREP " "`
47385    if test "x$has_space" != x; then
47386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47388      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47389    fi
47390
47391    # Use eval to expand a potential ~
47392    eval path="$path"
47393    if test ! -f "$path" && test ! -d "$path"; then
47394      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47395    fi
47396
47397    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47398  fi
47399
47400
47401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47402
47403  # Input might be given as Windows format, start by converting to
47404  # unix format.
47405  path="$POTENTIAL_FREETYPE_LIB_PATH"
47406  new_path=`$CYGPATH -u "$path"`
47407
47408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47411  # "foo.exe" is OK but "foo" is an error.
47412  #
47413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47414  # It is also a way to make sure we got the proper file name for the real test later on.
47415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47416  if test "x$test_shortpath" = x; then
47417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47418$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47419    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47420  fi
47421
47422  # Call helper function which possibly converts this using DOS-style short mode.
47423  # If so, the updated path is stored in $new_path.
47424
47425  input_path="$new_path"
47426  # Check if we need to convert this using DOS-style short mode. If the path
47427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47428  # take no chances and rewrite it.
47429  # Note: m4 eats our [], so we need to use [ and ] instead.
47430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47431  if test "x$has_forbidden_chars" != x; then
47432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47436      # Going to short mode and back again did indeed matter. Since short mode is
47437      # case insensitive, let's make it lowercase to improve readability.
47438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47439      # Now convert it back to Unix-stile (cygpath)
47440      input_path=`$CYGPATH -u "$shortmode_path"`
47441      new_path="$input_path"
47442    fi
47443  fi
47444
47445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47446  if test "x$test_cygdrive_prefix" = x; then
47447    # As a simple fix, exclude /usr/bin since it's not a real path.
47448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47450      # a path prefixed by /cygdrive for fixpath to work.
47451      new_path="$CYGWIN_ROOT_PATH$input_path"
47452    fi
47453  fi
47454
47455
47456  if test "x$path" != "x$new_path"; then
47457    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47459$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47460  fi
47461
47462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47463
47464  path="$POTENTIAL_FREETYPE_LIB_PATH"
47465  has_colon=`$ECHO $path | $GREP ^.:`
47466  new_path="$path"
47467  if test "x$has_colon" = x; then
47468    # Not in mixed or Windows style, start by that.
47469    new_path=`cmd //c echo $path`
47470  fi
47471
47472
47473  input_path="$new_path"
47474  # Check if we need to convert this using DOS-style short mode. If the path
47475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47476  # take no chances and rewrite it.
47477  # Note: m4 eats our [], so we need to use [ and ] instead.
47478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47479  if test "x$has_forbidden_chars" != x; then
47480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47482  fi
47483
47484
47485  windows_path="$new_path"
47486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47487    unix_path=`$CYGPATH -u "$windows_path"`
47488    new_path="$unix_path"
47489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47491    new_path="$unix_path"
47492  fi
47493
47494  if test "x$path" != "x$new_path"; then
47495    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47497$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47498  fi
47499
47500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47502
47503  else
47504    # We're on a unix platform. Hooray! :)
47505    path="$POTENTIAL_FREETYPE_LIB_PATH"
47506    has_space=`$ECHO "$path" | $GREP " "`
47507    if test "x$has_space" != x; then
47508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47509$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47510      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47511    fi
47512
47513    # Use eval to expand a potential ~
47514    eval path="$path"
47515    if test ! -f "$path" && test ! -d "$path"; then
47516      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47517    fi
47518
47519    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47520  fi
47521
47522
47523    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47525$as_echo_n "checking for freetype includes... " >&6; }
47526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47527$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47528    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47530$as_echo_n "checking for freetype libraries... " >&6; }
47531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47532$as_echo "$FREETYPE_LIB_PATH" >&6; }
47533  fi
47534
47535              if test "x$FOUND_FREETYPE" != xyes; then
47536
47537  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47538  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47539  METHOD="well-known location"
47540
47541  # Let's start with an optimistic view of the world :-)
47542  FOUND_FREETYPE=yes
47543
47544  # First look for the canonical freetype main include file ft2build.h.
47545  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47546    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47547    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47548    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47549      # Fail.
47550      FOUND_FREETYPE=no
47551    fi
47552  fi
47553
47554  if test "x$FOUND_FREETYPE" = xyes; then
47555    # Include file found, let's continue the sanity check.
47556    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47557$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47558
47559    # Reset to default value
47560    FREETYPE_BASE_NAME=freetype
47561    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47562    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47563      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47564          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47565        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47566        # for the .6 version explicitly.
47567        FREETYPE_BASE_NAME=freetype.6
47568        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47569        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47570$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47571      else
47572        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47573$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47574        FOUND_FREETYPE=no
47575      fi
47576    else
47577      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47578        # On Windows, we will need both .lib and .dll file.
47579        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47580          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47581$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47582          FOUND_FREETYPE=no
47583        fi
47584      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47585          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47586        # Found lib in isa dir, use that instead.
47587        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47588        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47589$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47590      fi
47591    fi
47592  fi
47593
47594  if test "x$FOUND_FREETYPE" = xyes; then
47595
47596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47597
47598  # Input might be given as Windows format, start by converting to
47599  # unix format.
47600  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47601  new_path=`$CYGPATH -u "$path"`
47602
47603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47606  # "foo.exe" is OK but "foo" is an error.
47607  #
47608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47609  # It is also a way to make sure we got the proper file name for the real test later on.
47610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47611  if test "x$test_shortpath" = x; then
47612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47614    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47615  fi
47616
47617  # Call helper function which possibly converts this using DOS-style short mode.
47618  # If so, the updated path is stored in $new_path.
47619
47620  input_path="$new_path"
47621  # Check if we need to convert this using DOS-style short mode. If the path
47622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47623  # take no chances and rewrite it.
47624  # Note: m4 eats our [], so we need to use [ and ] instead.
47625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47626  if test "x$has_forbidden_chars" != x; then
47627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47631      # Going to short mode and back again did indeed matter. Since short mode is
47632      # case insensitive, let's make it lowercase to improve readability.
47633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47634      # Now convert it back to Unix-stile (cygpath)
47635      input_path=`$CYGPATH -u "$shortmode_path"`
47636      new_path="$input_path"
47637    fi
47638  fi
47639
47640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47641  if test "x$test_cygdrive_prefix" = x; then
47642    # As a simple fix, exclude /usr/bin since it's not a real path.
47643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47645      # a path prefixed by /cygdrive for fixpath to work.
47646      new_path="$CYGWIN_ROOT_PATH$input_path"
47647    fi
47648  fi
47649
47650
47651  if test "x$path" != "x$new_path"; then
47652    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47655  fi
47656
47657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47658
47659  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47660  has_colon=`$ECHO $path | $GREP ^.:`
47661  new_path="$path"
47662  if test "x$has_colon" = x; then
47663    # Not in mixed or Windows style, start by that.
47664    new_path=`cmd //c echo $path`
47665  fi
47666
47667
47668  input_path="$new_path"
47669  # Check if we need to convert this using DOS-style short mode. If the path
47670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47671  # take no chances and rewrite it.
47672  # Note: m4 eats our [], so we need to use [ and ] instead.
47673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47674  if test "x$has_forbidden_chars" != x; then
47675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47677  fi
47678
47679
47680  windows_path="$new_path"
47681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47682    unix_path=`$CYGPATH -u "$windows_path"`
47683    new_path="$unix_path"
47684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47686    new_path="$unix_path"
47687  fi
47688
47689  if test "x$path" != "x$new_path"; then
47690    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47692$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47693  fi
47694
47695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47697
47698  else
47699    # We're on a unix platform. Hooray! :)
47700    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47701    has_space=`$ECHO "$path" | $GREP " "`
47702    if test "x$has_space" != x; then
47703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47705      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47706    fi
47707
47708    # Use eval to expand a potential ~
47709    eval path="$path"
47710    if test ! -f "$path" && test ! -d "$path"; then
47711      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47712    fi
47713
47714    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47715  fi
47716
47717
47718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47719
47720  # Input might be given as Windows format, start by converting to
47721  # unix format.
47722  path="$POTENTIAL_FREETYPE_LIB_PATH"
47723  new_path=`$CYGPATH -u "$path"`
47724
47725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47728  # "foo.exe" is OK but "foo" is an error.
47729  #
47730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47731  # It is also a way to make sure we got the proper file name for the real test later on.
47732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47733  if test "x$test_shortpath" = x; then
47734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47735$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47736    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47737  fi
47738
47739  # Call helper function which possibly converts this using DOS-style short mode.
47740  # If so, the updated path is stored in $new_path.
47741
47742  input_path="$new_path"
47743  # Check if we need to convert this using DOS-style short mode. If the path
47744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47745  # take no chances and rewrite it.
47746  # Note: m4 eats our [], so we need to use [ and ] instead.
47747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47748  if test "x$has_forbidden_chars" != x; then
47749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47753      # Going to short mode and back again did indeed matter. Since short mode is
47754      # case insensitive, let's make it lowercase to improve readability.
47755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47756      # Now convert it back to Unix-stile (cygpath)
47757      input_path=`$CYGPATH -u "$shortmode_path"`
47758      new_path="$input_path"
47759    fi
47760  fi
47761
47762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47763  if test "x$test_cygdrive_prefix" = x; then
47764    # As a simple fix, exclude /usr/bin since it's not a real path.
47765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47767      # a path prefixed by /cygdrive for fixpath to work.
47768      new_path="$CYGWIN_ROOT_PATH$input_path"
47769    fi
47770  fi
47771
47772
47773  if test "x$path" != "x$new_path"; then
47774    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47776$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47777  fi
47778
47779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47780
47781  path="$POTENTIAL_FREETYPE_LIB_PATH"
47782  has_colon=`$ECHO $path | $GREP ^.:`
47783  new_path="$path"
47784  if test "x$has_colon" = x; then
47785    # Not in mixed or Windows style, start by that.
47786    new_path=`cmd //c echo $path`
47787  fi
47788
47789
47790  input_path="$new_path"
47791  # Check if we need to convert this using DOS-style short mode. If the path
47792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47793  # take no chances and rewrite it.
47794  # Note: m4 eats our [], so we need to use [ and ] instead.
47795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47796  if test "x$has_forbidden_chars" != x; then
47797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47799  fi
47800
47801
47802  windows_path="$new_path"
47803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47804    unix_path=`$CYGPATH -u "$windows_path"`
47805    new_path="$unix_path"
47806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47808    new_path="$unix_path"
47809  fi
47810
47811  if test "x$path" != "x$new_path"; then
47812    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47814$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47815  fi
47816
47817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47819
47820  else
47821    # We're on a unix platform. Hooray! :)
47822    path="$POTENTIAL_FREETYPE_LIB_PATH"
47823    has_space=`$ECHO "$path" | $GREP " "`
47824    if test "x$has_space" != x; then
47825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47826$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47827      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47828    fi
47829
47830    # Use eval to expand a potential ~
47831    eval path="$path"
47832    if test ! -f "$path" && test ! -d "$path"; then
47833      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47834    fi
47835
47836    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47837  fi
47838
47839
47840    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47842$as_echo_n "checking for freetype includes... " >&6; }
47843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47844$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47845    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47847$as_echo_n "checking for freetype libraries... " >&6; }
47848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47849$as_echo "$FREETYPE_LIB_PATH" >&6; }
47850  fi
47851
47852              fi
47853            fi
47854          fi
47855        fi
47856      fi # end check in well-known locations
47857
47858      if test "x$FOUND_FREETYPE" != xyes; then
47859
47860  # Print a helpful message on how to acquire the necessary build dependency.
47861  # freetype is the help tag: freetype, cups, pulse, alsa etc
47862  MISSING_DEPENDENCY=freetype
47863
47864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47865    cygwin_help $MISSING_DEPENDENCY
47866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47867    msys_help $MISSING_DEPENDENCY
47868  else
47869    PKGHANDLER_COMMAND=
47870
47871    case $PKGHANDLER in
47872      apt-get)
47873        apt_help     $MISSING_DEPENDENCY ;;
47874      yum)
47875        yum_help     $MISSING_DEPENDENCY ;;
47876      port)
47877        port_help    $MISSING_DEPENDENCY ;;
47878      pkgutil)
47879        pkgutil_help $MISSING_DEPENDENCY ;;
47880      pkgadd)
47881        pkgadd_help  $MISSING_DEPENDENCY ;;
47882    esac
47883
47884    if test "x$PKGHANDLER_COMMAND" != x; then
47885      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47886    fi
47887  fi
47888
47889        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47890      fi
47891    fi # end user specified settings
47892
47893    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47894    if test "x$FREETYPE_CFLAGS" = x; then
47895
47896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47897
47898  # Input might be given as Windows format, start by converting to
47899  # unix format.
47900  path="$FREETYPE_INCLUDE_PATH"
47901  new_path=`$CYGPATH -u "$path"`
47902
47903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47906  # "foo.exe" is OK but "foo" is an error.
47907  #
47908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47909  # It is also a way to make sure we got the proper file name for the real test later on.
47910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47911  if test "x$test_shortpath" = x; then
47912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47913$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47914    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47915  fi
47916
47917  # Call helper function which possibly converts this using DOS-style short mode.
47918  # If so, the updated path is stored in $new_path.
47919
47920  input_path="$new_path"
47921  # Check if we need to convert this using DOS-style short mode. If the path
47922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47923  # take no chances and rewrite it.
47924  # Note: m4 eats our [], so we need to use [ and ] instead.
47925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47926  if test "x$has_forbidden_chars" != x; then
47927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47931      # Going to short mode and back again did indeed matter. Since short mode is
47932      # case insensitive, let's make it lowercase to improve readability.
47933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47934      # Now convert it back to Unix-stile (cygpath)
47935      input_path=`$CYGPATH -u "$shortmode_path"`
47936      new_path="$input_path"
47937    fi
47938  fi
47939
47940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47941  if test "x$test_cygdrive_prefix" = x; then
47942    # As a simple fix, exclude /usr/bin since it's not a real path.
47943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47945      # a path prefixed by /cygdrive for fixpath to work.
47946      new_path="$CYGWIN_ROOT_PATH$input_path"
47947    fi
47948  fi
47949
47950
47951  if test "x$path" != "x$new_path"; then
47952    FREETYPE_INCLUDE_PATH="$new_path"
47953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47954$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47955  fi
47956
47957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47958
47959  path="$FREETYPE_INCLUDE_PATH"
47960  has_colon=`$ECHO $path | $GREP ^.:`
47961  new_path="$path"
47962  if test "x$has_colon" = x; then
47963    # Not in mixed or Windows style, start by that.
47964    new_path=`cmd //c echo $path`
47965  fi
47966
47967
47968  input_path="$new_path"
47969  # Check if we need to convert this using DOS-style short mode. If the path
47970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47971  # take no chances and rewrite it.
47972  # Note: m4 eats our [], so we need to use [ and ] instead.
47973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47974  if test "x$has_forbidden_chars" != x; then
47975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47977  fi
47978
47979
47980  windows_path="$new_path"
47981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47982    unix_path=`$CYGPATH -u "$windows_path"`
47983    new_path="$unix_path"
47984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47986    new_path="$unix_path"
47987  fi
47988
47989  if test "x$path" != "x$new_path"; then
47990    FREETYPE_INCLUDE_PATH="$new_path"
47991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47992$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47993  fi
47994
47995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47997
47998  else
47999    # We're on a unix platform. Hooray! :)
48000    path="$FREETYPE_INCLUDE_PATH"
48001    has_space=`$ECHO "$path" | $GREP " "`
48002    if test "x$has_space" != x; then
48003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48004$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48005      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48006    fi
48007
48008    # Use eval to expand a potential ~
48009    eval path="$path"
48010    if test ! -f "$path" && test ! -d "$path"; then
48011      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48012    fi
48013
48014    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48015  fi
48016
48017      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48018        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48019      else
48020        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48021      fi
48022    fi
48023
48024    if test "x$FREETYPE_LIBS" = x; then
48025
48026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48027
48028  # Input might be given as Windows format, start by converting to
48029  # unix format.
48030  path="$FREETYPE_LIB_PATH"
48031  new_path=`$CYGPATH -u "$path"`
48032
48033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48036  # "foo.exe" is OK but "foo" is an error.
48037  #
48038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48039  # It is also a way to make sure we got the proper file name for the real test later on.
48040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48041  if test "x$test_shortpath" = x; then
48042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48043$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48044    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48045  fi
48046
48047  # Call helper function which possibly converts this using DOS-style short mode.
48048  # If so, the updated path is stored in $new_path.
48049
48050  input_path="$new_path"
48051  # Check if we need to convert this using DOS-style short mode. If the path
48052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48053  # take no chances and rewrite it.
48054  # Note: m4 eats our [], so we need to use [ and ] instead.
48055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48056  if test "x$has_forbidden_chars" != x; then
48057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48061      # Going to short mode and back again did indeed matter. Since short mode is
48062      # case insensitive, let's make it lowercase to improve readability.
48063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48064      # Now convert it back to Unix-stile (cygpath)
48065      input_path=`$CYGPATH -u "$shortmode_path"`
48066      new_path="$input_path"
48067    fi
48068  fi
48069
48070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48071  if test "x$test_cygdrive_prefix" = x; then
48072    # As a simple fix, exclude /usr/bin since it's not a real path.
48073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48075      # a path prefixed by /cygdrive for fixpath to work.
48076      new_path="$CYGWIN_ROOT_PATH$input_path"
48077    fi
48078  fi
48079
48080
48081  if test "x$path" != "x$new_path"; then
48082    FREETYPE_LIB_PATH="$new_path"
48083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48084$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48085  fi
48086
48087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48088
48089  path="$FREETYPE_LIB_PATH"
48090  has_colon=`$ECHO $path | $GREP ^.:`
48091  new_path="$path"
48092  if test "x$has_colon" = x; then
48093    # Not in mixed or Windows style, start by that.
48094    new_path=`cmd //c echo $path`
48095  fi
48096
48097
48098  input_path="$new_path"
48099  # Check if we need to convert this using DOS-style short mode. If the path
48100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48101  # take no chances and rewrite it.
48102  # Note: m4 eats our [], so we need to use [ and ] instead.
48103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48104  if test "x$has_forbidden_chars" != x; then
48105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48107  fi
48108
48109
48110  windows_path="$new_path"
48111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48112    unix_path=`$CYGPATH -u "$windows_path"`
48113    new_path="$unix_path"
48114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48116    new_path="$unix_path"
48117  fi
48118
48119  if test "x$path" != "x$new_path"; then
48120    FREETYPE_LIB_PATH="$new_path"
48121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48122$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48123  fi
48124
48125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48127
48128  else
48129    # We're on a unix platform. Hooray! :)
48130    path="$FREETYPE_LIB_PATH"
48131    has_space=`$ECHO "$path" | $GREP " "`
48132    if test "x$has_space" != x; then
48133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48134$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48135      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48136    fi
48137
48138    # Use eval to expand a potential ~
48139    eval path="$path"
48140    if test ! -f "$path" && test ! -d "$path"; then
48141      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48142    fi
48143
48144    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48145  fi
48146
48147      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48148        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48149      else
48150        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48151      fi
48152    fi
48153
48154    # Try to compile it
48155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48156$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48157    ac_ext=cpp
48158ac_cpp='$CXXCPP $CPPFLAGS'
48159ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48160ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48161ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48162
48163    PREV_CXXCFLAGS="$CXXFLAGS"
48164    PREV_LIBS="$LIBS"
48165    PREV_CXX="$CXX"
48166    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48167    LIBS="$LIBS $FREETYPE_LIBS"
48168    CXX="$FIXPATH $CXX"
48169    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48170/* end confdefs.h.  */
48171
48172          #include<ft2build.h>
48173          #include FT_FREETYPE_H
48174          int main () {
48175            FT_Init_FreeType(NULL);
48176            return 0;
48177          }
48178
48179_ACEOF
48180if ac_fn_cxx_try_link "$LINENO"; then :
48181
48182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48183$as_echo "yes" >&6; }
48184
48185else
48186
48187          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48188$as_echo "no" >&6; }
48189          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48190$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48191          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48192$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48193
48194
48195  # Print a helpful message on how to acquire the necessary build dependency.
48196  # freetype is the help tag: freetype, cups, pulse, alsa etc
48197  MISSING_DEPENDENCY=freetype
48198
48199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48200    cygwin_help $MISSING_DEPENDENCY
48201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48202    msys_help $MISSING_DEPENDENCY
48203  else
48204    PKGHANDLER_COMMAND=
48205
48206    case $PKGHANDLER in
48207      apt-get)
48208        apt_help     $MISSING_DEPENDENCY ;;
48209      yum)
48210        yum_help     $MISSING_DEPENDENCY ;;
48211      port)
48212        port_help    $MISSING_DEPENDENCY ;;
48213      pkgutil)
48214        pkgutil_help $MISSING_DEPENDENCY ;;
48215      pkgadd)
48216        pkgadd_help  $MISSING_DEPENDENCY ;;
48217    esac
48218
48219    if test "x$PKGHANDLER_COMMAND" != x; then
48220      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48221    fi
48222  fi
48223
48224
48225          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48226
48227
48228fi
48229rm -f core conftest.err conftest.$ac_objext \
48230    conftest$ac_exeext conftest.$ac_ext
48231    CXXCFLAGS="$PREV_CXXFLAGS"
48232    LIBS="$PREV_LIBS"
48233    CXX="$PREV_CXX"
48234    ac_ext=cpp
48235ac_cpp='$CXXCPP $CPPFLAGS'
48236ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48237ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48238ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48239
48240
48241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48242$as_echo_n "checking if we should bundle freetype... " >&6; }
48243    if test "x$BUNDLE_FREETYPE" = xyes; then
48244      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48245    fi
48246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48247$as_echo "$BUNDLE_FREETYPE" >&6; }
48248
48249  fi # end freetype needed
48250
48251
48252
48253
48254
48255
48256
48257  ###############################################################################
48258  #
48259  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48260  #
48261
48262# Check whether --with-alsa was given.
48263if test "${with_alsa+set}" = set; then :
48264  withval=$with_alsa;
48265fi
48266
48267
48268# Check whether --with-alsa-include was given.
48269if test "${with_alsa_include+set}" = set; then :
48270  withval=$with_alsa_include;
48271fi
48272
48273
48274# Check whether --with-alsa-lib was given.
48275if test "${with_alsa_lib+set}" = set; then :
48276  withval=$with_alsa_lib;
48277fi
48278
48279
48280  if test "x$ALSA_NOT_NEEDED" = xyes; then
48281    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48282      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48283$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48284    fi
48285    ALSA_CFLAGS=
48286    ALSA_LIBS=
48287  else
48288    ALSA_FOUND=no
48289
48290    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48291      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48292    fi
48293
48294    if test "x${with_alsa}" != x; then
48295      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48296      ALSA_CFLAGS="-I${with_alsa}/include"
48297      ALSA_FOUND=yes
48298    fi
48299    if test "x${with_alsa_include}" != x; then
48300      ALSA_CFLAGS="-I${with_alsa_include}"
48301      ALSA_FOUND=yes
48302    fi
48303    if test "x${with_alsa_lib}" != x; then
48304      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48305      ALSA_FOUND=yes
48306    fi
48307    if test "x$ALSA_FOUND" = xno; then
48308
48309
48310  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48311    # Source the builddeps file again, to make sure it uses the latest variables!
48312    . $builddepsfile
48313    # Look for a target and build machine specific resource!
48314    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48315    if test "x$resource" = x; then
48316      # Ok, lets instead look for a target specific resource
48317      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48318    fi
48319    if test "x$resource" = x; then
48320      # Ok, lets instead look for a build specific resource
48321      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48322    fi
48323    if test "x$resource" = x; then
48324      # Ok, lets instead look for a generic resource
48325      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48326      resource=${builddep_alsa}
48327    fi
48328    if test "x$resource" != x; then
48329      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48330$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48331      # If the resource in the builddeps.conf file is an existing directory,
48332      # for example /java/linux/cups
48333      if test -d ${resource}; then
48334        depdir=${resource}
48335      else
48336
48337  # alsa is for example mymodule
48338  # $resource is for example libs/general/libmymod_1_2_3.zip
48339  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48340  # $with_builddeps_dir is for example /localhome/builddeps
48341  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48342  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48343  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48344  filename=`basename $resource`
48345  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48346  filebase=${filename%%.*}
48347  extension=${filename#*.}
48348  installdir=$with_builddeps_dir/$filebase
48349  if test ! -f $installdir/$filename.unpacked; then
48350    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48351$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48352    if test ! -d $installdir; then
48353      mkdir -p $installdir
48354    fi
48355    if test ! -d $installdir; then
48356      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48357    fi
48358    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48359    touch $tmpfile
48360    if test ! -f $tmpfile; then
48361      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48362    fi
48363
48364  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48365  # $tmpfile is the local file name for the downloaded file.
48366  VALID_TOOL=no
48367  if test "x$BDEPS_FTP" = xwget; then
48368    VALID_TOOL=yes
48369    wget -O $tmpfile $with_builddeps_server/$resource
48370  fi
48371  if test "x$BDEPS_FTP" = xlftp; then
48372    VALID_TOOL=yes
48373    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48374  fi
48375  if test "x$BDEPS_FTP" = xftp; then
48376    VALID_TOOL=yes
48377    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48378    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48379    FTPUSERPWD=${FTPSERVER%%@*}
48380    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48381      FTPUSER=${userpwd%%:*}
48382      FTPPWD=${userpwd#*@}
48383      FTPSERVER=${FTPSERVER#*@}
48384    else
48385      FTPUSER=ftp
48386      FTPPWD=ftp
48387    fi
48388    # the "pass" command does not work on some
48389    # ftp clients (read ftp.exe) but if it works,
48390    # passive mode is better!
48391    ( \
48392        echo "user $FTPUSER $FTPPWD"        ; \
48393        echo "pass"                         ; \
48394        echo "bin"                          ; \
48395        echo "get $FTPPATH $tmpfile"              ; \
48396    ) | ftp -in $FTPSERVER
48397  fi
48398  if test "x$VALID_TOOL" != xyes; then
48399    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48400  fi
48401
48402    mv $tmpfile $installdir/$filename
48403    if test ! -s $installdir/$filename; then
48404      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48405    fi
48406    case "$extension" in
48407      zip)  echo "Unzipping $installdir/$filename..."
48408        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48409        ;;
48410      tar.gz) echo "Untaring $installdir/$filename..."
48411        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48412        ;;
48413      tgz) echo "Untaring $installdir/$filename..."
48414        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48415        ;;
48416      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48417        ;;
48418    esac
48419  fi
48420  if test -f $installdir/$filename.unpacked; then
48421    depdir=$installdir
48422  fi
48423
48424      fi
48425      # Source the builddeps file again, because in the previous command, the depdir
48426      # was updated to point at the current build dependency install directory.
48427      . $builddepsfile
48428      # Now extract variables from the builddeps.conf files.
48429      theroot=${builddep_alsa_ROOT}
48430      thecflags=${builddep_alsa_CFLAGS}
48431      thelibs=${builddep_alsa_LIBS}
48432      if test "x$depdir" = x; then
48433        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48434      fi
48435      ALSA=$depdir
48436      if test "x$theroot" != x; then
48437        ALSA="$theroot"
48438      fi
48439      if test "x$thecflags" != x; then
48440        ALSA_CFLAGS="$thecflags"
48441      fi
48442      if test "x$thelibs" != x; then
48443        ALSA_LIBS="$thelibs"
48444      fi
48445      ALSA_FOUND=yes
48446      else ALSA_FOUND=no
48447
48448    fi
48449    else ALSA_FOUND=no
48450
48451  fi
48452
48453    fi
48454    # Do not try pkg-config if we have a sysroot set.
48455    if test "x$SYSROOT" = x; then
48456      if test "x$ALSA_FOUND" = xno; then
48457
48458pkg_failed=no
48459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48460$as_echo_n "checking for ALSA... " >&6; }
48461
48462if test -n "$ALSA_CFLAGS"; then
48463    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48472else
48473  pkg_failed=yes
48474fi
48475 else
48476    pkg_failed=untried
48477fi
48478if test -n "$ALSA_LIBS"; then
48479    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48480 elif test -n "$PKG_CONFIG"; then
48481    if test -n "$PKG_CONFIG" && \
48482    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48483  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48484  ac_status=$?
48485  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48486  test $ac_status = 0; }; then
48487  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48488else
48489  pkg_failed=yes
48490fi
48491 else
48492    pkg_failed=untried
48493fi
48494
48495
48496
48497if test $pkg_failed = yes; then
48498
48499if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48500        _pkg_short_errors_supported=yes
48501else
48502        _pkg_short_errors_supported=no
48503fi
48504        if test $_pkg_short_errors_supported = yes; then
48505	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48506        else
48507	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48508        fi
48509	# Put the nasty error message in config.log where it belongs
48510	echo "$ALSA_PKG_ERRORS" >&5
48511
48512	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48513$as_echo "no" >&6; }
48514                ALSA_FOUND=no
48515elif test $pkg_failed = untried; then
48516	ALSA_FOUND=no
48517else
48518	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48519	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48521$as_echo "yes" >&6; }
48522	ALSA_FOUND=yes
48523fi
48524      fi
48525    fi
48526    if test "x$ALSA_FOUND" = xno; then
48527      for ac_header in alsa/asoundlib.h
48528do :
48529  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48530if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48531  cat >>confdefs.h <<_ACEOF
48532#define HAVE_ALSA_ASOUNDLIB_H 1
48533_ACEOF
48534
48535            ALSA_FOUND=yes
48536            ALSA_CFLAGS=-Iignoreme
48537            ALSA_LIBS=-lasound
48538            DEFAULT_ALSA=yes
48539
48540else
48541  ALSA_FOUND=no
48542fi
48543
48544done
48545
48546    fi
48547    if test "x$ALSA_FOUND" = xno; then
48548
48549  # Print a helpful message on how to acquire the necessary build dependency.
48550  # alsa is the help tag: freetype, cups, pulse, alsa etc
48551  MISSING_DEPENDENCY=alsa
48552
48553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48554    cygwin_help $MISSING_DEPENDENCY
48555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48556    msys_help $MISSING_DEPENDENCY
48557  else
48558    PKGHANDLER_COMMAND=
48559
48560    case $PKGHANDLER in
48561      apt-get)
48562        apt_help     $MISSING_DEPENDENCY ;;
48563      yum)
48564        yum_help     $MISSING_DEPENDENCY ;;
48565      port)
48566        port_help    $MISSING_DEPENDENCY ;;
48567      pkgutil)
48568        pkgutil_help $MISSING_DEPENDENCY ;;
48569      pkgadd)
48570        pkgadd_help  $MISSING_DEPENDENCY ;;
48571    esac
48572
48573    if test "x$PKGHANDLER_COMMAND" != x; then
48574      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48575    fi
48576  fi
48577
48578      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48579    fi
48580  fi
48581
48582
48583
48584
48585
48586
48587  ###############################################################################
48588  #
48589  # Check for the jpeg library
48590  #
48591
48592
48593# Check whether --with-libjpeg was given.
48594if test "${with_libjpeg+set}" = set; then :
48595  withval=$with_libjpeg;
48596fi
48597
48598
48599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48600$as_echo_n "checking for which libjpeg to use... " >&6; }
48601
48602  # default is bundled
48603  DEFAULT_LIBJPEG=bundled
48604
48605  #
48606  # if user didn't specify, use DEFAULT_LIBJPEG
48607  #
48608  if test "x${with_libjpeg}" = "x"; then
48609    with_libjpeg=${DEFAULT_LIBJPEG}
48610  fi
48611
48612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48613$as_echo "${with_libjpeg}" >&6; }
48614
48615  if test "x${with_libjpeg}" = "xbundled"; then
48616    USE_EXTERNAL_LIBJPEG=false
48617  elif test "x${with_libjpeg}" = "xsystem"; then
48618    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48619if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48620
48621else
48622   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48623fi
48624
48625
48626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48627$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48628if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48629  $as_echo_n "(cached) " >&6
48630else
48631  ac_check_lib_save_LIBS=$LIBS
48632LIBS="-ljpeg  $LIBS"
48633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48634/* end confdefs.h.  */
48635
48636/* Override any GCC internal prototype to avoid an error.
48637   Use char because int might match the return type of a GCC
48638   builtin and then its argument prototype would still apply.  */
48639#ifdef __cplusplus
48640extern "C"
48641#endif
48642char jpeg_CreateDecompress ();
48643int
48644main ()
48645{
48646return jpeg_CreateDecompress ();
48647  ;
48648  return 0;
48649}
48650_ACEOF
48651if ac_fn_cxx_try_link "$LINENO"; then :
48652  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48653else
48654  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48655fi
48656rm -f core conftest.err conftest.$ac_objext \
48657    conftest$ac_exeext conftest.$ac_ext
48658LIBS=$ac_check_lib_save_LIBS
48659fi
48660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48661$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48662if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48663  cat >>confdefs.h <<_ACEOF
48664#define HAVE_LIBJPEG 1
48665_ACEOF
48666
48667  LIBS="-ljpeg $LIBS"
48668
48669else
48670   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48671fi
48672
48673
48674    USE_EXTERNAL_LIBJPEG=true
48675  else
48676    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48677  fi
48678
48679
48680
48681  ###############################################################################
48682  #
48683  # Check for the gif library
48684  #
48685
48686
48687# Check whether --with-giflib was given.
48688if test "${with_giflib+set}" = set; then :
48689  withval=$with_giflib;
48690fi
48691
48692
48693
48694  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48695$as_echo_n "checking for which giflib to use... " >&6; }
48696
48697  # default is bundled
48698  DEFAULT_GIFLIB=bundled
48699
48700  #
48701  # if user didn't specify, use DEFAULT_GIFLIB
48702  #
48703  if test "x${with_giflib}" = "x"; then
48704    with_giflib=${DEFAULT_GIFLIB}
48705  fi
48706
48707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48708$as_echo "${with_giflib}" >&6; }
48709
48710  if test "x${with_giflib}" = "xbundled"; then
48711    USE_EXTERNAL_LIBGIF=false
48712  elif test "x${with_giflib}" = "xsystem"; then
48713    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48714if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48715
48716else
48717   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48718fi
48719
48720
48721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48722$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48723if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48724  $as_echo_n "(cached) " >&6
48725else
48726  ac_check_lib_save_LIBS=$LIBS
48727LIBS="-lgif  $LIBS"
48728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48729/* end confdefs.h.  */
48730
48731/* Override any GCC internal prototype to avoid an error.
48732   Use char because int might match the return type of a GCC
48733   builtin and then its argument prototype would still apply.  */
48734#ifdef __cplusplus
48735extern "C"
48736#endif
48737char DGifGetCode ();
48738int
48739main ()
48740{
48741return DGifGetCode ();
48742  ;
48743  return 0;
48744}
48745_ACEOF
48746if ac_fn_cxx_try_link "$LINENO"; then :
48747  ac_cv_lib_gif_DGifGetCode=yes
48748else
48749  ac_cv_lib_gif_DGifGetCode=no
48750fi
48751rm -f core conftest.err conftest.$ac_objext \
48752    conftest$ac_exeext conftest.$ac_ext
48753LIBS=$ac_check_lib_save_LIBS
48754fi
48755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48756$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48757if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48758  cat >>confdefs.h <<_ACEOF
48759#define HAVE_LIBGIF 1
48760_ACEOF
48761
48762  LIBS="-lgif $LIBS"
48763
48764else
48765   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48766fi
48767
48768
48769    USE_EXTERNAL_LIBGIF=true
48770  else
48771    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48772  fi
48773
48774
48775  ###############################################################################
48776  #
48777  # Check for the lcms2 library
48778  #
48779
48780
48781# Check whether --with-lcms was given.
48782if test "${with_lcms+set}" = set; then :
48783  withval=$with_lcms;
48784fi
48785
48786
48787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48788$as_echo_n "checking for which lcms to use... " >&6; }
48789
48790  DEFAULT_LCMS=bundled
48791
48792  #
48793  # If user didn't specify, use DEFAULT_LCMS
48794  #
48795  if test "x${with_lcms}" = "x"; then
48796      with_lcms=${DEFAULT_LCMS}
48797  fi
48798
48799  if test "x${with_lcms}" = "xbundled"; then
48800    USE_EXTERNAL_LCMS=false
48801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48802$as_echo "bundled" >&6; }
48803  elif test "x${with_lcms}" = "xsystem"; then
48804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48805$as_echo "system" >&6; }
48806
48807pkg_failed=no
48808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48809$as_echo_n "checking for LCMS... " >&6; }
48810
48811if test -n "$LCMS_CFLAGS"; then
48812    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48821else
48822  pkg_failed=yes
48823fi
48824 else
48825    pkg_failed=untried
48826fi
48827if test -n "$LCMS_LIBS"; then
48828    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48829 elif test -n "$PKG_CONFIG"; then
48830    if test -n "$PKG_CONFIG" && \
48831    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48832  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48833  ac_status=$?
48834  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48835  test $ac_status = 0; }; then
48836  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48837else
48838  pkg_failed=yes
48839fi
48840 else
48841    pkg_failed=untried
48842fi
48843
48844
48845
48846if test $pkg_failed = yes; then
48847
48848if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48849        _pkg_short_errors_supported=yes
48850else
48851        _pkg_short_errors_supported=no
48852fi
48853        if test $_pkg_short_errors_supported = yes; then
48854	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48855        else
48856	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48857        fi
48858	# Put the nasty error message in config.log where it belongs
48859	echo "$LCMS_PKG_ERRORS" >&5
48860
48861	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48862$as_echo "no" >&6; }
48863                LCMS_FOUND=no
48864elif test $pkg_failed = untried; then
48865	LCMS_FOUND=no
48866else
48867	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48868	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48870$as_echo "yes" >&6; }
48871	LCMS_FOUND=yes
48872fi
48873    if test "x${LCMS_FOUND}" = "xyes"; then
48874      USE_EXTERNAL_LCMS=true
48875    else
48876      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48877    fi
48878  else
48879    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48880  fi
48881
48882
48883
48884  ###############################################################################
48885  #
48886  # Check for the png library
48887  #
48888
48889
48890# Check whether --with-libpng was given.
48891if test "${with_libpng+set}" = set; then :
48892  withval=$with_libpng;
48893fi
48894
48895
48896
48897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48898$as_echo_n "checking for which libpng to use... " >&6; }
48899
48900  # default is bundled
48901  DEFAULT_LIBPNG=bundled
48902
48903  #
48904  # if user didn't specify, use DEFAULT_LIBPNG
48905  #
48906  if test "x${with_libpng}" = "x"; then
48907      with_libpng=${DEFAULT_LIBPNG}
48908  fi
48909
48910  if test "x${with_libpng}" = "xbundled"; then
48911      USE_EXTERNAL_LIBPNG=false
48912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48913$as_echo "bundled" >&6; }
48914  elif test "x${with_libpng}" = "xsystem"; then
48915
48916pkg_failed=no
48917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48918$as_echo_n "checking for PNG... " >&6; }
48919
48920if test -n "$PNG_CFLAGS"; then
48921    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48930else
48931  pkg_failed=yes
48932fi
48933 else
48934    pkg_failed=untried
48935fi
48936if test -n "$PNG_LIBS"; then
48937    pkg_cv_PNG_LIBS="$PNG_LIBS"
48938 elif test -n "$PKG_CONFIG"; then
48939    if test -n "$PKG_CONFIG" && \
48940    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48941  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48942  ac_status=$?
48943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48944  test $ac_status = 0; }; then
48945  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48946else
48947  pkg_failed=yes
48948fi
48949 else
48950    pkg_failed=untried
48951fi
48952
48953
48954
48955if test $pkg_failed = yes; then
48956
48957if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48958        _pkg_short_errors_supported=yes
48959else
48960        _pkg_short_errors_supported=no
48961fi
48962        if test $_pkg_short_errors_supported = yes; then
48963	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48964        else
48965	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48966        fi
48967	# Put the nasty error message in config.log where it belongs
48968	echo "$PNG_PKG_ERRORS" >&5
48969
48970	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48971$as_echo "no" >&6; }
48972                 LIBPNG_FOUND=no
48973elif test $pkg_failed = untried; then
48974	 LIBPNG_FOUND=no
48975else
48976	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48977	PNG_LIBS=$pkg_cv_PNG_LIBS
48978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48979$as_echo "yes" >&6; }
48980	 LIBPNG_FOUND=yes
48981fi
48982      if test "x${LIBPNG_FOUND}" = "xyes"; then
48983          USE_EXTERNAL_LIBPNG=true
48984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48985$as_echo "system" >&6; }
48986      else
48987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48988$as_echo "system not found" >&6; }
48989          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48990      fi
48991  else
48992      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48993  fi
48994
48995
48996  ###############################################################################
48997  #
48998  # Check for the zlib library
48999  #
49000
49001
49002# Check whether --with-zlib was given.
49003if test "${with_zlib+set}" = set; then :
49004  withval=$with_zlib;
49005fi
49006
49007
49008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49009$as_echo_n "checking for compress in -lz... " >&6; }
49010if ${ac_cv_lib_z_compress+:} false; then :
49011  $as_echo_n "(cached) " >&6
49012else
49013  ac_check_lib_save_LIBS=$LIBS
49014LIBS="-lz  $LIBS"
49015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49016/* end confdefs.h.  */
49017
49018/* Override any GCC internal prototype to avoid an error.
49019   Use char because int might match the return type of a GCC
49020   builtin and then its argument prototype would still apply.  */
49021#ifdef __cplusplus
49022extern "C"
49023#endif
49024char compress ();
49025int
49026main ()
49027{
49028return compress ();
49029  ;
49030  return 0;
49031}
49032_ACEOF
49033if ac_fn_cxx_try_link "$LINENO"; then :
49034  ac_cv_lib_z_compress=yes
49035else
49036  ac_cv_lib_z_compress=no
49037fi
49038rm -f core conftest.err conftest.$ac_objext \
49039    conftest$ac_exeext conftest.$ac_ext
49040LIBS=$ac_check_lib_save_LIBS
49041fi
49042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49043$as_echo "$ac_cv_lib_z_compress" >&6; }
49044if test "x$ac_cv_lib_z_compress" = xyes; then :
49045   ZLIB_FOUND=yes
49046else
49047   ZLIB_FOUND=no
49048fi
49049
49050
49051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49052$as_echo_n "checking for which zlib to use... " >&6; }
49053
49054  DEFAULT_ZLIB=bundled
49055  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49056    #
49057    # On macosx default is system...on others default is
49058    #
49059    DEFAULT_ZLIB=system
49060  fi
49061
49062  if test "x${ZLIB_FOUND}" != "xyes"; then
49063    #
49064    # If we don't find any system...set default to bundled
49065    #
49066    DEFAULT_ZLIB=bundled
49067  fi
49068
49069  #
49070  # If user didn't specify, use DEFAULT_ZLIB
49071  #
49072  if test "x${with_zlib}" = "x"; then
49073    with_zlib=${DEFAULT_ZLIB}
49074  fi
49075
49076  if test "x${with_zlib}" = "xbundled"; then
49077    USE_EXTERNAL_LIBZ=false
49078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49079$as_echo "bundled" >&6; }
49080  elif test "x${with_zlib}" = "xsystem"; then
49081    if test "x${ZLIB_FOUND}" = "xyes"; then
49082      USE_EXTERNAL_LIBZ=true
49083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49084$as_echo "system" >&6; }
49085    else
49086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49087$as_echo "system not found" >&6; }
49088      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49089    fi
49090  else
49091    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49092  fi
49093
49094
49095
49096  ###############################################################################
49097  LIBZIP_CAN_USE_MMAP=true
49098
49099
49100
49101  ###############################################################################
49102  #
49103  # Check if altzone exists in time.h
49104  #
49105
49106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49107/* end confdefs.h.  */
49108#include <time.h>
49109int
49110main ()
49111{
49112return (int)altzone;
49113  ;
49114  return 0;
49115}
49116_ACEOF
49117if ac_fn_cxx_try_link "$LINENO"; then :
49118  has_altzone=yes
49119else
49120  has_altzone=no
49121fi
49122rm -f core conftest.err conftest.$ac_objext \
49123    conftest$ac_exeext conftest.$ac_ext
49124  if test "x$has_altzone" = xyes; then
49125
49126$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49127
49128  fi
49129
49130  ###############################################################################
49131  #
49132  # Check the maths library
49133  #
49134
49135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49136$as_echo_n "checking for cos in -lm... " >&6; }
49137if ${ac_cv_lib_m_cos+:} false; then :
49138  $as_echo_n "(cached) " >&6
49139else
49140  ac_check_lib_save_LIBS=$LIBS
49141LIBS="-lm  $LIBS"
49142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49143/* end confdefs.h.  */
49144
49145/* Override any GCC internal prototype to avoid an error.
49146   Use char because int might match the return type of a GCC
49147   builtin and then its argument prototype would still apply.  */
49148#ifdef __cplusplus
49149extern "C"
49150#endif
49151char cos ();
49152int
49153main ()
49154{
49155return cos ();
49156  ;
49157  return 0;
49158}
49159_ACEOF
49160if ac_fn_cxx_try_link "$LINENO"; then :
49161  ac_cv_lib_m_cos=yes
49162else
49163  ac_cv_lib_m_cos=no
49164fi
49165rm -f core conftest.err conftest.$ac_objext \
49166    conftest$ac_exeext conftest.$ac_ext
49167LIBS=$ac_check_lib_save_LIBS
49168fi
49169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49170$as_echo "$ac_cv_lib_m_cos" >&6; }
49171if test "x$ac_cv_lib_m_cos" = xyes; then :
49172  cat >>confdefs.h <<_ACEOF
49173#define HAVE_LIBM 1
49174_ACEOF
49175
49176  LIBS="-lm $LIBS"
49177
49178else
49179
49180        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49181$as_echo "$as_me: Maths library was not found" >&6;}
49182
49183
49184fi
49185
49186
49187
49188  ###############################################################################
49189  #
49190  # Check for libdl.so
49191
49192  save_LIBS="$LIBS"
49193  LIBS=""
49194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49195$as_echo_n "checking for dlopen in -ldl... " >&6; }
49196if ${ac_cv_lib_dl_dlopen+:} false; then :
49197  $as_echo_n "(cached) " >&6
49198else
49199  ac_check_lib_save_LIBS=$LIBS
49200LIBS="-ldl  $LIBS"
49201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49202/* end confdefs.h.  */
49203
49204/* Override any GCC internal prototype to avoid an error.
49205   Use char because int might match the return type of a GCC
49206   builtin and then its argument prototype would still apply.  */
49207#ifdef __cplusplus
49208extern "C"
49209#endif
49210char dlopen ();
49211int
49212main ()
49213{
49214return dlopen ();
49215  ;
49216  return 0;
49217}
49218_ACEOF
49219if ac_fn_cxx_try_link "$LINENO"; then :
49220  ac_cv_lib_dl_dlopen=yes
49221else
49222  ac_cv_lib_dl_dlopen=no
49223fi
49224rm -f core conftest.err conftest.$ac_objext \
49225    conftest$ac_exeext conftest.$ac_ext
49226LIBS=$ac_check_lib_save_LIBS
49227fi
49228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49229$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49230if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49231  cat >>confdefs.h <<_ACEOF
49232#define HAVE_LIBDL 1
49233_ACEOF
49234
49235  LIBS="-ldl $LIBS"
49236
49237fi
49238
49239  LIBDL="$LIBS"
49240
49241  LIBS="$save_LIBS"
49242
49243
49244  ###############################################################################
49245  #
49246  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49247  # dynamic build is configured on command line.
49248  #
49249
49250# Check whether --with-stdc++lib was given.
49251if test "${with_stdc__lib+set}" = set; then :
49252  withval=$with_stdc__lib;
49253        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49254                && test "x$with_stdc__lib" != xdefault; then
49255          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49256        fi
49257
49258else
49259  with_stdc__lib=default
49260
49261fi
49262
49263
49264  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49265    # Test if -lstdc++ works.
49266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49267$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49268    ac_ext=cpp
49269ac_cpp='$CXXCPP $CPPFLAGS'
49270ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49271ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49272ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49273
49274    OLD_CXXFLAGS="$CXXFLAGS"
49275    CXXFLAGS="$CXXFLAGS -lstdc++"
49276    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49277/* end confdefs.h.  */
49278
49279int
49280main ()
49281{
49282return 0;
49283  ;
49284  return 0;
49285}
49286_ACEOF
49287if ac_fn_cxx_try_link "$LINENO"; then :
49288  has_dynamic_libstdcxx=yes
49289else
49290  has_dynamic_libstdcxx=no
49291fi
49292rm -f core conftest.err conftest.$ac_objext \
49293    conftest$ac_exeext conftest.$ac_ext
49294    CXXFLAGS="$OLD_CXXFLAGS"
49295    ac_ext=cpp
49296ac_cpp='$CXXCPP $CPPFLAGS'
49297ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49298ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49299ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49300
49301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49302$as_echo "$has_dynamic_libstdcxx" >&6; }
49303
49304    # Test if stdc++ can be linked statically.
49305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49306$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49307    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49308    ac_ext=cpp
49309ac_cpp='$CXXCPP $CPPFLAGS'
49310ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49311ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49312ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49313
49314    OLD_LIBS="$LIBS"
49315    OLD_CXX="$CXX"
49316    LIBS="$STATIC_STDCXX_FLAGS"
49317    CXX="$CC"
49318    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49319/* end confdefs.h.  */
49320
49321int
49322main ()
49323{
49324return 0;
49325  ;
49326  return 0;
49327}
49328_ACEOF
49329if ac_fn_cxx_try_link "$LINENO"; then :
49330  has_static_libstdcxx=yes
49331else
49332  has_static_libstdcxx=no
49333fi
49334rm -f core conftest.err conftest.$ac_objext \
49335    conftest$ac_exeext conftest.$ac_ext
49336    LIBS="$OLD_LIBS"
49337    CXX="$OLD_CXX"
49338    ac_ext=cpp
49339ac_cpp='$CXXCPP $CPPFLAGS'
49340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49343
49344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49345$as_echo "$has_static_libstdcxx" >&6; }
49346
49347    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49348      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49349    fi
49350
49351    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49352      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49353    fi
49354
49355    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49356      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49357    fi
49358
49359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49360$as_echo_n "checking how to link with libstdc++... " >&6; }
49361    # If dynamic was requested, it's available since it would fail above otherwise.
49362    # If dynamic wasn't requested, go with static unless it isn't available.
49363    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49364      LIBCXX="$LIBCXX -lstdc++"
49365      LDCXX="$CXX"
49366      STATIC_CXX_SETTING="STATIC_CXX=false"
49367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49368$as_echo "dynamic" >&6; }
49369    else
49370      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49371      LDCXX="$CC"
49372      STATIC_CXX_SETTING="STATIC_CXX=true"
49373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49374$as_echo "static" >&6; }
49375    fi
49376  fi
49377
49378
49379  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49380    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49381
49382pkg_failed=no
49383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49384$as_echo_n "checking for LIBFFI... " >&6; }
49385
49386if test -n "$LIBFFI_CFLAGS"; then
49387    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
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_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49396else
49397  pkg_failed=yes
49398fi
49399 else
49400    pkg_failed=untried
49401fi
49402if test -n "$LIBFFI_LIBS"; then
49403    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49404 elif test -n "$PKG_CONFIG"; then
49405    if test -n "$PKG_CONFIG" && \
49406    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49407  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49408  ac_status=$?
49409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49410  test $ac_status = 0; }; then
49411  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49412else
49413  pkg_failed=yes
49414fi
49415 else
49416    pkg_failed=untried
49417fi
49418
49419
49420
49421if test $pkg_failed = yes; then
49422
49423if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49424        _pkg_short_errors_supported=yes
49425else
49426        _pkg_short_errors_supported=no
49427fi
49428        if test $_pkg_short_errors_supported = yes; then
49429	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49430        else
49431	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49432        fi
49433	# Put the nasty error message in config.log where it belongs
49434	echo "$LIBFFI_PKG_ERRORS" >&5
49435
49436	as_fn_error $? "Package requirements (libffi) were not met:
49437
49438$LIBFFI_PKG_ERRORS
49439
49440Consider adjusting the PKG_CONFIG_PATH environment variable if you
49441installed software in a non-standard prefix.
49442
49443Alternatively, you may set the environment variables LIBFFI_CFLAGS
49444and LIBFFI_LIBS to avoid the need to call pkg-config.
49445See the pkg-config man page for more details.
49446" "$LINENO" 5
49447elif test $pkg_failed = untried; then
49448	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49450as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49451is in your PATH or set the PKG_CONFIG environment variable to the full
49452path to pkg-config.
49453
49454Alternatively, you may set the environment variables LIBFFI_CFLAGS
49455and LIBFFI_LIBS to avoid the need to call pkg-config.
49456See the pkg-config man page for more details.
49457
49458To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49459See \`config.log' for more details" "$LINENO" 5; }
49460else
49461	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49462	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49464$as_echo "yes" >&6; }
49465	:
49466fi
49467
49468  fi
49469
49470  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49471    # Extract the first word of "llvm-config", so it can be a program name with args.
49472set dummy llvm-config; ac_word=$2
49473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49474$as_echo_n "checking for $ac_word... " >&6; }
49475if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49476  $as_echo_n "(cached) " >&6
49477else
49478  if test -n "$LLVM_CONFIG"; then
49479  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49480else
49481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49482for as_dir in $PATH
49483do
49484  IFS=$as_save_IFS
49485  test -z "$as_dir" && as_dir=.
49486    for ac_exec_ext in '' $ac_executable_extensions; do
49487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49488    ac_cv_prog_LLVM_CONFIG="llvm-config"
49489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49490    break 2
49491  fi
49492done
49493  done
49494IFS=$as_save_IFS
49495
49496fi
49497fi
49498LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49499if test -n "$LLVM_CONFIG"; then
49500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49501$as_echo "$LLVM_CONFIG" >&6; }
49502else
49503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49504$as_echo "no" >&6; }
49505fi
49506
49507
49508
49509    if test "x$LLVM_CONFIG" != xllvm-config; then
49510      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49511    fi
49512
49513    llvm_components="jit mcjit engine nativecodegen native"
49514    unset LLVM_CFLAGS
49515    for flag in $("$LLVM_CONFIG" --cxxflags); do
49516      if echo "${flag}" | grep -q '^-[ID]'; then
49517        if test "${flag}" != "-D_DEBUG" ; then
49518          if test "${LLVM_CFLAGS}" != "" ; then
49519            LLVM_CFLAGS="${LLVM_CFLAGS} "
49520          fi
49521          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49522        fi
49523      fi
49524    done
49525    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49526    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49527
49528    unset LLVM_LDFLAGS
49529    for flag in $("${LLVM_CONFIG}" --ldflags); do
49530      if echo "${flag}" | grep -q '^-L'; then
49531        if test "${LLVM_LDFLAGS}" != ""; then
49532          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49533        fi
49534        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49535      fi
49536    done
49537
49538    unset LLVM_LIBS
49539    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49540      if echo "${flag}" | grep -q '^-l'; then
49541        if test "${LLVM_LIBS}" != ""; then
49542          LLVM_LIBS="${LLVM_LIBS} "
49543        fi
49544        LLVM_LIBS="${LLVM_LIBS}${flag}"
49545      fi
49546    done
49547
49548
49549
49550
49551  fi
49552
49553  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49554  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49555    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49556  fi
49557
49558  # TODO better (platform agnostic) test
49559  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49560    LIBCXX="-lstdc++"
49561  fi
49562
49563
49564
49565
49566  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49567
49568
49569# Check whether --with-msvcr-dll was given.
49570if test "${with_msvcr_dll+set}" = set; then :
49571  withval=$with_msvcr_dll;
49572fi
49573
49574
49575  if test "x$with_msvcr_dll" != x; then
49576    # If given explicitely by user, do not probe. If not present, fail directly.
49577
49578  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49579  METHOD="--with-msvcr-dll"
49580  if test -e "$POSSIBLE_MSVCR_DLL"; then
49581    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49582$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49583
49584    # Need to check if the found msvcr is correct architecture
49585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49586$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49587    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49589      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49590      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49591      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49592        CORRECT_MSVCR_ARCH="PE32 executable"
49593      else
49594        CORRECT_MSVCR_ARCH="PE32+ executable"
49595      fi
49596    else
49597      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49598        CORRECT_MSVCR_ARCH=386
49599      else
49600        CORRECT_MSVCR_ARCH=x86-64
49601      fi
49602    fi
49603    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49605$as_echo "ok" >&6; }
49606      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49607      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49608$as_echo_n "checking for msvcr100.dll... " >&6; }
49609      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49610$as_echo "$MSVCR_DLL" >&6; }
49611    else
49612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49613$as_echo "incorrect, ignoring" >&6; }
49614      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49615$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49616    fi
49617  fi
49618
49619    if test "x$MSVCR_DLL" = x; then
49620      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49621    fi
49622  fi
49623
49624  if test "x$MSVCR_DLL" = x; then
49625    # Probe: Using well-known location from Visual Studio 10.0
49626    if test "x$VCINSTALLDIR" != x; then
49627      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49628
49629  windows_path="$CYGWIN_VC_INSTALL_DIR"
49630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49631    unix_path=`$CYGPATH -u "$windows_path"`
49632    CYGWIN_VC_INSTALL_DIR="$unix_path"
49633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49635    CYGWIN_VC_INSTALL_DIR="$unix_path"
49636  fi
49637
49638      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49639        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49640      else
49641        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49642      fi
49643
49644  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49645  METHOD="well-known location in VCINSTALLDIR"
49646  if test -e "$POSSIBLE_MSVCR_DLL"; then
49647    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49648$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49649
49650    # Need to check if the found msvcr is correct architecture
49651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49652$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49653    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49655      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49656      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49657      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49658        CORRECT_MSVCR_ARCH="PE32 executable"
49659      else
49660        CORRECT_MSVCR_ARCH="PE32+ executable"
49661      fi
49662    else
49663      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49664        CORRECT_MSVCR_ARCH=386
49665      else
49666        CORRECT_MSVCR_ARCH=x86-64
49667      fi
49668    fi
49669    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49671$as_echo "ok" >&6; }
49672      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49674$as_echo_n "checking for msvcr100.dll... " >&6; }
49675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49676$as_echo "$MSVCR_DLL" >&6; }
49677    else
49678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49679$as_echo "incorrect, ignoring" >&6; }
49680      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49681$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49682    fi
49683  fi
49684
49685    fi
49686  fi
49687
49688  if test "x$MSVCR_DLL" = x; then
49689    # Probe: Check in the Boot JDK directory.
49690    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49691
49692  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49693  METHOD="well-known location in Boot JDK"
49694  if test -e "$POSSIBLE_MSVCR_DLL"; then
49695    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49696$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49697
49698    # Need to check if the found msvcr is correct architecture
49699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49700$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49701    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49703      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49704      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49705      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49706        CORRECT_MSVCR_ARCH="PE32 executable"
49707      else
49708        CORRECT_MSVCR_ARCH="PE32+ executable"
49709      fi
49710    else
49711      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49712        CORRECT_MSVCR_ARCH=386
49713      else
49714        CORRECT_MSVCR_ARCH=x86-64
49715      fi
49716    fi
49717    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49719$as_echo "ok" >&6; }
49720      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49722$as_echo_n "checking for msvcr100.dll... " >&6; }
49723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49724$as_echo "$MSVCR_DLL" >&6; }
49725    else
49726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49727$as_echo "incorrect, ignoring" >&6; }
49728      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49729$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49730    fi
49731  fi
49732
49733  fi
49734
49735  if test "x$MSVCR_DLL" = x; then
49736    # Probe: Look in the Windows system32 directory
49737    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49738
49739  windows_path="$CYGWIN_SYSTEMROOT"
49740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49741    unix_path=`$CYGPATH -u "$windows_path"`
49742    CYGWIN_SYSTEMROOT="$unix_path"
49743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49745    CYGWIN_SYSTEMROOT="$unix_path"
49746  fi
49747
49748    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49749
49750  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49751  METHOD="well-known location in SYSTEMROOT"
49752  if test -e "$POSSIBLE_MSVCR_DLL"; then
49753    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49754$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49755
49756    # Need to check if the found msvcr is correct architecture
49757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49758$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49759    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49761      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49762      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49763      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49764        CORRECT_MSVCR_ARCH="PE32 executable"
49765      else
49766        CORRECT_MSVCR_ARCH="PE32+ executable"
49767      fi
49768    else
49769      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49770        CORRECT_MSVCR_ARCH=386
49771      else
49772        CORRECT_MSVCR_ARCH=x86-64
49773      fi
49774    fi
49775    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49777$as_echo "ok" >&6; }
49778      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49780$as_echo_n "checking for msvcr100.dll... " >&6; }
49781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49782$as_echo "$MSVCR_DLL" >&6; }
49783    else
49784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49785$as_echo "incorrect, ignoring" >&6; }
49786      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49787$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49788    fi
49789  fi
49790
49791  fi
49792
49793  if test "x$MSVCR_DLL" = x; then
49794    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49795    if test "x$VS100COMNTOOLS" != x; then
49796      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49797
49798  windows_path="$CYGWIN_VS_TOOLS_DIR"
49799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49800    unix_path=`$CYGPATH -u "$windows_path"`
49801    CYGWIN_VS_TOOLS_DIR="$unix_path"
49802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49804    CYGWIN_VS_TOOLS_DIR="$unix_path"
49805  fi
49806
49807      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49808        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49809      else
49810        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49811      fi
49812
49813  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49814  METHOD="search of VS100COMNTOOLS"
49815  if test -e "$POSSIBLE_MSVCR_DLL"; then
49816    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49817$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49818
49819    # Need to check if the found msvcr is correct architecture
49820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49821$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49822    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49824      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49825      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49826      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49827        CORRECT_MSVCR_ARCH="PE32 executable"
49828      else
49829        CORRECT_MSVCR_ARCH="PE32+ executable"
49830      fi
49831    else
49832      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49833        CORRECT_MSVCR_ARCH=386
49834      else
49835        CORRECT_MSVCR_ARCH=x86-64
49836      fi
49837    fi
49838    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49840$as_echo "ok" >&6; }
49841      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49842      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49843$as_echo_n "checking for msvcr100.dll... " >&6; }
49844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49845$as_echo "$MSVCR_DLL" >&6; }
49846    else
49847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49848$as_echo "incorrect, ignoring" >&6; }
49849      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49850$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49851    fi
49852  fi
49853
49854    fi
49855  fi
49856
49857  if test "x$MSVCR_DLL" = x; then
49858    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49859    # (This was the original behaviour; kept since it might turn up something)
49860    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49861      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49862        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49863      else
49864        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49865        if test "x$POSSIBLE_MSVCR_DLL" = x; then
49866          # We're grasping at straws now...
49867          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49868        fi
49869      fi
49870
49871
49872  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49873  METHOD="search of VCINSTALLDIR"
49874  if test -e "$POSSIBLE_MSVCR_DLL"; then
49875    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49876$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49877
49878    # Need to check if the found msvcr is correct architecture
49879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49880$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49881    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49883      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49884      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49885      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49886        CORRECT_MSVCR_ARCH="PE32 executable"
49887      else
49888        CORRECT_MSVCR_ARCH="PE32+ executable"
49889      fi
49890    else
49891      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49892        CORRECT_MSVCR_ARCH=386
49893      else
49894        CORRECT_MSVCR_ARCH=x86-64
49895      fi
49896    fi
49897    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49899$as_echo "ok" >&6; }
49900      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
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: $MSVCR_DLL" >&5
49904$as_echo "$MSVCR_DLL" >&6; }
49905    else
49906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49907$as_echo "incorrect, ignoring" >&6; }
49908      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49909$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49910    fi
49911  fi
49912
49913    fi
49914  fi
49915
49916  if test "x$MSVCR_DLL" = x; then
49917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49918$as_echo_n "checking for msvcr100.dll... " >&6; }
49919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49920$as_echo "no" >&6; }
49921    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49922  fi
49923
49924
49925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49926
49927  # Input might be given as Windows format, start by converting to
49928  # unix format.
49929  path="$MSVCR_DLL"
49930  new_path=`$CYGPATH -u "$path"`
49931
49932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49935  # "foo.exe" is OK but "foo" is an error.
49936  #
49937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49938  # It is also a way to make sure we got the proper file name for the real test later on.
49939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49940  if test "x$test_shortpath" = x; then
49941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49942$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49943    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49944  fi
49945
49946  # Call helper function which possibly converts this using DOS-style short mode.
49947  # If so, the updated path is stored in $new_path.
49948
49949  input_path="$new_path"
49950  # Check if we need to convert this using DOS-style short mode. If the path
49951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49952  # take no chances and rewrite it.
49953  # Note: m4 eats our [], so we need to use [ and ] instead.
49954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49955  if test "x$has_forbidden_chars" != x; then
49956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49960      # Going to short mode and back again did indeed matter. Since short mode is
49961      # case insensitive, let's make it lowercase to improve readability.
49962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49963      # Now convert it back to Unix-stile (cygpath)
49964      input_path=`$CYGPATH -u "$shortmode_path"`
49965      new_path="$input_path"
49966    fi
49967  fi
49968
49969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49970  if test "x$test_cygdrive_prefix" = x; then
49971    # As a simple fix, exclude /usr/bin since it's not a real path.
49972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49974      # a path prefixed by /cygdrive for fixpath to work.
49975      new_path="$CYGWIN_ROOT_PATH$input_path"
49976    fi
49977  fi
49978
49979
49980  if test "x$path" != "x$new_path"; then
49981    MSVCR_DLL="$new_path"
49982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49983$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49984  fi
49985
49986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49987
49988  path="$MSVCR_DLL"
49989  has_colon=`$ECHO $path | $GREP ^.:`
49990  new_path="$path"
49991  if test "x$has_colon" = x; then
49992    # Not in mixed or Windows style, start by that.
49993    new_path=`cmd //c echo $path`
49994  fi
49995
49996
49997  input_path="$new_path"
49998  # Check if we need to convert this using DOS-style short mode. If the path
49999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50000  # take no chances and rewrite it.
50001  # Note: m4 eats our [], so we need to use [ and ] instead.
50002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50003  if test "x$has_forbidden_chars" != x; then
50004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50006  fi
50007
50008
50009  windows_path="$new_path"
50010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50011    unix_path=`$CYGPATH -u "$windows_path"`
50012    new_path="$unix_path"
50013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50015    new_path="$unix_path"
50016  fi
50017
50018  if test "x$path" != "x$new_path"; then
50019    MSVCR_DLL="$new_path"
50020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50021$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50022  fi
50023
50024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50026
50027  else
50028    # We're on a unix platform. Hooray! :)
50029    path="$MSVCR_DLL"
50030    has_space=`$ECHO "$path" | $GREP " "`
50031    if test "x$has_space" != x; then
50032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50033$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50034      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50035    fi
50036
50037    # Use eval to expand a potential ~
50038    eval path="$path"
50039    if test ! -f "$path" && test ! -d "$path"; then
50040      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50041    fi
50042
50043    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50044  fi
50045
50046
50047
50048
50049# Check whether --with-dxsdk was given.
50050if test "${with_dxsdk+set}" = set; then :
50051  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50052$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50053fi
50054
50055
50056
50057
50058# Check whether --with-dxsdk-lib was given.
50059if test "${with_dxsdk_lib+set}" = set; then :
50060  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50061$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50062fi
50063
50064
50065
50066
50067# Check whether --with-dxsdk-include was given.
50068if test "${with_dxsdk_include+set}" = set; then :
50069  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50070$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50071fi
50072
50073
50074  fi
50075
50076
50077
50078###############################################################################
50079#
50080# We need to do some final tweaking, when everything else is done.
50081#
50082###############################################################################
50083
50084
50085  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50086
50087
50088  # The name of the Service Agent jar.
50089  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50090  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50091    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50092  fi
50093
50094
50095
50096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50097$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50098
50099    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50100      ENABLE_INTREE_EC=yes
50101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50102$as_echo "yes" >&6; }
50103    else
50104      ENABLE_INTREE_EC=no
50105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50106$as_echo "no" >&6; }
50107    fi
50108
50109
50110
50111
50112###############################################################################
50113#
50114# Configure parts of the build that only affect the build performance,
50115# not the result.
50116#
50117###############################################################################
50118
50119
50120  # How many cores do we have on this build system?
50121
50122# Check whether --with-num-cores was given.
50123if test "${with_num_cores+set}" = set; then :
50124  withval=$with_num_cores;
50125fi
50126
50127  if test "x$with_num_cores" = x; then
50128    # The number of cores were not specified, try to probe them.
50129
50130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50131$as_echo_n "checking for number of cores... " >&6; }
50132  NUM_CORES=1
50133  FOUND_CORES=no
50134
50135  if test -f /proc/cpuinfo; then
50136    # Looks like a Linux (or cygwin) system
50137    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50138    FOUND_CORES=yes
50139  elif test -x /usr/sbin/psrinfo; then
50140    # Looks like a Solaris system
50141    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50142    FOUND_CORES=yes
50143  elif test -x /usr/sbin/system_profiler; then
50144    # Looks like a MacOSX system
50145    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50146    FOUND_CORES=yes
50147  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50148    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50149    FOUND_CORES=yes
50150  elif test -n "$NUMBER_OF_PROCESSORS"; then
50151    # On windows, look in the env
50152    NUM_CORES=$NUMBER_OF_PROCESSORS
50153    FOUND_CORES=yes
50154  fi
50155
50156  if test "x$FOUND_CORES" = xyes; then
50157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50158$as_echo "$NUM_CORES" >&6; }
50159  else
50160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50161$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50163$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50164  fi
50165
50166  else
50167    NUM_CORES=$with_num_cores
50168  fi
50169
50170
50171
50172  # How much memory do we have on this build system?
50173
50174# Check whether --with-memory-size was given.
50175if test "${with_memory_size+set}" = set; then :
50176  withval=$with_memory_size;
50177fi
50178
50179  if test "x$with_memory_size" = x; then
50180    # The memory size was not specified, try to probe it.
50181
50182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50183$as_echo_n "checking for memory size... " >&6; }
50184  # Default to 1024 MB
50185  MEMORY_SIZE=1024
50186  FOUND_MEM=no
50187
50188  if test -f /proc/meminfo; then
50189    # Looks like a Linux (or cygwin) system
50190    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50191    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50192    FOUND_MEM=yes
50193  elif test -x /usr/sbin/prtconf; then
50194    # Looks like a Solaris or AIX system
50195    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50196    FOUND_MEM=yes
50197  elif test -x /usr/sbin/system_profiler; then
50198    # Looks like a MacOSX system
50199    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50200    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50201    FOUND_MEM=yes
50202  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50203    # Windows, but without cygwin
50204    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50205    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50206    FOUND_MEM=yes
50207  fi
50208
50209  if test "x$FOUND_MEM" = xyes; then
50210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50211$as_echo "$MEMORY_SIZE MB" >&6; }
50212  else
50213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50214$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50215    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50216$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50217  fi
50218
50219  else
50220    MEMORY_SIZE=$with_memory_size
50221  fi
50222
50223
50224
50225  # Provide a decent default number of parallel jobs for make depending on
50226  # number of cores, amount of memory and machine architecture.
50227
50228# Check whether --with-jobs was given.
50229if test "${with_jobs+set}" = set; then :
50230  withval=$with_jobs;
50231fi
50232
50233  if test "x$with_jobs" = x; then
50234    # Number of jobs was not specified, calculate.
50235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50236$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50237    # Approximate memory in GB.
50238    memory_gb=`expr $MEMORY_SIZE / 1024`
50239    # Pick the lowest of memory in gb and number of cores.
50240    if test "$memory_gb" -lt "$NUM_CORES"; then
50241      JOBS="$memory_gb"
50242    else
50243      JOBS="$NUM_CORES"
50244      # On bigger machines, leave some room for other processes to run
50245      if test "$JOBS" -gt "4"; then
50246        JOBS=`expr $JOBS '*' 90 / 100`
50247      fi
50248    fi
50249    # Cap number of jobs to 16
50250    if test "$JOBS" -gt "16"; then
50251      JOBS=16
50252    fi
50253    if test "$JOBS" -eq "0"; then
50254      JOBS=1
50255    fi
50256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50257$as_echo "$JOBS" >&6; }
50258  else
50259    JOBS=$with_jobs
50260  fi
50261
50262
50263
50264# Setup arguments for the boot jdk (after cores and memory have been setup)
50265
50266  ##############################################################################
50267  #
50268  # Specify jvm options for anything that is run with the Boot JDK.
50269  # Not all JVM:s accept the same arguments on the command line.
50270  #
50271
50272# Check whether --with-boot-jdk-jvmargs was given.
50273if test "${with_boot_jdk_jvmargs+set}" = set; then :
50274  withval=$with_boot_jdk_jvmargs;
50275fi
50276
50277
50278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50279$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50280
50281  # Disable special log output when a debug build is used as Boot JDK...
50282
50283  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50284  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50285  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50286  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50287  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50288  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50289    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50290    JVM_ARG_OK=true
50291  else
50292    $ECHO "Arg failed:" >&5
50293    $ECHO "$OUTPUT" >&5
50294    JVM_ARG_OK=false
50295  fi
50296
50297
50298  # Apply user provided options.
50299
50300  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50301  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50302  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50303  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50304  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50305  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50306    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50307    JVM_ARG_OK=true
50308  else
50309    $ECHO "Arg failed:" >&5
50310    $ECHO "$OUTPUT" >&5
50311    JVM_ARG_OK=false
50312  fi
50313
50314
50315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50316$as_echo "$boot_jdk_jvmargs" >&6; }
50317
50318  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50319  JAVA_FLAGS=$boot_jdk_jvmargs
50320
50321
50322
50323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50324$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50325
50326  # Starting amount of heap memory.
50327
50328  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50329  $ECHO "Command: $JAVA -Xms64M -version" >&5
50330  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50331  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50332  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50333  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50334    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50335    JVM_ARG_OK=true
50336  else
50337    $ECHO "Arg failed:" >&5
50338    $ECHO "$OUTPUT" >&5
50339    JVM_ARG_OK=false
50340  fi
50341
50342
50343  # Maximum amount of heap memory.
50344  # Maximum stack size.
50345  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50346  if test "x$BUILD_NUM_BITS" = x32; then
50347    if test "$JVM_MAX_HEAP" -gt "1100"; then
50348      JVM_MAX_HEAP=1100
50349    elif test "$JVM_MAX_HEAP" -lt "512"; then
50350      JVM_MAX_HEAP=512
50351    fi
50352    STACK_SIZE=768
50353  else
50354    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50355    # pointers are used. Apparently, we need to increase the heap and stack
50356    # space for the jvm. More specifically, when running javac to build huge
50357    # jdk batch
50358    if test "$JVM_MAX_HEAP" -gt "1600"; then
50359      JVM_MAX_HEAP=1600
50360    elif test "$JVM_MAX_HEAP" -lt "512"; then
50361      JVM_MAX_HEAP=512
50362    fi
50363    STACK_SIZE=1536
50364  fi
50365
50366  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50367  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50368  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50369  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50370  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50371  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50372    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50373    JVM_ARG_OK=true
50374  else
50375    $ECHO "Arg failed:" >&5
50376    $ECHO "$OUTPUT" >&5
50377    JVM_ARG_OK=false
50378  fi
50379
50380
50381  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50382  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50383  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50384  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50385  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50386  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50387    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50388    JVM_ARG_OK=true
50389  else
50390    $ECHO "Arg failed:" >&5
50391    $ECHO "$OUTPUT" >&5
50392    JVM_ARG_OK=false
50393  fi
50394
50395
50396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50397$as_echo "$boot_jdk_jvmargs_big" >&6; }
50398
50399  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50400
50401
50402
50403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50404$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50405
50406  # Use serial gc for small short lived tools if possible
50407
50408  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50409  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50410  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50411  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50412  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50413  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50414    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50415    JVM_ARG_OK=true
50416  else
50417    $ECHO "Arg failed:" >&5
50418    $ECHO "$OUTPUT" >&5
50419    JVM_ARG_OK=false
50420  fi
50421
50422
50423  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50424  $ECHO "Command: $JAVA -Xms32M -version" >&5
50425  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50426  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50427  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50428  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50429    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50430    JVM_ARG_OK=true
50431  else
50432    $ECHO "Arg failed:" >&5
50433    $ECHO "$OUTPUT" >&5
50434    JVM_ARG_OK=false
50435  fi
50436
50437
50438  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50439  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50440  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50441  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50442  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50443  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50444    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50445    JVM_ARG_OK=true
50446  else
50447    $ECHO "Arg failed:" >&5
50448    $ECHO "$OUTPUT" >&5
50449    JVM_ARG_OK=false
50450  fi
50451
50452
50453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50454$as_echo "$boot_jdk_jvmargs_small" >&6; }
50455
50456  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50457
50458
50459  JAVA_TOOL_FLAGS_SMALL=""
50460  for f in $JAVA_FLAGS_SMALL; do
50461    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50462  done
50463
50464
50465
50466# Setup smart javac (after cores and memory have been setup)
50467
50468
50469# Check whether --with-sjavac-server-java was given.
50470if test "${with_sjavac_server_java+set}" = set; then :
50471  withval=$with_sjavac_server_java;
50472fi
50473
50474
50475  if test "x$with_sjavac_server_java" != x; then
50476    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50477    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50478    if test "x$FOUND_VERSION" = x; then
50479      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50480    fi
50481  else
50482    SJAVAC_SERVER_JAVA="$JAVA"
50483  fi
50484
50485
50486  if test "$MEMORY_SIZE" -gt "3000"; then
50487
50488  $ECHO "Check if jvm arg is ok: -d64" >&5
50489  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50490  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50491  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50492  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50493  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50494    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50495    JVM_ARG_OK=true
50496  else
50497    $ECHO "Arg failed:" >&5
50498    $ECHO "$OUTPUT" >&5
50499    JVM_ARG_OK=false
50500  fi
50501
50502    if test "$JVM_ARG_OK" = true; then
50503      JVM_64BIT=true
50504      JVM_ARG_OK=false
50505    fi
50506  fi
50507
50508  MX_VALUE=`expr $MEMORY_SIZE / 2`
50509  if test "$JVM_64BIT" = true; then
50510    # Set ms lower than mx since more than one instance of the server might
50511    # get launched at the same time before they figure out which instance won.
50512    MS_VALUE=512
50513    if test "$MX_VALUE" -gt "2048"; then
50514      MX_VALUE=2048
50515    fi
50516  else
50517    MS_VALUE=256
50518    if test "$MX_VALUE" -gt "1500"; then
50519      MX_VALUE=1500
50520    fi
50521  fi
50522  if test "$MX_VALUE" -lt "512"; then
50523    MX_VALUE=512
50524  fi
50525
50526  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50527  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50528  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50529  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50530  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50531  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50532    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50533    JVM_ARG_OK=true
50534  else
50535    $ECHO "Arg failed:" >&5
50536    $ECHO "$OUTPUT" >&5
50537    JVM_ARG_OK=false
50538  fi
50539
50540
50541
50542  # Check whether --enable-sjavac was given.
50543if test "${enable_sjavac+set}" = set; then :
50544  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50545else
50546  ENABLE_SJAVAC='no'
50547fi
50548
50549  if test "x$JVM_ARG_OK" = "xfalse"; then
50550    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50551$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50552    ENABLE_SJAVAC=no;
50553  fi
50554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50555$as_echo_n "checking whether to use sjavac... " >&6; }
50556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50557$as_echo "$ENABLE_SJAVAC" >&6; }
50558
50559
50560  if test "x$ENABLE_SJAVAC" = xyes; then
50561    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50562  else
50563    SJAVAC_SERVER_DIR=
50564  fi
50565
50566
50567
50568# Can the C/C++ compiler use precompiled headers?
50569
50570
50571  ###############################################################################
50572  #
50573  # Can the C/C++ compiler use precompiled headers?
50574  #
50575  # Check whether --enable-precompiled-headers was given.
50576if test "${enable_precompiled_headers+set}" = set; then :
50577  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50578else
50579  ENABLE_PRECOMPH=yes
50580fi
50581
50582
50583  USE_PRECOMPILED_HEADER=1
50584  if test "x$ENABLE_PRECOMPH" = xno; then
50585    USE_PRECOMPILED_HEADER=0
50586  fi
50587
50588  if test "x$ENABLE_PRECOMPH" = xyes; then
50589    # Check that the compiler actually supports precomp headers.
50590    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50591      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50592$as_echo_n "checking that precompiled headers work... " >&6; }
50593      echo "int alfa();" > conftest.h
50594      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50595      if test ! -f conftest.hpp.gch; then
50596        USE_PRECOMPILED_HEADER=0
50597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50598$as_echo "no" >&6; }
50599      else
50600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50601$as_echo "yes" >&6; }
50602      fi
50603      rm -f conftest.h conftest.hpp.gch
50604    fi
50605  fi
50606
50607
50608
50609
50610# Setup use of ccache, if available
50611
50612  # Check whether --enable-ccache was given.
50613if test "${enable_ccache+set}" = set; then :
50614  enableval=$enable_ccache;
50615fi
50616
50617
50618  CCACHE=
50619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50620$as_echo_n "checking is ccache enabled... " >&6; }
50621  ENABLE_CCACHE=$enable_ccache
50622  if test "x$enable_ccache" = xyes; then
50623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50624$as_echo "yes" >&6; }
50625    OLD_PATH="$PATH"
50626    if test "x$TOOLCHAIN_PATH" != x; then
50627      PATH=$TOOLCHAIN_PATH:$PATH
50628    fi
50629
50630
50631
50632  # Publish this variable in the help.
50633
50634
50635  if test "x$CCACHE" = x; then
50636    # The variable is not set by user, try to locate tool using the code snippet
50637    for ac_prog in ccache
50638do
50639  # Extract the first word of "$ac_prog", so it can be a program name with args.
50640set dummy $ac_prog; ac_word=$2
50641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50642$as_echo_n "checking for $ac_word... " >&6; }
50643if ${ac_cv_path_CCACHE+:} false; then :
50644  $as_echo_n "(cached) " >&6
50645else
50646  case $CCACHE in
50647  [\\/]* | ?:[\\/]*)
50648  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50649  ;;
50650  *)
50651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50652for as_dir in $PATH
50653do
50654  IFS=$as_save_IFS
50655  test -z "$as_dir" && as_dir=.
50656    for ac_exec_ext in '' $ac_executable_extensions; do
50657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50658    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50660    break 2
50661  fi
50662done
50663  done
50664IFS=$as_save_IFS
50665
50666  ;;
50667esac
50668fi
50669CCACHE=$ac_cv_path_CCACHE
50670if test -n "$CCACHE"; then
50671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50672$as_echo "$CCACHE" >&6; }
50673else
50674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50675$as_echo "no" >&6; }
50676fi
50677
50678
50679  test -n "$CCACHE" && break
50680done
50681
50682  else
50683    # The variable is set, but is it from the command line or the environment?
50684
50685    # Try to remove the string !CCACHE! from our list.
50686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50688      # If it failed, the variable was not from the command line. Ignore it,
50689      # but warn the user (except for BASH, which is always set by the calling BASH).
50690      if test "xCCACHE" != xBASH; then
50691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50692$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50693      fi
50694      # Try to locate tool using the code snippet
50695      for ac_prog in ccache
50696do
50697  # Extract the first word of "$ac_prog", so it can be a program name with args.
50698set dummy $ac_prog; ac_word=$2
50699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50700$as_echo_n "checking for $ac_word... " >&6; }
50701if ${ac_cv_path_CCACHE+:} false; then :
50702  $as_echo_n "(cached) " >&6
50703else
50704  case $CCACHE in
50705  [\\/]* | ?:[\\/]*)
50706  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50707  ;;
50708  *)
50709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50710for as_dir in $PATH
50711do
50712  IFS=$as_save_IFS
50713  test -z "$as_dir" && as_dir=.
50714    for ac_exec_ext in '' $ac_executable_extensions; do
50715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50716    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50718    break 2
50719  fi
50720done
50721  done
50722IFS=$as_save_IFS
50723
50724  ;;
50725esac
50726fi
50727CCACHE=$ac_cv_path_CCACHE
50728if test -n "$CCACHE"; then
50729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50730$as_echo "$CCACHE" >&6; }
50731else
50732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50733$as_echo "no" >&6; }
50734fi
50735
50736
50737  test -n "$CCACHE" && break
50738done
50739
50740    else
50741      # If it succeeded, then it was overridden by the user. We will use it
50742      # for the tool.
50743
50744      # First remove it from the list of overridden variables, so we can test
50745      # for unknown variables in the end.
50746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50747
50748      # Check if the provided tool contains a complete path.
50749      tool_specified="$CCACHE"
50750      tool_basename="${tool_specified##*/}"
50751      if test "x$tool_basename" = "x$tool_specified"; then
50752        # A command without a complete path is provided, search $PATH.
50753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50754$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50755        # Extract the first word of "$tool_basename", so it can be a program name with args.
50756set dummy $tool_basename; ac_word=$2
50757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50758$as_echo_n "checking for $ac_word... " >&6; }
50759if ${ac_cv_path_CCACHE+:} false; then :
50760  $as_echo_n "(cached) " >&6
50761else
50762  case $CCACHE in
50763  [\\/]* | ?:[\\/]*)
50764  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50765  ;;
50766  *)
50767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50768for as_dir in $PATH
50769do
50770  IFS=$as_save_IFS
50771  test -z "$as_dir" && as_dir=.
50772    for ac_exec_ext in '' $ac_executable_extensions; do
50773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50774    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50776    break 2
50777  fi
50778done
50779  done
50780IFS=$as_save_IFS
50781
50782  ;;
50783esac
50784fi
50785CCACHE=$ac_cv_path_CCACHE
50786if test -n "$CCACHE"; then
50787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50788$as_echo "$CCACHE" >&6; }
50789else
50790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50791$as_echo "no" >&6; }
50792fi
50793
50794
50795        if test "x$CCACHE" = x; then
50796          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50797        fi
50798      else
50799        # Otherwise we believe it is a complete path. Use it as it is.
50800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50801$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50803$as_echo_n "checking for CCACHE... " >&6; }
50804        if test ! -x "$tool_specified"; then
50805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50806$as_echo "not found" >&6; }
50807          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50808        fi
50809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50810$as_echo "$tool_specified" >&6; }
50811      fi
50812    fi
50813  fi
50814
50815
50816
50817  if test "x$CCACHE" = x; then
50818    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50819  fi
50820
50821
50822    CCACHE_STATUS="enabled"
50823    PATH="$OLD_PATH"
50824  elif test "x$enable_ccache" = xno; then
50825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50826$as_echo "no, explicitly disabled" >&6; }
50827  elif test "x$enable_ccache" = x; then
50828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50829$as_echo "no" >&6; }
50830  else
50831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50832$as_echo "unknown" >&6; }
50833    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50834  fi
50835
50836
50837
50838# Check whether --with-ccache-dir was given.
50839if test "${with_ccache_dir+set}" = set; then :
50840  withval=$with_ccache_dir;
50841fi
50842
50843
50844  if test "x$with_ccache_dir" != x; then
50845    # When using a non home ccache directory, assume the use is to share ccache files
50846    # with other users. Thus change the umask.
50847    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50848    if test "x$CCACHE" = x; then
50849      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50850$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50851    fi
50852  fi
50853
50854  if test "x$CCACHE" != x; then
50855
50856  if test "x$CCACHE" != x; then
50857    # Only use ccache if it is 3.1.4 or later, which supports
50858    # precompiled headers.
50859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
50860$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
50861    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
50862    if test "x$HAS_GOOD_CCACHE" = x; then
50863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
50864$as_echo "no, disabling ccache" >&6; }
50865      CCACHE=
50866      CCACHE_STATUS="disabled"
50867    else
50868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50869$as_echo "yes" >&6; }
50870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50871$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50872      PUSHED_FLAGS="$CXXFLAGS"
50873      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
50874      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50875/* end confdefs.h.  */
50876
50877int
50878main ()
50879{
50880
50881  ;
50882  return 0;
50883}
50884_ACEOF
50885if ac_fn_cxx_try_compile "$LINENO"; then :
50886  CC_KNOWS_CCACHE_TRICK=yes
50887else
50888  CC_KNOWS_CCACHE_TRICK=no
50889fi
50890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50891      CXXFLAGS="$PUSHED_FLAGS"
50892      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50894$as_echo "yes" >&6; }
50895      else
50896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
50897$as_echo "no, disabling ccaching of precompiled headers" >&6; }
50898        CCACHE=
50899        CCACHE_STATUS="disabled"
50900      fi
50901    fi
50902  fi
50903
50904  if test "x$CCACHE" != x; then
50905    CCACHE_SLOPPINESS=time_macros
50906    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
50907    CCACHE_FLAGS=-fpch-preprocess
50908
50909    if test "x$SET_CCACHE_DIR" != x; then
50910      mkdir -p $CCACHE_DIR > /dev/null 2>&1
50911      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50912    fi
50913  fi
50914
50915  fi
50916
50917
50918###############################################################################
50919#
50920# And now the finish...
50921#
50922###############################################################################
50923
50924# Check for some common pitfalls
50925
50926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50927    file_to_test="$SRC_ROOT/LICENSE"
50928    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50929      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
50930    fi
50931  fi
50932
50933
50934  # Did user specify any unknown variables?
50935
50936  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50937    # Replace the separating ! with spaces before presenting for end user.
50938    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50939    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50940$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50941  fi
50942
50943
50944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50945$as_echo_n "checking if build directory is on local disk... " >&6; }
50946
50947  # df -l lists only local disks; if the given directory is not found then
50948  # a non-zero exit code is given
50949  if test "x$DF" = x; then
50950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50951      # msys does not have df; use Windows "net use" instead.
50952      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50953      if test "x$IS_NETWORK_DISK" = x; then
50954        OUTPUT_DIR_IS_LOCAL="yes"
50955      else
50956        OUTPUT_DIR_IS_LOCAL="no"
50957      fi
50958    else
50959      # No df here, say it's local
50960      OUTPUT_DIR_IS_LOCAL="yes"
50961    fi
50962  else
50963    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50964      OUTPUT_DIR_IS_LOCAL="yes"
50965    else
50966      OUTPUT_DIR_IS_LOCAL="no"
50967    fi
50968  fi
50969
50970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50971$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50972
50973
50974
50975  # Check if the user has any old-style ALT_ variables set.
50976  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50977
50978  # Before generating output files, test if they exist. If they do, this is a reconfigure.
50979  # Since we can't properly handle the dependencies for this, warn the user about the situation
50980  if test -e $OUTPUT_ROOT/spec.gmk; then
50981    IS_RECONFIGURE=yes
50982  else
50983    IS_RECONFIGURE=no
50984  fi
50985
50986
50987# At the end, call the custom hook. (Dummy macro if no custom sources available)
50988
50989
50990# We're messing a bit with internal autoconf variables to put the config.status
50991# in the output directory instead of the current directory.
50992CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50993
50994# Create the actual output files. Now the main work of configure is done.
50995cat >confcache <<\_ACEOF
50996# This file is a shell script that caches the results of configure
50997# tests run on this system so they can be shared between configure
50998# scripts and configure runs, see configure's option --config-cache.
50999# It is not useful on other systems.  If it contains results you don't
51000# want to keep, you may remove or edit it.
51001#
51002# config.status only pays attention to the cache file if you give it
51003# the --recheck option to rerun configure.
51004#
51005# `ac_cv_env_foo' variables (set or unset) will be overridden when
51006# loading this file, other *unset* `ac_cv_foo' will be assigned the
51007# following values.
51008
51009_ACEOF
51010
51011# The following way of writing the cache mishandles newlines in values,
51012# but we know of no workaround that is simple, portable, and efficient.
51013# So, we kill variables containing newlines.
51014# Ultrix sh set writes to stderr and can't be redirected directly,
51015# and sets the high bit in the cache file unless we assign to the vars.
51016(
51017  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51018    eval ac_val=\$$ac_var
51019    case $ac_val in #(
51020    *${as_nl}*)
51021      case $ac_var in #(
51022      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51023$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51024      esac
51025      case $ac_var in #(
51026      _ | IFS | as_nl) ;; #(
51027      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51028      *) { eval $ac_var=; unset $ac_var;} ;;
51029      esac ;;
51030    esac
51031  done
51032
51033  (set) 2>&1 |
51034    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51035    *${as_nl}ac_space=\ *)
51036      # `set' does not quote correctly, so add quotes: double-quote
51037      # substitution turns \\\\ into \\, and sed turns \\ into \.
51038      sed -n \
51039	"s/'/'\\\\''/g;
51040	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51041      ;; #(
51042    *)
51043      # `set' quotes correctly as required by POSIX, so do not add quotes.
51044      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51045      ;;
51046    esac |
51047    sort
51048) |
51049  sed '
51050     /^ac_cv_env_/b end
51051     t clear
51052     :clear
51053     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51054     t end
51055     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51056     :end' >>confcache
51057if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51058  if test -w "$cache_file"; then
51059    if test "x$cache_file" != "x/dev/null"; then
51060      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51061$as_echo "$as_me: updating cache $cache_file" >&6;}
51062      if test ! -f "$cache_file" || test -h "$cache_file"; then
51063	cat confcache >"$cache_file"
51064      else
51065        case $cache_file in #(
51066        */* | ?:*)
51067	  mv -f confcache "$cache_file"$$ &&
51068	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51069        *)
51070	  mv -f confcache "$cache_file" ;;
51071	esac
51072      fi
51073    fi
51074  else
51075    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51076$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51077  fi
51078fi
51079rm -f confcache
51080
51081test "x$prefix" = xNONE && prefix=$ac_default_prefix
51082# Let make expand exec_prefix.
51083test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51084
51085# Transform confdefs.h into DEFS.
51086# Protect against shell expansion while executing Makefile rules.
51087# Protect against Makefile macro expansion.
51088#
51089# If the first sed substitution is executed (which looks for macros that
51090# take arguments), then branch to the quote section.  Otherwise,
51091# look for a macro that doesn't take arguments.
51092ac_script='
51093:mline
51094/\\$/{
51095 N
51096 s,\\\n,,
51097 b mline
51098}
51099t clear
51100:clear
51101s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51102t quote
51103s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51104t quote
51105b any
51106:quote
51107s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51108s/\[/\\&/g
51109s/\]/\\&/g
51110s/\$/$$/g
51111H
51112:any
51113${
51114	g
51115	s/^\n//
51116	s/\n/ /g
51117	p
51118}
51119'
51120DEFS=`sed -n "$ac_script" confdefs.h`
51121
51122
51123ac_libobjs=
51124ac_ltlibobjs=
51125U=
51126for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51127  # 1. Remove the extension, and $U if already installed.
51128  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51129  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51130  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51131  #    will be set to the directory where LIBOBJS objects are built.
51132  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51133  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51134done
51135LIBOBJS=$ac_libobjs
51136
51137LTLIBOBJS=$ac_ltlibobjs
51138
51139
51140
51141: "${CONFIG_STATUS=./config.status}"
51142ac_write_fail=0
51143ac_clean_files_save=$ac_clean_files
51144ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51145{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51146$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51147as_write_fail=0
51148cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51149#! $SHELL
51150# Generated by $as_me.
51151# Run this file to recreate the current configuration.
51152# Compiler output produced by configure, useful for debugging
51153# configure, is in config.log if it exists.
51154
51155debug=false
51156ac_cs_recheck=false
51157ac_cs_silent=false
51158
51159SHELL=\${CONFIG_SHELL-$SHELL}
51160export SHELL
51161_ASEOF
51162cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51163## -------------------- ##
51164## M4sh Initialization. ##
51165## -------------------- ##
51166
51167# Be more Bourne compatible
51168DUALCASE=1; export DUALCASE # for MKS sh
51169if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51170  emulate sh
51171  NULLCMD=:
51172  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51173  # is contrary to our usage.  Disable this feature.
51174  alias -g '${1+"$@"}'='"$@"'
51175  setopt NO_GLOB_SUBST
51176else
51177  case `(set -o) 2>/dev/null` in #(
51178  *posix*) :
51179    set -o posix ;; #(
51180  *) :
51181     ;;
51182esac
51183fi
51184
51185
51186as_nl='
51187'
51188export as_nl
51189# Printing a long string crashes Solaris 7 /usr/bin/printf.
51190as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51191as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51192as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51193# Prefer a ksh shell builtin over an external printf program on Solaris,
51194# but without wasting forks for bash or zsh.
51195if test -z "$BASH_VERSION$ZSH_VERSION" \
51196    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51197  as_echo='print -r --'
51198  as_echo_n='print -rn --'
51199elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51200  as_echo='printf %s\n'
51201  as_echo_n='printf %s'
51202else
51203  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51204    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51205    as_echo_n='/usr/ucb/echo -n'
51206  else
51207    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51208    as_echo_n_body='eval
51209      arg=$1;
51210      case $arg in #(
51211      *"$as_nl"*)
51212	expr "X$arg" : "X\\(.*\\)$as_nl";
51213	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51214      esac;
51215      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51216    '
51217    export as_echo_n_body
51218    as_echo_n='sh -c $as_echo_n_body as_echo'
51219  fi
51220  export as_echo_body
51221  as_echo='sh -c $as_echo_body as_echo'
51222fi
51223
51224# The user is always right.
51225if test "${PATH_SEPARATOR+set}" != set; then
51226  PATH_SEPARATOR=:
51227  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51228    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51229      PATH_SEPARATOR=';'
51230  }
51231fi
51232
51233
51234# IFS
51235# We need space, tab and new line, in precisely that order.  Quoting is
51236# there to prevent editors from complaining about space-tab.
51237# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51238# splitting by setting IFS to empty value.)
51239IFS=" ""	$as_nl"
51240
51241# Find who we are.  Look in the path if we contain no directory separator.
51242as_myself=
51243case $0 in #((
51244  *[\\/]* ) as_myself=$0 ;;
51245  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51246for as_dir in $PATH
51247do
51248  IFS=$as_save_IFS
51249  test -z "$as_dir" && as_dir=.
51250    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51251  done
51252IFS=$as_save_IFS
51253
51254     ;;
51255esac
51256# We did not find ourselves, most probably we were run as `sh COMMAND'
51257# in which case we are not to be found in the path.
51258if test "x$as_myself" = x; then
51259  as_myself=$0
51260fi
51261if test ! -f "$as_myself"; then
51262  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51263  exit 1
51264fi
51265
51266# Unset variables that we do not need and which cause bugs (e.g. in
51267# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51268# suppresses any "Segmentation fault" message there.  '((' could
51269# trigger a bug in pdksh 5.2.14.
51270for as_var in BASH_ENV ENV MAIL MAILPATH
51271do eval test x\${$as_var+set} = xset \
51272  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51273done
51274PS1='$ '
51275PS2='> '
51276PS4='+ '
51277
51278# NLS nuisances.
51279LC_ALL=C
51280export LC_ALL
51281LANGUAGE=C
51282export LANGUAGE
51283
51284# CDPATH.
51285(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51286
51287
51288# as_fn_error STATUS ERROR [LINENO LOG_FD]
51289# ----------------------------------------
51290# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51291# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51292# script with STATUS, using 1 if that was 0.
51293as_fn_error ()
51294{
51295  as_status=$1; test $as_status -eq 0 && as_status=1
51296  if test "$4"; then
51297    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51298    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51299  fi
51300  $as_echo "$as_me: error: $2" >&2
51301  as_fn_exit $as_status
51302} # as_fn_error
51303
51304
51305# as_fn_set_status STATUS
51306# -----------------------
51307# Set $? to STATUS, without forking.
51308as_fn_set_status ()
51309{
51310  return $1
51311} # as_fn_set_status
51312
51313# as_fn_exit STATUS
51314# -----------------
51315# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51316as_fn_exit ()
51317{
51318  set +e
51319  as_fn_set_status $1
51320  exit $1
51321} # as_fn_exit
51322
51323# as_fn_unset VAR
51324# ---------------
51325# Portably unset VAR.
51326as_fn_unset ()
51327{
51328  { eval $1=; unset $1;}
51329}
51330as_unset=as_fn_unset
51331# as_fn_append VAR VALUE
51332# ----------------------
51333# Append the text in VALUE to the end of the definition contained in VAR. Take
51334# advantage of any shell optimizations that allow amortized linear growth over
51335# repeated appends, instead of the typical quadratic growth present in naive
51336# implementations.
51337if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51338  eval 'as_fn_append ()
51339  {
51340    eval $1+=\$2
51341  }'
51342else
51343  as_fn_append ()
51344  {
51345    eval $1=\$$1\$2
51346  }
51347fi # as_fn_append
51348
51349# as_fn_arith ARG...
51350# ------------------
51351# Perform arithmetic evaluation on the ARGs, and store the result in the
51352# global $as_val. Take advantage of shells that can avoid forks. The arguments
51353# must be portable across $(()) and expr.
51354if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51355  eval 'as_fn_arith ()
51356  {
51357    as_val=$(( $* ))
51358  }'
51359else
51360  as_fn_arith ()
51361  {
51362    as_val=`expr "$@" || test $? -eq 1`
51363  }
51364fi # as_fn_arith
51365
51366
51367if expr a : '\(a\)' >/dev/null 2>&1 &&
51368   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51369  as_expr=expr
51370else
51371  as_expr=false
51372fi
51373
51374if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51375  as_basename=basename
51376else
51377  as_basename=false
51378fi
51379
51380if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51381  as_dirname=dirname
51382else
51383  as_dirname=false
51384fi
51385
51386as_me=`$as_basename -- "$0" ||
51387$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51388	 X"$0" : 'X\(//\)$' \| \
51389	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51390$as_echo X/"$0" |
51391    sed '/^.*\/\([^/][^/]*\)\/*$/{
51392	    s//\1/
51393	    q
51394	  }
51395	  /^X\/\(\/\/\)$/{
51396	    s//\1/
51397	    q
51398	  }
51399	  /^X\/\(\/\).*/{
51400	    s//\1/
51401	    q
51402	  }
51403	  s/.*/./; q'`
51404
51405# Avoid depending upon Character Ranges.
51406as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51407as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51408as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51409as_cr_digits='0123456789'
51410as_cr_alnum=$as_cr_Letters$as_cr_digits
51411
51412ECHO_C= ECHO_N= ECHO_T=
51413case `echo -n x` in #(((((
51414-n*)
51415  case `echo 'xy\c'` in
51416  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51417  xy)  ECHO_C='\c';;
51418  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51419       ECHO_T='	';;
51420  esac;;
51421*)
51422  ECHO_N='-n';;
51423esac
51424
51425rm -f conf$$ conf$$.exe conf$$.file
51426if test -d conf$$.dir; then
51427  rm -f conf$$.dir/conf$$.file
51428else
51429  rm -f conf$$.dir
51430  mkdir conf$$.dir 2>/dev/null
51431fi
51432if (echo >conf$$.file) 2>/dev/null; then
51433  if ln -s conf$$.file conf$$ 2>/dev/null; then
51434    as_ln_s='ln -s'
51435    # ... but there are two gotchas:
51436    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51437    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51438    # In both cases, we have to default to `cp -pR'.
51439    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51440      as_ln_s='cp -pR'
51441  elif ln conf$$.file conf$$ 2>/dev/null; then
51442    as_ln_s=ln
51443  else
51444    as_ln_s='cp -pR'
51445  fi
51446else
51447  as_ln_s='cp -pR'
51448fi
51449rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51450rmdir conf$$.dir 2>/dev/null
51451
51452
51453# as_fn_mkdir_p
51454# -------------
51455# Create "$as_dir" as a directory, including parents if necessary.
51456as_fn_mkdir_p ()
51457{
51458
51459  case $as_dir in #(
51460  -*) as_dir=./$as_dir;;
51461  esac
51462  test -d "$as_dir" || eval $as_mkdir_p || {
51463    as_dirs=
51464    while :; do
51465      case $as_dir in #(
51466      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51467      *) as_qdir=$as_dir;;
51468      esac
51469      as_dirs="'$as_qdir' $as_dirs"
51470      as_dir=`$as_dirname -- "$as_dir" ||
51471$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51472	 X"$as_dir" : 'X\(//\)[^/]' \| \
51473	 X"$as_dir" : 'X\(//\)$' \| \
51474	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51475$as_echo X"$as_dir" |
51476    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51477	    s//\1/
51478	    q
51479	  }
51480	  /^X\(\/\/\)[^/].*/{
51481	    s//\1/
51482	    q
51483	  }
51484	  /^X\(\/\/\)$/{
51485	    s//\1/
51486	    q
51487	  }
51488	  /^X\(\/\).*/{
51489	    s//\1/
51490	    q
51491	  }
51492	  s/.*/./; q'`
51493      test -d "$as_dir" && break
51494    done
51495    test -z "$as_dirs" || eval "mkdir $as_dirs"
51496  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51497
51498
51499} # as_fn_mkdir_p
51500if mkdir -p . 2>/dev/null; then
51501  as_mkdir_p='mkdir -p "$as_dir"'
51502else
51503  test -d ./-p && rmdir ./-p
51504  as_mkdir_p=false
51505fi
51506
51507
51508# as_fn_executable_p FILE
51509# -----------------------
51510# Test if FILE is an executable regular file.
51511as_fn_executable_p ()
51512{
51513  test -f "$1" && test -x "$1"
51514} # as_fn_executable_p
51515as_test_x='test -x'
51516as_executable_p=as_fn_executable_p
51517
51518# Sed expression to map a string onto a valid CPP name.
51519as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51520
51521# Sed expression to map a string onto a valid variable name.
51522as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51523
51524
51525exec 6>&1
51526## ----------------------------------- ##
51527## Main body of $CONFIG_STATUS script. ##
51528## ----------------------------------- ##
51529_ASEOF
51530test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51531
51532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51533# Save the log message, to keep $0 and so on meaningful, and to
51534# report actual input values of CONFIG_FILES etc. instead of their
51535# values after options handling.
51536ac_log="
51537This file was extended by OpenJDK $as_me jdk9, which was
51538generated by GNU Autoconf 2.69.  Invocation command line was
51539
51540  CONFIG_FILES    = $CONFIG_FILES
51541  CONFIG_HEADERS  = $CONFIG_HEADERS
51542  CONFIG_LINKS    = $CONFIG_LINKS
51543  CONFIG_COMMANDS = $CONFIG_COMMANDS
51544  $ $0 $@
51545
51546on `(hostname || uname -n) 2>/dev/null | sed 1q`
51547"
51548
51549_ACEOF
51550
51551case $ac_config_files in *"
51552"*) set x $ac_config_files; shift; ac_config_files=$*;;
51553esac
51554
51555
51556
51557cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51558# Files that config.status was made for.
51559config_files="$ac_config_files"
51560
51561_ACEOF
51562
51563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51564ac_cs_usage="\
51565\`$as_me' instantiates files and other configuration actions
51566from templates according to the current configuration.  Unless the files
51567and actions are specified as TAGs, all are instantiated by default.
51568
51569Usage: $0 [OPTION]... [TAG]...
51570
51571  -h, --help       print this help, then exit
51572  -V, --version    print version number and configuration settings, then exit
51573      --config     print configuration, then exit
51574  -q, --quiet, --silent
51575                   do not print progress messages
51576  -d, --debug      don't remove temporary files
51577      --recheck    update $as_me by reconfiguring in the same conditions
51578      --file=FILE[:TEMPLATE]
51579                   instantiate the configuration file FILE
51580
51581Configuration files:
51582$config_files
51583
51584Report bugs to <build-dev@openjdk.java.net>.
51585OpenJDK home page: <http://openjdk.java.net>."
51586
51587_ACEOF
51588cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51589ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51590ac_cs_version="\\
51591OpenJDK config.status jdk9
51592configured by $0, generated by GNU Autoconf 2.69,
51593  with options \\"\$ac_cs_config\\"
51594
51595Copyright (C) 2012 Free Software Foundation, Inc.
51596This config.status script is free software; the Free Software Foundation
51597gives unlimited permission to copy, distribute and modify it."
51598
51599ac_pwd='$ac_pwd'
51600srcdir='$srcdir'
51601AWK='$AWK'
51602test -n "\$AWK" || AWK=awk
51603_ACEOF
51604
51605cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51606# The default lists apply if the user does not specify any file.
51607ac_need_defaults=:
51608while test $# != 0
51609do
51610  case $1 in
51611  --*=?*)
51612    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51613    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51614    ac_shift=:
51615    ;;
51616  --*=)
51617    ac_option=`expr "X$1" : 'X\([^=]*\)='`
51618    ac_optarg=
51619    ac_shift=:
51620    ;;
51621  *)
51622    ac_option=$1
51623    ac_optarg=$2
51624    ac_shift=shift
51625    ;;
51626  esac
51627
51628  case $ac_option in
51629  # Handling of the options.
51630  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51631    ac_cs_recheck=: ;;
51632  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51633    $as_echo "$ac_cs_version"; exit ;;
51634  --config | --confi | --conf | --con | --co | --c )
51635    $as_echo "$ac_cs_config"; exit ;;
51636  --debug | --debu | --deb | --de | --d | -d )
51637    debug=: ;;
51638  --file | --fil | --fi | --f )
51639    $ac_shift
51640    case $ac_optarg in
51641    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51642    '') as_fn_error $? "missing file argument" ;;
51643    esac
51644    as_fn_append CONFIG_FILES " '$ac_optarg'"
51645    ac_need_defaults=false;;
51646  --he | --h |  --help | --hel | -h )
51647    $as_echo "$ac_cs_usage"; exit ;;
51648  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51649  | -silent | --silent | --silen | --sile | --sil | --si | --s)
51650    ac_cs_silent=: ;;
51651
51652  # This is an error.
51653  -*) as_fn_error $? "unrecognized option: \`$1'
51654Try \`$0 --help' for more information." ;;
51655
51656  *) as_fn_append ac_config_targets " $1"
51657     ac_need_defaults=false ;;
51658
51659  esac
51660  shift
51661done
51662
51663ac_configure_extra_args=
51664
51665if $ac_cs_silent; then
51666  exec 6>/dev/null
51667  ac_configure_extra_args="$ac_configure_extra_args --silent"
51668fi
51669
51670_ACEOF
51671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51672if \$ac_cs_recheck; then
51673  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51674  shift
51675  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51676  CONFIG_SHELL='$SHELL'
51677  export CONFIG_SHELL
51678  exec "\$@"
51679fi
51680
51681_ACEOF
51682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51683exec 5>>config.log
51684{
51685  echo
51686  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51687## Running $as_me. ##
51688_ASBOX
51689  $as_echo "$ac_log"
51690} >&5
51691
51692_ACEOF
51693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51694_ACEOF
51695
51696cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51697
51698# Handling of arguments.
51699for ac_config_target in $ac_config_targets
51700do
51701  case $ac_config_target in
51702    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51703    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51704    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51705    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51706    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51707
51708  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51709  esac
51710done
51711
51712
51713# If the user did not use the arguments to specify the items to instantiate,
51714# then the envvar interface is used.  Set only those that are not.
51715# We use the long form for the default assignment because of an extremely
51716# bizarre bug on SunOS 4.1.3.
51717if $ac_need_defaults; then
51718  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51719fi
51720
51721# Have a temporary directory for convenience.  Make it in the build tree
51722# simply because there is no reason against having it here, and in addition,
51723# creating and moving files from /tmp can sometimes cause problems.
51724# Hook for its removal unless debugging.
51725# Note that there is a small window in which the directory will not be cleaned:
51726# after its creation but before its name has been assigned to `$tmp'.
51727$debug ||
51728{
51729  tmp= ac_tmp=
51730  trap 'exit_status=$?
51731  : "${ac_tmp:=$tmp}"
51732  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51733' 0
51734  trap 'as_fn_exit 1' 1 2 13 15
51735}
51736# Create a (secure) tmp directory for tmp files.
51737
51738{
51739  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51740  test -d "$tmp"
51741}  ||
51742{
51743  tmp=./conf$$-$RANDOM
51744  (umask 077 && mkdir "$tmp")
51745} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51746ac_tmp=$tmp
51747
51748# Set up the scripts for CONFIG_FILES section.
51749# No need to generate them if there are no CONFIG_FILES.
51750# This happens for instance with `./config.status config.h'.
51751if test -n "$CONFIG_FILES"; then
51752
51753
51754ac_cr=`echo X | tr X '\015'`
51755# On cygwin, bash can eat \r inside `` if the user requested igncr.
51756# But we know of no other shell where ac_cr would be empty at this
51757# point, so we can use a bashism as a fallback.
51758if test "x$ac_cr" = x; then
51759  eval ac_cr=\$\'\\r\'
51760fi
51761ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51762if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51763  ac_cs_awk_cr='\\r'
51764else
51765  ac_cs_awk_cr=$ac_cr
51766fi
51767
51768echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51769_ACEOF
51770
51771
51772{
51773  echo "cat >conf$$subs.awk <<_ACEOF" &&
51774  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51775  echo "_ACEOF"
51776} >conf$$subs.sh ||
51777  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51778ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51779ac_delim='%!_!# '
51780for ac_last_try in false false false false false :; do
51781  . ./conf$$subs.sh ||
51782    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51783
51784  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51785  if test $ac_delim_n = $ac_delim_num; then
51786    break
51787  elif $ac_last_try; then
51788    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51789  else
51790    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51791  fi
51792done
51793rm -f conf$$subs.sh
51794
51795cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51796cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51797_ACEOF
51798sed -n '
51799h
51800s/^/S["/; s/!.*/"]=/
51801p
51802g
51803s/^[^!]*!//
51804:repl
51805t repl
51806s/'"$ac_delim"'$//
51807t delim
51808:nl
51809h
51810s/\(.\{148\}\)..*/\1/
51811t more1
51812s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51813p
51814n
51815b repl
51816:more1
51817s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51818p
51819g
51820s/.\{148\}//
51821t nl
51822:delim
51823h
51824s/\(.\{148\}\)..*/\1/
51825t more2
51826s/["\\]/\\&/g; s/^/"/; s/$/"/
51827p
51828b
51829:more2
51830s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51831p
51832g
51833s/.\{148\}//
51834t delim
51835' <conf$$subs.awk | sed '
51836/^[^""]/{
51837  N
51838  s/\n//
51839}
51840' >>$CONFIG_STATUS || ac_write_fail=1
51841rm -f conf$$subs.awk
51842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51843_ACAWK
51844cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51845  for (key in S) S_is_set[key] = 1
51846  FS = ""
51847
51848}
51849{
51850  line = $ 0
51851  nfields = split(line, field, "@")
51852  substed = 0
51853  len = length(field[1])
51854  for (i = 2; i < nfields; i++) {
51855    key = field[i]
51856    keylen = length(key)
51857    if (S_is_set[key]) {
51858      value = S[key]
51859      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51860      len += length(value) + length(field[++i])
51861      substed = 1
51862    } else
51863      len += 1 + keylen
51864  }
51865
51866  print line
51867}
51868
51869_ACAWK
51870_ACEOF
51871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51872if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51873  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51874else
51875  cat
51876fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51877  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51878_ACEOF
51879
51880# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51881# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51882# trailing colons and then remove the whole line if VPATH becomes empty
51883# (actually we leave an empty line to preserve line numbers).
51884if test "x$srcdir" = x.; then
51885  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
51886h
51887s///
51888s/^/:/
51889s/[	 ]*$/:/
51890s/:\$(srcdir):/:/g
51891s/:\${srcdir}:/:/g
51892s/:@srcdir@:/:/g
51893s/^:*//
51894s/:*$//
51895x
51896s/\(=[	 ]*\).*/\1/
51897G
51898s/\n//
51899s/^[^=]*=[	 ]*$//
51900}'
51901fi
51902
51903cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51904fi # test -n "$CONFIG_FILES"
51905
51906
51907eval set X "  :F $CONFIG_FILES      "
51908shift
51909for ac_tag
51910do
51911  case $ac_tag in
51912  :[FHLC]) ac_mode=$ac_tag; continue;;
51913  esac
51914  case $ac_mode$ac_tag in
51915  :[FHL]*:*);;
51916  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51917  :[FH]-) ac_tag=-:-;;
51918  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51919  esac
51920  ac_save_IFS=$IFS
51921  IFS=:
51922  set x $ac_tag
51923  IFS=$ac_save_IFS
51924  shift
51925  ac_file=$1
51926  shift
51927
51928  case $ac_mode in
51929  :L) ac_source=$1;;
51930  :[FH])
51931    ac_file_inputs=
51932    for ac_f
51933    do
51934      case $ac_f in
51935      -) ac_f="$ac_tmp/stdin";;
51936      *) # Look for the file first in the build tree, then in the source tree
51937	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
51938	 # because $ac_f cannot contain `:'.
51939	 test -f "$ac_f" ||
51940	   case $ac_f in
51941	   [\\/$]*) false;;
51942	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51943	   esac ||
51944	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51945      esac
51946      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51947      as_fn_append ac_file_inputs " '$ac_f'"
51948    done
51949
51950    # Let's still pretend it is `configure' which instantiates (i.e., don't
51951    # use $as_me), people would be surprised to read:
51952    #    /* config.h.  Generated by config.status.  */
51953    configure_input='Generated from '`
51954	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51955	`' by configure.'
51956    if test x"$ac_file" != x-; then
51957      configure_input="$ac_file.  $configure_input"
51958      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51959$as_echo "$as_me: creating $ac_file" >&6;}
51960    fi
51961    # Neutralize special characters interpreted by sed in replacement strings.
51962    case $configure_input in #(
51963    *\&* | *\|* | *\\* )
51964       ac_sed_conf_input=`$as_echo "$configure_input" |
51965       sed 's/[\\\\&|]/\\\\&/g'`;; #(
51966    *) ac_sed_conf_input=$configure_input;;
51967    esac
51968
51969    case $ac_tag in
51970    *:-:* | *:-) cat >"$ac_tmp/stdin" \
51971      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51972    esac
51973    ;;
51974  esac
51975
51976  ac_dir=`$as_dirname -- "$ac_file" ||
51977$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51978	 X"$ac_file" : 'X\(//\)[^/]' \| \
51979	 X"$ac_file" : 'X\(//\)$' \| \
51980	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51981$as_echo X"$ac_file" |
51982    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51983	    s//\1/
51984	    q
51985	  }
51986	  /^X\(\/\/\)[^/].*/{
51987	    s//\1/
51988	    q
51989	  }
51990	  /^X\(\/\/\)$/{
51991	    s//\1/
51992	    q
51993	  }
51994	  /^X\(\/\).*/{
51995	    s//\1/
51996	    q
51997	  }
51998	  s/.*/./; q'`
51999  as_dir="$ac_dir"; as_fn_mkdir_p
52000  ac_builddir=.
52001
52002case "$ac_dir" in
52003.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52004*)
52005  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52006  # A ".." for each directory in $ac_dir_suffix.
52007  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52008  case $ac_top_builddir_sub in
52009  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52010  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52011  esac ;;
52012esac
52013ac_abs_top_builddir=$ac_pwd
52014ac_abs_builddir=$ac_pwd$ac_dir_suffix
52015# for backward compatibility:
52016ac_top_builddir=$ac_top_build_prefix
52017
52018case $srcdir in
52019  .)  # We are building in place.
52020    ac_srcdir=.
52021    ac_top_srcdir=$ac_top_builddir_sub
52022    ac_abs_top_srcdir=$ac_pwd ;;
52023  [\\/]* | ?:[\\/]* )  # Absolute name.
52024    ac_srcdir=$srcdir$ac_dir_suffix;
52025    ac_top_srcdir=$srcdir
52026    ac_abs_top_srcdir=$srcdir ;;
52027  *) # Relative name.
52028    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52029    ac_top_srcdir=$ac_top_build_prefix$srcdir
52030    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52031esac
52032ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52033
52034
52035  case $ac_mode in
52036  :F)
52037  #
52038  # CONFIG_FILE
52039  #
52040
52041_ACEOF
52042
52043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52044# If the template does not know about datarootdir, expand it.
52045# FIXME: This hack should be removed a few years after 2.60.
52046ac_datarootdir_hack=; ac_datarootdir_seen=
52047ac_sed_dataroot='
52048/datarootdir/ {
52049  p
52050  q
52051}
52052/@datadir@/p
52053/@docdir@/p
52054/@infodir@/p
52055/@localedir@/p
52056/@mandir@/p'
52057case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52058*datarootdir*) ac_datarootdir_seen=yes;;
52059*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52060  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52061$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52062_ACEOF
52063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52064  ac_datarootdir_hack='
52065  s&@datadir@&$datadir&g
52066  s&@docdir@&$docdir&g
52067  s&@infodir@&$infodir&g
52068  s&@localedir@&$localedir&g
52069  s&@mandir@&$mandir&g
52070  s&\\\${datarootdir}&$datarootdir&g' ;;
52071esac
52072_ACEOF
52073
52074# Neutralize VPATH when `$srcdir' = `.'.
52075# Shell code in configure.ac might set extrasub.
52076# FIXME: do we really want to maintain this feature?
52077cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52078ac_sed_extra="$ac_vpsub
52079$extrasub
52080_ACEOF
52081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52082:t
52083/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52084s|@configure_input@|$ac_sed_conf_input|;t t
52085s&@top_builddir@&$ac_top_builddir_sub&;t t
52086s&@top_build_prefix@&$ac_top_build_prefix&;t t
52087s&@srcdir@&$ac_srcdir&;t t
52088s&@abs_srcdir@&$ac_abs_srcdir&;t t
52089s&@top_srcdir@&$ac_top_srcdir&;t t
52090s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52091s&@builddir@&$ac_builddir&;t t
52092s&@abs_builddir@&$ac_abs_builddir&;t t
52093s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52094$ac_datarootdir_hack
52095"
52096eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52097  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52098
52099test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52100  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52101  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52102      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52103  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52104which seems to be undefined.  Please make sure it is defined" >&5
52105$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52106which seems to be undefined.  Please make sure it is defined" >&2;}
52107
52108  rm -f "$ac_tmp/stdin"
52109  case $ac_file in
52110  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52111  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52112  esac \
52113  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52114 ;;
52115
52116
52117
52118  esac
52119
52120done # for ac_tag
52121
52122
52123as_fn_exit 0
52124_ACEOF
52125ac_clean_files=$ac_clean_files_save
52126
52127test $ac_write_fail = 0 ||
52128  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52129
52130
52131# configure is writing to config.log, and then calls config.status.
52132# config.status does its own redirection, appending to config.log.
52133# Unfortunately, on DOS this fails, as config.log is still kept open
52134# by configure, so config.status won't be able to write to it; its
52135# output is simply discarded.  So we exec the FD to /dev/null,
52136# effectively closing config.log, so it can be properly (re)opened and
52137# appended to by config.status.  When coming back to configure, we
52138# need to make the FD available again.
52139if test "$no_create" != yes; then
52140  ac_cs_success=:
52141  ac_config_status_args=
52142  test "$silent" = yes &&
52143    ac_config_status_args="$ac_config_status_args --quiet"
52144  exec 5>/dev/null
52145  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52146  exec 5>>config.log
52147  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52148  # would make configure fail if this is the last instruction.
52149  $ac_cs_success || as_fn_exit 1
52150fi
52151if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52152  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52153$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52154fi
52155
52156
52157# Try to move the config.log file to the output directory.
52158if test -e ./config.log; then
52159  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52160fi
52161
52162# Make the compare script executable
52163$CHMOD +x $OUTPUT_ROOT/compare.sh
52164
52165# Finally output some useful information to the user
52166
52167  # Finally output some useful information to the user
52168
52169  printf "\n"
52170  printf "====================================================\n"
52171  if test "x$no_create" != "xyes"; then
52172    if test "x$IS_RECONFIGURE" != "xyes"; then
52173      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52174    else
52175      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52176    fi
52177  else
52178    if test "x$IS_RECONFIGURE" != "xyes"; then
52179      printf "A configuration has been successfully checked but not created\n"
52180    else
52181      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52182    fi
52183  fi
52184  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52185    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52186  else
52187    printf "using default settings.\n"
52188  fi
52189
52190  printf "\n"
52191  printf "Configuration summary:\n"
52192  printf "* Debug level:    $DEBUG_LEVEL\n"
52193  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52194  printf "* JDK variant:    $JDK_VARIANT\n"
52195  printf "* JVM variants:   $with_jvm_variants\n"
52196  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52197
52198  printf "\n"
52199  printf "Tools summary:\n"
52200  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52201    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52202  fi
52203  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52204  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52205  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52206  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52207
52208  printf "\n"
52209  printf "Build performance summary:\n"
52210  printf "* Cores to use:   $JOBS\n"
52211  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52212  if test "x$CCACHE_STATUS" != "x"; then
52213    printf "* ccache status:  $CCACHE_STATUS\n"
52214  fi
52215  printf "\n"
52216
52217  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52218    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52219    printf "will result in longer build times.\n"
52220    printf "\n"
52221  fi
52222
52223  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52224    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52225    printf "These are not respected, and will be ignored. It is recommended\n"
52226    printf "that you clean your environment. The following variables are set:\n"
52227    printf "$FOUND_ALT_VARIABLES\n"
52228    printf "\n"
52229  fi
52230
52231  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52232    printf "WARNING: Your build output directory is not on a local disk.\n"
52233    printf "This will severely degrade build performance!\n"
52234    printf "It is recommended that you create an output directory on a local disk,\n"
52235    printf "and run the configure script again from that directory.\n"
52236    printf "\n"
52237  fi
52238
52239  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52240    printf "WARNING: The result of this configuration has overridden an older\n"
52241    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52242    printf "proper build. Failure to do so might result in strange build problems.\n"
52243    printf "\n"
52244  fi
52245
52246  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52247    printf "WARNING: The result of this configuration was not saved.\n"
52248    printf "You should run without '--no-create | -n' to create the configuration.\n"
52249    printf "\n"
52250  fi
52251
52252
52253
52254if test -e "$OUTPUT_ROOT/config.log"; then
52255  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52256  if test $? -eq 0; then
52257    printf "The following warnings were produced. Repeated here for convenience:\n"
52258    # We must quote sed expression (using []) to stop m4 from eating the [].
52259    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52260    printf "\n"
52261  fi
52262fi
52263
52264
52265